Skip to content

Commit f8632ba

Browse files
authored
Merge pull request #2633 from comintern/next
Super minor changes in VBComponent, add AvalonEdit attribution.
2 parents 2c8016f + 45c8155 commit f8632ba

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ LibGit2Sharp is the library that has allowed us to integrate Git right into the
8181
8282
Which basically means it's a reimplementation of Git in C. It also [happens to be the technology Microsoft uses for their own Git integration with Visual Studio](http://www.hanselman.com/blog/GitSupportForVisualStudioGitTFSAndVSPutIntoContext.aspx).
8383

84+
###[AvalonEdit](http://avalonedit.net)
85+
86+
Source code looks a lot better with syntax highlighting, and AvalonEdit excels at it.
87+
88+
> AvalonEdit is a WPF-based text editor component. It was written by [Daniel Grunwald](https://github.com/dgrunwald) for the [SharpDevelop](http://www.icsharpcode.net/OpenSource/SD/) IDE. Starting with version 5.0, AvalonEdit is released under the [MIT license](http://opensource.org/licenses/MIT).
89+
90+
We're currently only using a tiny bit of this code editor's functionality (more to come!).
91+
8492
###[WPF Localization Using RESX Files](http://www.codeproject.com/Articles/35159/WPF-Localization-Using-RESX-Files)
8593

8694
This library makes localizing WPF applications at runtime using resx files a breeze. Thank you [Grant Frisken](http://www.codeproject.com/script/Membership/View.aspx?mid=1079060)!

Rubberduck.VBEEditor/SafeComWrappers/VBA/VBComponent.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ public string ExportAsSourceFile(string folder)
131131

132132
public IVBProject ParentProject
133133
{
134-
get
135-
{
136-
return Collection != null ? Collection.Parent : null;
137-
}
134+
get { return Collection.Parent; }
138135
}
139136

140137
private void ExportUserFormModule(string path)

Rubberduck.VBEEditor/SafeComWrappers/VBA/VBComponents.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public IVBComponent this[object index]
4242

4343
public void Remove(IVBComponent item)
4444
{
45-
if (!IsWrappingNullReference) Target.Remove((VB.VBComponent)item.Target);
45+
if (item != null && item.Target != null && !IsWrappingNullReference)
46+
{
47+
Target.Remove((VB.VBComponent)item.Target);
48+
}
4649
}
4750

4851
public IVBComponent Add(ComponentType type)

RubberduckTests/Mocks/MockVbeBuilder.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public MockVbeBuilder AddProject(Mock<IVBProject> project)
6868

6969
_vbe.SetupGet(vbe => vbe.ActiveVBProject).Returns(project.Object);
7070
_vbe.SetupGet(vbe => vbe.Version).Returns("7.1");
71-
72-
_vbProjects = CreateProjectsMock();
7371
_vbe.SetupGet(m => m.VBProjects).Returns(() => _vbProjects.Object);
7472

7573
return this;

0 commit comments

Comments
 (0)