Bug 145942 [regression] use library function does not work properly
steps to reproduce: - create a library - publish to resource folder - create a report - use the library - insert -> use library, or - outline -> libraries -> use library - navigate to designer resource folder - select a library - click on open expected behavior: - library is included actual behavior: - error occurred, please refer to attached screen capture
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/actions/ImportLibraryAction.java
ExceptionHandler.openErrorMessageBox( Messages.getString( "AddLibraryAction.Error.Title" ), 
						Messages.getFormattedString( "AddLibraryAction.Error.FileIsNotLibrary", new String[]{filename, ".rptlibrary"} ) ); 
				return;
			}
			try
			{
				filename = copyToResourceFolder( filename );
				if ( filename != null )
				{
					ModuleHandle moduleHandle = SessionHandleAdapter.getInstance( )
							.getReportDesignHandle( );
					UIUtil.includeLibrary( moduleHandle, filename );
				}
			}
			catch ( Exception e )
			{
				ExceptionHandler.handle( e );
			}
		}
	}
	private String copyToResourceFolder( String filename ) throws IOException
	{
		File orgFile = new File( filename );
		File resourceFolder = new File( ReportPlugin.getDefault( )
				.getResourcePreference( ) );
		if ( resourceFolder.exists( ) )
		{
			File targetFile = new File( resourceFolder, orgFile.getName( ) );
			if ( targetFile.exists( ) )
			{