const
var
function
namespace
class
interface
use namespace
In the first context, the INamespaceDefinition can represent a custom namespace of the form ns1, ns1::ns2, (ns1::ns2)::ns3, etc.,
ns1
ns1::ns2
(ns1::ns2)::ns3
149114921493149414951496149714981499
QualifiedNamespaceExpressionNode qNode = (QualifiedNamespaceExpressionNode)node; // TODO: this cast is kinda bad. QualifiedNamespaceExpressionNode should have a getPackage() method IIdentifierNode prefix = (IIdentifierNode)qNode.getLeftOperandNode(); Workspace w = (Workspace)scope.getWorkspace(); INamespaceReference qualifedNamespace = w.getPackageNamespaceDefinitionCache().get(prefix.getName(), false); return qualifedNamespace; }