IntelliSense
   HOME

TheInfoList



OR:

Intelligent code completion is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes. Attempts at this are usually done through auto-completion popups while typing, querying parameters of functions, and query hints related to syntax errors. Intelligent code completion and related tools serve as documentation and disambiguation for variable names,
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
s, and
method Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
s, using
reflection Reflection or reflexion may refer to: Science and technology * Reflection (physics), a common wave phenomenon ** Specular reflection, reflection from a smooth surface *** Mirror image, a reflection in a mirror or in water ** Signal reflection, in ...
. The feature appears in many programming environments. Implementations include "autocomplete +" in
Atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas, ...
, and IntelliSense in
Visual Studio Code Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code comple ...
. The term was originally popularized as "picklist" and some implementations still refer to it as such.


Overview

Intelligent code completion, which is similar to other autocompletion systems, is a convenient way to access descriptions of functions—and in particular their parameter lists. The feature speeds up software development by reducing keyboard input and the necessity for name memorization. It also allows for users to refer less frequently 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 The tooltip, also known as infotip or hint, is a common graphical user interface (GUI) element in which, when hovering over a screen element or component, a text box displays information about that element, such as a description of a button's f ...
s. Intelligent code completion uses an automatically generated in-memory
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
of classes, variable names, and other constructs that given computer code defines or references. The "classic" implementation of IntelliSense works by detecting ''marker characters'' such as periods (or other separator characters, depending on the language). When the user types one of these characters immediately after the name of an entity having one or more accessible members (such as contained variables or functions), IntelliSense suggests matches in a pop-up dialog. 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++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
), or continue typing the name. Over time, IntelliSense determines which variable or function the user most likely needs. IntelliSense also displays a short description of a function in the pop-up window—depending on the amount of documentation in the function's
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the w ...
. The feature also lets users select from a number of
overloaded function In some programming languages, function overloading or method overloading is the ability to create multiple functions of the same name with different implementations. Calls to an overloaded function will run a specific implementation of that f ...
s in languages that support
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
. Some code editing software provide intelligent code completion through a
Language Server Protocol The Language Server Protocol (LSP) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide programming language-specific features like code completion, syntax hi ...
(LSP) server.


History

Research on intelligent code completion began in 1957, with spelling checkers for
bitmap In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array or bitmap index. As a noun, the term "bitmap" is very often used to refer to a particular bitmapping application: t ...
images of
cursive writing Cursive (also known as script, among other names) is any style of penmanship in which characters are written joined in a flowing manner, generally for the purpose of making writing faster, in contrast to block letters. It varies in functionalit ...
and special applications to find records in databases despite incorrect entries. In 1961,
Les Earnest Lester Donald Earnest (born December 17, 1930) is an American computer scientist. Education and career After receiving his B.S. in electrical engineering from the California Institute of Technology (Caltech) in 1953, he began his career as a comp ...
, who headed the research on this budding technology, saw it necessary to include the first spell checker that accessed a list of 10,000 acceptable words. Ralph Gorin, a graduate student under Earnest at the time, created the first true spell-check program written as an application (rather than research) for general English text. SPELL, for the DEC PDP-10 at Stanford University's Artificial Intelligence Laboratory (SAIL), was published in February 1971. Gorin wrote the program in assembly for faster action; he made it by searching a word list for plausible correct spellings that differ by a single letter or adjacent-letter transpositions, and presenting them to the user. Gorin made SPELL publicly accessible, as was done with most SAIL programs, and it soon spread around the world via the then-new
ARPANET The Advanced Research Projects Agency Network (ARPANET) was the first wide-area packet-switched network with distributed control and one of the first networks to implement the TCP/IP protocol suite. Both technologies became the technical fou ...
, about a decade before personal computers came into general use. SPELL and its algorithms and data structures inspired the
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
program
Ispell Ispell is a spelling checker for Unix that supports most Western languages. It offers several interfaces, including a programmatic interface for use by editors such as Emacs. Unlike GNU Aspell, ispell will only suggest corrections that are base ...
.


Support in editors and IDEs


Visual Studio

IntelliSense is
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
's implementation of code completion, best known in
Visual Studio Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such ...
. It was first introduced as a feature of a mainstream Microsoft product in 1996 building on many already invented concepts of code completion and syntax checking, with the Visual Basic 5.0 Control Creation Edition, which was essentially a publicly available prototype for
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic .NET (now simply referred to as "Visual Basic"), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic ( ...
5.0. Initially, Visual Basic IDE was the primary "test bed" for the technology, but IntelliSense was incorporated into
Visual FoxPro Visual FoxPro is a Microsoft data-centric procedural programming language with object-oriented programming (OOP) features. It was derived from FoxPro (originally known as FoxBASE) which was developed by Fox Software beginning in 1984. Fox Techn ...
and
Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both tri ...
in the Visual Studio 97 timeframe (one revision after first seen in Visual Basic). Because it was based on the introspection capabilities of COM, 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 .NET product lines. For example, one of the most requested capabilities missing from the pre-.NET products was support for
templates Template may refer to: Tools * Die (manufacturing), used to cut or shape material * Mold, in a molding process * Stencil, a pattern or overlay used in graphic arts (drawing, painting, etc.) and sewing to replicate letters, shapes or designs Co ...
, 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++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
, C#, J#,
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic .NET (now simply referred to as "Visual Basic"), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic ( ...
,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
,
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaSc ...
and XSLT among others. As of
Visual Studio 2005 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such ...
, IntelliSense is now activated by default when the user begins to type, instead of requiring marker characters (though this behavior can be turned off). The IDE 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 and are also included in the choice list. In 2017 Microsoft announced IntelliCode, which uses machine learning to infer exactly which language or library feature is likely to be intended at every keystroke. Initially available as an extension for C# only, it is expected to be built in to future releases of Visual Studio. Visual Studio 2022 includes artificial-intelligence features that can automatically suggest entire lines of code based on surrounding context. Other Microsoft products that incorporate IntelliSense include
Expression Web Microsoft Expression Web is a discontinued HTML editor and general web design software product by Microsoft. It was discontinued on December 20, 2012, and subsequently made available free of charge from Microsoft. It was a component of the also ...
, FrontPage 2003, Small Basic, the
Visual Basic for Applications Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6.0 built into most desktop Microsoft Office applications. Although based on pre-.NET Visual Basic, which is no longer support ...
IDEs in the
Microsoft Office Microsoft Office, or simply Office, is the former name of a family of client software, server software, and services developed by Microsoft. It was first announced by Bill Gates on August 1, 1988, at COMDEX in Las Vegas. Initially a marketi ...
products,
Visual Studio Code Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code comple ...
and many others. SQL Server 2008 Management Studio has autocomplete for the SQL syntax.


Eclipse

The Eclipse IDE has code completion tools that come packaged with the program. It includes notable support for Java, C++, and JavaScript code authoring. The Code Recommenders Eclipse project used to provide powerful intelligent completion, but due to lack of resources, was dropped in Eclipse 2018–12, and then archived in July 2019.


Vim

Vim IntellisenseVim Intellisense
Insenvim.sourceforge.net. Retrieved on 2014-04-04. is an advanced code completion system for the Vim editor.


Example

Assume a C++ application being edited in Visual Studio has a class with some member functions: class Foo ; 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 beside their names). 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 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such ...
this displays the entire application domain object model available to the developer.


Notes


External links

* * * {{DEFAULTSORT:Integrated development environment * Text editor features Microsoft development tools Microsoft Visual Studio Autocomplete