public void init(IStructuredSelection selection) {
   if (selection != null && selection instanceof IStructuredSelection) {
     Object firstElement = ((IStructuredSelection) selection).getFirstElement();
     if (firstElement instanceof IFile && Util.isModuleXml((IResource) firstElement)) {
       this.selectedModule = (IFile) firstElement;
       this.selectedProject = ((IFile) firstElement).getProject().getName();
     }
   }
   super.init(selection);
 }
  protected void createTypeMembers(IType newType, ImportsManager imports, IProgressMonitor monitor)
      throws CoreException {

    imports.addImport("com.google.gwt.core.client.GWT");
    imports.addImport("com.google.gwt.user.client.rpc.ServiceDefTarget");
    newType.createField(
        "public static final String SERVICE_URI = \"/" + serviceUri + "\";",
        null,
        true,
        monitor); //$NON-NLS-1$ //$NON-NLS-2$
    newType.createType(getUtilClassContents(), null, true, monitor);
    super.createTypeMembers(newType, imports, monitor);
  }
  //	@Override
  public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException {

    monitor = Util.getNonNullMonitor(monitor);
    isImplCreation = false;
    super.createType(monitor);

    isImplCreation = true;

    try {
      addServletToWebXml(new SubProgressMonitor(monitor, 1));
      createRemoteServiceImpl(new SubProgressMonitor(monitor, 2));
      addServletToGwtXml(new SubProgressMonitor(monitor, 3));
    } catch (Exception e) {
      throw new CoreException(Util.errorStatus);
    }
  }
  //	@Override
  protected void handleFieldChanged(String fieldName) {

    super.handleFieldChanged(fieldName);
    doStatusUpdate();
  }