if ( getActiveEditor( ) instanceof GraphicalEditorWithFlyoutPalette )
if ( getActivePageInstance( ) instanceof GraphicalEditorWithFlyoutPalette )
	public void partActivated( IWorkbenchPart part )	{		if ( part != this )		{			if ( part instanceof PageBookView )			{				PageBookView view = (PageBookView) part;				if ( view.getCurrentPage( ) instanceof DesignerOutlinePage )				{					ISelectionProvider provider = (ISelectionProvider) view.getCurrentPage( );					ReportRequest request = new ReportRequest( view.getCurrentPage( ) );					List list = new ArrayList( );					if ( provider.getSelection( ) instanceof IStructuredSelection )					{						list = ( (IStructuredSelection) provider.getSelection( ) ).toList( );					}					request.setSelectionObject( list );					request.setType( ReportRequest.SELECTION );					// no convert					// request.setRequestConvert(new					// EditorReportRequestConvert());					SessionHandleAdapter.getInstance( )							.getMediator( )							.notifyRequest( request );					SessionHandleAdapter.getInstance( )							.getMediator( )							.pushState( );				}			}			if ( getActiveEditor( ) instanceof GraphicalEditorWithFlyoutPalette )			{				if ( ( (GraphicalEditorWithFlyoutPalette) getActiveEditor( ) ).getGraphicalViewer( )						.getEditDomain( )						.getPaletteViewer( ) != null )				{					GraphicalEditorWithFlyoutPalette editor = (GraphicalEditorWithFlyoutPalette) getActiveEditor( );					GraphicalViewer view = editor.getGraphicalViewer( );					view.getEditDomain( ).loadDefaultTool( );				}			}			return;		}		if ( part == this )		{			// use the asynchronized execution to ensure correct active page			// index.			Display.getCurrent( ).asyncExec( new Runnable( ) {				public void run( )				{					if ( getActivePageInstance( ) instanceof GraphicalEditorWithFlyoutPalette )					{						GraphicalEditorWithFlyoutPalette editor = (GraphicalEditorWithFlyoutPalette) getActivePageInstance( );						GraphicalViewer view = editor.getGraphicalViewer( );						UIUtil.resetViewSelection( view, true );					}				};			} );			if ( getEditorInput( ).exists( ) )			{				handleActivation( );				SessionHandleAdapter.getInstance( )						.setReportDesignHandle( getModel( ) );				DataSetManager.initCurrentInstance( getEditorInput( ) );			}		}	}