PageComponent pageComponent = editorDescriptor.createPageComponent();
AbstractEditor editor = (AbstractEditor)pageComponent;
editor.setEditorInput(editorObject);
EditorComponentPane editorPane = new EditorComponentPane(pageComponent);
pageComponent.setContext(new DefaultViewContext(this, editorPane));
WorkspaceView workspace = (WorkspaceView)workspaceComponent;
workspace.addDocumentComponent(pageComponent, activateAfterOpen);
// Fires lifecycle event so listeners can react to editor
// being opened.
LifecycleApplicationEvent event = new LifecycleApplicationEvent(
LifecycleApplicationEvent.CREATED, editor);
Application.instance().getApplicationContext().publishEvent(event);