use of org.eclipse.jface.text.source.IChangeRulerColumn in project eclipse.platform.text by eclipse.
the class LineNumberColumn method updateDeletedColor.
private void updateDeletedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
if (pref != null && column instanceof IChangeRulerColumn) {
RGB rgb = getColorFromAnnotationPreference(store, pref);
((IChangeRulerColumn) column).setDeletedColor(getSharedColors().getColor(rgb));
}
}
use of org.eclipse.jface.text.source.IChangeRulerColumn in project eclipse.platform.text by eclipse.
the class LineNumberColumn method updateChangedColor.
private void updateChangedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
if (pref != null && column instanceof IChangeRulerColumn) {
RGB rgb = getColorFromAnnotationPreference(store, pref);
((IChangeRulerColumn) column).setChangedColor(getSharedColors().getColor(rgb));
}
}
use of org.eclipse.jface.text.source.IChangeRulerColumn in project eclipse.platform.text by eclipse.
the class LineNumberColumn method installChangeRulerModel.
/**
* Installs the differ annotation model with the current quick diff display.
*
* @param column the column to install the model on
*/
private void installChangeRulerModel(IVerticalRulerColumn column) {
if (column instanceof IChangeRulerColumn) {
IAnnotationModel model = getAnnotationModelWithDiffer();
((IChangeRulerColumn) column).setModel(model);
if (model != null) {
ISourceViewer viewer = fViewer;
if (viewer != null && viewer.getAnnotationModel() == null && column.getControl() != null)
viewer.showAnnotations(true);
}
}
}
use of org.eclipse.jface.text.source.IChangeRulerColumn in project eclipse.platform.text by eclipse.
the class LineNumberColumn method updateAddedColor.
private void updateAddedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
if (pref != null && column instanceof IChangeRulerColumn) {
RGB rgb = getColorFromAnnotationPreference(store, pref);
((IChangeRulerColumn) column).setAddedColor(getSharedColors().getColor(rgb));
}
}
use of org.eclipse.jface.text.source.IChangeRulerColumn in project eclipse.platform.text by eclipse.
the class LineNumberColumn method getDiffer.
/**
* Extracts the line differ from the displayed document's annotation model. If none can be found,
* <code>null</code> is returned.
*
* @return the line differ, or <code>null</code> if none could be found
*/
private IAnnotationModel getDiffer() {
// get annotation model extension
ISourceViewer viewer = fViewer;
if (viewer == null)
return null;
IAnnotationModel m = viewer.getAnnotationModel();
if (m == null && fDelegate instanceof IChangeRulerColumn)
m = ((IChangeRulerColumn) fDelegate).getModel();
if (!(m instanceof IAnnotationModelExtension))
return null;
IAnnotationModelExtension model = (IAnnotationModelExtension) m;
// get diff model if it exists already
return model.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
}
Aggregations