Skip to content

Commit ca44716

Browse files
committed
Updated version number; fixed code explorer enum and UDT members to show below their parent type, and fixed off-by-one selection bug.
1 parent 68b257f commit ca44716

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

RetailCoder.VBE/Extensions/CodePaneExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void SetSelection(this CodePane codePane, int lineNumber)
6666
/// <param name="selection"></param>
6767
public static void SetSelection(this CodePane codePane, Selection selection)
6868
{
69-
codePane.SetSelection(selection.StartLine, selection.StartColumn, selection.EndLine, selection.EndColumn + 1);
69+
codePane.SetSelection(selection.StartLine, selection.StartColumn, selection.EndLine, selection.EndColumn);
7070
codePane.ForceFocus();
7171
}
7272

RetailCoder.VBE/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.22.*")]
35-
[assembly: AssemblyFileVersion("1.22.0.0")]
34+
[assembly: AssemblyVersion("1.3.*")]
35+
[assembly: AssemblyFileVersion("1.3.0.0")]

RetailCoder.VBE/UI/CodeExplorer/CodeExplorerDockablePresenter.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,13 @@ private async Task<IEnumerable<TreeNode>> CreateModuleNodesAsync(VBProject proje
319319

320320
foreach (var declaration in members)
321321
{
322+
if (declaration.DeclarationType == DeclarationType.UserDefinedTypeMember
323+
|| declaration.DeclarationType == DeclarationType.EnumerationMember)
324+
{
325+
// these ones are handled by their respective parent
326+
continue;
327+
}
328+
322329
var text = GetNodeText(declaration);
323330
var child = new TreeNode(text);
324331
child.ImageKey = GetImageKeyForDeclaration(declaration);
@@ -329,7 +336,10 @@ private async Task<IEnumerable<TreeNode>> CreateModuleNodesAsync(VBProject proje
329336
|| declaration.DeclarationType == DeclarationType.Enumeration)
330337
{
331338
var subDeclaration = declaration;
332-
var subMembers = parseResult.Declarations.Items.Where(item => item.ParentScope == subDeclaration.Scope + "." + subDeclaration.IdentifierName);
339+
var subMembers = parseResult.Declarations.Items.Where(item =>
340+
(item.DeclarationType == DeclarationType.EnumerationMember || item.DeclarationType == DeclarationType.UserDefinedTypeMember)
341+
&& item.Context.Parent.Equals(subDeclaration.Context));
342+
333343
foreach (var subMember in subMembers)
334344
{
335345
var subChild = new TreeNode(subMember.IdentifierName);

0 commit comments

Comments
 (0)