fDelegate.redraw();
// listen to changes
fDispatcher= new PropertyEventDispatcher(store);
fDispatcher.addPropertyChangeListener(FG_COLOR_KEY, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateForegroundColor(store, fDelegate);
fDelegate.redraw();
}
});
IPropertyChangeListener backgroundHandler= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateBackgroundColor(store, fDelegate);
fDelegate.redraw();
}
};
fDispatcher.addPropertyChangeListener(BG_COLOR_KEY, backgroundHandler);
fDispatcher.addPropertyChangeListener(USE_DEFAULT_BG_KEY, backgroundHandler);
fDispatcher.addPropertyChangeListener(LINE_NUMBER_KEY, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
// only handle quick diff on/off information, but not ruler visibility (handled by AbstractDecoratedTextEditor)
updateLineNumbersVisibility(fDelegate);
}
});
fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_CHARACTER_MODE, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateCharacterMode(store, fDelegate);
}
});
fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_RENDERING_MODE, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateRevisionRenderingMode(store, fDelegate);
}
});
fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_AUTHOR, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateRevisionAuthorVisibility(store, fDelegate);
}
});
fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_REVISION, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateRevisionIdVisibility(store, fDelegate);
}
});
fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON, new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateQuickDiffVisibility(fDelegate);
}
});
if (changedPref != null) {
fDispatcher.addPropertyChangeListener(changedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateChangedColor(changedPref, store, fDelegate);
fDelegate.redraw();
}
});
}
if (addedPref != null) {
fDispatcher.addPropertyChangeListener(addedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateAddedColor(addedPref, store, fDelegate);
fDelegate.redraw();
}
});
}
if (deletedPref != null) {
fDispatcher.addPropertyChangeListener(deletedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
updateDeletedColor(deletedPref, store, fDelegate);
fDelegate.redraw();
}
});