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

Commit fea3b5a

Browse files
committed
WIP: newNR integration
1 parent c61a9b1 commit fea3b5a

40 files changed

Lines changed: 807 additions & 607 deletions

doc/technotes/AddInTree.rtf

Lines changed: 506 additions & 261 deletions
Large diffs are not rendered by default.

doc/technotes/BuildSystem.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ projects which have no dependencies and are ready to be built, and projects whic
2020
The build engine calls StartBuild concurrently on up to buildOptions.ParallelBuild* projects which are ready. Whenever a project finishes building sucessfully,
2121
the engine checks whether this causes any other projects to become available to be built.
2222
If there are more projects available to be built than parallel builds are allowed, then the scheduling algorithm tries to maximize the amount of projects
23-
that are available by first picking those projects that cause the most other projects to become available.
23+
that are available in the future by first picking those projects that cause the most other projects to become available
24+
(have the most projects depending on them).

src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void ParserServiceParseInformationUpdated(object sender, ParseInformationEventAr
544544
this.VerifyAccess();
545545
// When parse information is updated quickly in succession, only do a single update
546546
// to the latest version.
547-
updateParseInfoTo = e.NewParseInformation;
547+
updateParseInfoTo = e.NewParsedFile;
548548
this.Dispatcher.BeginInvoke(
549549
DispatcherPriority.Background,
550550
new Action(

src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchAndReplaceDialog.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ protected override void OnKeyDown(KeyEventArgs e)
9999
Close();
100100
} else if (searchKeyboardShortcut == e.KeyData && !searchButton.Checked) {
101101
EnableSearchMode(true);
102+
e.Handled = true;
102103
} else if (replaceKeyboardShortcut == e.KeyData && !replaceButton.Checked) {
103104
EnableSearchMode(false);
105+
e.Handled = true;
104106
}
105107
}
106108

src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextAnchor.cs

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,52 +51,21 @@ public TextDocument Document {
5151
get { return document; }
5252
}
5353

54-
/// <summary>
55-
/// Controls how the anchor moves.
56-
/// </summary>
57-
/// <remarks>Anchor movement is ambiguous if text is inserted exactly at the anchor's location.
58-
/// Does the anchor stay before the inserted text, or does it move after it?
59-
/// The property <see cref="MovementType"/> will be used to determine which of these two options the anchor will choose.
60-
/// The default value is <see cref="AnchorMovementType.Default"/>.</remarks>
54+
/// <inheritdoc/>
6155
public AnchorMovementType MovementType { get; set; }
6256

63-
/// <summary>
64-
/// <para>
65-
/// Specifies whether the anchor survives deletion of the text containing it.
66-
/// </para><para>
67-
/// <c>false</c>: The anchor is deleted when the a selection that includes the anchor is deleted.
68-
/// <c>true</c>: The anchor is not deleted.
69-
/// </para>
70-
/// </summary>
71-
/// <remarks><inheritdoc cref="IsDeleted" /></remarks>
57+
/// <inheritdoc/>
7258
public bool SurviveDeletion { get; set; }
7359

74-
/// <summary>
75-
/// Gets whether the anchor was deleted.
76-
/// </summary>
77-
/// <remarks>
78-
/// <para>When a piece of text containing an anchor is removed, then that anchor will be deleted.
79-
/// First, the <see cref="IsDeleted"/> property is set to true on all deleted anchors,
80-
/// then the <see cref="Deleted"/> events are raised.
81-
/// You cannot retrieve the offset from an anchor that has been deleted.</para>
82-
/// <para>This deletion behavior might be useful when using anchors for building a bookmark feature,
83-
/// but in other cases you want to still be able to use the anchor. For those cases, set <c><see cref="SurviveDeletion"/> = true</c>.</para>
84-
/// </remarks>
60+
/// <inheritdoc/>
8561
public bool IsDeleted {
8662
get {
8763
document.DebugVerifyAccess();
8864
return node == null;
8965
}
9066
}
9167

92-
/// <summary>
93-
/// Occurs after the anchor was deleted.
94-
/// </summary>
95-
/// <remarks>
96-
/// <inheritdoc cref="IsDeleted" />
97-
/// <para>Due to the 'weak reference' nature of TextAnchor, you will receive the Deleted event only
98-
/// while your code holds a reference to the TextAnchor object.</para>
99-
/// </remarks>
68+
/// <inheritdoc/>
10069
public event EventHandler Deleted;
10170

10271
internal void OnDeleted(DelayedEvents delayedEvents)

src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<Doozer name="ProjectBinding" class="ICSharpCode.SharpDevelop.ProjectBindingDoozer"/>
4141
<Doozer name="LanguageBinding" class="ICSharpCode.SharpDevelop.LanguageBindingDoozer"/>
4242
<Doozer name="Parser" class="ICSharpCode.SharpDevelop.ParserDoozer"/>
43-
<Doozer name="ProjectContentRegistry" class="ICSharpCode.SharpDevelop.ProjectContentRegistryDoozer"/>
4443
<Doozer name="BrowserSchemeExtension" class="ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer"/>
4544
<Doozer name="CodeCompletionBinding" class="ICSharpCode.SharpDevelop.Editor.CodeCompletion.CodeCompletionBindingDoozer"/>
4645
<Doozer name="Debugger" class="ICSharpCode.SharpDevelop.Debugging.DebuggerDoozer"/>
@@ -2173,21 +2172,6 @@
21732172
<String id = "System.Xml.Linq" text = "System.Xml.Linq"/>
21742173
</Path>
21752174

2176-
<Path name = "/Workspace/ProjectContentRegistry">
2177-
<ComplexCondition>
2178-
<Or>
2179-
<Condition name = "ProjectActive" activeproject="C#"/>
2180-
<Condition name = "ProjectActive" activeproject="VBNet"/>
2181-
</Or>
2182-
<Condition name = "CompareProjectProperty" property = "SharpDevelopTargetFrameworkVersion" equals = "CF 2.0">
2183-
<ProjectContentRegistry id="NetCF20" class="ICSharpCode.SharpDevelop.NetCF20ProjectContentRegistry"/>
2184-
</Condition>
2185-
<Condition name = "CompareProjectProperty" property = "SharpDevelopTargetFrameworkVersion" equals = "CF 3.5">
2186-
<ProjectContentRegistry id="NetCF35" class="ICSharpCode.SharpDevelop.NetCF35ProjectContentRegistry"/>
2187-
</Condition>
2188-
</ComplexCondition>
2189-
</Path>
2190-
21912175
<Path name = "/SharpDevelop/BackendBindings/TemplateCommands">
21922176
<Class id="AddDotNet35ReferencesIfTargetFrameworkIs35"
21932177
class="ICSharpCode.SharpDevelop.Project.Commands.AddDotNet35ReferencesIfTargetFrameworkIs35Command"/>

src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@
333333
<Compile Include="Src\Services\File\FileEventArgs.cs" />
334334
<Compile Include="Src\Services\ParserService\AssemblyParserService.cs" />
335335
<Compile Include="Src\Services\ParserService\DomAssemblyName.cs" />
336+
<Compile Include="Src\Services\ParserService\ParseInformation.cs" />
336337
<Compile Include="Src\Services\ParserService\LoadSolutionProjects.cs" />
337338
<Compile Include="Src\Services\ParserService\ParserService.cs" />
338339
<Compile Include="Src\Services\ProjectService\CompileModifiedProjectsOnly.cs" />
@@ -367,6 +368,7 @@
367368
<Compile Include="Src\Services\RefactoringService\GoToClassAction.cs" />
368369
<Compile Include="Src\Services\RefactoringService\GoToMemberAction.cs" />
369370
<Compile Include="Src\Services\Tasks\ErrorPainter.cs" />
371+
<Compile Include="Src\Services\Tasks\TagComment.cs" />
370372
<Compile Include="Src\Services\Tasks\Task.cs" />
371373
<Compile Include="Src\Services\Tasks\TaskService.cs" />
372374
<Compile Include="Src\Services\DisplayBinding\IDisplayBinding.cs" />
@@ -740,8 +742,6 @@
740742
<Compile Include="Src\Project\BuildError.cs" />
741743
<Compile Include="Src\Services\HelpProvider.cs" />
742744
<Compile Include="Src\Services\ParserService\CodeCompletionOptions.cs" />
743-
<Compile Include="Src\Services\ParserService\Doozer\ProjectContentRegistryDescriptor.cs" />
744-
<Compile Include="Src\Services\ParserService\Doozer\ProjectContentRegistryDoozer.cs" />
745745
<Compile Include="Src\Internal\ConditionEvaluators\CompareProjectPropertyConditionEvaluator.cs" />
746746
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\SolutionConfigurationEditor.Designer.cs">
747747
<DependentUpon>SolutionConfigurationEditor.cs</DependentUpon>

src/Main/Base/Project/Src/Bookmarks/BookmarkBase.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public IDocument Document {
2626
if (document != value) {
2727
if (anchor != null) {
2828
location = anchor.Location;
29-
anchor = null;
3029
}
3130
document = value;
3231
CreateAnchor();
@@ -37,6 +36,11 @@ public IDocument Document {
3736

3837
void CreateAnchor()
3938
{
39+
if (anchor != null) {
40+
// Detach from Deleted event: don't delete the bookmark
41+
// if the anchor at the old position is deleted after the anchor was moved
42+
anchor.Deleted -= AnchorDeleted;
43+
}
4044
if (document != null) {
4145
int lineNumber = Math.Max(1, Math.Min(location.Line, document.LineCount));
4246
int lineLength = document.GetLineByNumber(lineNumber).Length;

src/Main/Base/Project/Src/Bookmarks/BookmarkConverter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
4545
scriptLanguage = v[6];
4646
script = v[7];
4747

48-
var bbm = new Debugging.BreakpointBookmark(fileName, new TextLocation(columnNumber, lineNumber), action, scriptLanguage, script);
48+
var bbm = new Debugging.BreakpointBookmark(fileName, new TextLocation(lineNumber, columnNumber), action, scriptLanguage, script);
4949
bbm.IsEnabled = bool.Parse(v[4]);
5050
bbm.Action = action;
5151
bbm.ScriptLanguage = scriptLanguage;
@@ -59,15 +59,15 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
5959
int ilfrom = Convert.ToInt32(v[8]);
6060
int ilto = Convert.ToInt32(v[9]);
6161

62-
bbm = new DecompiledBreakpointBookmark(null, ilfrom, ilto, fileName, new Location(columnNumber, lineNumber), action, scriptLanguage, script);
62+
bbm = new DecompiledBreakpointBookmark(null, ilfrom, ilto, fileName, new TextLocation(lineNumber, columnNumber), action, scriptLanguage, script);
6363
bbm.IsEnabled = bool.Parse(v[4]);
6464
bbm.Action = action;
6565
bbm.ScriptLanguage = scriptLanguage;
6666
bbm.Condition = script;
6767
bookmark = bbm;
6868
break;
6969
case "PinBookmark":
70-
var pin = new PinBookmark(fileName, new TextLocation(columnNumber, lineNumber));
70+
var pin = new PinBookmark(fileName, new TextLocation(lineNumber, columnNumber));
7171
pin.Comment = v[4];
7272
pin.PinPosition =
7373
new Point
@@ -85,7 +85,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
8585
bookmark = pin;
8686
break;
8787
default:
88-
bookmark = new Bookmark(fileName, new TextLocation(columnNumber, lineNumber));
88+
bookmark = new Bookmark(fileName, new TextLocation(lineNumber, columnNumber));
8989
break;
9090
}
9191
return bookmark;

src/Main/Base/Project/Src/Bookmarks/BookmarkManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static void ToggleBookmark(ITextEditor editor, int line,
119119
// no bookmark at that line: create a new bookmark
120120
int lineStartOffset = editor.Document.GetLineByNumber(line).Offset;
121121
int column = 1 + DocumentUtilitites.GetWhitespaceAfter(editor.Document, lineStartOffset).Length;
122-
BookmarkManager.AddMark(bookmarkFactory(new TextLocation(column, line)));
122+
BookmarkManager.AddMark(bookmarkFactory(new TextLocation(line, column)));
123123
}
124124

125125
public static void RemoveAll(Predicate<SDBookmark> match)

0 commit comments

Comments
 (0)