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:
parent
03f01c56b8
commit
436c2fb40b
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue