String defaultName = new File( libraryHandle.getFileName( ) ).getName( ) .split( File.separator + "." )[0]; if ( SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getLibrary( defaultName ) != null ) { ImportLibraryDialog dialog = new ImportLibraryDialog( defaultName ); if ( dialog.open( ) == Dialog.OK ) { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), (String) dialog.getResult( ) ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } return false; }
	public static boolean includeLibrary( ModuleHandle moduleHandle,			LibraryHandle libraryHandle ) throws DesignFileException,			SemanticException	{		if ( moduleHandle != libraryHandle				&& !moduleHandle.isInclude( libraryHandle ) )		{			String defaultName = new File( libraryHandle.getFileName( ) ).getName( )					.split( File.separator + "." )[0];			if ( SessionHandleAdapter.getInstance( )					.getReportDesignHandle( )					.getLibrary( defaultName ) != null )			{				ImportLibraryDialog dialog = new ImportLibraryDialog( defaultName );				if ( dialog.open( ) == Dialog.OK )				{					moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ),							libraryHandle.getFileName( ) ),							(String) dialog.getResult( ) );					ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE,							MessageFormat.format( MSG_DIALOG_MSG, new String[]{								libraryHandle.getFileName( )							} ),							SWT.ICON_INFORMATION );					return true;				}				return false;			}			moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ),					libraryHandle.getFileName( ) ),					defaultName );			ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE,					MessageFormat.format( MSG_DIALOG_MSG, new String[]{						libraryHandle.getFileName( )					} ),					SWT.ICON_INFORMATION );			return true;		}		return true;	}