@Test public void testGetNamespace() throws Exception { Type classType = modelIndex.getType(CLASSTYPE_ID); assertEquals(UMLPACKAGE_NAME, NamespaceHelper.getNamespace(classType, modelIndex)); }
public static final String getNamespace(final Type type, final ModelIndex model) { for (final ModelElement whereUsed : model.whereUsed(type.getId())) { if (whereUsed instanceof UmlPackage) { final UmlPackage pkg = (UmlPackage) whereUsed; return pkg.getName(); } } return ""; }
NamespaceHelper { public static final String getNamespace(final Type type, final ModelIndex model) { for (final ModelElement whereUsed : model.whereUsed(type.getId())) { if (whereUsed instanceof UmlPackage) { final UmlPackage pkg = (UmlPackage) whereUsed; return pkg.getName(); } } return ""; } }
NamespaceHelper { public static final String getNamespace(final Type type, final ModelIndex model) { for (final ModelElement whereUsed : model.whereUsed(type.getId())) { if (whereUsed instanceof UmlPackage) { final UmlPackage pkg = (UmlPackage) whereUsed; return pkg.getName(); } } return ""; }  }
NamespaceHelper { public static final String getNamespace(final Type type, final ModelIndex model) { for (final ModelElement whereUsed : model.whereUsed(type.getId())) { if (whereUsed instanceof UmlPackage) { final UmlPackage pkg = (UmlPackage) whereUsed; return pkg.getName(); } } return ""; }  static final String getNamespace(final Type type, final ModelIndex model); }
NamespaceHelper { public static final String getNamespace(final Type type, final ModelIndex model) { for (final ModelElement whereUsed : model.whereUsed(type.getId())) { if (whereUsed instanceof UmlPackage) { final UmlPackage pkg = (UmlPackage) whereUsed; return pkg.getName(); } } return ""; }  static final String getNamespace(final Type type, final ModelIndex model);  }