Skip to content

Commit

Permalink
VB.Net Code Element Positions: Fixing issue codecadwallader#333
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Huttinger committed May 5, 2017
1 parent d474939 commit ba6bae6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CodeMaid/Model/CodeItems/BaseCodeItemElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected BaseCodeItemElement()
/// <summary>
/// Gets the start point adjusted for leading comments, may be null.
/// </summary>
public override EditPoint StartPoint => CodeElement != null ? GetStartPointAdjustedForComments(CodeElement.StartPoint) : null;
public override EditPoint StartPoint => CodeElement != null ? GetStartPointAdjustedForComments(CodeElement.GetStartPoint(vsCMPart.vsCMPartWholeWithAttributes)) : null;

/// <summary>
/// Gets the end point, may be null.
Expand All @@ -66,10 +66,10 @@ public override void LoadLazyInitializedValues()
/// </summary>
public override void RefreshCachedPositionAndName()
{
StartLine = CodeElement.StartPoint.Line;
StartOffset = CodeElement.StartPoint.AbsoluteCharOffset;
EndLine = CodeElement.EndPoint.Line;
EndOffset = CodeElement.EndPoint.AbsoluteCharOffset;
StartLine = CodeElement.GetStartPoint(vsCMPart.vsCMPartWholeWithAttributes).Line;
StartOffset = CodeElement.GetStartPoint(vsCMPart.vsCMPartWholeWithAttributes).AbsoluteCharOffset;
EndLine = CodeElement.GetEndPoint(vsCMPart.vsCMPartWholeWithAttributes).Line;
EndOffset = CodeElement.GetEndPoint(vsCMPart.vsCMPartWholeWithAttributes).AbsoluteCharOffset;
Name = CodeElement.Name;
}

Expand Down

0 comments on commit ba6bae6

Please sign in to comment.