Did you know… Why the Object Browser has so many commands you can bind to (and how to create a keyboard shortcut to clear the search results) – #227

As I’ve been writing the Object Browser Tip Series, I noticed that there were a lot of commands available under Tools – Options – Environment – Keyboard…  Just type in ObjectBrowser and you’ll see what i mean.

Object Browser Lots of Commands

Technically, this is a bug, since not all these commands need keyboard shortcuts.  For example, the ability to sort objects by access level probably doesn’t need a keyboard shortcut.  But since they do, let’s have some fun…

If you bind any of the Object Browser Settings commands to a keyboard shortcut, you’ll see that shortcut in the drop down menu.  Oh, the things I’ve discovered writing this Tip of the Day series =D

Object Browser Settings shwoing keyboard shortcuts

How you can take advantage of this:  If you use the object browser a lot to search, you might find it meaningful to clear the search via the keyboard shortcut. 

View.ObjectBrowserClearSearch – clears the search combo, hence clearing the object browser filter.

If you have a particular keybinding or command that you use in this list, please leave a comment below and share with the group.

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… What the “Default Presentation Language” setting does the Object Browser settings? – #226

In yesterday’s tip, I talk about how you can export and import your Object Browser settings.  If you examined the .vssettings file for just the Object Browser Settings category in Import / Export Settings, you may have seen

<PropertyValue name="DefaultPresentationLanguage">VB</PropertyValue>

The Object Browser tries to show the language of the current project.  If this is not possible or multiple languages exist,  the Object Browser uses the “DefaultPresentationLanguage” to decide what syntax to use.

In the example below, there’s no solution shown, so the Object Browser is forced to use this setting.

Using DefaultPresentationLanguage=VB, we see the Object Browser use VB syntax.

Object Browser VB Syntax

Using DefaultPresentationLanguage=VC#, we see the Object Browser use C# syntax.

Object Browser C# Syntax

Technorati Tags: VS2005Tip,VS2008Tip

3 Talks at TechEd 2008 – Wish Me Luck!

Tuesday starts TechEd 2008, where I’ll find myself presenting three(!) talks.  The third talk came a few weeks ago when Noah Coad became unavailable to do the Visual Studio 2008 IDE Tips and Tricks talk.  Being the tireless community people that we are, Charlie and I have  picked up the talk.  Since then, I think I’ve spent almost every afternoon after work with Charlie figuring out which tips to include.  Charlie is doing the talk on Tuesday and i do the repeat on Friday.

I wished we would have filmed some of these afternoon “talk on talk” meetings (what we called the meeting invite).  I think the best was the “Project Not Trusted” message box (i was in tears laughing so hard), but the “which development environment settings do we use” was a close second.  I’m General Development and Charlie is C#.  =D

When I’m not talking, I’m going to be working at the CodePlex booth at the MSDN Community Zone and other smaller one-off activities, like participating in the Blogger Connect in the Blogger Lounge on Tuesday, June 3 from 3:00 PM– 4:00PM.

Come by and say hi.  It keeps the Tip of the Day going.  =D

Here’s my talk schedule.  I’ll share what i can (when i can) from the talks and from TechEd itself.  At least this time i won’t be driving ScooterCam-1.  Wish me luck success! 

Breakout Session:  Microsoft Visual Studio 2008 IDE Tips and Tricks (Repeated from 6/3)

Dev Conference  TLA321R  
Session Day/Time: 6/6/2008 8:30AM-9:45AM
Room: S230 C

Microsoft Visual Studio Tip of the Day

Dev Conference  TLA11-TLC 
Session Day/Time: 6/6/2008 10:15AM-11:30AM
Room: Blue Theater 2 

Embrace Open Source on CodePlex

Dev Conference  LUN07 
Session Day/Time: 6/3/2008 12:00PM-1:00PM
Room: S230 C 

And this is Charlie’s talk:

Dev Conference  TLA321  Microsoft Visual Studio 2008 IDE Tips and Tricks (Repeats on 6/6)
Session Day/Time: 6/3/2008 10:30AM-11:45AM
Room: S320 A 

Did you know… You can export all your Object Browser customizations in a .vssettings file? – #225

Over these past couple of weeks, we’ve taken a close look at customizing your Object Browser experience, from sorting to searching to filtering, among other options.

Your customizations can be saved out to a .vssetings file via the Tools – Import / Export Settings dialog, under General Settings – Object Browser Options.

Exporting Object Browser settings

Good news is that the xml stored in the created .vssettings file for the object browser settings is human readable, in case you need to make a quick tweak.

      <PropertyValue name="ObjectBrowserViewNamespaces">false</PropertyValue>
      <PropertyValue name="ObjectBrowserShowHiddenTypesAndMembers">true</PropertyValue>
      <PropertyValue name="ObjectBrowserTypesSortAlphabetically">true</PropertyValue>
      <PropertyValue name="ObjectBrowserTypesSortByType">false</PropertyValue>
      <PropertyValue name="ObjectBrowserTypesSortByAccess">false</PropertyValue>
      <PropertyValue name="ObjectBrowserTypesGroupByType">false</PropertyValue>
       …

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… The Object Browser Supports Type-Ahead Selection? – #224

Today’s tip you’ve probably tried on your own, just in hopes that it would work.  But just in case you never thought about it, like in the Solution Explorer (which works btw, and i’m still singing my tip of the day songs), yes, the Object Browser supports type-ahead selection.

Object Browser supports Type Ahead Scrolling

Back in the 2003 days, I was on a quest for a while to have all lists in Visual Studio support type-ahead selection.  I did what I could, so if you see a list that should support it and it doesn’t, definitely file a bug in Connect.   Maybe one day my quest will be completed.

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can do a “Find Symbol” search (Shift+F12) in the Object Browser? – #223

Just like yesterday’s tip that talked about going to an object or function’s definition, you can find all the references of what you have selected in the Object Browser.

Find All References

In the General Development Settings, Edit.FindAllReferences is bound to Shift+F12.  When you press Shift+F12, it’ll bring up the Find All References Tool Window. 

Find Symbol Results

This is the same as doing a Find Symbol from the Find in Files tool window.

Find Symbol Tool Window

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can use F12 in the Object Browser to go to the definition of whatever’s selected? – #222

On the context menu of both the Member Pane (right panel) and the Object Pane (left panel), you’ll see the Go To Definition command.  You can use this command to navigate directly into the code where whatever you have selected is defined (or you’ll get a nice error message).

Go To Definition

In the General Development Settings, the Edit.GoToDefinition command is bound to F12.  Pressing F12 in the image above will take us to where the bar function is defined.

where function bar() is defined in editor

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can sort objects and members in the Object Browser? – #221

On the context menu for either the Object Pane (left) or Member Pane (top-right), you can sort by four different options: Alphabetically, Object Type, Object Access, or Group by Object Type.

Sorting in Object Browser

Alphabetically is self-explanatory.  Object type will have the following effect.  Notice how Classes appear first in the list, then Structures, then Enums.

Sorting by Type

Next is sort by Object Access.  Notice in the example below how the first three classes of the foobar namespace are public, but the fourth is private.

Sorting by Access

And lastly, is Group by Object Type. As shown in the Microsoft.VisualBasic.dll, all objects are grouped by what type of creature they are.

Grouping by Type

And of course you can rinse and repeat for the Members pane.

Member Pane Sort

Did you know… There are two primary means of searching for objects in the Object Browser? – #220

Now we’ll move to the second toolbar in the Object Browser, which is all about searching. 

Searching within Object Browser

But the search scope depends on what you have selected in the Browse combo box, or in other words the Object Browser Scope.  For example, if you try to search for System.Web in a Console Application, you’ll won’t be very successful.

No Results Found in Search

But there’s also another way to search… it’s using the Find and Replace tool window’s Find Symbol functionality.  Those of you following the tip of the day for a while will remember this one.  You’ll notice the picture closely resembles the Object Browser search functionality.

ObjectBrowserSearch3

Technorati Tags: VS2005Tip,VS2008Tip

Did you know… You can show Extension Methods in the Object Browser – #219

This tip is new for Visual Studio 2008.

You can learn more about extension methods in the documentation for both Visual Basic and C#.

In the Object Browser Settings, you’ll see the Show Extension Methods option.

Object Browser Show Extension Members

Now, when you have an extension method in your code (or in my example, a module, since i’m using VB), you’ll see the following:

Object Browser displaying an Extension Methods

and you’ll get the downward-pointing icon.

Technorati Tags: VS2008Tip