use of org.erlide.ui.prefs.TokenHighlight in project erlide_eclipse by erlang.
the class ColoringPreferencePage method handleSyntaxColorListSelection.
void handleSyntaxColorListSelection() {
final TokenHighlight item = getHighlight();
fEnableCheckbox.setEnabled(item != null);
fSyntaxForegroundColorEditor.getButton().setEnabled(item != null);
fColorEditorLabel.setEnabled(item != null);
fBoldCheckBox.setEnabled(item != null);
fItalicCheckBox.setEnabled(item != null);
fStrikethroughCheckBox.setEnabled(item != null);
fUnderlineCheckBox.setEnabled(item != null);
if (item == null) {
return;
}
final HighlightStyle style = item.getStyle(fOverlayStore);
fSyntaxForegroundColorEditor.setColorValue(style.getColor());
fBoldCheckBox.setSelection(style.hasStyle(SWT.BOLD));
fItalicCheckBox.setSelection(style.hasStyle(SWT.ITALIC));
fStrikethroughCheckBox.setSelection(style.hasStyle(TextAttribute.STRIKETHROUGH));
fUnderlineCheckBox.setSelection(style.hasStyle(TextAttribute.UNDERLINE));
// if (item instanceof SemanticHighlightingColorListItem) {
// fEnableCheckbox.setEnabled(true);
// final boolean enable = getPreferenceStore().getBoolean(
// ((SemanticHighlightingColorListItem) item).getEnableKey());
// fEnableCheckbox.setSelection(enable);
// fSyntaxForegroundColorEditor.getButton().setEnabled(enable);
// fColorEditorLabel.setEnabled(enable);
// fBoldCheckBox.setEnabled(enable);
// fItalicCheckBox.setEnabled(enable);
// fStrikethroughCheckBox.setEnabled(enable);
// fUnderlineCheckBox.setEnabled(enable);
// }
}
Aggregations