Script module only visible under system namespace

If I add a script module under the system namespace, it is visible in the Script Console.

oScriptManager.addScriptModule(“system.xasdMaterialAPI”, MaterialAPI.class);

In Script Console:
print system.xasdMaterialAPI.Identify() executes correctly.

If I close the Designer, edit the java module to take the script module name out from under system, and rebuild–the script module is not visible.

oScriptManager.addScriptModule(“xasdMaterialAPI”, MaterialAPI.class);

In Script Console:
import xasdMaterialAPI
causes Import Error: No module named xasdMaterialAPI

In the Output Console, I see my logger message that script module xasdMaterialAPI was added.

Checked the docs. Can’t see what I’m doing wrong.

It works when I specify the full java path of the class, as it appears in the repository (less version number):
oScriptManager.addScriptModule(“xas.xasIgnition.xasMaterial.MaterialAPI”, MaterialAPI.class);

So it seems that if the script module is added to the system namespace, any unique name can be specified, and that name will be substituted for the class name.
system.xasdMaterialAPI works, even though the class name in the gateway module is MaterialAPI.

But if a namespace other than system is specified, the full path to the class in the gateway module must be specified.

These inferred rules may not be exactly correct, but they are consistent with what I am seeing.

The weird part is that when I specified a shorter path under xas, the autocomplete system in the designer recognized the class name, and the method in the class. But at execution the script module was not recognized.
In the designer hook class:
oScriptManager.addScriptModule(“xas.MaterialAPI”, MaterialAPI.class);

In the Script Console:
xas.Material… <<-- autocomplete recognizes the script module, up to and including the method in the class. But the script will not run; script module MaterialAPI not found.

It would be nice if the designer would reject (with a message) the add of a module to a non-existent namespace, rather than silently accepting it.