当前位置: 首页>>代码示例>>Java>>正文


Java ModuleHandle类代码示例

本文整理汇总了Java中org.eclipse.birt.report.model.api.ModuleHandle的典型用法代码示例。如果您正苦于以下问题:Java ModuleHandle类的具体用法?Java ModuleHandle怎么用?Java ModuleHandle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ModuleHandle类属于org.eclipse.birt.report.model.api包,在下文中一共展示了ModuleHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createOdaDataSetHandle

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * create OdaDataSetHandle
 * 
 * @param response
 * @param parentHandle
 * @return
 * @throws OdaException
 * @throws SemanticException 
 */
public OdaDataSetHandle createOdaDataSetHandle(
		DesignSessionResponse response, ModuleHandle parentHandle )
		throws SemanticException
{
	initDesignSessionFields( response );
	OdaDataSetHandle dataSetHandle = null;

	if ( isSessionOk( ) )
	{
		try
		{
			dataSetHandle = modelOdaAdapter.createDataSetHandle( response.getDataSetDesign( ),
					parentHandle );
			updateROMDesignerState( dataSetHandle );
		}
		catch ( SemanticException e )
		{
			throw e;
		}
	}
	return dataSetHandle;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:32,代码来源:DTPUtil.java

示例2: createComputedMeasureView

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public static ExtendedItemHandle createComputedMeasureView(
		ModuleHandle module, String measureViewName )
		throws SemanticException
{
	if ( module == null )
		return null;
	ExtendedItemHandle extendedItem = module.getElementFactory( )
			.newExtendedItem( measureViewName,
					COMPUTED_MEASURE_VIEW_EXTENSION_NAME );

	if ( extendedItem == null )
		return null;

	// prepare detail cell
	ExtendedItemHandle cellHandle = createAggregationCell( module );
	if ( cellHandle != null )
	{
		extendedItem.getPropertyHandle( IMeasureViewConstants.DETAIL_PROP )
				.add( cellHandle );
	}

	return extendedItem;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:CrosstabExtendedItemFactory.java

示例3: getAvailableDataSetNames

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * Gets names of the available data sets and extended data sets
 * @param module
 * @return
 */
public static List<String> getAvailableDataSetNames( ModuleHandle module )
{
	List<String> dataSets = new ArrayList<String>();
	if( module == null )
	{
		return dataSets;
	}
	
	for ( Iterator iterator = module.getVisibleDataSets( ).iterator( ); iterator.hasNext( ); )
	{
		DataSetHandle dataSetHandle = (DataSetHandle) iterator.next( );
		dataSets.add( dataSetHandle.getName( ) );
	}
	for (Iterator itr = new LinkedDataSetAdapter().getVisibleLinkedDataSets( ).iterator( ); itr.hasNext( );)
	{
		dataSets.add( (String) itr.next( ) );
	}
	
	return dataSets;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:DataUtil.java

示例4: getMessageFile

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * Gets message file URL.
 * 
 * @param moduleHandle
 *            module handle
 * @param fileName
 *            file name
 * @param location
 *            the location to search
 * @return message file URL.
 */

private URL getMessageFile( ModuleHandle moduleHandle, String fileName,
		int location )
{
	if ( moduleHandle == null )
		return null;

	ULocale locale = moduleHandle.getModule( ).getSession( ).getLocale( );

	List<String> possibleFiles = BundleHelper.getHelper( moduleHandle.getModule( ),
			fileName )
			.getMessageFilenames( locale );

	for ( int i = 0; i < possibleFiles.size( ); i++ )
	{
		String filename = possibleFiles.get( i );
		URL url = getResource( moduleHandle, filename, location );
		if ( url != null )
			return url;
	}
	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:34,代码来源:ResourceLocatorImplBase.java

示例5: notifySaveFile

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public void notifySaveFile( ModuleHandle owner )
{
	if ( owner instanceof LibraryHandle )
	{
		IReportResourceSynchronizer synchronizer = ReportPlugin.getDefault( )
				.getResourceSynchronizerService( );

		if ( synchronizer != null )
		{
			synchronizer.notifyResourceChanged( new LibrarySaveChangeEvent( owner,
					null,
					IReportResourceChangeEvent.LibraySaveChange,
					owner.getFileName( ) ) );
		}
	}

}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:LibraryFileChangeResolve.java

示例6: getErrorLineFromModuleHandle

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
private int getErrorLineFromModuleHandle( ModuleHandle handle )
{
	handle.checkReport( );
	List list = handle.getErrorList( );
	if ( list != null )
		for ( int i = 0, m = list.size( ); i < m; i++ )
		{
			Object obj = list.get( i );
			if ( obj instanceof ErrorDetail )
			{
				ErrorDetail errorDetail = (ErrorDetail) list.get( i );
				this.errorDetail = errorDetail;
				return errorDetail.getLineNo( );
			}
		}
	return 0;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:ReportXMLSourceEditorFormPage.java

示例7: createIntPropertyDefn

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public static void createIntPropertyDefn( ModuleHandle module, String id,
		String key ) throws UserPropertyException
{
	UserPropertyDefnHandle property = module.getUserPropertyDefnHandle( id
			+ BuilderConstants.PROPERTY_SEPARATOR
			+ key );
	if ( property != null
			&& property.getType( ) != PropertyType.INTEGER_TYPE )
		module.dropUserPropertyDefn( property.getName( ) );

	UserPropertyDefn propertyDefn = new UserPropertyDefn( );
	propertyDefn.setName( id + BuilderConstants.PROPERTY_SEPARATOR + key );
	propertyDefn.setType( DEUtil.getMetaDataDictionary( )
			.getPropertyType( PropertyType.INTEGER_TYPE ) );
	propertyDefn.setVisible( false );
	module.addUserPropertyDefn( propertyDefn );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:UIHelper.java

示例8: setDesignFile

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * 
 * set ReportDesignHandle properties.
 * 
 * @param fileName
 * @throws DesignFileException
 * @throws SemanticException
 * @throws IOException
 */
private void setDesignFile( String fileName ) throws DesignFileException,
		SemanticException, IOException
{
	ReportDesignHandle newHandle = SessionHandleAdapter.getInstance( )
			.getSessionHandle( )
			.openDesign( fileName );
	if ( !page.getDisplayName( ).equals( "" ) ) //$NON-NLS-1$
		newHandle.setDisplayName( page.getDisplayName( ) );

	newHandle.setProperty( ModuleHandle.DESCRIPTION_PROP,
			page.getDescription( ) );

	if ( !page.getPreviewImagePath( ).equals( "" ) ) //$NON-NLS-1$
	{
		newHandle.setIconFile( page.getPreviewImagePath( ) );
		newHandle.deleteThumbnail( );
	}
	// if ( !page.getCheetSheetPath( ).equals( "" ) ) //$NON-NLS-1$
	// handle.setCheetSheet( page.getCheetSheetPath( ) );

	newHandle.save( );
	newHandle.close( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:33,代码来源:PublishTemplateWizard.java

示例9: isEnabled

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public boolean isEnabled( )
{
	LibraryHandle library = getSelectedLibrary( );
	ModuleHandle moduleHandle = SessionHandleAdapter.getInstance( )
			.getReportDesignHandle( );

	boolean enabled = library != null
			&& moduleHandle != null
			&& !moduleHandle.isInclude( library )
			&& ( library.getFileName( ) != null && !library.getFileName( )
					.equals( moduleHandle.getFileName( ) ) );

	if ( enabled )
		enabled = testRun( library );

	if ( library != null )
		library.close( );

	return enabled;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:AddSelectedLibToCurrentReportDesignAction.java

示例10: rebuildReportDesign

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * Rebuild report design model.
 * 
 * @param oldModel
 */
protected void rebuildReportDesign( ModuleHandle oldModel )
{
	// Initializes command stack
	WrapperCommandStack stack = (WrapperCommandStack) getCommandStack( );
	if ( stack != null )
	{
		stack.removeCommandStackListener( getCommandStackListener( ) );
		stack.setActivityStack( getModel( ).getCommandStack( ) );
		stack.addCommandStackListener( getCommandStackListener( ) );
	}

	// Resets the mediator
	SessionHandleAdapter.getInstance( ).resetReportDesign( oldModel,
			getModel( ) );

	SessionHandleAdapter.getInstance( ).setReportDesignHandle( getModel( ) );

	UIUtil.processSessionResourceFolder( getEditorInput( ),
			UIUtil.getProjectFromInput( getEditorInput( ) ),
			getModel( ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:27,代码来源:ReportMasterPageEditorFormPage.java

示例11: test_regression_119220

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * @throws DesignFileException
 */

public void test_regression_119220( ) throws DesignFileException
{
	openDesign( filename );

	libraryHandle = designHandle.getLibrary( "Lib" ); //$NON-NLS-1$
	assertNotNull( libraryHandle );
	PropertyHandle libImages = libraryHandle
			.getPropertyHandle( ModuleHandle.IMAGES_PROP );

	ImageHandle imageHandle = (ImageHandle) designHandle
			.findElement( "Image" ); //$NON-NLS-1$

	assertNotNull( imageHandle );
	
	
	assertEquals( "Lib.actuatetop.jpg", imageHandle.getImageName( ) ); //$NON-NLS-1$
	assertEquals( "Lib.actuatetop.jpg", imageHandle //$NON-NLS-1$
			.getProperty( IImageItemModel.IMAGE_NAME_PROP ) );

	// make sure the embedded image refer to the library.
	
	assertEquals( libImages.getAt( 0 ).getStructure( ), imageHandle
			.getEmbeddedImage( ).getStructure( ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:29,代码来源:Regression_119220.java

示例12: getCubes

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
/**
 * Gets all the Cubes available.
 * 
 * @return A String array contains all the Cubs.
 */
public static String[] getCubes( )
{
	ArrayList list = new ArrayList( );

	ModuleHandle handle = SessionHandleAdapter.getInstance( )
			.getReportDesignHandle( );

	for ( Iterator iterator = handle.getVisibleCubes( ).iterator( ); iterator.hasNext( ); )
	{
		CubeHandle CubeHandle = (CubeHandle) iterator.next( );
		list.add( CubeHandle.getQualifiedName( ) );
	}
	list.addAll(getLinkedDataSetNames());

	return (String[]) list.toArray( new String[0] );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:22,代码来源:ChoiceSetFactory.java

示例13: gotoLibraryLayoutPage

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
protected void gotoLibraryLayoutPage( IMarker marker,
		ReportElementHandle reportElementHandle )
{
	String pageId = LibraryLayoutEditorFormPage.ID;
	if ( activatePage( pageId ) == false )
	{
		return;
	}
	ModuleHandle moduleHandle = editorPart.getModel( );
	reportElementHandle = getReportElementHandle( moduleHandle, marker );
	if ( reportElementHandle != null
			&& ( !isElementInMasterPage( reportElementHandle ) ) )
	{
		SetCurrentEditModelCommand command = new SetCurrentEditModelCommand( reportElementHandle );
		command.execute( );
	}
	else
	// can not find it in this editpage
	{
		MessageDialog.openError( UIUtil.getDefaultShell( ),
				Messages.getString( "BIRTGotoMarker.Error.Title" ), //$NON-NLS-1$
				Messages.getString( "BIRTGotoMarker.Error.Message" ) ); //$NON-NLS-1$
	}

}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:BIRTGotoMarker.java

示例14: doSave

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public void doSave( IProgressMonitor progressMonitor )
{
	super.doSave( progressMonitor );
	IReportProvider provider = getProvider( );
	if ( provider != null && getErrorLIine( false ) == -1 )
	{
		ModuleHandle model = provider.getReportModuleHandle( getEditorInput( ),
				true );
		SessionHandleAdapter.getInstance( ).setReportDesignHandle( model );
		
		UIUtil.processSessionResourceFolder( getEditorInput( ), 
				UIUtil.getProjectFromInput( getEditorInput( ) ), model );
		
		UIUtil.doFinishSave( model );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:ReportXMLSourceEditorFormPage.java

示例15: getImage

import org.eclipse.birt.report.model.api.ModuleHandle; //导入依赖的package包/类
public IImage getImage( String name )
{
	ModuleHandle moduleHandle = getModuleHandle( );
	EmbeddedImage embeddedImage = moduleHandle.findImage( name );

	if ( embeddedImage != null )
	{
		Image image = new Image( embeddedImage.getData( moduleHandle
				.getModule( ) ), name );
		image.setReportRunnable( this );

		return image;
	}

	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:DesignRunnable.java


注:本文中的org.eclipse.birt.report.model.api.ModuleHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。