striketroughCheckboxField = new CheckBoxField(PreferencesMessages.DLTKEditorPreferencePage_strikethrough);
striketroughCheckboxField.createComponent(itemEditorComposite, gdFillDefaults().indent(20, 0).create());
underlineCheckboxField = new CheckBoxField(PreferencesMessages.DLTKEditorPreferencePage_underline);
underlineCheckboxField.createComponent(itemEditorComposite, gdFillDefaults().indent(20, 0).create());
enableField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
boolean enabled = enableField.getBooleanFieldValue();
getOverlayPrefStore().setValue(item.getEnableKey(), enabled);
setColoringEditorControlsEnabled(enabled);
}
});
colorField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
PreferenceConverter.setValue(getOverlayPrefStore(), item.getColorKey(), colorField.getFieldValue());
}
});
boldCheckboxField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
getOverlayPrefStore().setValue(item.getBoldKey(), boldCheckboxField.getBooleanFieldValue());
}
});
italicCheckboxField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
getOverlayPrefStore().setValue(item.getItalicKey(), italicCheckboxField.getBooleanFieldValue());
}
});
striketroughCheckboxField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
getOverlayPrefStore().setValue(item.getStrikethroughKey(),
striketroughCheckboxField.getBooleanFieldValue());
}
});
underlineCheckboxField.addValueChangedListener(new IFieldValueListener() {
@Override
public void fieldValueChanged() {
SourceColoringElement item = getSelectedColoringItem();
getOverlayPrefStore().setValue(item.getUnderlineKey(), underlineCheckboxField.getBooleanFieldValue());
}