Browse Source
Conflicts: src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs src/AddIns/BackendBindings/CppBinding/CppBinding/Project/CppProject.cs src/AddIns/BackendBindings/FSharpBinding/FSharpProject.cs src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ContextActionsRenderer.cs src/Libraries/NRefactory/Project/Src/Parser/CSharp/CSharpParser.cs src/Libraries/NRefactory/Test/Parser/Expressions/UnaryOperatorExpressionTests.cs src/Main/Base/Project/Src/Project/CompilableProject.csnewNRvisualizers
80 changed files with 1135 additions and 476 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<!-- Enable mixed-mode CLRv2 assemblies. --> |
||||
<startup useLegacyV2RuntimeActivationPolicy="true"> |
||||
<supportedRuntime version="v4.0" /> |
||||
</startup> |
||||
|
||||
<runtime> |
||||
<!-- Enable loading assemblies from network shares or downloaded from the internet. --> |
||||
<loadFromRemoteSources enabled="true"/> |
||||
</runtime> |
||||
</configuration> |
||||
Binary file not shown.
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<!-- Enable mixed-mode CLRv2 assemblies. --> |
||||
<startup useLegacyV2RuntimeActivationPolicy="true"> |
||||
<supportedRuntime version="v4.0" /> |
||||
</startup> |
||||
|
||||
<runtime> |
||||
<!-- Enable loading assemblies from network shares or downloaded from the internet. --> |
||||
<loadFromRemoteSources enabled="true"/> |
||||
</runtime> |
||||
</configuration> |
||||
@ -1,42 +1,37 @@
@@ -1,42 +1,37 @@
|
||||
<gui:OptionPanel x:Class="Debugger.AddIn.Options.DebuggingOptionsPanel" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:sd="http://icsharpcode.net/sharpdevelop/core" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" |
||||
xmlns:debugger="clr-namespace:ICSharpCode.SharpDevelop.Services;assembly=Debugger.AddIn" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"> |
||||
<StackPanel> |
||||
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping}"> |
||||
<widgets:StackPanelWithSpacing SpaceBetweenItems="5"> |
||||
<CheckBox x:Name="chbEnableJustMyCode" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.EnableJustMyCode}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.EnableJustMyCode}" /> |
||||
<CheckBox x:Name="chbStepOverNoSymbols" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverNoSymbols}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverNoSymbols}" /> |
||||
<CheckBox x:Name="chbStepOverDebuggerAttributes" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverDebuggerAttributes}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverDebuggerAttributes}" /> |
||||
|
||||
<CheckBox x:Name="chbStepOverAllProperties" |
||||
Checked="ChbStepOverAllProperties_CheckedChanged" |
||||
Unchecked="ChbStepOverAllProperties_CheckedChanged" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverAllProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverAllProperties}" /> |
||||
<CheckBox x:Name="chbStepOverSingleLineProperties" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverSingleLineProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverSingleLineProperties}" /> |
||||
<CheckBox x:Name="chbStepOverFieldAccessProperties" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverFieldAccessProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverFieldAccessProperties}" /> |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:sd="http://icsharpcode.net/sharpdevelop/core" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" |
||||
xmlns:debugger="clr-namespace:ICSharpCode.SharpDevelop.Services;assembly=Debugger.AddIn" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"> |
||||
<StackPanel> |
||||
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping}"> |
||||
<widgets:StackPanelWithSpacing SpaceBetweenItems="5"> |
||||
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.DecompileCodeWithoutSymbols}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.DecompileCodeWithoutSymbols}" /> |
||||
<CheckBox x:Name="chbStepOverDebuggerAttributes" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverDebuggerAttributes}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverDebuggerAttributes}" /> |
||||
<CheckBox x:Name="chbStepOverAllProperties" |
||||
Checked="ChbStepOverAllProperties_CheckedChanged" |
||||
Unchecked="ChbStepOverAllProperties_CheckedChanged" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverAllProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverAllProperties}" /> |
||||
<CheckBox x:Name="chbStepOverSingleLineProperties" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverSingleLineProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverSingleLineProperties}" /> |
||||
<CheckBox x:Name="chbStepOverFieldAccessProperties" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverFieldAccessProperties}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverFieldAccessProperties}" /> |
||||
</widgets:StackPanelWithSpacing> |
||||
</GroupBox> |
||||
</GroupBox> |
||||
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Exceptions}"> |
||||
<widgets:StackPanelWithSpacing SpaceBetweenItems="5"> |
||||
<CheckBox x:Name="chbPauseOnHandledExceptions" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.PauseOnHandledExceptions}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.PauseOnHandledExceptions}" /> |
||||
<CheckBox x:Name="chbPauseOnHandledExceptions" |
||||
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.PauseOnHandledExceptions}" |
||||
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.PauseOnHandledExceptions}" /> |
||||
</widgets:StackPanelWithSpacing> |
||||
</GroupBox> |
||||
</StackPanel> |
||||
</StackPanel> |
||||
</gui:OptionPanel> |
||||
@ -0,0 +1,154 @@
@@ -0,0 +1,154 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Reflection; |
||||
using System.Text; |
||||
|
||||
namespace Debugger |
||||
{ |
||||
/// <summary>
|
||||
/// Description of IDStringProvider.
|
||||
/// </summary>
|
||||
public static class IDStringProvider |
||||
{ |
||||
/// <summary>
|
||||
/// Gets the ID string (C# 4.0 spec, §A.3.1) for the specified entity.
|
||||
/// </summary>
|
||||
public static string GetIDString(MemberInfo member) |
||||
{ |
||||
StringBuilder b = new StringBuilder(); |
||||
if (member is Type) { |
||||
b.Append("T:"); |
||||
AppendTypeName(b, (Type)member); |
||||
} else { |
||||
if (member is FieldInfo) |
||||
b.Append("F:"); |
||||
else if (member is PropertyInfo) |
||||
b.Append("P:"); |
||||
else if (member is EventInfo) |
||||
b.Append("E:"); |
||||
else if (member is MethodBase) |
||||
b.Append("M:"); |
||||
AppendTypeName(b, member.DeclaringType); |
||||
b.Append('.'); |
||||
b.Append(member.Name.Replace('.', '#')); |
||||
IList<ParameterInfo> parameters; |
||||
Type explicitReturnType = null; |
||||
if (member is PropertyInfo) { |
||||
parameters = ((PropertyInfo)member).GetIndexParameters(); |
||||
} else if (member is MethodInfo) { |
||||
MethodInfo mr = (MethodInfo)member; |
||||
if (mr.IsGenericMethod) { |
||||
b.Append("``"); |
||||
b.Append(mr.GetGenericArguments().Length); |
||||
} |
||||
parameters = mr.GetParameters(); |
||||
if (mr.Name == "op_Implicit" || mr.Name == "op_Explicit") { |
||||
explicitReturnType = mr.ReturnType; |
||||
} |
||||
} else { |
||||
parameters = null; |
||||
} |
||||
if (parameters != null && parameters.Count > 0) { |
||||
b.Append('('); |
||||
for (int i = 0; i < parameters.Count; i++) { |
||||
if (i > 0) b.Append(','); |
||||
AppendTypeName(b, parameters[i].ParameterType); |
||||
} |
||||
b.Append(')'); |
||||
} |
||||
if (explicitReturnType != null) { |
||||
b.Append('~'); |
||||
AppendTypeName(b, explicitReturnType); |
||||
} |
||||
} |
||||
return b.ToString(); |
||||
} |
||||
|
||||
static void AppendTypeName(StringBuilder b, Type type) |
||||
{ |
||||
if (type == null) { |
||||
return; |
||||
} |
||||
if (type.IsGenericType) { |
||||
AppendTypeNameWithArguments(b, type.GetElementType(), type.GetGenericArguments()); |
||||
} else if (type.HasElementType) { |
||||
AppendTypeName(b, type.GetElementType()); |
||||
if (type.IsArray) { |
||||
b.Append('['); |
||||
if (type.GetArrayRank() > 1) { |
||||
for (int i = 0; i < type.GetArrayRank(); i++) { |
||||
if (i > 0) |
||||
b.Append(','); |
||||
b.Append("0:"); |
||||
} |
||||
} |
||||
b.Append(']'); |
||||
} |
||||
if (type.IsByRef) { |
||||
b.Append('@'); |
||||
} |
||||
if (type.IsPointer) { |
||||
b.Append('*'); |
||||
} |
||||
} else { |
||||
if (type.IsGenericParameter) { |
||||
b.Append('`'); |
||||
if (type.DeclaringMethod != null) { |
||||
b.Append('`'); |
||||
} |
||||
b.Append(type.GenericParameterPosition); |
||||
} else if (type.DeclaringType != null) { |
||||
AppendTypeName(b, type.DeclaringType); |
||||
b.Append('.'); |
||||
b.Append(type.Name); |
||||
} else { |
||||
b.Append(type.FullName); |
||||
} |
||||
} |
||||
} |
||||
|
||||
static int AppendTypeNameWithArguments(StringBuilder b, Type type, IList<Type> genericArguments) |
||||
{ |
||||
int outerTypeParameterCount = 0; |
||||
if (type.DeclaringType != null) { |
||||
Type declType = type.DeclaringType; |
||||
outerTypeParameterCount = AppendTypeNameWithArguments(b, declType, genericArguments); |
||||
b.Append('.'); |
||||
} else if (!string.IsNullOrEmpty(type.Namespace)) { |
||||
b.Append(type.Namespace); |
||||
b.Append('.'); |
||||
} |
||||
int localTypeParameterCount = 0; |
||||
b.Append(SplitTypeParameterCountFromReflectionName(type.Name, out localTypeParameterCount)); |
||||
|
||||
if (localTypeParameterCount > 0) { |
||||
int totalTypeParameterCount = outerTypeParameterCount + localTypeParameterCount; |
||||
b.Append('{'); |
||||
for (int i = outerTypeParameterCount; i < totalTypeParameterCount && i < genericArguments.Count; i++) { |
||||
if (i > outerTypeParameterCount) b.Append(','); |
||||
AppendTypeName(b, genericArguments[i]); |
||||
} |
||||
b.Append('}'); |
||||
} |
||||
return outerTypeParameterCount + localTypeParameterCount; |
||||
} |
||||
|
||||
static string SplitTypeParameterCountFromReflectionName(string reflectionName, out int typeParameterCount) |
||||
{ |
||||
int pos = reflectionName.LastIndexOf('`'); |
||||
if (pos < 0) { |
||||
typeParameterCount = 0; |
||||
return reflectionName; |
||||
} else { |
||||
string typeCount = reflectionName.Substring(pos + 1); |
||||
if (int.TryParse(typeCount, out typeParameterCount)) |
||||
return reflectionName.Substring(0, pos); |
||||
else |
||||
return reflectionName; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,57 +0,0 @@
@@ -1,57 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Editor.CodeCompletion; |
||||
using ICSharpCode.XmlEditor; |
||||
using NUnit.Framework; |
||||
using XmlEditor.Tests.Utils; |
||||
|
||||
namespace XmlEditor.Tests.Completion |
||||
{ |
||||
[TestFixture] |
||||
public class NamespaceCompletionWindowTestFixture : NamespaceCompletionWindowTestFixtureBase |
||||
{ |
||||
[SetUp] |
||||
public void Init() |
||||
{ |
||||
base.InitBase(); |
||||
|
||||
XmlCodeCompletionBinding completionBinding = new XmlCodeCompletionBinding(associations); |
||||
keyPressResult = completionBinding.HandleKeyPress(textEditor, '='); |
||||
} |
||||
|
||||
[Test] |
||||
public void KeyPressResultIsCompletedAfterPressingEqualsSign() |
||||
{ |
||||
Assert.AreEqual(CodeCompletionKeyPressResult.Completed, keyPressResult); |
||||
} |
||||
|
||||
[Test] |
||||
public void CompletionWindowWidthSetToMatchLongestNamespaceTextWidth() |
||||
{ |
||||
Assert.AreEqual(double.NaN, textEditor.CompletionWindowDisplayed.Width); |
||||
} |
||||
|
||||
[Test] |
||||
public void ExpectedCompletionDataItems() |
||||
{ |
||||
XmlCompletionItemCollection expectedItems = new XmlCompletionItemCollection(); |
||||
expectedItems.Add(new XmlCompletionItem("a", XmlCompletionItemType.NamespaceUri)); |
||||
expectedItems.Add(new XmlCompletionItem("b", XmlCompletionItemType.NamespaceUri)); |
||||
expectedItems.Add(new XmlCompletionItem("c", XmlCompletionItemType.NamespaceUri)); |
||||
|
||||
Assert.AreEqual(expectedItems.ToArray(), textEditor.CompletionItemsDisplayedToArray()); |
||||
} |
||||
|
||||
[Test] |
||||
public void TextEditorDocumentGetTextCalledWithOffsetAndLength() |
||||
{ |
||||
TextSection expectedTextSection = new TextSection(0, 8); |
||||
Assert.AreEqual(expectedTextSection, textEditor.MockDocument.GetTextSectionUsedWithGetTextMethod()); |
||||
} |
||||
} |
||||
} |
||||
@ -1,41 +1,39 @@
@@ -1,41 +1,39 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 14.11.2011 |
||||
* Time: 19:48 |
||||
* |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections; |
||||
using System.ComponentModel; |
||||
using System.IO; |
||||
using System.Globalization; |
||||
using System.Linq; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.Core; |
||||
using System.Windows.Data; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
public class StorageLocationConverter:System.Windows.Data.IMultiValueConverter |
||||
public class StorageLocationConverter : IMultiValueConverter |
||||
{ |
||||
|
||||
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
// Console.WriteLine ("Convert");
|
||||
// foreach (var element in values) {
|
||||
// Console.WriteLine(element.ToString());
|
||||
// }
|
||||
return values[0]; |
||||
} |
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) |
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
||||
{ |
||||
return Enumerable.Repeat(value, targetTypes.Length).ToArray(); |
||||
} |
||||
} |
||||
|
||||
public class StartActionToBooleanConverter : IValueConverter |
||||
{ |
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
return (StartAction)value == (StartAction)parameter; |
||||
} |
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
var s = Array.ConvertAll<Type, Object>(targetTypes, t => value); |
||||
return s; |
||||
if ((bool)value) |
||||
return parameter; |
||||
return Binding.DoNothing; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Loading…
Reference in new issue