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


Java MPart.setIconURI方法代码示例

本文整理汇总了Java中org.eclipse.e4.ui.model.application.ui.basic.MPart.setIconURI方法的典型用法代码示例。如果您正苦于以下问题:Java MPart.setIconURI方法的具体用法?Java MPart.setIconURI怎么用?Java MPart.setIconURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.e4.ui.model.application.ui.basic.MPart的用法示例。


在下文中一共展示了MPart.setIconURI方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAndMapNewPart

import org.eclipse.e4.ui.model.application.ui.basic.MPart; //导入方法依赖的package包/类
private MPart createAndMapNewPart(final PositionWithOrderAndArticleInfoDTO positionViewDTO) {
	MPart newPart = modelService.createModelElement(MPart.class);
	newPart.setLabel(positionViewDTO.getPositionDetailPartLabel());
	newPart.setContributionURI(PART_CLASS_URI);
	newPart.setIconURI(ORDER_ICON_URI);
	newPart.setCloseable(true);
	// For newly created editors there is no reason to cache existing MPart
	if (positionViewDTO.getPositionId() != null) {
		positionIdToMPartMap.put(positionViewDTO.getPositionId(), newPart);
	}
	// IEclipseContext newContext = EclipseContextFactory.create();
	// newContext.setParent(context);
	// newPart.setContext(newContext);
	// newContext.set(PositionWithOrderAndArticleInfoDTO.class, positionViewDTO);
	return newPart;
}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:17,代码来源:PositionMPartFactory.java

示例2: createAndMapNewPart

import org.eclipse.e4.ui.model.application.ui.basic.MPart; //导入方法依赖的package包/类
private MPart createAndMapNewPart(final Order order) {
	MPart newPart = modelService.createModelElement(MPart.class);
	newPart.setLabel(order.getOrderNumber() + " - " + order.getState().getCaption());
	newPart.setContributionURI(PART_CLASS_URI);
	newPart.setIconURI(ORDER_ICON_URI);
	newPart.setCloseable(true);
	orderIdToMPartMap.put(order.getId(), newPart);
	return newPart;
}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:10,代码来源:OrderMPartFactory.java

示例3: createDynamicPart

import org.eclipse.e4.ui.model.application.ui.basic.MPart; //导入方法依赖的package包/类
/**
 * Allow to avoid using of EPartService, because it is not working in life
 * cycle manager.
 * 
 * @param modelService
 *            using for creating part descriptor and new empty part.
 * @return MPart created on part descriptor. There are no menus, handlers
 *         and toolbar.
 */
@Inject
private MPart createDynamicPart(EModelService modelService) {
    MPartDescriptor descriptor = modelService.getPartDescriptor(IdStorage.DYNAMIC_PART_DESCRIPTOR_ID);
    if (descriptor == null) {
        return null;
    }
    MPart part = modelService.createModelElement(MPart.class);
    part.setElementId(descriptor.getElementId());

    // part.getMenus().addAll(EcoreUtil.copyAll(descriptor.getMenus()));
    // if (descriptor.getToolbar() != null) {
    // part.setToolbar((MToolBar) EcoreUtil.copy((EObject)
    // descriptor.getToolbar()));
    // }
    if (log.isDebugEnabled()) {
        log.debug("ContributorURI: " + descriptor.getContributorURI()); //$NON-NLS-1$
    }
    part.setContributorURI(descriptor.getContributorURI());
    part.setCloseable(descriptor.isCloseable());
    if (log.isDebugEnabled()) {
        log.debug("ContributionURI: " + descriptor.getContributionURI());
    }
    part.setContributionURI(descriptor.getContributionURI());
    part.setLabel(descriptor.getLabel());
    part.setIconURI(descriptor.getIconURI());
    part.setTooltip(descriptor.getTooltip());

    // part.getHandlers().addAll(EcoreUtil.copyAll(descriptor.getHandlers()));

    part.getTags().addAll(descriptor.getTags());

    // TODO set if property
    part.getPersistedState().putAll(descriptor.getPersistedState());
    part.getBindingContexts().addAll(descriptor.getBindingContexts());
    return part;
}
 
开发者ID:e4c,项目名称:EclipseCommander,代码行数:46,代码来源:PartServiceImpl.java


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