本文整理汇总了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;
}
示例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;
}
示例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;
}