US20130263086A1 - Extensible Mechanism for Providing Suggestions in a Source Code Editor - Google Patents

Extensible Mechanism for Providing Suggestions in a Source Code Editor Download PDF

Info

Publication number
US20130263086A1
US20130263086A1 US13/430,738 US201213430738A US2013263086A1 US 20130263086 A1 US20130263086 A1 US 20130263086A1 US 201213430738 A US201213430738 A US 201213430738A US 2013263086 A1 US2013263086 A1 US 2013263086A1
Authority
US
United States
Prior art keywords
source code
code
editor
default display
computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US13/430,738
Other versions
US9170782B2 (en
Inventor
Jonathan P. Carter
Boris Asipov
Fiona Fung
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Microsoft Corp filed Critical Microsoft Corp
Priority to US13/430,738 priority Critical patent/US9170782B2/en
Assigned to MICROSOFT CORPORATION reassignment MICROSOFT CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: CARTER, JONATHAN P., FUNG, FIONA, ASIPOV, BORIS
Publication of US20130263086A1 publication Critical patent/US20130263086A1/en
Assigned to MICROSOFT TECHNOLOGY LICENSING, LLC reassignment MICROSOFT TECHNOLOGY LICENSING, LLC ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MICROSOFT CORPORATION
Application granted granted Critical
Publication of US9170782B2 publication Critical patent/US9170782B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Definitions

  • a dynamic programming language is one that at runtime executes behaviors that a static language typically either does not perform at all or performs during compilation.
  • the behaviors executed at runtime by a dynamic language can include extension of the program by adding new code, extension of the program by extending objects and definitions, or by modifying the type system.
  • information not available at compile time can significantly alter how the program executes. For example, in a static program, when a variable is declared in the source code, the declaration specifies the type of the variable: variable x is an integer, or variable x is a string, etc. If variable x is an integer, adding x to an integer constant will invoke an arithmetic add.
  • variable x is a string
  • adding x to a constant that is a string will invoke a concatenation of the constant and x.
  • type of the variable is not known until the program executes, so additional code paths are needed to handle the different types of add operations, adding overhead to program execution.
  • Examples of languages generally considered to be dynamic languages include but are not limited to: ActionScript, BASIC, BeanShell, ColdFusion, Common Lisp and some other Lisp languages, Groovy, E programming languages; JavaScript, VBScript, MATLAB, Lua, Objective-C, Perl, PHP, Powershell, Python, Ruby, Smalltalk, Tcl and Dolphin Smalltalk.
  • An extensible editor for editing program source code can customize editor suggestions comprising a collection of one or more entries using source code-specific extension code associated with program source code loaded into the extensible editor.
  • the extension code can be provided by a third party.
  • the extension code can reside in the source code file to which it applies.
  • the extension code can reside in a separate file from the file in which the source code resides.
  • a naming convention can be used to enable the extensible editor to locate the extension code.
  • the extension code can be written in the same programming language as is the source code.
  • the extension code can be written in a different programming language than the source code. Completion list items can be filtered, added, removed, or modified using an application programming interface (API) provided by the extensible editor.
  • API application programming interface
  • the API can allow the extension code to register for one or more events including but not limited to a completion hint event, a completion list event, and a function help event.
  • User-provided extension code can be used to customize default completion list results, completion hint information and/or function help information.
  • FIG. 1 a illustrates an example of a web browsing environment 100 that includes a browser application configured to render pages from received documents in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 b illustrates an example of a system 120 comprising an extensible editor for editing source code in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 c illustrates a first usage example 150 for removing completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 d illustrates a second usage example 160 for adding completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 e illustrates a third usage example 170 for filtering out completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 f illustrates a fourth usage example 180 for modifying parameter help in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 g illustrates a fifth usage example 190 for filtering out parameter help in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 h illustrates a sixth usage example 195 for modifying completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 i illustrates a seventh usage example 197 for providing a descriptive annotation of an entry in the modified default completion list in accordance with aspects of the subject matter disclosed herein;
  • FIG. 2 illustrates an example of a method 250 for providing suggestions in a source code editor using source code-specific extension code associated with program source code in accordance with aspects of the subject matter disclosed herein;
  • FIG. 3 is a block diagram of an example of a computing environment in accordance with aspects of the subject matter disclosed herein;
  • FIG. 4 is a block diagram of an example of an integrated development environment (IDE) in accordance with aspects of the subject matter disclosed herein.
  • IDE integrated development environment
  • a source code editor as described herein is able to provide suggestions for user selection as a software developer inputs source code.
  • a completion list function such as a member completion feature can display a list of object members when a user enters the object name. For example, suppose an object “point” is defined as:
  • a completion list feature can display a list of variables, functions, or arguments that are valid in the scope.
  • a list of keywords can also be displayed.
  • a completion list display can be automatically triggered by typing a character. The completion list display can be requested explicitly, (for example, by typing Ctrl-Space in Microsoft Corporation's Visual Studio®).
  • the completion list feature may display “foo”, “arg1”, and all the global object properties and keywords.
  • a source code editor as described herein can include a function help feature.
  • a function help feature may be triggered when a user inputs a call to a function.
  • the function help may be displayed when a triggering character such as opening bracket (e.g., “(” ) is input.
  • a source code editor as described herein can include a completion hint feature.
  • a completion hint can comprise information that describes what an entry is, (e.g., the entry is a method, a field, etc.), what the type of the item is, (e.g., the item is a number, string, object, function, etc.).
  • a completion hint can show summary text for an item, its lexical scope (global, local, argument, etc.) and so on.
  • the suggestions provided may include names of variables, functions and arguments valid in the scope, language keywords, or a list of object members.
  • the suggestions are typically displayed as a list from which a user can select an entry.
  • a completion list entry may represent a global variable, a local variable, a function, a function argument, an object member, or a keyword.
  • a user can highlight any list entry to get more information (e.g., to trigger display of a completion hint).
  • a completion hint may include function help information when an entry is a function. Highlighting an entry may return information concerning the nature of the entry, such as: the highlighted entry is a function or the highlighted entry is a variable, etc. Highlighting an entry that is a variable or an argument can return the runtime type of the variable or argument. Highlighting a function can return function signature help and so on.
  • Dynamic languages including but not limited to JavaScript are typically not strongly typed.
  • Some source code editors that operate within an integrated development environment determine type information for dynamic languages by executing the code (e.g., in the background) and checking the runtime type of the variable or argument as the program executes.
  • Type information and human readable descriptive annotations can also be specified for variables, fields, functions and arguments via documentation comments in the source code. This information can also be displayed to the user as part of the displayed suggestions.
  • the logic that populates a display with suggestions does not provide source-specific information. That is, the information provided uses programming language features rather than particular aspects of the source file being edited or referenced, such as author conventions and concepts.
  • user-provided extension code can be used to customize default display results including but not limited to: completion list results, completion hint results and/or function help results.
  • the extension code can be written in a dynamic programming language such as but not limited to JavaScript or can be written in any other programming language.
  • the extension code may reside in the same source file to which it applies.
  • the extension code may reside in a separate file than the file in which the source code resides.
  • the extension code may use an extensibility application programming interface (API) implemented by the IDE.
  • API extensibility application programming interface
  • the extension code can filter displayed items based on item name, kind (field, function, variable, etc.), runtime type, or runtime value.
  • the extension code can add, remove or modify display entries.
  • Extension code can be added, removed or modified in the display for different types of entries.
  • Extension code may change an entry icon.
  • the type and description information that is displayed to the user can be modified.
  • the API can be implemented in the dynamic language in which the source code is written (e.g., the source code file and the extension file can be written in the same programming language such as dynamic scripting languages such as but not limited to JavaScript).
  • the extension code does not need to be installed.
  • extension code can be added to a project in the integrated development environment (IDE) as files with specified extensions (e.g., as .js files).
  • Extension code can reside in a directory in which an IDE looks for extension files. When the source code file and the extension code are written in the same language, the developer does not need to learn a new programming language to take advantage of the extension capabilities.
  • Source-specific aspect of the source code concerns the way particular members or variables are prevented from appearing in a display.
  • Some programming languages including but not limited to JavaScript do not provide built-in access control support. That is, there is no concept of private and public entities in the JavaScript language. Commonly, by developer-decided convention, members that are private are prefixed with an underscore or some other prefix such as a dollar sign. Because conventions between different libraries, code modules, projects, applications, etc. differ, to prevent members considered private from appearing in the completion list, source-specific logic can be applied.
  • Another example of a source-specific aspect of the source code is using type information and human readable descriptive annotations provided as comments in a library-specific format.
  • type information and human readable descriptive annotations provided as comments in a library-specific format.
  • Known IDEs support an XML format for annotations but other commonly used annotations such as but not limited to JSDoc are also known.
  • An example of a library-specific concept concerns displaying an icon adjacent to a display entry to reflect its classification such as function, field, variable, argument, etc.).
  • Some libraries utilize higher level concepts such as “classes”, “components”, etc., which are not part of the programming language in which the source code is written.
  • Extension code can provide completion list, completion hint and function help information based on data retrieved from a network by the extension code. For example, extension code associated with a particular library may access a Web Server where an XML file including annotation information resides. The retrieved data can be used to populate a completion list, completion hint or function help display.
  • FIG. 1 a illustrates a web browsing environment 100 , in accordance with some aspects of the subject matter disclosed herein.
  • web browsing environment 100 can include one or more of: a computing device 102 , a server 104 , a network 106 and a browser application 108 .
  • Web browsing environment 100 may include other components known in the arts.
  • Computing device 102 can be any type of stationary or mobile computing device, including a desktop computer (e.g., a personal computer, etc.), a mobile computer or computing device (e.g., a Palm® device, a RIM Blackberry® device, a personal digital assistant (PDA), a laptop computer, a notebook computer, a tablet computer (e.g., an Apple iPadTM), a netbook, etc.), a mobile phone (e.g., a cell phone, a smart phone such as an Apple iPhone, a Google AndroidTM phone, a Microsoft Windows® phone, etc.), or other type of mobile device.
  • Server 104 may be implemented in one or more computer systems, including one or more servers, which may be any type of computing device described herein or otherwise known that is capable of enabling the corresponding functionality described herein.
  • Network 106 can include one or more communication links and/or communication networks, such as a PAN (personal area network), a LAN (local area network), a WAN (wide area network), or a combination of networks, such as the Internet.
  • Network 106 may include one or more communication links and/or communication networks, such as a PAN (personal area network), a LAN (local area network), a WAN (wide area network), or a combination of networks, such as the Internet.
  • Computing device 102 and server 104 may be communicatively coupled to network 106 using various links, including wired and/or wireless links, such as IEEE 802.11 wireless LAN (WLAN) wireless links, Worldwide Interoperability for Microwave Access (Wi-MAX) links, cellular network links, wireless personal area network (PAN) links (e.g., BluetoothTM links), Ethernet links, USB links, etc.
  • WLAN wireless local area network
  • Wi-MAX Worldwide Interoperability for Microwave Access
  • PAN personal area network
  • Ethernet links e.g.
  • Browser application 108 can be a program that can execute on computing device 102 .
  • Browser application 108 can enable network information resources to be retrieved, presented, and traversed.
  • An information resource or object can be retrieved by browser application 108 using a network address, such as a uniform resource identifier (URI).
  • URI uniform resource identifier
  • Examples of information resources include web pages, images, videos, and other forms of content. Hyperlinks that are present in information resources enable users easily to navigate their browsers to related resources.
  • Examples of browser application 108 include Internet Explorer®, developed by Microsoft Corp. of Redmond, Wash., Mozilla Firefox®, developed by Mozilla Corp. of Mountain View, Calif., Safari®, developed by Apple Inc. of Cupertino, Calif., and Google® Chrome of Mountain View, Calif.
  • Browser application 108 can retrieve a document 112 from a server 104 through network 106 .
  • Document 112 can be a web document that includes code of a markup language, such as Hyper Text Markup Language (HTML), dynamic HTML (DHTML), extensible HTML (XHTML), extensible markup language (XML), etc.
  • Document 112 can include DOM (document object model) objects 114 and one or more scripts 116 .
  • DOM objects 114 can include one or more objects represented in document 112 according to the DOM convention, which is a cross-platform and language-independent convention for representing and interacting with objects.
  • DOM objects 114 may include objects that are directly included in document 112 , and/or are referenced by document 112 and separately retrieved from server 104 or other server.
  • Script(s) 116 include code formatted according to a dynamic language (e.g., JavaScript, VBScript, AJAX, Python, Perl, etc.) that enables changes to be made to DOM objects 114 , including changes based on factors such as user input, environmental conditions (e.g., the time of day, or other variables), etc.
  • the code of script(s) 116 can access and modify objects of DOM objects 114 on the fly without returning to server 104 .
  • Browser application 108 can receive (e.g., load) document 112 .
  • Browser application 108 can include a browser engine (e.g., a layout engine or rendering engine) that formats information of document 112 , and displays the formatted information. For example, as shown in FIG. 1 a , browser application 108 can generate a page 118 based on document 112 that is displayed by a display 110 of computing device 102 .
  • Browser application 108 can be configured to execute one or more scripts 116 that are embedded in document 112 , or separate from but associated with document 112 .
  • FIG. 1 b illustrates a block diagram of a system 120 that provides an extensible programming source code editor, according to some aspects of the subject matter disclosed herein. All or portions of system 120 may reside on one or more computers such as the computers described below with respect to FIG. 3 . System 120 or portions thereof may be provided as a stand-alone system or as a plug-in or add-in. System 120 may execute on a software development computer such as the software development computer described with respect to FIG. 4 . System 120 may execute within an integrated development environment (IDE) such as IDE 122 , described more fully with respect to FIG. 4 or can execute outside an IDE. All or portions of system 120 may be implemented as a plug-in or add-on.
  • IDE integrated development environment
  • System 120 may include one or more computing devices or computers such as computing device 102 including one or more processors such as processor 142 , etc., a memory such as memory 144 , and one or more modules comprising an extensible program source code editor such as extensible program source code editor 124 as described herein. It will be appreciated that one or more modules such as extensible program source code editor 124 , etc. can be loaded into memory 144 to cause one or more processors such as processor 142 , etc. to perform the actions attributed to the one extensible program source code editor 124 . Other components well known in the arts may also be included in system 120 but are not here shown.
  • Extensible program source code editor 124 can be a source code editor for a static or dynamic programming language. Extensible program source code editor 124 can be a source code editor for a strongly or weakly typed programming language. Extensible program source code editor 124 can be but is not limited to being a script editor. Extensible program source code editor 124 can be but is not limited to being an editor for a language that is not compiled. Extensible program source code editor 124 can be but is not limited to being a JavaScript editor.
  • Extensible program source code editor 124 can receive a program source code file such as source code file 128 and a corresponding program source code extension file such as extension code 130 .
  • the corresponding program source code extension file can include extension program source code.
  • Extensible program source code editor 124 can receive a program source code file such as source code file 126 that includes program source code such as source code 126 a and extension code such as extension code 126 b .
  • Extensible program source code editor 124 can implement an application programming interface (API) such as extension API 134 to which extension code can apply to subscribe to events.
  • the events to which the extension code can apply and include but are not limited to: a display completion list event, a display completion hint event and a display function help event.
  • Suggestions may be provided to a user as a user edits or enters program source code in the extensible program source code editor 124 .
  • the suggestions provided may be in the form of function help.
  • the suggestions provided may be in the form of completion hints.
  • the suggestions provided may be in the form of an automatic completion list or an autocomplete function (e.g., such as but not limited to Microsoft Corporation's Intellisense®) in which the editor provides suggestions for completing a word or phrase that the user wants to enter without the user actually typing the word or phrase in completely.
  • an autocomplete function e.g., such as but not limited to Microsoft Corporation's Intellisense®
  • the information provided by the autocomplete function may be based on an execution model.
  • the information provided by the autocomplete function may be based on information available at compilation time.
  • the information provided by the autocomplete function may be based on analysis of the abstract syntax tree of the source code loaded into the editor corresponding to a user location or any combination thereof.
  • One such scenario occurs when the run-time behavior of the library inhibits the ability of the language service to provide results because a library wraps a user-defined function in another function that does not have the same statically-defined signature, preventing the suggestion providing feature from showing the expected parameters.
  • An example of when this scenario can occur is when, for example, a programming language (e.g., JavaScript) lacks the concept of classes.
  • a class-emulating library can be written in a programming language that lacks the concept of a class.
  • An outer, generic wrapping function can be written that returns a result from an inner, wrapped function whose arguments represents the type of the class using a parameter.
  • the suggestion providing function will not show the appropriate parameter (for the inner, wrapped function) because the outer function in which the class-emulating function is wrapped, does not have a parameter.
  • the author of the nested function can provide the parameter for the inner function by providing extension code that displays the parameter for the inner function.
  • Another scenario can occur when a library includes an event where calling the event's event handler may result in relevant display results but the event is not triggered before the point at which the display is requested.
  • the execution code can trigger the event so that the relevant display results are included in the display.
  • Another scenario can occur when a library includes throttling or timing behavior that is available at run-time but that prevents the language service from being able to retrieve the structural type information needed to provide more complete information.
  • the extension code can include logic that disregards time components at design time and returns the function as if it were not wrapped in the throttle.
  • the execution code can replace one function with another function. Extension code does not necessitate using an editor-implemented API in this scenario.
  • the language service cannot derive the information it needs because the context available at runtime cannot be predicted.
  • One such scenario can occur when a library allows a function definition to be passed as an argument to one of its functions.
  • a suggestion display is requested within the user-defined function, the values for the function or any of the function's parameters are not available. In this case, the expected values for a function and its parameters may not be provided.
  • An extension can be written that points the function to a different function at runtime. Extension code does not necessitate using an editor-implemented API in this scenario.
  • Another scenario can occur when the library includes semantics that the language service is not aware of that would be useful to expose to consumers through the display. Examples of this scenario include a library that includes members that are not meant to be exposed to users. Some programming languages such as but not limited to JavaScript do not include the concept of public and private entities preventing the language service from filtering out entries in the display.
  • a second example can occur when a library includes or creates objects that can be accompanied by a glyph or icon.
  • the glyph or icon can be a customized entity.
  • the glyph can override information. For example, the name of a function object may be accompanied by a class icon because that is how a user typically perceives it.
  • Another scenario can occur when the library's API would benefit from user-provided documentation but annotating the API is difficult.
  • it is problematic to include comments in library code because the person who provides the comments or annotations is not the person who develops or owns the library and therefore cannot add comments annotations to the library code. It may be undesirable to add comments to library code because it increases the library size and as a result increases download time and execution time.
  • Another example can be a library that defines members using an approach that is not supported by the language service. For example, in some known language services, comments are only parsed when they appear in a certain location with respect to service-supported entities.
  • the extension code can provide the user the opportunity to provide additional comments and documentation.
  • the extension code can provide the user an opportunity to read the annotations which the language service does not support or understand, and provide a more complete completion hint and/or function help information based on the annotations.
  • the language service providing suggestions is unaware of user-specific, source-specific, library/application/project-specific concepts.
  • some programming languages such as but not limited to JavaScript do not provide built-in access control.
  • languages in which there is no built-in access control there is no concept of public and private entities. For example, each field of an object is treated as a public field. Consequently, each field of the object will appear in a suggestion display.
  • a user may by individual convention indicate that an entity is private, by preceding the name or identifier with a particular character or series of characters such as dollar sign (“$”), underscore (“_”), “private” or the like but these personal conventions will not be respected by the language service, which will still display the private entities because the concept of private and public entities is not a feature of the programming language.
  • a user's preference may be to have these private entities filtered out from the display but the language service cannot respect these changes because the convention is not standardized across the universe of all developers.
  • the extension code can filter out the user-designated private entities from the suggestions display.
  • the extension code can tell the language service and editor how to hide private entities by implementing extension code.
  • the extension code can remove entries from the display.
  • the extension code can add entries to the display.
  • the extension code can change entries in the display.
  • a semantic meaning of entities displayed can include concepts that are not part of the programming language.
  • the JavaScript script language does not include the concept of “component” or “class”.
  • the semantic meaning of the entities may be a higher level concept that those appreciated by the programming language in which the source code or source code extension code is written.
  • the semantic meaning of the entities can be library or application-specific.
  • the semantic meaning of the entities can be indicated by indicators such as but not limited to icons, etc. Information concerning these language-independent concepts can be provided by the extension code by displaying the indicator in the suggestions display. These indicators can be filtered, added, changed or removed by the extension code.
  • the extensible program source code editor 124 can implement an extension API 134 .
  • the extension code can apply to this API to subscribe to events such as but not limited to show completion list, show completion hint and show function help.
  • the default contents e.g., default suggestions 138 generated by a language service such as language service 136
  • the default list can include a collection of list entries.
  • An event can be fired to notify the extension code that a default display has been received by the editor. “Firing an event” means to call all event handlers which are registered to that event.
  • the extension code can then change the contents of the display by providing additional extension suggestions, changing suggestion entries, removing suggestion entries and so on (cumulatively extension suggestions 140 ).
  • the extension code can provide an event handler which provides or modifies the information that is displayed in completion lists, completion hints, function help, etc. displayed by the editor.
  • the content of this descriptive information can be changed in the extension code based on information known because of an application-specific convention. For example, summary text can be obtained from a language service or other source and the summary text can be displayed.
  • the edited information can provide more information about the displayed information.
  • the information that is displayed to the user can provide domain-specific information that is not based on characteristics of the programming language but instead is based on the user's particular source code. A higher-level semantic can be exposed to the user.
  • the contents of comments in the code can be provided in a display 132 as a completion hint.
  • Additional documentation (comment) formats can be supported, including XML, and JSDoc, and so on.
  • FIG. 1 c illustrates code for a first usage example 150 for removing completion list entries in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 d illustrates code for a second usage example 160 for adding completion list entries in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 e illustrates code for a third usage example 170 for filtering out completion list entries in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 f illustrates code for a fourth usage example 180 for modifying parameter help in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 g illustrates code for a fifth usage example 190 for filtering out parameter help in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 h illustrates code for a six usage example 195 for modifying completion list entries in accordance with aspects of the subject matter disclosed herein.
  • FIG. 1 i illustrates code for a seventh usage example 197 for providing a descriptive annotation of an entry in the modified default completion list in accordance with aspects of the subject matter disclosed herein.
  • FIG. 2 illustrates a method 250 that can provide suggestions in a source code editor using source code-specific extension code associated with program source code in accordance with aspects of the subject matter disclosed herein.
  • the method described in FIG. 2 can be practiced by a system such as but not limited to the ones described with respect to FIG. 1 a and FIG. 1 b .
  • method 250 describes a series of acts that are performed in a sequence, it is to be understood that method 250 is not limited by the order of the sequence. For instance, some acts may occur in a different order than that described. In addition, an act may occur concurrently with another act. In some instances, not all acts may be performed.
  • a function can be initiated within the extensible editor, as described more fully above.
  • the function requested can be a completion list, function help or completion hint function.
  • Such a request can be initiated by a user inputting some character or series of characters followed by a particular character (e.g., a dot “.”) that triggers the request.
  • the request can be made explicitly via UI (menu command) or via a keyboard shortcut. Any typed character may trigger display of a completion list as the user types. For example, if a user types “a” an auto-complete function can be triggered that shows all available items in the scope that begin with “a”.
  • the request can be sent to a language service.
  • the language service can return a default display to the extensible editor.
  • the default display can include items discernible from features of the programming language.
  • the extensible editor can determine if there are any extensions that apply to the default completion list, by, for example, checking to see if there are any event subscribers to events including but not limited to show completion list, function help and completion hint. If there are no event subscribers, the default display can be displayed on a display device of the computer or computing device at 216 .
  • the programming language in which the extension code is written is based on an object model, the default display results can be wrapped into an object model of the appropriate programming language, (e.g., JavaScript).
  • the default display results can be sent to the extension code associated with the part of the code in which the request was triggered by firing an appropriate event.
  • the extension code associated with the request can be executed.
  • the extension code may determine that the editor should not display the results ( 218 ) and processing may resume normal editing operations at 201 . If the extension code determines at 212 that the results are to be displayed, the extension code involved with the interaction can apply changes as described more fully above to the default display at 214 .
  • the potentially modified display can be displayed at 216 . Processing can resume with normal editing functions at 201 .
  • FIG. 3 and the following discussion are intended to provide a brief general description of a suitable computing environment 510 in which various embodiments of the subject matter disclosed herein may be implemented. While the subject matter disclosed herein is described in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other computing devices, those skilled in the art will recognize that portions of the subject matter disclosed herein can also be implemented in combination with other program modules and/or a combination of hardware and software. Generally, program modules include routines, programs, objects, physical artifacts, data structures, etc. that perform particular tasks or implement particular data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments.
  • the computing environment 510 is only one example of a suitable operating environment and is not intended to limit the scope of use or functionality of the subject matter disclosed herein.
  • Computer 512 may include at least one processing unit 514 , a system memory 516 , and a system bus 518 .
  • the at least one processing unit 514 can execute instructions that are stored in a memory such as but not limited to system memory 516 .
  • the processing unit 514 can be any of various available processors.
  • the processing unit 514 can be a GPU.
  • the instructions can be instructions for implementing functionality carried out by one or more components or modules discussed above or instructions for implementing one or more of the methods described above. Dual microprocessors and other multiprocessor architectures also can be employed as the processing unit 514 .
  • the computer 512 may be used in a system that supports rendering graphics on a display screen.
  • the system memory 516 may include volatile memory 520 and nonvolatile memory 522 .
  • Nonvolatile memory 522 can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM) or flash memory.
  • Volatile memory 520 may include random access memory (RAM) which may act as external cache memory.
  • the system bus 518 couples system physical artifacts including the system memory 516 to the processing unit 514 .
  • the system bus 518 can be any of several types including a memory bus, memory controller, peripheral bus, external bus, or local bus and may use any variety of available bus architectures.
  • Computer 512 may include a data store accessible by the processing unit 514 by way of the system bus 518 .
  • the data store may include executable instructions, 3D models, materials, textures and so on for graphics rendering.
  • Computer 512 typically includes a variety of computer readable media such as volatile and nonvolatile media, removable and non-removable media.
  • Computer storage media may be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CDROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other transitory or non-transitory medium which can be used to store the desired information and which can be accessed by computer 512 .
  • FIG. 3 describes software that can act as an intermediary between users and computer resources.
  • This software may include an operating system 528 which can be stored on disk storage 524 , and which can allocate resources of the computer 512 .
  • Disk storage 524 may be a hard disk drive connected to the system bus 518 through a non-removable memory interface such as interface 526 .
  • System applications 530 take advantage of the management of resources by operating system 528 through program modules 532 and program data 534 stored either in system memory 516 or on disk storage 524 . It will be appreciated that computers can be implemented with various operating systems or combinations of operating systems.
  • a user can enter commands or information into the computer 512 through an input device(s) 536 .
  • Input devices 536 include but are not limited to a pointing device such as a mouse, trackball, stylus, touch pad, keyboard, microphone, voice and gesture input systems and the like. These and other input devices connect to the processing unit 514 through the system bus 518 via interface port(s) 538 .
  • An interface port(s) 538 may represent a serial port, parallel port, universal serial bus (USB) and the like.
  • Output devices(s) 540 may use the same type of ports as do the input devices.
  • Output adapter 542 is provided to illustrate that there are some output devices 540 like monitors, speakers and printers that require particular adapters.
  • Output adapters 542 include but are not limited to video and sound cards that provide a connection between the output device 540 and the system bus 518 .
  • Other devices and/or systems or devices such as remote computer(s) 544 may provide both input and output capabilities.
  • Computer 512 can operate in a networked environment using logical connections to one or more remote computers, such as a remote computer(s) 544 .
  • the remote computer 544 can be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 512 , although only a memory storage device 546 has been illustrated in FIG. 3 .
  • Remote computer(s) 544 can be logically connected via communication connection(s) 550 .
  • Network interface 548 encompasses communication networks such as local area networks (LANs) and wide area networks (WANs) but may also include other networks.
  • Communication connection(s) 550 refers to the hardware/software employed to connect the network interface 548 to the bus 518 .
  • Communication connection(s) 550 may be internal to or external to computer 512 and include internal and external technologies such as modems (telephone, cable, DSL and wireless) and ISDN adapters, Ethernet cards and so on.
  • a computer 512 or other client device can be deployed as part of a computer network.
  • the subject matter disclosed herein may pertain to any computer system having any number of memory or storage units, and any number of applications and processes occurring across any number of storage units or volumes.
  • aspects of the subject matter disclosed herein may apply to an environment with server computers and client computers deployed in a network environment, having remote or local storage.
  • aspects of the subject matter disclosed herein may also apply to a standalone computing device, having programming language functionality, interpretation and execution capabilities.
  • FIG. 4 illustrates an integrated development environment (IDE) 600 and Common Language Runtime Environment 602 .
  • An IDE 600 may allow a user (e.g., developer, programmer, designer, coder, etc.) to design, code, compile, test, run, edit, debug or build a program, set of programs, web sites, web applications, and web services in a computer system.
  • Software programs can include source code (component 610 ), created in one or more source code languages (e.g., Visual Basic, Visual J#, C++. C#, J#, Java Script, APL, COBOL, Pascal, Eiffel, Haskell, M L, Oberon, Perl, Python, Scheme, Smalltalk and the like).
  • the IDE 600 may provide a native code development environment or may provide a managed code development that runs on a virtual machine or may provide a combination thereof.
  • the IDE 600 may provide a managed code development environment using the .NET framework.
  • An intermediate language component 650 may be created from the source code component 610 and the native code component 611 using a language specific source compiler 620 using a modeling tool 652 and model store 653 and the native code component 611 (e.g., machine executable instructions) is created from the intermediate language component 650 using the intermediate language compiler 660 (e.g. just-in-time (JIT) compiler), when the application is executed.
  • JIT just-in-time
  • an IL application when executed, it is compiled while being executed into the appropriate machine language for the platform it is being executed on, thereby making code portable across several platforms.
  • programs may be compiled to native code machine language (not shown) appropriate for its intended platform.
  • a user can create and/or edit the source code component according to known software programming techniques and the specific logical and syntactical rules associated with a particular source language via a user interface 640 and a source code editor 651 in the IDE 600 . Thereafter, the source code component 610 can be compiled via a source compiler 620 , whereby an intermediate language representation of the program may be created, such as assembly 630 .
  • the assembly 630 may comprise the intermediate language component 650 and metadata 642 .
  • Application designs may be able to be validated before deployment.
  • the various techniques described herein may be implemented in connection with hardware or software or, where appropriate, with a combination of both.
  • the methods and apparatus described herein, or certain aspects or portions thereof may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing aspects of the subject matter disclosed herein.
  • the term “machine-readable medium” shall be taken to exclude any mechanism that provides (i.e., stores and/or transmits) any form of propagated signals.
  • the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
  • One or more programs that may utilize the creation and/or implementation of domain-specific programming models aspects, e.g., through the use of a data processing API or the like, may be implemented in a high level procedural or object oriented programming language to communicate with a computer system.
  • the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language, and combined with hardware implementations.

Abstract

An extensible editor for editing program source code can customize a default display provided by a language service in an IDE. The default display can be modified using source code-specific extension code. The extension code can be provided by a third party. The extension code can reside in the source code file to which it applies. The extension code can reside in a separate file from the file in which the source code resides. A naming convention can be used to enable the extensible editor to locate the extension code. Display entries can be filtered, added, removed, or modified using an API provided by the extensible editor. The API can allow the extension code to register for one or more events including but not limited to a completion hint event, a completion list event, and a function help event. User-provided extensions can be used to customize default display results.

Description

    BACKGROUND
  • A dynamic programming language is one that at runtime executes behaviors that a static language typically either does not perform at all or performs during compilation. The behaviors executed at runtime by a dynamic language can include extension of the program by adding new code, extension of the program by extending objects and definitions, or by modifying the type system. In a dynamic programming language, information not available at compile time can significantly alter how the program executes. For example, in a static program, when a variable is declared in the source code, the declaration specifies the type of the variable: variable x is an integer, or variable x is a string, etc. If variable x is an integer, adding x to an integer constant will invoke an arithmetic add. If variable x is a string, adding x to a constant that is a string will invoke a concatenation of the constant and x. In a dynamic programming language, the type of the variable is not known until the program executes, so additional code paths are needed to handle the different types of add operations, adding overhead to program execution.
  • Examples of languages generally considered to be dynamic languages include but are not limited to: ActionScript, BASIC, BeanShell, ColdFusion, Common Lisp and some other Lisp languages, Groovy, E programming languages; JavaScript, VBScript, MATLAB, Lua, Objective-C, Perl, PHP, Powershell, Python, Ruby, Smalltalk, Tcl and Dolphin Smalltalk.
  • SUMMARY
  • An extensible editor for editing program source code can customize editor suggestions comprising a collection of one or more entries using source code-specific extension code associated with program source code loaded into the extensible editor. The extension code can be provided by a third party. The extension code can reside in the source code file to which it applies. The extension code can reside in a separate file from the file in which the source code resides. A naming convention can be used to enable the extensible editor to locate the extension code. The extension code can be written in the same programming language as is the source code. The extension code can be written in a different programming language than the source code. Completion list items can be filtered, added, removed, or modified using an application programming interface (API) provided by the extensible editor. The API can allow the extension code to register for one or more events including but not limited to a completion hint event, a completion list event, and a function help event. User-provided extension code can be used to customize default completion list results, completion hint information and/or function help information.
  • This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • In the drawings:
  • FIG. 1 a illustrates an example of a web browsing environment 100 that includes a browser application configured to render pages from received documents in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 b illustrates an example of a system 120 comprising an extensible editor for editing source code in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 c illustrates a first usage example 150 for removing completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 d illustrates a second usage example 160 for adding completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 e illustrates a third usage example 170 for filtering out completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 f illustrates a fourth usage example 180 for modifying parameter help in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 g illustrates a fifth usage example 190 for filtering out parameter help in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 h illustrates a sixth usage example 195 for modifying completion list entries in accordance with aspects of the subject matter disclosed herein;
  • FIG. 1 i illustrates a seventh usage example 197 for providing a descriptive annotation of an entry in the modified default completion list in accordance with aspects of the subject matter disclosed herein;
  • FIG. 2 illustrates an example of a method 250 for providing suggestions in a source code editor using source code-specific extension code associated with program source code in accordance with aspects of the subject matter disclosed herein;
  • FIG. 3 is a block diagram of an example of a computing environment in accordance with aspects of the subject matter disclosed herein; and
  • FIG. 4 is a block diagram of an example of an integrated development environment (IDE) in accordance with aspects of the subject matter disclosed herein.
  • DETAILED DESCRIPTION Overview
  • A source code editor as described herein is able to provide suggestions for user selection as a software developer inputs source code. For example, a completion list function such as a member completion feature can display a list of object members when a user enters the object name. For example, suppose an object “point” is defined as:
      • var point={x:0, y:0};
        Suppose that a user types:
      • point.
        When the user types the dot following the object name, a completion list showing the members of the “point” object may be shown. That is, a member completion feature may display:
      • x
      • y
  • A completion list feature can display a list of variables, functions, or arguments that are valid in the scope. A list of keywords can also be displayed. A completion list display can be automatically triggered by typing a character. The completion list display can be requested explicitly, (for example, by typing Ctrl-Space in Microsoft Corporation's Visual Studio®).
  • For example for the following:
  • function foo( ) { }
    function bar(arg1) {
    <user requests completion list explicitly here>
    }

    The completion list feature may display “foo”, “arg1”, and all the global object properties and keywords.
  • A source code editor as described herein can include a function help feature. A function help feature may be triggered when a user inputs a call to a function. The function help may be displayed when a triggering character such as opening bracket (e.g., “(” ) is input.
  • For the following function:
  • function add(one, two) {
    /// <summary>adds two numbers</summary>
    /// <param name=“one” type=“Number”>first arg</param>
    /// <param name=“two” type=“Number”>second arg</param>
    /// <returns type=“Number”/>
     return one + two;
    }

    when the user inputs a call to the “add” function, the following information can be displayed when user types the call opening bracket:
      • Number add(Number one, Number two)
      • adds two numbers
      • one: first arg
  • A source code editor as described herein can include a completion hint feature. A completion hint can comprise information that describes what an entry is, (e.g., the entry is a method, a field, etc.), what the type of the item is, (e.g., the item is a number, string, object, function, etc.). A completion hint can show summary text for an item, its lexical scope (global, local, argument, etc.) and so on.
  • For dynamic languages the suggestions provided may include names of variables, functions and arguments valid in the scope, language keywords, or a list of object members. The suggestions are typically displayed as a list from which a user can select an entry. For example, a completion list entry may represent a global variable, a local variable, a function, a function argument, an object member, or a keyword. A user can highlight any list entry to get more information (e.g., to trigger display of a completion hint). A completion hint may include function help information when an entry is a function. Highlighting an entry may return information concerning the nature of the entry, such as: the highlighted entry is a function or the highlighted entry is a variable, etc. Highlighting an entry that is a variable or an argument can return the runtime type of the variable or argument. Highlighting a function can return function signature help and so on.
  • Dynamic languages including but not limited to JavaScript are typically not strongly typed. Some source code editors that operate within an integrated development environment determine type information for dynamic languages by executing the code (e.g., in the background) and checking the runtime type of the variable or argument as the program executes. Type information and human readable descriptive annotations can also be specified for variables, fields, functions and arguments via documentation comments in the source code. This information can also be displayed to the user as part of the displayed suggestions. Traditionally, the logic that populates a display with suggestions does not provide source-specific information. That is, the information provided uses programming language features rather than particular aspects of the source file being edited or referenced, such as author conventions and concepts.
  • In accordance with aspects of the subject matter disclosed herein, user-provided extension code can be used to customize default display results including but not limited to: completion list results, completion hint results and/or function help results. The extension code can be written in a dynamic programming language such as but not limited to JavaScript or can be written in any other programming language. The extension code may reside in the same source file to which it applies. The extension code may reside in a separate file than the file in which the source code resides. The extension code may use an extensibility application programming interface (API) implemented by the IDE. The extension code can filter displayed items based on item name, kind (field, function, variable, etc.), runtime type, or runtime value. The extension code can add, remove or modify display entries. Displayed icons can be added, removed or modified in the display for different types of entries. Extension code may change an entry icon. The type and description information that is displayed to the user can be modified. The API can be implemented in the dynamic language in which the source code is written (e.g., the source code file and the extension file can be written in the same programming language such as dynamic scripting languages such as but not limited to JavaScript). In some cases, the extension code does not need to be installed. For example, extension code can be added to a project in the integrated development environment (IDE) as files with specified extensions (e.g., as .js files). Extension code can reside in a directory in which an IDE looks for extension files. When the source code file and the extension code are written in the same language, the developer does not need to learn a new programming language to take advantage of the extension capabilities.
  • One example of a source-specific aspect of the source code concerns the way particular members or variables are prevented from appearing in a display. Some programming languages including but not limited to JavaScript, do not provide built-in access control support. That is, there is no concept of private and public entities in the JavaScript language. Commonly, by developer-decided convention, members that are private are prefixed with an underscore or some other prefix such as a dollar sign. Because conventions between different libraries, code modules, projects, applications, etc. differ, to prevent members considered private from appearing in the completion list, source-specific logic can be applied.
  • Another example of a source-specific aspect of the source code is using type information and human readable descriptive annotations provided as comments in a library-specific format. Currently there is no single standard for annotating variables, fields, arguments and functions with type and description information in a particular format. Known IDEs support an XML format for annotations but other commonly used annotations such as but not limited to JSDoc are also known.
  • An example of a library-specific concept concerns displaying an icon adjacent to a display entry to reflect its classification such as function, field, variable, argument, etc.). Some libraries utilize higher level concepts such as “classes”, “components”, etc., which are not part of the programming language in which the source code is written.
  • Extension code can provide completion list, completion hint and function help information based on data retrieved from a network by the extension code. For example, extension code associated with a particular library may access a Web Server where an XML file including annotation information resides. The retrieved data can be used to populate a completion list, completion hint or function help display.
  • It will be appreciated that while described within the context of a dynamic programming language, the subject matter described herein is applicable to any programming language whether dynamic or static, strongly or weakly typed.
  • Extensible Mechanism for Providing Suggestions in a Source Code Editor
  • FIG. 1 a illustrates a web browsing environment 100, in accordance with some aspects of the subject matter disclosed herein. As shown in FIG. 1 a, web browsing environment 100 can include one or more of: a computing device 102, a server 104, a network 106 and a browser application 108. Web browsing environment 100 may include other components known in the arts.
  • Computing device 102 can be any type of stationary or mobile computing device, including a desktop computer (e.g., a personal computer, etc.), a mobile computer or computing device (e.g., a Palm® device, a RIM Blackberry® device, a personal digital assistant (PDA), a laptop computer, a notebook computer, a tablet computer (e.g., an Apple iPad™), a netbook, etc.), a mobile phone (e.g., a cell phone, a smart phone such as an Apple iPhone, a Google Android™ phone, a Microsoft Windows® phone, etc.), or other type of mobile device. Server 104 may be implemented in one or more computer systems, including one or more servers, which may be any type of computing device described herein or otherwise known that is capable of enabling the corresponding functionality described herein.
  • Computing device 102 and server 104 can be communicatively coupled by network 106. Network 106 can include one or more communication links and/or communication networks, such as a PAN (personal area network), a LAN (local area network), a WAN (wide area network), or a combination of networks, such as the Internet. Computing device 102 and server 104 may be communicatively coupled to network 106 using various links, including wired and/or wireless links, such as IEEE 802.11 wireless LAN (WLAN) wireless links, Worldwide Interoperability for Microwave Access (Wi-MAX) links, cellular network links, wireless personal area network (PAN) links (e.g., Bluetooth™ links), Ethernet links, USB links, etc.
  • Browser application 108 can be a program that can execute on computing device 102. Browser application 108 can enable network information resources to be retrieved, presented, and traversed. An information resource or object can be retrieved by browser application 108 using a network address, such as a uniform resource identifier (URI). Examples of information resources include web pages, images, videos, and other forms of content. Hyperlinks that are present in information resources enable users easily to navigate their browsers to related resources. Examples of browser application 108 include Internet Explorer®, developed by Microsoft Corp. of Redmond, Wash., Mozilla Firefox®, developed by Mozilla Corp. of Mountain View, Calif., Safari®, developed by Apple Inc. of Cupertino, Calif., and Google® Chrome of Mountain View, Calif.
  • Browser application 108 can retrieve a document 112 from a server 104 through network 106. Document 112 can be a web document that includes code of a markup language, such as Hyper Text Markup Language (HTML), dynamic HTML (DHTML), extensible HTML (XHTML), extensible markup language (XML), etc. Document 112 can include DOM (document object model) objects 114 and one or more scripts 116. DOM objects 114 can include one or more objects represented in document 112 according to the DOM convention, which is a cross-platform and language-independent convention for representing and interacting with objects. DOM objects 114 may include objects that are directly included in document 112, and/or are referenced by document 112 and separately retrieved from server 104 or other server. Script(s) 116 include code formatted according to a dynamic language (e.g., JavaScript, VBScript, AJAX, Python, Perl, etc.) that enables changes to be made to DOM objects 114, including changes based on factors such as user input, environmental conditions (e.g., the time of day, or other variables), etc. The code of script(s) 116 can access and modify objects of DOM objects 114 on the fly without returning to server 104.
  • Browser application 108 can receive (e.g., load) document 112. Browser application 108 can include a browser engine (e.g., a layout engine or rendering engine) that formats information of document 112, and displays the formatted information. For example, as shown in FIG. 1 a, browser application 108 can generate a page 118 based on document 112 that is displayed by a display 110 of computing device 102. Browser application 108 can be configured to execute one or more scripts 116 that are embedded in document 112, or separate from but associated with document 112.
  • FIG. 1 b illustrates a block diagram of a system 120 that provides an extensible programming source code editor, according to some aspects of the subject matter disclosed herein. All or portions of system 120 may reside on one or more computers such as the computers described below with respect to FIG. 3. System 120 or portions thereof may be provided as a stand-alone system or as a plug-in or add-in. System 120 may execute on a software development computer such as the software development computer described with respect to FIG. 4. System 120 may execute within an integrated development environment (IDE) such as IDE 122, described more fully with respect to FIG. 4 or can execute outside an IDE. All or portions of system 120 may be implemented as a plug-in or add-on.
  • System 120 may include one or more computing devices or computers such as computing device 102 including one or more processors such as processor 142, etc., a memory such as memory 144, and one or more modules comprising an extensible program source code editor such as extensible program source code editor 124 as described herein. It will be appreciated that one or more modules such as extensible program source code editor 124, etc. can be loaded into memory 144 to cause one or more processors such as processor 142, etc. to perform the actions attributed to the one extensible program source code editor 124. Other components well known in the arts may also be included in system 120 but are not here shown.
  • Extensible program source code editor 124 can be a source code editor for a static or dynamic programming language. Extensible program source code editor 124 can be a source code editor for a strongly or weakly typed programming language. Extensible program source code editor 124 can be but is not limited to being a script editor. Extensible program source code editor 124 can be but is not limited to being an editor for a language that is not compiled. Extensible program source code editor 124 can be but is not limited to being a JavaScript editor.
  • Extensible program source code editor 124 can receive a program source code file such as source code file 128 and a corresponding program source code extension file such as extension code 130. The corresponding program source code extension file can include extension program source code. Extensible program source code editor 124 can receive a program source code file such as source code file 126 that includes program source code such as source code 126 a and extension code such as extension code 126 b. Extensible program source code editor 124 can implement an application programming interface (API) such as extension API 134 to which extension code can apply to subscribe to events. The events to which the extension code can apply and include but are not limited to: a display completion list event, a display completion hint event and a display function help event.
  • Suggestions may be provided to a user as a user edits or enters program source code in the extensible program source code editor 124. The suggestions provided may be in the form of function help. The suggestions provided may be in the form of completion hints. The suggestions provided may be in the form of an automatic completion list or an autocomplete function (e.g., such as but not limited to Microsoft Corporation's Intellisense®) in which the editor provides suggestions for completing a word or phrase that the user wants to enter without the user actually typing the word or phrase in completely. For example, a list of previously defined variables, a list of previously defined functions, a list of applicable arguments and so on can be displayed. The information provided by the autocomplete function may be based on an execution model. The information provided by the autocomplete function may be based on information available at compilation time. The information provided by the autocomplete function may be based on analysis of the abstract syntax tree of the source code loaded into the editor corresponding to a user location or any combination thereof.
  • While default suggestions are often quite accurate, there can be situations in which the default suggestions leave something to be desired. For dynamic languages, for example, because of the execution-based nature of some language services, traditional display results for libraries including third-party libraries can be misleading, incomplete or include items that should not be included. Sometimes, the language service cannot derive the information it needs to provide display results because of the runtime behavior of the language.
  • One such scenario occurs when the run-time behavior of the library inhibits the ability of the language service to provide results because a library wraps a user-defined function in another function that does not have the same statically-defined signature, preventing the suggestion providing feature from showing the expected parameters.
  • An example of when this scenario can occur is when, for example, a programming language (e.g., JavaScript) lacks the concept of classes. A class-emulating library can be written in a programming language that lacks the concept of a class. An outer, generic wrapping function can be written that returns a result from an inner, wrapped function whose arguments represents the type of the class using a parameter. The suggestion providing function will not show the appropriate parameter (for the inner, wrapped function) because the outer function in which the class-emulating function is wrapped, does not have a parameter. The author of the nested function can provide the parameter for the inner function by providing extension code that displays the parameter for the inner function.
  • Another scenario can occur when a library includes an event where calling the event's event handler may result in relevant display results but the event is not triggered before the point at which the display is requested. In this case, the execution code can trigger the event so that the relevant display results are included in the display. Another scenario can occur when a library includes throttling or timing behavior that is available at run-time but that prevents the language service from being able to retrieve the structural type information needed to provide more complete information. The extension code can include logic that disregards time components at design time and returns the function as if it were not wrapped in the throttle. The execution code can replace one function with another function. Extension code does not necessitate using an editor-implemented API in this scenario.
  • Sometimes, the language service cannot derive the information it needs because the context available at runtime cannot be predicted. One such scenario can occur when a library allows a function definition to be passed as an argument to one of its functions. When a suggestion display is requested within the user-defined function, the values for the function or any of the function's parameters are not available. In this case, the expected values for a function and its parameters may not be provided. An extension can be written that points the function to a different function at runtime. Extension code does not necessitate using an editor-implemented API in this scenario.
  • Another scenario can occur when the library includes semantics that the language service is not aware of that would be useful to expose to consumers through the display. Examples of this scenario include a library that includes members that are not meant to be exposed to users. Some programming languages such as but not limited to JavaScript do not include the concept of public and private entities preventing the language service from filtering out entries in the display. A second example can occur when a library includes or creates objects that can be accompanied by a glyph or icon. The glyph or icon can be a customized entity. The glyph can override information. For example, the name of a function object may be accompanied by a class icon because that is how a user typically perceives it.
  • Another scenario can occur when the library's API would benefit from user-provided documentation but annotating the API is difficult. Sometimes it is problematic to include comments in library code because the person who provides the comments or annotations is not the person who develops or owns the library and therefore cannot add comments annotations to the library code. It may be undesirable to add comments to library code because it increases the library size and as a result increases download time and execution time. Another example can be a library that defines members using an approach that is not supported by the language service. For example, in some known language services, comments are only parsed when they appear in a certain location with respect to service-supported entities. The extension code can provide the user the opportunity to provide additional comments and documentation. The extension code can provide the user an opportunity to read the annotations which the language service does not support or understand, and provide a more complete completion hint and/or function help information based on the annotations.
  • In accordance with some aspects of the subject matter disclosed herein, the language service providing suggestions is unaware of user-specific, source-specific, library/application/project-specific concepts. For example, some programming languages such as but not limited to JavaScript do not provide built-in access control. In languages in which there is no built-in access control, there is no concept of public and private entities. For example, each field of an object is treated as a public field. Consequently, each field of the object will appear in a suggestion display. A user may by individual convention indicate that an entity is private, by preceding the name or identifier with a particular character or series of characters such as dollar sign (“$”), underscore (“_”), “private” or the like but these personal conventions will not be respected by the language service, which will still display the private entities because the concept of private and public entities is not a feature of the programming language. A user's preference may be to have these private entities filtered out from the display but the language service cannot respect these changes because the convention is not standardized across the universe of all developers.
  • In accordance with some aspects of the subject matter disclosed herein, the extension code can filter out the user-designated private entities from the suggestions display. The extension code can tell the language service and editor how to hide private entities by implementing extension code. The extension code can remove entries from the display. The extension code can add entries to the display. The extension code can change entries in the display.
  • A semantic meaning of entities displayed can include concepts that are not part of the programming language. For example, the JavaScript script language does not include the concept of “component” or “class”. The semantic meaning of the entities may be a higher level concept that those appreciated by the programming language in which the source code or source code extension code is written. The semantic meaning of the entities can be library or application-specific. The semantic meaning of the entities can be indicated by indicators such as but not limited to icons, etc. Information concerning these language-independent concepts can be provided by the extension code by displaying the indicator in the suggestions display. These indicators can be filtered, added, changed or removed by the extension code.
  • The extensible program source code editor 124 can implement an extension API 134. The extension code can apply to this API to subscribe to events such as but not limited to show completion list, show completion hint and show function help. In response to subscribing to an event, the default contents (e.g., default suggestions 138 generated by a language service such as language service 136) can be returned to the extension code loaded into the extensible program source code editor 124. The default list can include a collection of list entries. An event can be fired to notify the extension code that a default display has been received by the editor. “Firing an event” means to call all event handlers which are registered to that event. The extension code can then change the contents of the display by providing additional extension suggestions, changing suggestion entries, removing suggestion entries and so on (cumulatively extension suggestions 140). For each item, the extension code can provide an event handler which provides or modifies the information that is displayed in completion lists, completion hints, function help, etc. displayed by the editor. The content of this descriptive information can be changed in the extension code based on information known because of an application-specific convention. For example, summary text can be obtained from a language service or other source and the summary text can be displayed. The edited information can provide more information about the displayed information. Thus the information that is displayed to the user (e.g., suggestions display 132, which can be displayed on a display device of the computing device 102) can provide domain-specific information that is not based on characteristics of the programming language but instead is based on the user's particular source code. A higher-level semantic can be exposed to the user.
  • The contents of comments in the code can be provided in a display 132 as a completion hint. Additional documentation (comment) formats can be supported, including XML, and JSDoc, and so on.
  • FIG. 1 c illustrates code for a first usage example 150 for removing completion list entries in accordance with aspects of the subject matter disclosed herein. FIG. 1 d illustrates code for a second usage example 160 for adding completion list entries in accordance with aspects of the subject matter disclosed herein. FIG. 1 e illustrates code for a third usage example 170 for filtering out completion list entries in accordance with aspects of the subject matter disclosed herein. FIG. 1 f illustrates code for a fourth usage example 180 for modifying parameter help in accordance with aspects of the subject matter disclosed herein. FIG. 1 g illustrates code for a fifth usage example 190 for filtering out parameter help in accordance with aspects of the subject matter disclosed herein. FIG. 1 h illustrates code for a six usage example 195 for modifying completion list entries in accordance with aspects of the subject matter disclosed herein. FIG. 1 i illustrates code for a seventh usage example 197 for providing a descriptive annotation of an entry in the modified default completion list in accordance with aspects of the subject matter disclosed herein.
  • FIG. 2 illustrates a method 250 that can provide suggestions in a source code editor using source code-specific extension code associated with program source code in accordance with aspects of the subject matter disclosed herein. The method described in FIG. 2 can be practiced by a system such as but not limited to the ones described with respect to FIG. 1 a and FIG. 1 b. While method 250 describes a series of acts that are performed in a sequence, it is to be understood that method 250 is not limited by the order of the sequence. For instance, some acts may occur in a different order than that described. In addition, an act may occur concurrently with another act. In some instances, not all acts may be performed.
  • At 201 editing operations in an extensible source code editor may occur. At 202 a function can be initiated within the extensible editor, as described more fully above. The function requested can be a completion list, function help or completion hint function. Such a request can be initiated by a user inputting some character or series of characters followed by a particular character (e.g., a dot “.”) that triggers the request. The request can be made explicitly via UI (menu command) or via a keyboard shortcut. Any typed character may trigger display of a completion list as the user types. For example, if a user types “a” an auto-complete function can be triggered that shows all available items in the scope that begin with “a”.
  • The request can be sent to a language service. At 204 the language service can return a default display to the extensible editor. The default display can include items discernible from features of the programming language. At 206 the extensible editor can determine if there are any extensions that apply to the default completion list, by, for example, checking to see if there are any event subscribers to events including but not limited to show completion list, function help and completion hint. If there are no event subscribers, the default display can be displayed on a display device of the computer or computing device at 216. At 208, if the programming language in which the extension code is written is based on an object model, the default display results can be wrapped into an object model of the appropriate programming language, (e.g., JavaScript). At 210 the default display results can be sent to the extension code associated with the part of the code in which the request was triggered by firing an appropriate event. At 211 the extension code associated with the request can be executed. At 212 the extension code may determine that the editor should not display the results (218) and processing may resume normal editing operations at 201. If the extension code determines at 212 that the results are to be displayed, the extension code involved with the interaction can apply changes as described more fully above to the default display at 214. The potentially modified display can be displayed at 216. Processing can resume with normal editing functions at 201.
  • Example of a Suitable Computing Environment
  • In order to provide context for various aspects of the subject matter disclosed herein, FIG. 3 and the following discussion are intended to provide a brief general description of a suitable computing environment 510 in which various embodiments of the subject matter disclosed herein may be implemented. While the subject matter disclosed herein is described in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other computing devices, those skilled in the art will recognize that portions of the subject matter disclosed herein can also be implemented in combination with other program modules and/or a combination of hardware and software. Generally, program modules include routines, programs, objects, physical artifacts, data structures, etc. that perform particular tasks or implement particular data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments. The computing environment 510 is only one example of a suitable operating environment and is not intended to limit the scope of use or functionality of the subject matter disclosed herein.
  • With reference to FIG. 3, a computing device in the form of a computer 512 is described. Computer 512 may include at least one processing unit 514, a system memory 516, and a system bus 518. The at least one processing unit 514 can execute instructions that are stored in a memory such as but not limited to system memory 516. The processing unit 514 can be any of various available processors. For example, the processing unit 514 can be a GPU. The instructions can be instructions for implementing functionality carried out by one or more components or modules discussed above or instructions for implementing one or more of the methods described above. Dual microprocessors and other multiprocessor architectures also can be employed as the processing unit 514. The computer 512 may be used in a system that supports rendering graphics on a display screen. In another example, at least a portion of the computing device can be used in a system that comprises a graphical processing unit. The system memory 516 may include volatile memory 520 and nonvolatile memory 522. Nonvolatile memory 522 can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM) or flash memory. Volatile memory 520 may include random access memory (RAM) which may act as external cache memory. The system bus 518 couples system physical artifacts including the system memory 516 to the processing unit 514. The system bus 518 can be any of several types including a memory bus, memory controller, peripheral bus, external bus, or local bus and may use any variety of available bus architectures. Computer 512 may include a data store accessible by the processing unit 514 by way of the system bus 518. The data store may include executable instructions, 3D models, materials, textures and so on for graphics rendering.
  • Computer 512 typically includes a variety of computer readable media such as volatile and nonvolatile media, removable and non-removable media. Computer storage media may be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CDROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other transitory or non-transitory medium which can be used to store the desired information and which can be accessed by computer 512.
  • It will be appreciated that FIG. 3 describes software that can act as an intermediary between users and computer resources. This software may include an operating system 528 which can be stored on disk storage 524, and which can allocate resources of the computer 512. Disk storage 524 may be a hard disk drive connected to the system bus 518 through a non-removable memory interface such as interface 526. System applications 530 take advantage of the management of resources by operating system 528 through program modules 532 and program data 534 stored either in system memory 516 or on disk storage 524. It will be appreciated that computers can be implemented with various operating systems or combinations of operating systems.
  • A user can enter commands or information into the computer 512 through an input device(s) 536. Input devices 536 include but are not limited to a pointing device such as a mouse, trackball, stylus, touch pad, keyboard, microphone, voice and gesture input systems and the like. These and other input devices connect to the processing unit 514 through the system bus 518 via interface port(s) 538. An interface port(s) 538 may represent a serial port, parallel port, universal serial bus (USB) and the like. Output devices(s) 540 may use the same type of ports as do the input devices. Output adapter 542 is provided to illustrate that there are some output devices 540 like monitors, speakers and printers that require particular adapters. Output adapters 542 include but are not limited to video and sound cards that provide a connection between the output device 540 and the system bus 518. Other devices and/or systems or devices such as remote computer(s) 544 may provide both input and output capabilities.
  • Computer 512 can operate in a networked environment using logical connections to one or more remote computers, such as a remote computer(s) 544. The remote computer 544 can be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 512, although only a memory storage device 546 has been illustrated in FIG. 3. Remote computer(s) 544 can be logically connected via communication connection(s) 550. Network interface 548 encompasses communication networks such as local area networks (LANs) and wide area networks (WANs) but may also include other networks. Communication connection(s) 550 refers to the hardware/software employed to connect the network interface 548 to the bus 518. Communication connection(s) 550 may be internal to or external to computer 512 and include internal and external technologies such as modems (telephone, cable, DSL and wireless) and ISDN adapters, Ethernet cards and so on.
  • It will be appreciated that the network connections shown are examples only and other means of establishing a communications link between the computers may be used. One of ordinary skill in the art can appreciate that a computer 512 or other client device can be deployed as part of a computer network. In this regard, the subject matter disclosed herein may pertain to any computer system having any number of memory or storage units, and any number of applications and processes occurring across any number of storage units or volumes. Aspects of the subject matter disclosed herein may apply to an environment with server computers and client computers deployed in a network environment, having remote or local storage. Aspects of the subject matter disclosed herein may also apply to a standalone computing device, having programming language functionality, interpretation and execution capabilities.
  • FIG. 4 illustrates an integrated development environment (IDE) 600 and Common Language Runtime Environment 602. An IDE 600 may allow a user (e.g., developer, programmer, designer, coder, etc.) to design, code, compile, test, run, edit, debug or build a program, set of programs, web sites, web applications, and web services in a computer system. Software programs can include source code (component 610), created in one or more source code languages (e.g., Visual Basic, Visual J#, C++. C#, J#, Java Script, APL, COBOL, Pascal, Eiffel, Haskell, M L, Oberon, Perl, Python, Scheme, Smalltalk and the like). The IDE 600 may provide a native code development environment or may provide a managed code development that runs on a virtual machine or may provide a combination thereof. The IDE 600 may provide a managed code development environment using the .NET framework. An intermediate language component 650 may be created from the source code component 610 and the native code component 611 using a language specific source compiler 620 using a modeling tool 652 and model store 653 and the native code component 611 (e.g., machine executable instructions) is created from the intermediate language component 650 using the intermediate language compiler 660 (e.g. just-in-time (JIT) compiler), when the application is executed. That is, when an IL application is executed, it is compiled while being executed into the appropriate machine language for the platform it is being executed on, thereby making code portable across several platforms. Alternatively, in other embodiments, programs may be compiled to native code machine language (not shown) appropriate for its intended platform.
  • A user can create and/or edit the source code component according to known software programming techniques and the specific logical and syntactical rules associated with a particular source language via a user interface 640 and a source code editor 651 in the IDE 600. Thereafter, the source code component 610 can be compiled via a source compiler 620, whereby an intermediate language representation of the program may be created, such as assembly 630. The assembly 630 may comprise the intermediate language component 650 and metadata 642. Application designs may be able to be validated before deployment.
  • The various techniques described herein may be implemented in connection with hardware or software or, where appropriate, with a combination of both. Thus, the methods and apparatus described herein, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing aspects of the subject matter disclosed herein. As used herein, the term “machine-readable medium” shall be taken to exclude any mechanism that provides (i.e., stores and/or transmits) any form of propagated signals. In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. One or more programs that may utilize the creation and/or implementation of domain-specific programming models aspects, e.g., through the use of a data processing API or the like, may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language, and combined with hardware implementations.
  • Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (20)

What is claimed:
1. A system comprising:
at least one processor of a computing device;
a memory of the computing device; and
an extensible program source code editor comprising at least one module loaded into the memory causing the at least one processor to:
customize default editor statement suggestions using program source code-specific code comprising extension code associated with program source code loaded into the extensible program source code editor.
2. The system of claim 1, further comprising:
at least one module loaded into the memory causing the at least one processor to:
provide an API to which the program source code-specific extension code registers for an event.
3. The system of claim 2, the event comprising a display completion list event.
4. The system of claim 2, the event comprising a display completion hint event.
5. The system of claim 2, the event comprising a display function help event.
6. The system of claim 1, further comprising:
an extensible program source code editor comprising at least one module loaded into the memory causing the at least one processor to:
receive the extension code in a programming language in which the program source code is written.
7. The system of claim 6, wherein the programming language is a dynamic scripting language.
8. A method comprising:
receiving by a processor of a software development computer, a default display of editor suggestions, the default display of editor suggestions comprising a collection of entries;
modifying the default display of editor suggestions by executing user-provided extension code extending program source code associated with the default display;
displaying the modified default display of editor suggestions on a display device of the software development computer.
9. The method of claim 8, further comprising:
customizing the default display of editor suggestions by adding at least one entry to the default display.
10. The method of claim 8, further comprising:
customizing the default display of editor suggestions by removing at least one entry from the default display.
11. The method of claim 10, further comprising:
customizing the default display of editor suggestions by changing at least one entry in the default display.
12. The method of claim 8, wherein the default display is a completion list, completion hint or function help.
13. The method of claim 8, further comprising:
receiving the user-provided extension code in a file comprising the program source code.
14. The method of claim 8, further comprising:
receiving the user-provided extension code in a first file and receiving the program source code in a second file.
15. A computer-readable storage medium comprising computer-executable instructions which when executed cause at least one processor of a computing device to:
in response to receiving a default display,
use extension code to modify the default display, the extension code associated with program source code, the program source code loaded into an extensible program source code editor; and
display the modified default display.
16. The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause the at least one processor to:
hide members denoted as private in the modified default display.
17. The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause the at least one processor to:
provide an indicator in the modified default display, the indicator indicating a concept not supported by a programming language in which the program source code associated with the extension code is written.
18. The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause at least one processor to:
provide a descriptive annotation of an entry in the modified default display, the descriptive annotation provided as a comment in a source code-specific format in the program source code associated with the extension code.
19. The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause at least one processor to:
use a naming convention to load extension code into an IDE.
20. The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause at least one processor to:
provide a result in the modified default display for an event not triggered by execution of the program source code before a point at which the default display is requested.
US13/430,738 2012-03-27 2012-03-27 Extensible mechanism for providing suggestions in a source code editor Active 2032-09-17 US9170782B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/430,738 US9170782B2 (en) 2012-03-27 2012-03-27 Extensible mechanism for providing suggestions in a source code editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US13/430,738 US9170782B2 (en) 2012-03-27 2012-03-27 Extensible mechanism for providing suggestions in a source code editor

Publications (2)

Publication Number Publication Date
US20130263086A1 true US20130263086A1 (en) 2013-10-03
US9170782B2 US9170782B2 (en) 2015-10-27

Family

ID=49236822

Family Applications (1)

Application Number Title Priority Date Filing Date
US13/430,738 Active 2032-09-17 US9170782B2 (en) 2012-03-27 2012-03-27 Extensible mechanism for providing suggestions in a source code editor

Country Status (1)

Country Link
US (1) US9170782B2 (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007700A1 (en) * 2011-06-29 2013-01-03 Microsoft Corporation Code suggestions
US20140280484A1 (en) * 2013-03-15 2014-09-18 Oliver Klemenz Dynamic Service Extension Infrastructure For Cloud Platforms
US20140359574A1 (en) * 2013-06-04 2014-12-04 Microsoft Corporation Multi-step auto-completion model for software development environments
US20150127771A1 (en) * 2012-05-08 2015-05-07 Nokia Solutions And Networks Oy Method and Apparatus
US9170782B2 (en) * 2012-03-27 2015-10-27 Microsoft Technology Licensing, Llc Extensible mechanism for providing suggestions in a source code editor
US9448772B2 (en) 2013-03-15 2016-09-20 Microsoft Technology Licensing, Llc Generating program fragments using keywords and context information
US9582294B1 (en) * 2015-08-26 2017-02-28 Mckesson Financial Holdings Apparatuses, methods, and computer program products for automatic internationalization of grammatical output
US9600244B1 (en) * 2015-12-09 2017-03-21 International Business Machines Corporation Cognitive editor
US9798524B1 (en) * 2007-12-04 2017-10-24 Axway, Inc. System and method for exposing the dynamic web server-side
CN108845800A (en) * 2018-05-23 2018-11-20 北京五八信息技术有限公司 A kind of implementation method, device, equipment and the storage medium of component extension function
US10169018B2 (en) 2015-09-17 2019-01-01 International Business Machines Corporation Downloading a package of code
US10171627B2 (en) 2015-09-17 2019-01-01 International Business Machines Corporation Download of a package of code
US10409561B1 (en) * 2017-10-19 2019-09-10 Amazon Technologies, Inc. Client-side caching for code language services
DE102018213053A1 (en) * 2018-08-03 2020-02-06 Continental Teves Ag & Co. Ohg Procedures for analyzing source texts
CN111273899A (en) * 2020-01-17 2020-06-12 北京达佳互联信息技术有限公司 Code processing method and device, electronic equipment and storage medium
US10691420B1 (en) * 2016-04-18 2020-06-23 The Mathworks, Inc. Dynamic function argument completion
US10776248B2 (en) 2018-11-28 2020-09-15 International Business Machines Corporation Automated source code writing style evaluation, validation, and modification
CN111736840A (en) * 2019-09-19 2020-10-02 北京沃东天骏信息技术有限公司 Compiling method and running method of applet, storage medium and electronic equipment
CN111967038A (en) * 2019-09-30 2020-11-20 华控清交信息科技(北京)有限公司 Data processing system, method, apparatus, editor, and storage medium
CN112416324A (en) * 2020-11-24 2021-02-26 歌尔光学科技有限公司 Script function implementation method based on python language, terminal equipment and storage medium
CN112925583A (en) * 2021-02-25 2021-06-08 北京百度网讯科技有限公司 Host application capability expansion method, device, equipment and storage medium
US20220179624A1 (en) * 2020-12-07 2022-06-09 Texas Instruments Incorporated Method and Apparatus for Adding New Inline Prompts to a Program Development Environment
US11513773B2 (en) 2020-07-09 2022-11-29 Microsoft Technology Licensing, Llc. Feedback-driven semi-supervised synthesis of program transformations
US11526350B2 (en) * 2020-03-18 2022-12-13 Red Hat, Inc. Providing code editor documentation pages using a lightweight text formatting language and platform-agnostic command links
CN116339736A (en) * 2023-05-29 2023-06-27 英诺达(成都)电子科技有限公司 Configuration method, device, equipment and storage medium of TCL (TCL) interactive interface
US20230221930A1 (en) * 2022-01-11 2023-07-13 Lemon Inc. Graphical user interface generator using markup language
US11886841B2 (en) * 2019-10-08 2024-01-30 Texas Instruments Incorporated Argument helper for python program editor
US11900080B2 (en) * 2020-07-09 2024-02-13 Microsoft Technology Licensing, Llc Software development autocreated suggestion provenance
US11941378B1 (en) * 2023-10-19 2024-03-26 Hud Software Platforms Ltd. System and method for utilizing production insights in generative AI models

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361068B2 (en) * 2014-05-21 2016-06-07 International Business Machines Corporation System and method for using development objectives to guide implementation of source code
US10162605B2 (en) 2016-07-20 2018-12-25 Microsoft Technology Licensing, Llc Code snippet content recommendation to define an object literal
US10983813B2 (en) 2019-04-19 2021-04-20 Microsoft Technology Licensing, Llc Automatic repetition of context-specific code edits

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6305008B1 (en) * 1998-11-13 2001-10-16 Microsoft Corporation Automatic statement completion
US20020016953A1 (en) * 1997-10-02 2002-02-07 Borland International, Inc. Development system with methods for assisting a user with inputting source code
US20060090154A1 (en) * 2004-10-07 2006-04-27 International Business Machines Corp. System and method for contributing remote object content to an integrated development environment type-ahead
US20080244513A1 (en) * 2007-03-26 2008-10-02 International Business Machines Corporation Method of operating a data processing system
US20080320444A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Late bound programmatic assistance
US20090077535A1 (en) * 2007-09-17 2009-03-19 International Business Machines Corporation System and computer program product for assisting a user in the process of creating software code
US7562344B1 (en) * 2008-04-29 2009-07-14 International Business Machines Corporation Method, system, and computer program product for providing real-time developer feedback in an integrated development environment
US20090313597A1 (en) * 2008-06-16 2009-12-17 Microsoft Corporation Tabular completion lists
US20100192074A1 (en) * 2009-01-28 2010-07-29 Microsoft Corporation Pluggable margin extension
US20100235730A1 (en) * 2009-03-13 2010-09-16 Microsoft Corporation Consume-first mode text insertion
US20100235812A1 (en) * 2009-03-13 2010-09-16 Omron Corporation Input supporting method of variable name in programming of plc
US20100269095A1 (en) * 2009-04-21 2010-10-21 Microsoft Corporation Analysis of dynamic elements in bounded time
US20100287525A1 (en) * 2009-05-07 2010-11-11 Microsoft Corporation Extension through visual reflection
US8032860B2 (en) * 2003-02-26 2011-10-04 Oracle International Corporation Methods for type-independent source code editing
US8051408B1 (en) * 2004-09-13 2011-11-01 The Mathworks, Inc. Method of providing interactive usage descriptions based on source code analysis
US20110271250A1 (en) * 2010-04-30 2011-11-03 Microsoft Corporation Software Development Tool
US20130007699A1 (en) * 2011-06-28 2013-01-03 Microsoft Corporation Population of dynamic objects representing static namespace hierarchies

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9170782B2 (en) * 2012-03-27 2015-10-27 Microsoft Technology Licensing, Llc Extensible mechanism for providing suggestions in a source code editor

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020016953A1 (en) * 1997-10-02 2002-02-07 Borland International, Inc. Development system with methods for assisting a user with inputting source code
US6305008B1 (en) * 1998-11-13 2001-10-16 Microsoft Corporation Automatic statement completion
US8032860B2 (en) * 2003-02-26 2011-10-04 Oracle International Corporation Methods for type-independent source code editing
US8051408B1 (en) * 2004-09-13 2011-11-01 The Mathworks, Inc. Method of providing interactive usage descriptions based on source code analysis
US20060090154A1 (en) * 2004-10-07 2006-04-27 International Business Machines Corp. System and method for contributing remote object content to an integrated development environment type-ahead
US20080244513A1 (en) * 2007-03-26 2008-10-02 International Business Machines Corporation Method of operating a data processing system
US20080320444A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Late bound programmatic assistance
US8321836B2 (en) * 2007-06-21 2012-11-27 Microsoft Corporation Late bound programmatic assistance
US20090077535A1 (en) * 2007-09-17 2009-03-19 International Business Machines Corporation System and computer program product for assisting a user in the process of creating software code
US7562344B1 (en) * 2008-04-29 2009-07-14 International Business Machines Corporation Method, system, and computer program product for providing real-time developer feedback in an integrated development environment
US20090313597A1 (en) * 2008-06-16 2009-12-17 Microsoft Corporation Tabular completion lists
US20100192074A1 (en) * 2009-01-28 2010-07-29 Microsoft Corporation Pluggable margin extension
US20100235812A1 (en) * 2009-03-13 2010-09-16 Omron Corporation Input supporting method of variable name in programming of plc
US20100235730A1 (en) * 2009-03-13 2010-09-16 Microsoft Corporation Consume-first mode text insertion
US20100269095A1 (en) * 2009-04-21 2010-10-21 Microsoft Corporation Analysis of dynamic elements in bounded time
US20100287525A1 (en) * 2009-05-07 2010-11-11 Microsoft Corporation Extension through visual reflection
US20110271250A1 (en) * 2010-04-30 2011-11-03 Microsoft Corporation Software Development Tool
US20130007699A1 (en) * 2011-06-28 2013-01-03 Microsoft Corporation Population of dynamic objects representing static namespace hierarchies

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Wikipedia, Visual Studio Extensibility, Wikipedia.org (September 26, 2011) retrieved from http://en.wikipedia.org/w/index.php?title=Visual_Studio_Extensibility&oldid=452501475 on 3/6/2015 *
Writing and Editing Source Code, Applicant Provided Prior Art, IDS 3/27/2012 *
Xcode, Writing and Editing Source Code, Applicant Provided Prior Art, IDS 3/27/2012 (Published December 20, 2011) *

Cited By (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9798524B1 (en) * 2007-12-04 2017-10-24 Axway, Inc. System and method for exposing the dynamic web server-side
US20130007700A1 (en) * 2011-06-29 2013-01-03 Microsoft Corporation Code suggestions
US9383973B2 (en) * 2011-06-29 2016-07-05 Microsoft Technology Licensing, Llc Code suggestions
US9170782B2 (en) * 2012-03-27 2015-10-27 Microsoft Technology Licensing, Llc Extensible mechanism for providing suggestions in a source code editor
US20150127771A1 (en) * 2012-05-08 2015-05-07 Nokia Solutions And Networks Oy Method and Apparatus
US9448772B2 (en) 2013-03-15 2016-09-20 Microsoft Technology Licensing, Llc Generating program fragments using keywords and context information
US20140280484A1 (en) * 2013-03-15 2014-09-18 Oliver Klemenz Dynamic Service Extension Infrastructure For Cloud Platforms
US9244658B2 (en) * 2013-06-04 2016-01-26 Microsoft Technology Licensing, Llc Multi-step auto-completion model for software development environments
US10338893B2 (en) 2013-06-04 2019-07-02 Microsoft Technology Licensing, Llc Multi-step auto-completion model for software development environments
US20140359574A1 (en) * 2013-06-04 2014-12-04 Microsoft Corporation Multi-step auto-completion model for software development environments
US9582294B1 (en) * 2015-08-26 2017-02-28 Mckesson Financial Holdings Apparatuses, methods, and computer program products for automatic internationalization of grammatical output
US10169018B2 (en) 2015-09-17 2019-01-01 International Business Machines Corporation Downloading a package of code
US10171627B2 (en) 2015-09-17 2019-01-01 International Business Machines Corporation Download of a package of code
US9600244B1 (en) * 2015-12-09 2017-03-21 International Business Machines Corporation Cognitive editor
US10691420B1 (en) * 2016-04-18 2020-06-23 The Mathworks, Inc. Dynamic function argument completion
US11137984B1 (en) 2017-10-19 2021-10-05 Amazon Technologies, Inc. Client-side caching for code language services
US10409561B1 (en) * 2017-10-19 2019-09-10 Amazon Technologies, Inc. Client-side caching for code language services
CN108845800A (en) * 2018-05-23 2018-11-20 北京五八信息技术有限公司 A kind of implementation method, device, equipment and the storage medium of component extension function
US20210157929A1 (en) * 2018-08-03 2021-05-27 Continental Teves Ag & Co. Ohg Method for the analysis of source texts
DE102018213053A1 (en) * 2018-08-03 2020-02-06 Continental Teves Ag & Co. Ohg Procedures for analyzing source texts
US10776248B2 (en) 2018-11-28 2020-09-15 International Business Machines Corporation Automated source code writing style evaluation, validation, and modification
CN111736840A (en) * 2019-09-19 2020-10-02 北京沃东天骏信息技术有限公司 Compiling method and running method of applet, storage medium and electronic equipment
CN111967038A (en) * 2019-09-30 2020-11-20 华控清交信息科技(北京)有限公司 Data processing system, method, apparatus, editor, and storage medium
US11886841B2 (en) * 2019-10-08 2024-01-30 Texas Instruments Incorporated Argument helper for python program editor
CN111273899A (en) * 2020-01-17 2020-06-12 北京达佳互联信息技术有限公司 Code processing method and device, electronic equipment and storage medium
US11526350B2 (en) * 2020-03-18 2022-12-13 Red Hat, Inc. Providing code editor documentation pages using a lightweight text formatting language and platform-agnostic command links
US11513773B2 (en) 2020-07-09 2022-11-29 Microsoft Technology Licensing, Llc. Feedback-driven semi-supervised synthesis of program transformations
US11900080B2 (en) * 2020-07-09 2024-02-13 Microsoft Technology Licensing, Llc Software development autocreated suggestion provenance
CN112416324A (en) * 2020-11-24 2021-02-26 歌尔光学科技有限公司 Script function implementation method based on python language, terminal equipment and storage medium
US20220179624A1 (en) * 2020-12-07 2022-06-09 Texas Instruments Incorporated Method and Apparatus for Adding New Inline Prompts to a Program Development Environment
US11875137B2 (en) * 2020-12-07 2024-01-16 Texas Instruments Incorporated Method and apparatus for adding new inline prompts to a program development environment
CN112925583A (en) * 2021-02-25 2021-06-08 北京百度网讯科技有限公司 Host application capability expansion method, device, equipment and storage medium
US20230221930A1 (en) * 2022-01-11 2023-07-13 Lemon Inc. Graphical user interface generator using markup language
US11829734B2 (en) * 2022-01-11 2023-11-28 Lemon Inc. Graphical user interface generator using markup language
CN116339736A (en) * 2023-05-29 2023-06-27 英诺达(成都)电子科技有限公司 Configuration method, device, equipment and storage medium of TCL (TCL) interactive interface
US11941378B1 (en) * 2023-10-19 2024-03-26 Hud Software Platforms Ltd. System and method for utilizing production insights in generative AI models

Also Published As

Publication number Publication date
US9170782B2 (en) 2015-10-27

Similar Documents

Publication Publication Date Title
US9170782B2 (en) Extensible mechanism for providing suggestions in a source code editor
US8752035B2 (en) Transforming dynamic source code based on semantic analysis
US9256401B2 (en) Editor visualization of symbolic relationships
EP3365772B1 (en) Missing include suggestions for external files
US8683319B2 (en) Shared script files in multi-tab browser
US8959477B2 (en) Scripting language for business applications
US8707263B2 (en) Using a DSL for calling APIS to test software
RU2668973C2 (en) Debugging native code by transitioning from execution in native mode to execution in interpreted mode
US9448770B2 (en) Source code editor
US8572554B2 (en) Method and system for integrating Java and JavaScript technologies
Raybaut Spyder-documentation
US20160321055A1 (en) Mapping between local and remote for seamless build and design time experience
JP2013539130A (en) Compile-time boundary checking for user-defined types
US9311077B2 (en) Identification of code changes using language syntax and changeset data
Wielemaker et al. SWISH: SWI-Prolog for sharing
CN111078217A (en) Brain graph generation method, apparatus and computer-readable storage medium
US20160062748A1 (en) Embedded domain specific languages as first class code artifacts
Oliveira pytest Quick Start Guide: Write better Python code with simple and maintainable tests
KR102601387B1 (en) Declarative cascade reordering for styles
Johansson et al. Introduction to computing with python
Asenov et al. Customizing the visualization and interaction for embedded domain-specific languages in a structured editor
RU2799988C2 (en) System and method for dynamic visualization of software elements
US20230418574A1 (en) Using a semantic tree of a compiler to execute a semantic code query against source code
Sasano et al. An approach to completing variable names for implicitly typed functional languages
WO2023128793A1 (en) System and method for dynamically visualizing software elements

Legal Events

Date Code Title Description
AS Assignment

Owner name: MICROSOFT CORPORATION, WASHINGTON

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CARTER, JONATHAN P.;ASIPOV, BORIS;FUNG, FIONA;SIGNING DATES FROM 20120309 TO 20120316;REEL/FRAME:027931/0674

AS Assignment

Owner name: MICROSOFT TECHNOLOGY LICENSING, LLC, WASHINGTON

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICROSOFT CORPORATION;REEL/FRAME:034544/0541

Effective date: 20141014

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 8