1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix template preference page previewer

This commit is contained in:
Anton Leherbauer 2006-10-03 07:59:03 +00:00
parent 03f01c56b8
commit 436c2fb40b

View file

@ -77,14 +77,14 @@ public class CTemplatePreferencePage extends TemplatePreferencePage {
IPreferenceStore store= CUIPlugin.getDefault().getCombinedPreferenceStore();
CSourceViewer viewer= new CSourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL, store);
CTextTools tools= CUIPlugin.getDefault().getTextTools();
CSourceViewerConfiguration configuration = new CSourceViewerConfiguration(tools, null);
CSourceViewerConfiguration configuration = new CSourceViewerConfiguration(tools.getColorManager(), store, null, tools.getDocumentPartitioning());
IDocument document = new Document();
tools.setupCDocument(document);
viewer.configure(configuration);
viewer.setEditable(false);
viewer.setDocument(document);
Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT);
Font font= JFaceResources.getFontRegistry().get(PreferenceConstants.EDITOR_TEXT_FONT);
viewer.getTextWidget().setFont(font);
Control control= viewer.getControl();