public boolean performOk() {
   try {
     if (s2jsfProject.getSelection()) {
       S2JSFPlugin.getDefault().addNature((IProject) getElement());
     } else {
       S2JSFPlugin.getDefault().removeNature((IProject) getElement());
     }
   } catch (Exception ex) {
     Util.logException(ex);
     return false;
   }
   return true;
 }
  protected Control createContents(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));

    GridLayout layout = new GridLayout();
    composite.setLayout(layout);

    s2jsfProject = new Button(composite, SWT.CHECK);
    s2jsfProject.setText(S2JSFPlugin.getResourceString("ProjectProperty.Validation"));

    try {
      s2jsfProject.setSelection(((IProject) getElement()).hasNature(S2JSFPlugin.S2JSF_NATURE));
    } catch (Exception ex) {
      Util.logException(ex);
    }
    return composite;
  }