Quick actions are available in the following situations:
You can use the Extract to Copybook quick action as an alternative to the Extract to Copybook context menu command in the editor:
You can use the light bulb feature to implement interfaces in managed OO COBOL programs. To use them:
class-id MyClass implements type Interface
At this stage the class does not implement the interface and you get an error at its name. Hover the error until the light bulb appears ().
This adds the missing interface members to the implementing class or value type.
When a type is specified without fully qualifying the namespace, use the light bulb feature to resolve that type. For example, you want to use System.IO.Path::GetFullPath and you might only have the following defined in the local-storage section:
01 var1 type Path
You get an error message that Path is an unknown type in the Output window, and when you click the line for this declaration, the light bulb icon appears in the margin of the program on this line.
Hover Path until the light bulb appears then click the light bulb icon () to see the suggested fixes. Choose the fix that applies to your code:
When referencing .NET types in your code, you can either use the fully qualified namespace or only use the simplified name and omit the namespace, if the simplified name can be resolved without ambiguity. For example, instead of typing System.String, you can simply type String provided that String is not used by any other class.
The editor provides a light bulb quick action, Simplify name Type, to automatically replace the fully qualified name with the simplified name:
You can choose to simplify the current occurrence of a fully qualified name or simplify all occurrences of that name in the current file (click Document) or in the current file and any copybooks displayed in the expanded copybook view in it (click Program).
When writing managed COBOL code that should be used on any platform, a light bulb quick action enables you to convert .NET types that have a corresponding predefined managed COBOL type to COBOL predefined types - this helps write platform independent applications which you can easily export from Visual Studio and edit with Visual COBOL for Eclipse.
To help with this, use the light bulb quick action, Convert to COBOL Syntax, available for .NET types. For example, this offers an option to convert System.UInt64 to binary-double unsigned.
The editor provides a light bulb quick action, Convert to portable COBOL syntax, to automatically replace the .NET type with a COBOL predefined type:
You can choose to simplify the current occurrence of a fully qualified name or simplify all occurrences of that name in the current file (click Document) or in the current file and any copybooks displayed in the expanded copybook view in it (click Program).