if (!project.isOpen() || JETNature.getRuntime(project) != null)
boolean isJavaProject = false; try { isJavaProject = project.getNature(JavaCore.NATURE_ID) != null; } catch (CoreException e) { }  if (!project.isOpen() || JETNature.getRuntime(project) != null || !isJavaProject)
    public void createControl(Composite parent)    {      Composite composite = new Composite(parent, SWT.NONE);      {        GridLayout layout = new GridLayout();        layout.numColumns = 2;        layout.verticalSpacing = 12;        composite.setLayout(layout);        GridData data = new GridData();        data.verticalAlignment = GridData.FILL;        data.grabExcessVerticalSpace = true;        data.horizontalAlignment = GridData.FILL;        composite.setLayoutData(data);      }      Label projectsLabel = new Label(composite, SWT.LEFT);      projectsLabel.setText(CodeGenUIPlugin.getPlugin().getString("_UI_Projects_label"));      {        GridData data = new GridData();        data.horizontalAlignment = GridData.FILL;        projectsLabel.setLayoutData(data);      }      Composite selectionComposite = new Composite(composite, SWT.NONE);      {        GridData data = new GridData();        data.horizontalAlignment = GridData.END;        selectionComposite.setLayoutData(data);        RowLayout layout = new RowLayout();        layout.justify = true;        layout.pack = true;        layout.spacing = 15;        selectionComposite.setLayout(layout);      }      Button selectAllButton = new Button(selectionComposite, SWT.PUSH);      selectAllButton.setText(CodeGenUIPlugin.getPlugin().getString("_UI_SelectAll_label"));      Button deselectAllButton = new Button(selectionComposite, SWT.PUSH);      deselectAllButton.setText(CodeGenUIPlugin.getPlugin().getString("_UI_DeselectAll_label"));      Table projectsTable = new Table(composite, SWT.CHECK | SWT.BORDER);      final CheckboxTableViewer projectsCheckboxTableViewer = new CheckboxTableViewer(projectsTable);      {        GridData data = new GridData();        data.verticalAlignment = GridData.FILL;        data.grabExcessHorizontalSpace = true;        data.grabExcessVerticalSpace = true;        data.horizontalAlignment = GridData.FILL;        data.horizontalSpan = 2;        projectsTable.setLayoutData(data);      }      {        TableLayout layout = new TableLayout();        TableColumn projectColumn = new TableColumn(projectsTable, SWT.NONE);        layout.addColumnData(new ColumnWeightData(1, true));        projectColumn.setResizable(true);        projectsTable.setLayout(layout);      }      projectsCheckboxTableViewer.setColumnProperties(new String [] {"a"});      projectsCheckboxTableViewer.setContentProvider(new ArrayContentProvider());      projectsCheckboxTableViewer.setLabelProvider        (new LabelProvider()         {           public Image getImage(Object o)           {             return workbench.getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);           }                      public String getText(Object o)           {             return ((IProject)o).getName();           }         });      projectsCheckboxTableViewer.addCheckStateListener        (new ICheckStateListener()         {           public void checkStateChanged(CheckStateChangedEvent event)           {             projectsToConvert.clear();             projectsToConvert.addAll(Arrays.asList(projectsCheckboxTableViewer.getCheckedElements()));             setPageComplete(isPageComplete());           }         });      final List projects = new ArrayList(Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects()));      for (Iterator i = projects.iterator(); i.hasNext(); )      {        IProject project = (IProject)i.next();        if (!project.isOpen() || JETNature.getRuntime(project) != null)        {          i.remove();        }      }      projectsCheckboxTableViewer.setInput(projects.toArray());      projectsCheckboxTableViewer.setCheckedElements(projectsToConvert.toArray());      selectAllButton.addSelectionListener        (new SelectionAdapter()         {           public void widgetSelected(SelectionEvent event)           {             projectsToConvert.addAll(projects);             projectsCheckboxTableViewer.setCheckedElements(projects.toArray());             setPageComplete(isPageComplete());           }         });      deselectAllButton.addSelectionListener        (new SelectionAdapter()         {           public void widgetSelected(SelectionEvent event)           {             projectsCheckboxTableViewer.setCheckedElements(new Object [0]);             projectsToConvert.clear();             setPageComplete(isPageComplete());           }         });      setControl(composite);      setPageComplete(isPageComplete());    }