Bug 16382 - Auto-completion is so aggressive it's unusable or totally disabled
Summary: Auto-completion is so aggressive it's unusable or totally disabled
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-11-21 06:32 UTC by Rob Davis
Modified: 2013-11-21 23:30 UTC (History)
2 users (show)

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 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 Rob Davis 2013-11-21 06:32:15 UTC
I'm using the new MonoDevelop 4.0.1 with Unity 4.3 on Mac.

With "aggressively trigger code completion list" enabled, code completion is so aggressive you cannot type freely. For example, if you type the letter "i" and a space, you cannot continue without it becoming "if". You would have to press ESC which is clearly not convenient when free typing.

If you then switch off  "aggressively trigger code completion list", you pretty much lose all auto-completion. If you start to type a known object name, e.g. MyProjectMethod, there is no auto-completion at all - you must type it manually.

Why is the only choice over-bearing auto-complete or none? The old system where you had to type a TAB to confirm any auto-complete worked PERFECTLY!!!!!!!!!!
Comment 1 Mikayla Hutchinson [MSFT] 2013-11-21 14:49:06 UTC
C#, UnityScript or Boo?

You may find this useful http://mjhutchinson.com/journal/2011/02/monodevelop_tips_suggestion_mode

Note that Unity ships an old, modified version of MonoDevelop that we do not support. Do you have this problem with 4.2.x?
Comment 2 Rob Davis 2013-11-21 19:24:52 UTC
I'm using C#. It's MonoDevelop 4.0.1 released with Unity 4.3.

Ah that looks very helpful - thanks! I think suggestion mode is just what I need!

I think it's a bit confusing that is separate from the Preferences setting. Also there is no documentation for MonoDevelop AFAIK? The online docs are very basic and don't cover this. Or have I missed something?

Thanks again.
Comment 3 Mikayla Hutchinson [MSFT] 2013-11-21 19:41:29 UTC
Well, as explained in the post, the C# completion should provide you every valid thing that you can type at that point, or go into suggestion mode automatically if it's not possible to do so. Do you have reproducible cases where things are missing from the list?

It's command instead of a preference so you can toggle it on the fly. For example if you want to write code that uses APIs that don't yet exist, then you could toggle on suggestion mode for a while, and toggle it back later.
Comment 4 Rob Davis 2013-11-21 20:50:53 UTC
OK now i've got used to that it makes sense and is very good. I think the problem was it wasn't documented anywhere I could find how to use the feature. All I had found was the toggle in preferences. (If there is any documentation you can point me at that would be great - none I could find on Unity or MonoDevelop web sites).

There is a use case where auto-completion fails. If I click on a class in Unity so it opens up in MonoDevelop  (which is the expected Unity workflow)  I get no code completion for Unity classes. Code completion only works if I open up the MonoDevelop solution SLN file directly in MonoDevelop. The problem is, Unity 4.3 doesn't seem to create those solution files, so for new projects there will be no way to get code completion. ;(
Comment 5 Mikayla Hutchinson [MSFT] 2013-11-21 23:30:37 UTC
Yeah, we tend to over-rely on people being able to use Visual Studio docs for features like this that work the same way as VS. We do have a pretty small team for developing an IDE :)

You won't get accurate/full C# completion if you just open a C# file, the files needs to be opened in the context of a project so it has access to the right dll references etc.

If you have a solution open in MD/XS, then you open a .cs file "separately", if the file is part of the open solution, it will still be opened in the correct project context. I just tested this with XS 4.2.1 (though not with Unity) and it works fine.

I'm not familiar with the Unity -> MD workflow but I hear there's some kind of "sync project" step that creates a solution. I would assume that you sync the project, open the sln, then when you try to open cs files from Unity, it would "just work". But maybe it doesn't work that way, or maybe this was broken in the version of MD that Unity shipped - it's 14 stable releases (8 months) behind - or maybe it's something odd in the way Unity opens files, or was broken by one of the dozens of changes Unity made to the MD core. You should report it to Unity.

You could try using MD/XS 4.2.1 - someone helpfully ported the Unity debugger addin over, so it's available to be installed in our addin manager (http://www.cliffordroche.ca/monodevelop-4-xamarin-studio-debugging-in-unity/).