USING

By default we will be USING full packages (namespaces) like this:

USING {Package}.{Subpackage}.* USING Consultingwerk.SmartComponents.Implementation.*

If only one subclass is needed or there are conflicts with other classes we will specify individual class references in the USING statement:

USING {Package}.{Subpackage}.Classname USING Consultingwerk.Dynamics.SpecialClass

However, it should be attempted to avoid naming conflicts between class names at all by using clear and individual class names!

To improve compile time performance, add a USING statement with the FROM ASSEMBLY or FROM PROPATH option for every Class or Namespace reference used in the code.

This will have big impact on compile time performance when the source code (or parts of it) are located on a network share.

So a USING statement looks like in example

USING Consultingwerk.SmartComponents.Base.* FROM PROPATH. USING Progress.Lang.* FROM ASSEMBLY.

For better readability USING statements should be formatted in tabular order and sorted by alphabet (unless this would have an impact on the class name resolution in case of naming conflict, which should be documented using a comment anyway).

 

You can use the Source->Organize USING Statement functionality of OpenEdge Developer Studio to organize your USING statements:

 

Please note that USING statements have to follow the https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/527564907 statements.

 

USING Statements in AppBuilder .w Files

Do not place USING Statements (like BLOCK-LEVEL/ROUTINE-LEVEL) not in the definitions section.

Place them in a dedicated “Declarative Statements” section.

Otherwise the AppBuilder generated FRAME-Query Definition would be before the USING Statements in the source code. This would cause compile errors.