IntelliSense is the collective term for a number of Visual Studio features - List Members, Parameter Info, Quick Info, and Complete Word.
In Visual COBOL, IntelliSense provides writing assistance for both native and managed COBOL.
IntelliSense support for COBOL is configurable. You can change your preferences for IntelliSense from within the IDE in the Tools > Options > Text Editor > Micro Focus COBOL > IntelliSense section and specify options such as the case of the inserted words, whether to show the completion lists or insert single suggestions automatically, or whether suggestions should be added in overwrite mode or as insertions. See Configuring IntelliSense for COBOL for details.
The following describes the writing assistance that IntelliSense provides in native COBOL.
IntelliSense provides editing features to help you write syntactically correct code. It enables you to complete words quickly and to look up available elements.
IntelliSense only offers assistance for the data items that are in scope based on the current position of the cursor.
The following list summarizes how completion lists work:
For example, completion lists only show COBOL verbs in the Procedure Division section and not in the Working-Storage section, and the verbs are only relevant to native code.
To complete a statement:
By default, IntelliSense automatically pops up a completion list that includes the clauses and identifiers that you can use.
You need to choose a copybook from the list for IntelliSense to insert after the COPY statement. After the copybook is inserted, the completion list that appears gives you the option of terminating the statement with a period (.) or continuing it with one of the clauses IN, OF, REPLACING or SUPPRESS.
By default, suggestions for COPY statements only include the copybooks that are part of the current project or are found in the directories specified on the Copybooks tab of the project's properties, but you can change this so that the suggestions also include system copybooks. System copybooks are ones that are not included in the project but are defined using the COBCPY variable. You can change your preferences from the Tools > Options > Text Editor > Micro Focus COBOL > IntelliSense section.
Consider the example of a program that defines two group items - StudentRecord and TeacherRecord. Both group items include a number of PIC X elementary items with the same names - for example, FirstName, Surname, Phone and so on. In such a case, IntelliSense qualifies the elementary items as follows:
The completion list that pops-up includes COBOL keywords, the group items defined in your program, and the elementary items that are present in both group items.
IntelliSense has helped you specify the exact elementary item to use in your code:
move Surname of StudentRecord to...
In .NET COBOL, IntelliSense shows suggestions that include any methods, fields, properties, types and so on that are available when you declare items or type an object name followed by a double colon or an opening bracket in the Procedure Division.
You can choose an item from the list to complete the code rather than typing it yourself.
The following are examples of where IntelliSense pops up: