@Override protected String[] getJavaSource_decorate(String... lines) { lines = CodeUtils.join( new String[] { "package test.client;", "import com.google.gwt.core.client.*;", "import com.google.gwt.event.dom.client.*;", "import com.google.gwt.dom.client.Style.Unit;", "import com.google.gwt.user.client.ui.*;", "import com.google.gwt.uibinder.client.*;" }, lines); return lines; }
//////////////////////////////////////////////////////////////////////////// // // Creation // //////////////////////////////////////////////////////////////////////////// public void createModule(IJavaProject javaProject) throws Exception { if (createModuleButton.getSelection()) { IPackageFragmentRoot root = CodeUtils.getPackageFragmentRoot(javaProject); final String packageName = moduleComposite.getPackageName(); final String moduleName = moduleComposite.getModuleName(); final boolean isCreateEntryPoint = moduleComposite.createEntryPoint(); final boolean isMvpEntryPoint = moduleComposite.createEntryPointMVP(); // create module IFile moduleFile = CreateModuleOperation.create( root, packageName, moduleName, isCreateEntryPoint, isMvpEntryPoint, false); ModuleDescription moduleDescription = Utils.getExactModule(moduleFile); // apply configurator { IModuleConfigurator configurator = moduleComposite.getConfigurator(); if (configurator != null) { configurator.configure(moduleDescription); } } } }