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