Bug 3618 - ClassPad should show the method's parameter when I use VB.NET
Summary: ClassPad should show the method's parameter when I use VB.NET
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: VB.Net Binding ()
Version: 2.8.6
Hardware: PC Windows
: Lowest normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-23 16:54 UTC by himajin100000
Modified: 2012-04-24 12:15 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 3618 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description himajin100000 2012-02-23 16:54:41 UTC
STEPS TO REPRODUCE:

1. Open MonoDevelop
2. Show ClassPad
3. Open following code.

Public Class Application
	Public Shared Sub Main()
		System.Console.WriteLine("Hello world!")
	End Sub
	
	Public Shared Sub Hoge(x As Integer)
	End Sub
End Class

EXPECTED RESULT:

ClassPad should show Hoge(Int32):null

ACTUAL RESULT:

ClassPad should shows Hoge():null

ADDITIONAL NOTE:

when MonoDevelop.VBNetBinding.Parser.DomParser.VisitMethodDeclaration
adds the method to type, it does not add Parameters.

https://github.com/mono/monodevelop/blob/master/main/src/addins/VBNetBinding/Parser/DomParser.cs#L172 

so I wrote as follows, and the issue seemed gone.

public override object VisitMethodDeclaration(ICSharpCode.OldNRefactory.Ast.MethodDeclaration methodDeclaration, object data)
{
	Debug.Assert (currentType.Count > 0);
	DomType type = currentType.Peek ();
	
	DomMethod method1 = new DomMethod (
											methodDeclaration.Name,
	                         				(Modifiers)methodDeclaration.Modifier,
	                         				MethodModifier.None,
	                         				new DomLocation (methodDeclaration.StartLocation.Line, methodDeclaration.StartLocation.Column),
	                         				methodDeclaration.Body != null ? TranslateRegion (methodDeclaration.Body.StartLocation, methodDeclaration.Body.EndLocation) : DomRegion.Empty
									);
	foreach(ICSharpCode.OldNRefactory.Ast.ParameterDeclarationExpression pe in methodDeclaration.Parameters){
		method1.Add (new DomParameter(method1,pe.ParameterName,new DomReturnType(pe.TypeReference.Type)));
	}
	type.Add(method1);
	return null;
}
Comment 1 Mike Krüger 2012-04-24 12:15:04 UTC
Class pad is going to be removed.