*/
public class SupplementalDataPreferences extends CdmPreferencePage implements SelectionListener{
-
protected Boolean isShowIDNamspace;
protected Boolean isShowIDSource;
protected boolean isOverrideShowIDNamspace;
protected boolean isOverrideShowIDSource;
-
protected Combo showIDNamspaceButton;
protected Button allowOverrideShowIDNamspaceButton;
protected Combo showIDSourceButton;
final String SHOW = Messages.GeneralPreference_yes;
final String DO_NOT_SHOW = Messages.GeneralPreference_no;
- /**
- * {@inheritDoc}
- */
+
@Override
protected Control createContents(Composite parent) {
getValues();
}
});
}
-
-
showIDSourceButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowNamespaceInSource, "Show ID in Source",
isAdminPreference);
-
showIDSourceButton.addSelectionListener(this);
if (isShowIDSource == null || (!isOverrideShowIDSource && !isAdminPreference)){
showIDSourceButton.select(0);
if (!isAllowOverrideShowIDSource && !isAdminPreference){
showIDSourceButton.setEnabled(false);
}
-
-
return composite;
}
-
-
@Override
public boolean performOk() {
if (isAllowOverrideShowIDNamspace){
PreferencesUtil.setBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey(), isShowIDSource);
PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowNamespaceInSource.getKey()), isOverrideShowIDSource);
}
-
-
return true;
}
@Override
}else{
isAllowOverrideShowIDSource = true;
}
-
-
}
-
-
- /**
- * {@inheritDoc}
- */
@Override
public void widgetSelected(SelectionEvent e) {
if (e.getSource().equals(this.showIDNamspaceButton)) {
}
this.setApply(true);
-
-
}
-
-
- /**
- * {@inheritDoc}
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
}
}