/**
* Creates and populates an editor site for the given editor.
*/
protected EditorSite createEditorSite(String editorId, IEditorInput input, IEditorPart editor) {
EditorDescriptor descriptor = (EditorDescriptor) idToDescriptor.get(editorId);
IEditorReference ref = new EditorReference(getEditorManager(), input, descriptor);
EditorSite site = new EditorInViewSite(viewSite, ref, editor, page, descriptor);
IEditorActionBarContributor contributor = descriptor.createActionBarContributor();
site.setActionBars(createEditorActionBars(descriptor, contributor, site));
return site;
}