public void saveTo(File file, String renameTo) { boolean absoluteFile = renameTo.endsWith(".gwt.xml"); if (absoluteFile) { renameTo = renameTo.substring(0, renameTo.length() - 8); } boolean rename = !renameTo.replace('/', '.').equals(module.getInheritName()); final String inheritName; if (rename) { final String pkg, name; int ind = renameTo.lastIndexOf('.'); boolean moveToPackage = ind > -1; if (moveToPackage) { pkg = renameTo.substring(0, ind).replace('.', '/'); name = renameTo.substring(ind + 1); } else { pkg = ""; name = renameTo; } if (pkg.length() == 0) { inheritName = name; } else { if (file.isDirectory()) { File f = new File(file, pkg); f.mkdirs(); f.deleteOnExit(); file = f; } inheritName = pkg + (pkg.length() == 0 ? "" : ".") + name; } } else { inheritName = renameTo; } }
public String getGenName() { return module.getInheritName(); }
public void saveTo(File file) { saveTo(file, module.getInheritName()); }
public String generateGwtXml(Gwtc gwtc, String pkg, String name) { xml = GwtcXmlBuilder.generateGwtXml(gwtc, pkg, name); return xml.getInheritName(); }