RAD Studio 2010 - IDE Insight Part 1

Posted by on in Blogs
"Where on earth are my sunglasses?"

After searching for a full five minutes, I finally find them and get on my way to Embarcadero to take care of more important business. Most of us have set down our keys and forgotten exactly where. We *know* we saw them a while ago, but where exactly? A few seconds delay, or a few minutes, an unwelcome interruption. Valuable neuron time wasted on the mundane.

The same problem happens using software. You're happily working away, firmly in the zone, when you need to do just one simple thing. Problem is, it's not something you do every day. So now you have to try and remember how you got to that dialog, file, setting, program, whatever. What folder is it in? Which main menu item was it under? View? Window? Hm. Maybe it's in a sub-menu. Nope. What was the hot key again? You relent and hit F1.

Now you're out of the zone. Dang.

In Windows, Vista helps out by providing the Start Menu search box. Tap the Windows key, start typing and you'll be presented with a list of choices, one of which is likely what you want. Google Desktop does the same thing with Ctrl+Ctrl. Yes! The entire filesystem at your fingertips.

RAD Studio 2009 caught on to this paradigm somewhat with the ability to search the component palette and in the component wizards. Very helpful and a great time saver.

Now RAD Studio 2010 brings palette search to entire IDE. We call it "IDE Insight", and it puts most functionality of the RAD Studio IDE at your fingertips. Just like Code Insight shows appropriate functions, methods, types, etc., based on the current editor context, IDE Insight uses the current IDE state to show you a list of things you can do, with a minimum of effort and distraction. My goal in developing it was to save you a few seconds a hundred times a day, and help you stay in that coding zone.


Suppose you want to see what breakpoints are set before starting a debug session, but the Breakpoints window isn't currently visible. View menu, or Run menu? Maybe you don't want to grab the mouse - was it "Ctrl+Shift+B" or "Ctrl+Alt+B"? Don't remember? Just use Ctrl+.  ( <-- that's a period )




[caption id="attachment_8" align="aligncenter" width="484" caption="The IDE Insight Window"]The IDE Insight Window[/caption]

IDE Insight initially shows all the categories of available items. Not particularly useful at the moment, but they're there for a reason that'll be apparent later.

Now just type the word "break" in the search box:

[caption id="attachment_10" align="aligncenter" width="484" caption="Filtered on "]Filtered on "break"[/caption]

Tap the <Enter> key and you're there.

IDE Insight keeps a list of all relevant menu items, commands, components, code templates, Gallery and Repository items, project options, IDE preferences, open files, open projects, files in open projects, and recent file history - filtered based one or more search terms you specify. Also note that it encapsulates the functionality of the View | Units and View | Forms dialogs as well.

Suppose you want to lengthen the Code Insight delay time. What page was that on? Who cares?

"Ctrl+." then "code" shows you this:

[caption id="attachment_14" align="aligncenter" width="484" caption="Each category show the number of matches"]Each category show the number of matches[/caption]

The search for "code" is a little too broad - 1 code template, 17 files, 5 forms, 5 Repository items, 21 preferences, 8 project options and one project. If you want, you can see all matches at this point by toggling the "Show all" button (or just typing Alt+A) and scrolling through the list:

[caption id="attachment_17" align="aligncenter" width="484" caption="Incremental search in the expanded list "]Incremental search in the expanded list [/caption]

To further narrow the match list add additional search terms, whole or partial:

[caption id="attachment_18" align="aligncenter" width="484" caption="Multiple search terms"]Multiple search terms[/caption]

Press <Enter> and up comes the Tools | Options dialog on the correct page and with the relevant control focused:

[caption id="attachment_19" align="aligncenter" width="650" caption="Right on the money"]Right on the money[/caption]

Now just right arrow to lengthen the delay, hit <Enter>, done. A handful of seconds and some brain cycles saved.

Invoking IDE Insight when the form designer is active shows components from the component palette (including what pages they're on) plus all controls on the form. You can use it to drop a new component or select an existing one:

[caption id="attachment_20" align="aligncenter" width="484" caption="Context sensitive items (designer is active)"]Context sensitive items (designer is active)[/caption]

Exactly what will happen when selecting an item depends on its category.

  • Commands: Invokes the selected command in the current IDE context (active project, current editor view, etc.)

  • New Items: Creates a new item from the Object Repository, and either adds it to the current project or creates a new project.

  • Component Palette (designer only): Drops the selected component on the selected control in the form designer.

  • Component (designer only): Selects the component on the form and in the object inspector (very handy for containers with client-aligned children or components lost at the back of the z-order)

  • Code Templates (editor only): Inserts the selected code template at the caret position in the editor.

  • Project Options: Opens the project options dialog, selects the correct page and focuses the UI element for the selected option.

  • Preferences: Same as Project Options, but for IDE-wide settings (Tools | Options).

  • Files, Forms, Open Files, Recent Files: Opens the file in the editor or designer.

  • Projects: Makes the project active, and selects it in the project manager.

  • Recent Projects: Closes the current project or project group and opens a recently closed project.

  • Desktop SpeedSettings: Activates the selected Desktop SpeedSetting.


You can turn off categories you're not interested in. Click on the magnifying class icon in the search box and deselect them:

[caption id="attachment_25" align="aligncenter" width="484" caption="Deselect uninteresting categories"]Deselect uninteresting categories[/caption]

If the widespread acceptance of IDE Insight by the RAD Studio team is any indication, it will be a great benefit for customers as well. Whenever I need to do just about anything in the IDE I immediately reach for Ctrl+period.

Later on - Nuts and bolts: forcing our IDE to be discoverable, and an Open Tools API IDE Insight plug-in.


Comments

  • Guest
    Xepol Wednesday, 5 August 2009

    My question would have been is it usable through the OpenTools API -> you have made me VERY happy.

    I can see bolting it together with RemObject's pascal script to add scripting to the IDE - frankly I am excited at the possibilities.

    Now add on a configurable keybinding system, and I would get VERY excited!

  • Guest
    mduncan Wednesday, 5 August 2009

    Yes, you can add to and access all the categories and items using OTAPI. I'll try to provide an example in a later post.

    Configurable keybindings would be nice, wouldn't they?

  • Guest
    Delphi 2010 Preview! | 4DotNet Developers Blog Monday, 17 August 2009

    [...] IDE Insight (!) [...]

  • Guest
    Личная записная Tuesday, 25 August 2009

    [...] - IDE Insight. Об этой функции пишут Nick Hodges, Chris Bensen, Mark Duncan.

  • Guest
    Wilfred Oluoch Friday, 6 August 2010
  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: