Bug 15031 - Fix intellisense for new object creation with namespace import
Summary: Fix intellisense for new object creation with namespace import
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.1.10
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2013-09-27 02:57 UTC by Mohib Sheth
Modified: 2014-01-24 07:15 UTC (History)
2 users (show)

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

screenshot (23.20 KB, image/png)
2013-09-27 02:58 UTC, Mohib Sheth

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mohib Sheth 2013-09-27 02:57:38 UTC
I have found this quite problamatic during my codings.

If I type "var list = new List<UIButton>()" without importing the required namespace, XS provides with a quick fix to import the namespace. But it messess up the object creation syntax.

It changes the code to "var list = System.Collections.Generic.new List<UIButton>()" instead of the correct syntax which should be "var list = new System.Collections.Generic.List<UIButton>()".

Check the attached image for clarification. I hope this is fixed soon.
Comment 1 Mohib Sheth 2013-09-27 02:58:06 UTC
Created attachment 5002 [details]
Comment 2 Mike Krüger 2013-09-27 04:12:38 UTC
already fixed
Comment 3 Mohib Sheth 2013-09-27 04:48:46 UTC
Can you mentioned which version of Xamarin Studio?
Comment 4 Sadik Ali 2014-01-24 06:19:28 UTC
I have verified this issue. 

I added the code "var list = new List<Button>()" but unable to get window as attached in screen shot. I right click on List<Button> and checked in option "Resolve" and "Refactor".

Please suggest me if this is OK to verify this issue or missing any thing.

Refer screen cast: http://www.screencast.com/t/isGQ1yH5c1

Environment info:
Xamarin Studio
Version 4.2.3 (build 154)
Build Information
Release ID: 402030154
Git revision: 4dca4a28d7ecc2c4df8a4d58e74b8902d0283b53
Xamarin addins: cc120a6f639fa6649aa4d23a0f0e7c5701134047


Hash: 094bb4e
Comment 5 Mike Krüger 2014-01-24 06:46:01 UTC
Not entirely - you should've clicked the resolve option.

The bug was that you did get:

var list = System.Collections.Generic.new List<Button>()

instead of:

var list = new System.Collections.Generic.List<Button>()
Comment 6 Sadik Ali 2014-01-24 07:15:52 UTC
I am getting "var list = new System.Collections.Generic.List<Button>()" after clicking on resolve. 
Hence marked this bug with verified status.