The light bulb feature in this version of Visual Studio supports a number of quick actions that enable to you to implement certain constructs in your COBOL code.
You can enable or disable any of the quick actions supported in COBOL from the IDE preferences - click
Tools > Options > Text Editor > Micro Focus COBOL > Quick Actions. The following quick actions are available:
- Enable Quick Actions
- Enabled by default. Uncheck this to disable all light bulbs in the COBOL editor.
- Add missing namespace
- Enables you to resolve unknown types either by generating a new class for them or by adding a an existing namespace to the types.
- Convert to portable COBOL syntax
- Enables you to convert .NET types to COBOL predefined types that can be used on both .NET and JVM platforms.
- Creates or finds a copybook
- For copybooks referenced in an application that are not found in any of the copybook paths of the project, this quick action enables you to either browse and find the copybook manually or create the copybook and add it to your project.
- Extract selected code to a new copybook
- Enables you to create a new copybook from a selection of code in the editor. The copybooks is then added to the project.
- Implement missing methods
- Enables you to implement any missing methods, properties and events that an interface or an abstract class requires.
- Rename operation on an edited symbol
- Enables you to perform a refactoring rename of identifiers in the code. When you rename a symbol in the code, a light bulb appears in the left margin of the line where you renamed the symbol and offers you a quick action to do a refactoring rename. In native code, executing the quick action renames all instances of the identifier in the current source file. In managed code, you can choose to rename across the current project or the entire solution.
- Set CICS directive
- Enables you to set the CICSECM directive on files or project configurations when your application includes any EXEC CICS statements.
- Simplify namespace
- Enables you to remove a namespace in places in the code where it is not required.