final IPreferenceStore prefStore= JavaPlugin.getDefault().getPreferenceStore(); final RGB rgb= PreferenceConverter.getColor(prefStore, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR); fMarginPainter.setMarginRulerColor(fTextTools.getColorManager().getColor(rgb));
final RGB rgb= PreferenceConverter.getColor(fPreferenceStore, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR); fMarginPainter.setMarginRulerColor(tools.getColorManager().getColor(rgb));
	public JavaPreview(Map workingValues, Composite parent) {		fTextTools= JavaPlugin.getDefault().getJavaTextTools();		fViewerConfiguration= new JavaSourceViewerConfiguration( fTextTools, null, IJavaPartitions.JAVA_PARTITIONING);		fPreviewDocument= new Document();		fWorkingValues= workingValues;		fTextTools.setupJavaDocumentPartitioner( fPreviewDocument, IJavaPartitions.JAVA_PARTITIONING);					fSourceViewer= new JavaSourceViewer(parent, null, null, false, SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);		fSourceViewer.configure(fViewerConfiguration);		fSourceViewer.getTextWidget().setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT));				fMarginPainter= new MarginPainter(fSourceViewer);		final IPreferenceStore prefStore= JavaPlugin.getDefault().getPreferenceStore();		final RGB rgb= PreferenceConverter.getColor(prefStore, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR);		fMarginPainter.setMarginRulerColor(fTextTools.getColorManager().getColor(rgb));		fSourceViewer.addPainter(fMarginPainter);				new JavaSourcePreviewerUpdater();		fSourceViewer.setDocument(fPreviewDocument);	}