Try OpenEdge Now
skip to main content
Online Help
Introducing the ABL Editor : Tasks : Writing ABL code : Working with USING statements : Organizing USING statements
 
Organizing USING statements
The Organize USING Statements option allows you to organize USING statements in ABL sources through a set of default rules or custom rules that you can define by using a set of preferences. These rules include cleaning, sorting, and grouping USING statements.
Selecting the Organize USING Statements option removes duplicate and unused USING statements and sorts the required ones. It expands .* to a fully qualified package type. It also prompts you if a referenced type name cannot be mapped uniquely to a type in the current project.
Note: The Organize USING Statements option is not available for SpeedScript files. Also, using this option to organize USING statements in a preprocessor directive affects the processing of those USING statements.
To organize USING statements, do the following:
1. Select one or more workspace resources.
2. Select Source > Organize USING Statements from one of the following locations:
*Main menu bar
*Project Explorer context menu
*ABL Editor context menu
*Outline view context menu
Note: You can also use the keyboard shortcut Ctrl+Shift+O to organize USING statements.
If no conflicts are found in the selected resources, Progress Developer Studio for OpenEdge updates the USING statements for the resources.
If you have selected a single resource and if that resource contains conflicting reference types, a dialog is displayed prompting you to select the correct class for the USING statement. If you have selected multiple resources and if at least one of those resources contains conflicting reference types, a dialog is displayed listing the resources with conflicts and prompts you to perform the Organize USING Statements operation on each resource separately.
When you use content assistance (by pressing CTRL+SPACE) for selecting a class or interface, the fully-qualified type name is added at the current cursor position and a new or existing USING statement is appended to it based on whether or not a USING statement already exists.
If the operation is not supported and cannot be performed on the selected resources, a message is displayed stating the same.
To undo an Organize USING Statements operation, select Edit > Undo or press Ctrl+Z. To redo, select Edit > Redo or press Ctrl+Y.
The Include FROM ASSEMBLY/FROM PROPATH option preference option on the USING Statements preferences page allows you to add a FROM ASSEMBLY or FROM PROPATH option to a USING statement. Adding a FROM ASSEMBLY or FROM PROPATH option to a USING statement narrows the search for the type definition, depending on whether the USING statement specifies an ABL package-based type or a .NET namespace-based type. When you specify the FROM ASSEMBLY option, ABL assumes that the type is a .NET type and uses the list of .NET assemblies defined in the assembly identification file to search for the type definition. When you specify the FROM PROPATH option, ABL assumes that the type is an ABL type and uses PROPATH to search for the type definition. The Include FROM ASSEMBLY/FROM PROPATH option preference option is selected by default. For more information, see USING Statements options.