HOME

TheInfoList



OR:

Code completion is an
autocompletion Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing. In Android and iOS smartphones, this is called predictive text. In graphical user interfaces, users can typically press the t ...
feature in many
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
s (IDEs) that speeds up the process of coding applications by fixing common mistakes and suggesting lines of code. This usually happens through popups while typing, querying parameters of functions, and query hints related to syntax errors. Modern code completion software typically uses
generative artificial intelligence Generative artificial intelligence (Generative AI, GenAI, or GAI) is a subfield of artificial intelligence that uses generative models to produce text, images, videos, or other forms of data. These models Machine learning, learn the underlyin ...
systems to predict lines of code. Code completion and related tools serve as documentation and disambiguation for variable names, functions, and
method Method (, methodos, from μετά/meta "in pursuit or quest of" + ὁδός/hodos "a method, system; a way or manner" of doing, saying, etc.), literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In re ...
s, using static analysis. The feature appears in many programming environments. Implementations include IntelliSense in
Visual Studio Code Visual Studio Code, commonly referred to as VS Code, is an integrated development environment developed by Microsoft for Windows, Linux, macOS and web browsers. Features include support for debugging, syntax highlighting, intelligent code comp ...
. 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 Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing. In Android and iOS smartphones, this is called predictive text. In graphical user interfaces, users can typically press the t ...
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 hoverbox, hovering over a screen element or component, a text box displays information about that element, such as a description of a ...
s. Intelligent code completion uses an automatically generated in-memory
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
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++), 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 or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
. The feature also lets users select from a number of overloaded functions in languages that support
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
. Some code editing software provide intelligent code completion through a Language Server Protocol (LSP) server.


History

Research on intelligent code completion began in 1957, with spelling checkers for
bitmap In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap. As a noun, the term "bitmap" is very often used to refer to a partic ...
images of cursive writing and special applications to find records in databases despite incorrect entries. In 1961, Les Earnest, 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 computer networks to implement the TCP/IP protocol suite. Both technologies became the tec ...
, 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, multi-user 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, a ...
program Ispell.


Support in editors and IDEs


Visual Studio

IntelliSense is
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
's implementation of code completion, best known in
Visual Studio Visual Studio is an integrated development environment (IDE) developed by Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development ...
. 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), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic (classic), the original Visual Basic suppo ...
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 programming language that was developed by Microsoft. It is a data-centric and procedural programming language with object-oriented programming (OOP) features. It was derived from FoxPro (which was itself descended from FoxB ...
and
Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++, C++/CLI 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 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 The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
product lines. For example, one of the most requested capabilities missing from the pre-.NET products was support for templates, 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#, J#,
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic (classic), the original Visual Basic suppo ...
,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
,
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
and
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text, or XSL Formatting Objects. These formats c ...
among others. As of
Visual Studio 2005 Visual Studio is an integrated development environment (IDE) developed by Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development ...
, 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, such as
GitHub Copilot GitHub Copilot is a code completion and automatic programming tool developed by GitHub and OpenAI that assists users of Visual Studio Code, Visual Studio, Neovim, and JetBrains integrated development environments (IDEs) by autocomplete, autocom ...
, which can automatically suggest entire lines of code based on surrounding context. Other Microsoft products that incorporate IntelliSense include Expression Web, 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, Visual Basic 6.0 built into most desktop Microsoft Office applications. Although based on pre-.NET Visual Basic, which is no ...
IDEs in the
Microsoft Office Microsoft Office, MS Office, or simply Office, is an office suite and family of client software, server software, and services developed by Microsoft. The first version of the Office suite, announced by Bill Gates on August 1, 1988, at CO ...
products,
Visual Studio Code Visual Studio Code, commonly referred to as VS Code, is an integrated development environment developed by Microsoft for Windows, Linux, macOS and web browsers. Features include support for debugging, syntax highlighting, intelligent code comp ...
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) developed by Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development ...
this displays the entire application domain object model available to the developer.


See also

* * Microsoft Copilot *
Autocomplete Autocomplete, or word completion, is a feature in which an application software, application predicts the rest of a word a user is typing. In Android (operating system), Android and iOS smartphones, this is called predictive text. In graphical us ...
*
Autocorrection Autocorrection, also known as text replacement, replace-as-you-type, text expander or simply autocorrect, is an automatic data validation function commonly found in word processors and text editing interfaces for smartphones and tablet computer ...


Notes

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