public static String getModuleName(final GeneratorContext context) { try { return getModuleDef(context).getCanonicalName(); } catch (final Throwable t) { return null; } }
public static String getModuleName(final GeneratorContext context) { try { return getModuleDef(context).getCanonicalName(); } catch (final Throwable t) { return null; } }
public static Set<String> getReloadablePackageNames(final GeneratorContext context) { final Set<String> result = new HashSet<String>(); final ModuleDef module = getModuleDef(context); if (module == null) { return result; } final String moduleName = module.getCanonicalName().replace(".JUnit", ""); result.add(StringUtils.substringBeforeLast(moduleName, ".")); final List<String> dottedModulePaths = new ArrayList<String>(); for (final File moduleXmlFile : getAllModuleXMLs(context)) { String fileName = moduleXmlFile.getAbsolutePath(); fileName = fileName.replace(File.separatorChar, '.'); dottedModulePaths.add(fileName); } for (final String inheritedModule : getInheritedModules(context)) { for (final String dottedModulePath : dottedModulePaths) { if (dottedModulePath.contains(inheritedModule)) { result.add(StringUtils.substringBeforeLast(inheritedModule, ".")); } } } return result; }
private ModuleSpace createModuleSpace(ModuleSpaceHost host) { return new ModuleSpace(GwtTreeLogger.get(), host, moduleDef.getCanonicalName()) { public void createNativeMethods(TreeLogger logger, List<JsniMethod> jsniMethods, DispatchIdOracle dispatchIdOracle) { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.createNativeMethods(..) not supported by gwt-test-utils"); } @Override protected void createStaticDispatcher(TreeLogger logger) { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.createStaticDispatcher(..) not supported by gwt-test-utils"); } @Override protected JsValue doInvoke(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.doInvoke(..) not supported by gwt-test-utils"); } @Override protected Object getStaticDispatcher() { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.getStaticDispatcher() not supported by gwt-test-utils"); } }; }
private ModuleSpace createModuleSpace(ModuleSpaceHost host) { return new ModuleSpace(GwtTreeLogger.get(), host, moduleDef.getCanonicalName()) { public void createNativeMethods(TreeLogger logger, List<JsniMethod> jsniMethods, DispatchIdOracle dispatchIdOracle) { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.createNativeMethods(..) not supported by gwt-test-utils"); } @Override protected void createStaticDispatcher(TreeLogger logger) { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.createStaticDispatcher(..) not supported by gwt-test-utils"); } @Override protected JsValue doInvoke(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.doInvoke(..) not supported by gwt-test-utils"); } @Override protected Object getStaticDispatcher() { // this method should never be called throw new UnsupportedOperationException( "ModuleSpace.getStaticDispatcher() not supported by gwt-test-utils"); } }; }
final String moduleName = moduleDef.getCanonicalName().replace(".JUnit", ""); final int endIndex = moduleName.lastIndexOf('.'); final String modulePackage = endIndex == -1 ? "" : moduleName.substring(0, endIndex);
public static Set<String> getReloadablePackageNames(final GeneratorContext context) { final Set<String> result = new HashSet<String>(); final ModuleDef module = getModuleDef(context); if (module == null) { return result; } final String moduleName = module.getCanonicalName().replace(".JUnit", ""); result.add(StringUtils.substringBeforeLast(moduleName, ".")); final List<String> dottedModulePaths = new ArrayList<String>(); for (final File moduleXmlFile : getAllModuleXMLs(context)) { String fileName = moduleXmlFile.getAbsolutePath(); fileName = fileName.replace(File.separatorChar, '.'); dottedModulePaths.add(fileName); } for (final String inheritedModule : getInheritedModules(context)) { for (final String dottedModulePath : dottedModulePaths) { if (dottedModulePath.contains(inheritedModule)) { result.add(StringUtils.substringBeforeLast(inheritedModule, ".")); } } } return result; }
final String moduleName = moduleDef.getCanonicalName().replace(".JUnit", ""); final int endIndex = moduleName.lastIndexOf('.'); final String modulePackage = endIndex == -1 ? "" : moduleName.substring(0, endIndex);