Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA 2393: incomplete member names in Nav bar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2097 Posts

Posted - Feb 02 2021 :  08:00:46 AM  Show Profile  Reply with Quote
As you can see on the screenshot, for whatever reason, some members of the System.Windows.Forms.ToolStripItem class are shown without the class name. The class info is provided by the automatic metadata when doing a "goto definition"



The decompiled source from the metadata:



You have to enable "Enable navigation to decompiled sources" in VS2019

feline
Whole Tomato Software

United Kingdom
17186 Posts

Posted - Feb 02 2021 :  09:35:54 AM  Show Profile  Reply with Quote
Using VS2019 and C#, I have added the line:

ToolStripItem localFoo;

to a function in 3 different C# projects. One is a standard C# project, one is a C# 8 project and one is a C# 9 project. In all three cases I needed to get the IDE to add something to the file / project before the type was picked up.

F12 then takes me to the file "ToolStripItem.cs", deep under the %TEMP% directory, generated from metadata.

In all three cases there is no sign of the problem, and the DefaultPadding entry is the line:

protected virtual Padding DefaultPadding { get; }

so I am guessing that the specific version of things is a factor here, starting with the version of C# and the version of .NET that is being used for the project.

Turning to the syntax used here for "DefaultPadding" I have the following C# 8 example of properties in one of my test files:

internal interface ITestCSharp8
{
	string TestString { get; set; }
	public string TestStringDef { get { return string.Empty; } } // in C#8 properties can have default implementations
	public bool TestBool() { return true; }
	public int TestIntDef => 1;
	public void TestMethod();
}

and for this interface, the class is shown for all of the members, including "TestIntDef" in the Alt-M list.

All of this is working with VS2019 version 16.8.4 and VA 2399.0, which has just been posted to our downloads page:

http://www.wholetomato.com/downloads/default.asp

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2097 Posts

Posted - Feb 02 2021 :  09:56:36 AM  Show Profile  Reply with Quote
VS 2019, 18.8.4, VA 2393 (still), .NET Core 3.1 project with WinForms, C# 8.0
As we see the generated code is different here, so there may be a different SDK at work.

I have as project reference:
C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0
C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0
C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2097 Posts

Posted - Feb 02 2021 :  10:04:56 AM  Show Profile  Reply with Quote
Just updated to the latest VA version, makes no difference.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2097 Posts

Posted - Feb 03 2021 :  05:10:25 AM  Show Profile  Reply with Quote
Its easy to repro in own code too. The problem arises when having an property referring to a constant:

using System.Windows.Forms;
namespace Test
{
  class Somename
  {
    private ToolStripLayoutStyle _layoutStyle = ToolStripLayoutStyle.Flow; 
    public new ToolStripLayoutStyle LayoutStyle1 => _layoutStyle;
    public new ToolStripLayoutStyle LayoutStyle2 => ToolStripLayoutStyle.Flow;
  }
}


LayoutStyle1 is shown correctly, LayoutStyle2 has no classname.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17186 Posts

Posted - Feb 03 2021 :  08:52:18 AM  Show Profile  Reply with Quote
Thank you for the clear example, exactly the same problem here. I have put in a bug report for this:

case=144380

I suspect the linq / lambda syntax is also a factor.

At least if you have Sort alphabetically turned Off in the Alt-M list settings this isn't to confusing, but it doesn't help.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000