import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
super.createControl(parent);
+
+
}
+ @Override
+ protected Button createAllowOverrideButton(Composite parent) {
+ Button activateCheckButton = new Button(parent, SWT.CHECK);
+ if (localPref){
+ activateCheckButton.setText("Override");
+ activateCheckButton.setSelection(override);
+ }else{
+ activateCheckButton.setText("Allow Override");
+ activateCheckButton.setSelection(override);
+ }
+ activateCheckButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ actualPref.setAllowOverride(overrideButton.getSelection());
+ override = overrideButton.getSelection();
+
+ }
+ });
+ return activateCheckButton;
+ }
protected void createAreaSelectionCombo(Composite parent) {
actualPref = CdmPreference.NewInstance(key, null);
perAreaPreferences.add(actualPref);
}
+ override = actualPref.isAllowOverride();
}else{
actualPref = null;
}
PrefKey key = newAreaSpecificStatusPreference();
actualPref = PreferenceResolver.resolve(perAreaPreferences, key);
areaText.setText(actualArea.getLabel());
+ override = actualPref.isAllowOverride();
}else{
actualPref = null;
}
}
}
checkedValues = actualPref.getValue();
+ override = actualPref.isAllowOverride();
}
return checkedValues;
perAreaPreferences.remove(actualPref);
}
perAreaPreferences.add(savePref);
+ savePref.setAllowOverride(override);
actualPref = savePref;
}
public void setActualPreference(CdmPreference pref){
-
this.actualPref = pref;
-
-
+ override = actualPref.isAllowOverride();
}