PublishLibraryWizard publishLibrary = new PublishLibraryWizard( (LibraryHandle) SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ),
String url = file.getLocation( ).toOSString( ); ModuleHandle handle = null; try { handle = SessionHandleAdapter.getInstance( ) .getSessionHandle( ) .openLibrary( url );  if ( !( handle instanceof LibraryHandle ) ) { action.setEnabled( false ); return; }  String filePath = handle.getFileName( ); if ( filePath != null && filePath.length( ) != 0 ) { fileName = filePath.substring( filePath.lastIndexOf( File.separator ) + 1 ); } libHandle = (LibraryHandle) handle; } catch ( Exception e ) { ExceptionHandler.handle( e ); return; } finally { if ( handle != null ) { handle.close( ); } } }  PublishLibraryWizard publishLibrary = new PublishLibraryWizard( libHandle,
	public void run( IAction action )	{		if ( isEnable( ) == false )		{			return;		}		String filePath = SessionHandleAdapter.getInstance( )				.getReportDesignHandle( )				.getFileName( );		String fileName = filePath.substring( filePath.lastIndexOf( File.separator ) + 1 );		PublishLibraryWizard publishLibrary = new PublishLibraryWizard( (LibraryHandle) SessionHandleAdapter.getInstance( )				.getReportDesignHandle( ),				fileName,				ReportPlugin.getDefault( ).getResourcePreference( ) );		WizardDialog dialog = new WizardDialog( UIUtil.getDefaultShell( ),				publishLibrary );		dialog.setPageSize( 500, 250 );		dialog.open( );	}