SchemaWrapper schemaWrapper = ( SchemaWrapper ) selection;
try
{
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
FormEditor editor = ( FormEditor ) page.openEditor(
new SchemaEditorInput( schemaWrapper.getMySchema() ), SchemaEditor.ID );
editor.setActivePage( SchemaEditorSourceCodePage.ID );
}
catch ( PartInitException e )
{
Logger.getLogger( OpenSchemaSourceCode.class ).debug( "error when opening the editor" ); //$NON-NLS-1$