Object newObj = getRequest( ).getNewObject(); if( newObj instanceof Object[] && (( Object[])newObj).length>0) { newObj = (( Object[])newObj)[0]; } DesignElementHandle elementHandle = (DesignElementHandle) newObj; if ( elementHandle.getRoot( ) instanceof LibraryHandle ) { ModuleHandle moduleHandle = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); LibraryHandle library = (LibraryHandle) elementHandle.getRoot( ); try { if ( UIUtil.includeLibrary( moduleHandle, library ) ) { moduleHandle.addElement(moduleHandle.getElementFactory( ) .newElementFrom( elementHandle, null ),ModuleHandle.PARAMETER_SLOT); } } catch ( Exception e ) { ExceptionHandler.handle( e ); } }
		public boolean preHandleMouseUp( )		{			if ( getRequest( ).getNewObjectType( ) instanceof ScalarParameterHandle )			{				try				{					Object newHandle = InsertInLayoutUtil.performInsert( getRequest( ).getNewObject( ),							getTargetEditPart( ) );					if ( newHandle == null )						return false;					setModel( newHandle );					return super.preHandleMouseUp( );				}				catch ( SemanticException e )				{					ExceptionHandler.handle( e );				}			}			return false;		}