IntelliSense
Encyclopedia
IntelliSense is Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's implementation of autocompletion, best known for its use in the Microsoft Visual Studio
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

 integrated development environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

. In addition to completing the symbol names the programmer is typing, IntelliSense serves as documentation and disambiguation for variable
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 names, function
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

s and method
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

s using reflection
Reflection (computer science)
In computer science, reflection is the process by which a computer program can observe and modify its own structure and behavior at runtime....

.

Overview

Similar to other autocompletion systems, IntelliSense is a convenient way to access descriptions of functions, particularly their parameter lists. It speeds up software development by reducing the amount of name memorization needed and keyboard input required. It also allows for less reference to external documentation as interactive documentation on many symbols (i.e. variables and functions) in the active scope appears dynamically in the form of tooltip
Tooltip
The tooltip or infotip is a common graphical user interface element. It is used in conjunction with a cursor, usually a mouse pointer. The user hovers the cursor over an item, without clicking it, and a tooltip may appear—a small "hover box" with information about the item being hovered...

s while programming.

IntelliSense works by accessing an automatically generated in-memory database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 of classes, variable names and other constructs defined in or referenced by the application being edited. The "classic" implementation of IntelliSense works by detecting marker characters such as periods, or other separator characters depending on the language used. As the user types one of these marker characters immediately after the name of an entity having one or more accessible members (such as contained variables or functions), IntelliSense starts suggesting matches with a pop-up window. The user can either accept the suggestion by typing a statement completion character ( or or a language-specific marker such as the semicolon for C++) or continue typing the name. Eventually IntelliSense will determine exactly which variable or function the user desires, given enough information. The feature also allows the user to select from a number of overloaded functions in the case of languages that support object oriented programming. IntelliSense can also display a short description of a function in the pop-up window (this feature depends on the amount of documentation contained in the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 of the function).

History

IntelliSense was first introduced as a feature of a mainstream Microsoft product in 1996, with the Visual Basic 5.0 Control Creation Edition, which was essentially a publicly-available prototype for Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

 5.0. Although initially the primary "test bed" for the technology was the Visual Basic IDE, IntelliSense was quickly incorporated into Visual FoxPro
Visual FoxPro
Visual FoxPro is a data-centric object-oriented and procedural programming language produced by Microsoft. It is derived from FoxPro which was developed by Fox Software beginning in 1984. Fox Technologies merged with Microsoft in 1992, after which the software acquired further features and the...

 and Visual C++
Visual C++
Microsoft Visual C++ is a commercial , integrated development environment product from Microsoft for the C, C++, and C++/CLI programming languages...

 in the Visual Studio 97 timeframe (one revision after it was first seen in Visual Basic). Because it was based on the introspection capabilities of COM
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

, the Visual Basic versions of IntelliSense were always more robust and complete than the 5.0 and 6.0 (97 and 98 in the Visual Studio naming sequence) versions of Visual C++, which did not have the benefit of being entirely based on COM. These shortcomings (criticized by many VC++ developers since the 97 release) have been largely corrected in the post-.NET product lines. For example, one of the most requested capabilities missing from the pre-.NET products was support for templates
Generic programming
In a broad definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters...

, which is now fully implemented.

IntelliSense has entered a new phase of development with the unified Visual Studio.NET environment first released in 2001, augmented by the more powerful introspection and code documentation capabilities provided by the .NET framework. IntelliSense is now supported by the Visual Studio editors for C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, C#, J#
J Sharp
Visual J# |sharp]]') programming language is a discontinued transitional language for programmers of Java and Visual J++ languages, so they may use their existing knowledge and applications on .NET Framework....

, Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

, XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

, HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 and XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

 among others. As of Visual Studio 2005, IntelliSense is now activated by default when the user begins to type, instead of requiring marker characters (although this behavior can be turned off). The IDE
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 has the capability of inferring a greater amount of context based on what the developer is typing, to the point that basic language constructs such as for and while are also included in the choice list.

In current versions of Visual Studio IntelliSense evaluates C code as C++, generating large numbers of spurious errors. The problem does not affect the compile process.

Other Microsoft products that incorporate IntelliSense include FrontPage
Microsoft FrontPage
Microsoft FrontPage was a WYSIWYG HTML editor and web site administration tool from Microsoft for the Microsoft Windows line of operating systems. It was branded as part of the Microsoft Office suite from 1997 to 2003...

, Expression Web
Microsoft Expression Web
Microsoft Expression Web, code-named Quartz, is an HTML editor and general web design software product by Microsoft. It is part of the Expression Studio suite....

 (in code view), the Visual Basic for Applications
Visual Basic for Applications
Visual Basic for Applications is an implementation of Microsoft's event-driven programming language Visual Basic 6 and its associated integrated development environment , which are built into most Microsoft Office applications...

 IDEs in the Microsoft Office
Microsoft Office
Microsoft Office is a non-free commercial office suite of inter-related desktop applications, servers and services for the Microsoft Windows and Mac OS X operating systems, introduced by Microsoft in August 1, 1989. Initially a marketing term for a bundled set of applications, the first version of...

 products, and many others. SQL Server 2008 Management Studio has autocomplete for the SQL syntax.

Example

Assume a C++ application being edited in Visual Studio has a class Foo with some member functions:


class Foo {
public:
void bar;
void foo_bar(char c, int n);
};


When the developer references this class in source code, e.g.:

Foo foo;
foo.

as soon as the user types the period after foo, IntelliSense automatically lists all the available member functions (i.e. bar and foo_bar) and all the available member attributes (private and protected members can be identified by a padlock picture besides its name). The user can then select one by using the arrow keys and hitting a completion character when the correct member function is highlighted. When available, IntelliSense displays a short description of the member function as given in the source code documentation.

IntelliSense goes further by indicating the required parameters in another pop-up window as the user fills in the parameters. As the user types a variable name, the feature also makes suggestions to complete the variable as they are typed. IntelliSense continues to show parameters, highlighting the pertinent one, as the user types.

The user can "force" IntelliSense to show its pop-up list without context by using + or +. In Visual Studio this displays the entire application domain object model available to the developer.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK