IFile file = getSelectedFile( navigator ); if ( file == null ) { return; }  String url = file.getLocation( ).toOSString( );
String url = libFile.getLocation( ).toOSString( );
	public void run( IAction action )	{		String fileName = null;		LibraryHandle libHandle = null;		if ( isEnable( ) == false )		{			return;		}		if ( editLibrary( ) )		{			String filePath = SessionHandleAdapter.getInstance( )					.getReportDesignHandle( )					.getFileName( );			fileName = filePath.substring( filePath.lastIndexOf( File.separator ) + 1 );			libHandle = (LibraryHandle) SessionHandleAdapter.getInstance( )					.getReportDesignHandle( );		}		else if ( selectLibrary( ) )		{			IFile file = getSelectedFile( navigator );			if ( file == null )			{				return;			}			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,				fileName,				ReportPlugin.getDefault( ).getResourcePreference( ) );		WizardDialog dialog = new WizardDialog( UIUtil.getDefaultShell( ),				publishLibrary );		dialog.setPageSize( 500, 250 );		dialog.open( );	}