Autocomplete order Visual Studio 2010 - visual-studio-2010

Is there any way to change the order by of the autocomplete functionality for Visual Studio 2010?
I want to see the autocomplete options ordered by type, I mean:
Methods
Variables
etc...
I dont wan't to get it ordered alphabetically, so what can I do?

Visual Assist X allows you to filter by type.
There is a free add on CSharpIntellisensePresenter

Related

Hide namespace in Quick Info from Visual Studio

Is there a way to hide the clumsy and verbose namespace expression from the Quick Info of classes in VS?
I don't want this:
I want this:
Is there a way to make the class names displayed a bit cleaner like this? It is plain unreadable for the moment. I am thinking of some plugins like ReSharper, CodeRush, JustCode etc.
Further information requested
Could you please confirm which version (and any updates) of Visual Studio you are using? I do see Visual Sudio 2013 as a tag in your question.
Also, is it possible to provide a screenshot of the code without the Quick Info displayed, but, highlight the exact location in your code that you were trying to display Quick Info for?
Initial Answer
As mentioned elsewhere, Resharper can be used to enhance intellisense. i.e. one can choose whether or not to use the default Visual Studio, or Resharper, intellisense provider. But, while Resharper enhances syntax completion and display of parameters, this does not affect Quick Info, in the example given in the question. Quick Info is a tooltip, that by default, is displayed automatically when mousing over a symbol or variable.
In Visual Studio 2010, it was possible to write an extension to override intellisense, to display your own custom tooltip.
IntellisensePresenter
In Visual Studio 2013, there is no built in option to allow customisation.
Visual Studio Ultimate 2013, with Update 4, without Resharper:
Displays the following Quick Info for a Generic Dictionary:
In Visual Studio 2015 (currently Release Candidate), the intellisense tooltip for Quick Info is altered, with increased readability:
Expansion of Answer
Revisiting the example given in the question, and using a simple line of code as a test with a Dictionary containing another Dictionary:
Dictionary<string, Dictionary<string, int>> dict;
In Visual Studio 2013 Ultimate, Update 4, with or without Resharper latest, the following is displayed:
In Visual Studio 2015 RC, with or without Resharper latest, the following is displayed:
Note that Visual Studio 2015 has changed the way that Quick Info is displayed, and is close to the desired outcome. In this instance, ReSharper, although an excellent tool, does not affect Quick Info.
Updates following comments
Visual Studio 2015 RC Quick Info behaviour
To validate that custom types exhibit the same behaviour as described above in Visual Studio 2015 RC, a simple class is created, in a new namespace:
namespace StackAnswer
{
class MyClass
{
public int MyProperty
{
get; set;
}
}
}
Referencing the type using its 'fully qualified' name (i.e without a using statement):
Dictionary<string, Dictionary<string, StackAnswer.MyClass>> dict;
Displays the following:
Adding a using statement:
using StackAnswer;
And altering the reference to the type to not be 'fully qualified':
Dictionary<string, Dictionary<string, MyClass>> dict;
Indicates that Visual Studio 2015 RC displays the name according to the reference declaration:
This is possibly behaviour allowed by use of the Rosyln compiler.
Resharper's "Quick Documentation"
If using Resharper's "Quick Documentation" feature that is opened via a key combination (which is not Visual Studio Quick Info that is displayed on mouse over, as mentioned in the question), the namespaces are indeed shortened. Two screenshots below taken in Visual Studio 2013:
Additional note: background information regarding Quick Info
Visual Assist, an extension for Visual Studio, does possess the ability to enhance, and potentially replace the Quick Info tooltip - if built-in Quick Info is turned off.
Quick Info in Visual Assist
However, currently, in Visual Studio (up to and including 2015 RC), the ability to turn off the built in Quick Info is only available for the C/C++ language; therefore it is unlikely that any tool will presently be able to achieve the exact desired behaviour as mentioned in the original question, which is related to the C# language.
(If using C/C++ this can be found via Tools > Options > Text Editor > C/C++ > Advanced >Auto Quick Info.)
I really recommend ReSharper for that. You can adjust the Parameter Info and Quick Info using the Parameter Info and Quick Documentation features respectively. Both by default hides namespaces and offer more fine grained control over what to display.
On the website you can download a 30 day demo.

DSL. Is it possible to add commands to context menu item dynamically?

I have DSL Diagram builted in Visual Studio 2012 Ultimate.
And I want to duplicate TFS functionality like in standard UML Diagrams in Visual Studio ( In my case Visual Studio 2012 Ultimate ). And I have one issue - Types of work items are different in different TFS projects types, which means that I need to add commands in run time. And I don't know how to add some commands to Context Menu dynamically. Is there any way?
I found the answer:
How to: Dynamically Add Menu Items
http://msdn.microsoft.com/en-us/library/vstudio/bb166492.aspx

Is it possible to provide intellisense for dynamic objects in visual studio?

I am using dynamic objects in a project, and I'd like to provide intellisense for the object. I understand that Visual Studio can't know what to show for intellisense, but if I can plug into the intellisense, I do know what entries should show up.
Is there a way to extend Visual Studio's intellisense? If so, any pointers?
Thanks!
You can use Editor Extension Points.
You can find specific information for extending Intellisense near the bottom of this page:
Editor Extension Points
From this page you can get information about ICompletionSource and ICompletionSourceProvider which are the two interfaces you must implement to provide autocompletion.

Visual studio 2010 intellisense methods order

I'm writing in C++. Visual Studio 2010 intellisense shows methods in alphabetical order.
Is there a way to make it show methods in original order (the order they appear in source code)?
From another question's answer:
There isn't a way to control the ordering within Visual Studio's Intellisense. If you do have multiple constructors (or methods), your only real control in terms of intellisense is to use EditorBrowsable with the appropriate EditorBrowsableState. This allows you to hide a contructor (or method) in intellisense, or only have it displayed in "advanced" mode, but does not allow you to reorder them.

Filtering the Visual Studio toolbox

Does anyone know if it is possible at all to filter the Toolbox's items in Visual Studio using an add-in?
Visual Studio 2010 introduced the ability to search but I want to filter, for example: type in button and it must show all items containing "button", same as on this on this Delphi XE screenshot:
This is a very good answer for this question. I copied from the VS blog:
In VS 2010 Beta2, we’ve added the ability to search for controls in the toolbox by name. To use it, put focus in the toolbox (by clicking in it, for example) and start typing the name of the control you want to find. As you type, the selection will move to the next item that matches what you've typed so far.
http://blogs.msdn.com/b/visualstudio/archive/2009/10/26/toolbox-search.aspx
This is something not possible as microsoft does not reveal the secret of adding toolbox controls details completely. They make change the process for each platform and for each versions of visual studio. if we have a clear details of how they add, we can also do the similar kind of small application with search capability and add it as add-in.
Luckily Visual Studio 2012 now has that feature!

Resources