Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit d0649ba

Browse files
committed
Merge branch 'master' into csformatter
2 parents 7f98c89 + 6de90c4 commit d0649ba

16 files changed

Lines changed: 128 additions & 134 deletions

File tree

src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecTestDebugger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace ICSharpCode.MachineSpecifications
2828
public class MSpecTestDebugger : TestDebuggerBase
2929
{
3030
public MSpecTestDebugger()
31-
: base(new UnitTestDebuggerService(), SD.MessageService, new MSpecUnitTestMonitor())
31+
: base(SD.Debugger, SD.MessageService, new MSpecUnitTestMonitor())
3232
{
3333
}
3434

src/AddIns/Analysis/UnitTesting/Interfaces/UnitTestDebuggerService.cs

Lines changed: 0 additions & 117 deletions
This file was deleted.

src/AddIns/Analysis/UnitTesting/NUnit/NUnitTestDebugger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class NUnitTestDebugger : TestDebuggerBase
3131
UnitTestingOptions options;
3232

3333
public NUnitTestDebugger()
34-
: this(new UnitTestDebuggerService(),
34+
: this(SD.Debugger,
3535
SD.MessageService,
3636
new TestResultsReader(),
3737
UnitTestingOptions.Instance.Clone())

src/AddIns/Analysis/UnitTesting/TestRunner/TestDebuggerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class TestDebuggerBase : TestRunnerBase
3333
ITestResultsReader testResultsReader;
3434

3535
public TestDebuggerBase()
36-
: this(new UnitTestDebuggerService(),
36+
: this(SD.Debugger,
3737
SD.MessageService,
3838
new TestResultsReader())
3939
{

src/AddIns/Analysis/UnitTesting/UnitTesting.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
<Compile Include="Commands\RunningTestsCondition.cs" />
5757
<Compile Include="Commands\TestableCondition.cs" />
5858
<Compile Include="Commands\UnitTestCommands.cs" />
59-
<Compile Include="Interfaces\UnitTestDebuggerService.cs" />
6059
<Compile Include="Pad\UnitTestNodeFactory.cs" />
6160
<Compile Include="Service\ITestService.cs" />
6261
<Compile Include="Model\ITest.cs" />

src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ public void Dispose()
7878

7979
public void Draw(TextView textView, DrawingContext drawingContext)
8080
{
81+
var codeEditorOptions = editor.Options as ICodeEditorOptions;
82+
if ((codeEditorOptions != null) && !codeEditorOptions.HighlightSymbol) {
83+
// User has disabled highlighting of symbols
84+
return;
85+
}
86+
8187
if (currentReferences == null) {
8288
if (textView.VisualLines.Count == 0)
8389
return;

src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static CSharpFormattingOptionsPersistence GetProjectOptions(IProject proj
101101
if (!projectOptions.ContainsKey(key)) {
102102
// Lazily create options container for project
103103
projectOptions[key] = new CSharpFormattingOptionsPersistence(
104-
csproject.ExtensionProperties,
104+
csproject.GlobalPreferences,
105105
new CSharpFormattingOptionsContainer((SolutionOptions ?? GlobalOptions).OptionsContainer)
106106
{
107107
DefaultText = StringParser.Parse("${res:CSharpBinding.Formatting.ProjectOptionReference}")

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ namespace CSharpBinding
3939
/// </summary>
4040
public class CSharpProject : CompilableProject
4141
{
42-
const string ExtensionPropertiesName = "SharpDevelopExtensions";
43-
Properties extensionProperties;
42+
Properties globalPreferences;
43+
FileName globalSettingsFileName;
4444

4545
public override IAmbience GetAmbience()
4646
{
@@ -66,6 +66,8 @@ public Version LanguageVersion {
6666

6767
void Init()
6868
{
69+
globalPreferences = new Properties();
70+
6971
reparseReferencesSensitiveProperties.Add("TargetFrameworkVersion");
7072
reparseCodeSensitiveProperties.Add("DefineConstants");
7173
reparseCodeSensitiveProperties.Add("AllowUnsafeBlocks");
@@ -124,28 +126,32 @@ public CompilerSettings CompilerSettings {
124126
}
125127
}
126128

127-
public Properties ExtensionProperties
129+
public Properties GlobalPreferences
128130
{
129131
get {
130-
return extensionProperties;
132+
return globalPreferences;
131133
}
132134
}
133135

134136
public override void ProjectLoaded()
135137
{
136138
base.ProjectLoaded();
137139

138-
// Load project extensions
139-
extensionProperties = Properties.Load(LoadProjectExtensions(ExtensionPropertiesName));
140+
// Load SD settings file
141+
globalSettingsFileName = new FileName(FileName + ".sdsettings");
142+
if (File.Exists(globalSettingsFileName)) {
143+
globalPreferences = Properties.Load(globalSettingsFileName);
144+
}
145+
if (globalPreferences == null)
146+
globalPreferences = new Properties();
140147
}
141148

142149
public override void Save(string fileName)
143150
{
144151
// Save project extensions
145-
if (extensionProperties != null && extensionProperties.IsDirty) {
146-
var propertiesXElement = extensionProperties.Save();
147-
SaveProjectExtensions(ExtensionPropertiesName, propertiesXElement);
148-
extensionProperties.IsDirty = false;
152+
if (globalPreferences != null && globalPreferences.IsDirty) {
153+
globalPreferences.Save(new FileName(fileName + ".sdsettings"));
154+
globalPreferences.IsDirty = false;
149155
}
150156
base.Save(fileName);
151157
}

src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlOutlineContentHost.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ XamlOutlineNode BuildNode(AXmlElement item)
118118
void TreeViewMouseDoubleClick(object sender, MouseButtonEventArgs e)
119119
{
120120
XamlOutlineNode node = treeView.SelectedItem as XamlOutlineNode;
121+
if (node == null) return;
121122
editor.Select(node.Marker.Offset, node.EndMarker.Offset - node.Marker.Offset);
122123
}
123124

src/AddIns/Debugger/Debugger.AddIn/Pads/AutoCompleteTextBox.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ void editor_TextArea_TextEntered(object sender, TextCompositionEventArgs e)
140140
var binding = DebuggerDotCompletion.PrepareDotCompletion(editor.Text.Substring(0, editor.CaretOffset), context);
141141
if (binding == null) return;
142142
binding.HandleKeyPressed(editorAdapter, '.');
143+
SD.ParserService.ParseFileAsync(context.FileName).FireAndForget();
143144
} else {
144145
// TODO : implement automated error checking CSharpParser.ParseExpression does not report useful error messages.
145146
// Error[] errors;

0 commit comments

Comments
 (0)