IEditorInput input =
new FileEditorInput(ProjectUtils.getFile(project, file));
editor.init(new EclimEditorSite(), input);
editor.setInput(input);
CTextTools textTools = CUIPlugin.getDefault().getTextTools();
IPreferenceStore store = CUIPlugin.getDefault().getCombinedPreferenceStore();
CSourceViewerConfiguration config =
new CSourceViewerConfiguration(
textTools.getColorManager(),
store,
editor,
textTools.getDocumentPartitioning());
CSourceViewer viewer = new CSourceViewer(
EclimPlugin.getShell(), null, null, false,
SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION,
CUIPlugin.getDefault().getPreferenceStore());