Roslyn: VB: Code preview tooltip should work for collapsed methods with attributes applied.

Created on 5 Jun 2018  路  1Comment  路  Source: dotnet/roslyn

Version Used:

Visual Studio Community 2017 v15.5.6

Steps to Reproduce:

Type in the following code into a VB project:


Imports System.Runtime.CompilerServices

Public Module SomeModule
  <Extension>
  Public Sub WillNotShowPreviewWhenFolded(ArgFoo As Object)
    'this will NOT be visible in the preview tooltip.
  End Sub

  Public Sub WorksJustAsExpected(ArgFoo As Integer)
    'this WILL be visible in the preview tooltip.
  End Sub
End Module

When the two methods above are collapsed using the editor's outlining/folding feature, if you hover over the WorksJustAsExpected method, you get a preview of the method's body as expected (I have drawn a red rectangle around the tooltip):

vs_outlining_tooltips_working

However, if you hover over the WillNotShowPreviewWhenFolded method which has the Extension attribute applied, the code preview tooltip only shows the keyword Public (again I have drawn a red rectangle around the tooltip):

vs_outlining_tooltips_broken

Expected Behavior:

The only difference between the two methods is the Extension attribute applied to one of them. I have tested this with several other attributes and the result is the same: the code preview tooltip trips up somewhere along the way and doesn't show the full preview. In any case, a preview should be shown for both methods :+1:

Area-IDE Bug Resolution-Fixed

Most helpful comment

@jinujoseph @JieCarolHu thanks a lot for working on this :+1:

>All comments

@jinujoseph @JieCarolHu thanks a lot for working on this :+1:

Was this page helpful?
0 / 5 - 0 ratings