use of org.eclipse.ui.texteditor.SourceViewerDecorationSupport in project tmdm-studio-se by Talend.
the class ElementFKInfoFormatViewer method getSourceViewerDecorationSupport.
protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
if (fSourceViewerDecorationSupport == null) {
fSourceViewerDecorationSupport = new SourceViewerDecorationSupport(viewer, overviewRuler, XMLSourceViewerHelper.getInstance().getAnnotationAccess(), XMLSourceViewerHelper.getInstance().getSharedColors());
// patch see SourceViewerDecorationSupport
AnnotationPreference info = new AnnotationPreference();
info.setAnnotationType(TYPE);
// $NON-NLS-1$
info.setTextPreferenceKey("errorIndication");
// $NON-NLS-1$
info.setTextStylePreferenceKey("errorTextStyle");
// $NON-NLS-1$
info.setColorPreferenceKey("errorIndicationColor");
getPreferenceStore().setValue(info.getTextPreferenceKey(), true);
// $NON-NLS-1$
getPreferenceStore().setValue(info.getTextStylePreferenceKey(), "PROBLEM_UNDERLINE");
// $NON-NLS-1$
getPreferenceStore().setValue(info.getColorPreferenceKey(), "255, 0, 0");
configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);
}
return fSourceViewerDecorationSupport;
}
use of org.eclipse.ui.texteditor.SourceViewerDecorationSupport in project tmdm-studio-se by Talend.
the class XMLSourceViewer method getSourceViewerDecorationSupport.
protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
if (fSourceViewerDecorationSupport == null) {
fSourceViewerDecorationSupport = new SourceViewerDecorationSupport(viewer, getOverviewRuler(), XMLSourceViewerHelper.getInstance().getAnnotationAccess(), XMLSourceViewerHelper.getInstance().getSharedColors());
// patch see SourceViewerDecorationSupport
AnnotationPreference info = new AnnotationPreference();
info.setAnnotationType(XMLValidator.TYPE);
// $NON-NLS-1$
info.setTextPreferenceKey("errorIndication");
// $NON-NLS-1$
info.setTextStylePreferenceKey("errorTextStyle");
// $NON-NLS-1$
info.setColorPreferenceKey("errorIndicationColor");
getPreferenceStore().setValue(info.getTextPreferenceKey(), true);
// $NON-NLS-1$
getPreferenceStore().setValue(info.getTextStylePreferenceKey(), "PROBLEM_UNDERLINE");
// $NON-NLS-1$
getPreferenceStore().setValue(info.getColorPreferenceKey(), "255, 0, 0");
configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);
}
return fSourceViewerDecorationSupport;
}
Aggregations