Object fileAdapter = editor.getEditorInput( ) .getAdapter( IFile.class ); LibraryExplorerTreeViewPage page = getPage( fileAdapter, editor ); initPage( page ); page.createControl( getPageBook( ) ); return new PageRec( part, page );
if ( editor != null ) { Object fileAdapter = editor.getEditorInput( ) .getAdapter( IFile.class ); if ( fileAdapter != null ) { LibraryExplorerTreeViewPage page = getPage( fileAdapter, editor ); initPage( page ); page.createControl( getPageBook( ) ); return new PageRec( part, page ); } }
	protected PageRec doCreatePage( IWorkbenchPart part )	{		if ( part instanceof AbstractMultiPageLayoutEditor )		{			IEditorPart editor = UIUtil.getActiveEditor( true );			Object fileAdapter = editor.getEditorInput( )					.getAdapter( IFile.class );			LibraryExplorerTreeViewPage page = getPage( fileAdapter, editor );			initPage( page );			page.createControl( getPageBook( ) );			return new PageRec( part, page );		}		return null;	}