本文整理汇总了Java中org.eclipse.e4.ui.services.IServiceConstants.ACTIVE_PART属性的典型用法代码示例。如果您正苦于以下问题:Java IServiceConstants.ACTIVE_PART属性的具体用法?Java IServiceConstants.ACTIVE_PART怎么用?Java IServiceConstants.ACTIVE_PART使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.e4.ui.services.IServiceConstants
的用法示例。
在下文中一共展示了IServiceConstants.ACTIVE_PART属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: activePartChanged
@Inject
void activePartChanged(@Named(IServiceConstants.ACTIVE_PART) MPart part, ETerminologyService eTerminologyService) {
if(part != null && part.getObject() instanceof TerminologyPart && part.getContext().get(ETerminology.class) != null) {
ETerminology eTerminology = part.getContext().get(ETerminology.class);
if(eTerminologyService.readTerminology(eTerminology).getOccurrenceStore().size() == 0) {
// emptyOccStoreLabel.setText("Occurrence store for terminology " + TerminologyPart.toPartLabel(eTerminology) + " is empty.");
// emptyOccStoreLabel.setVisible(true);
// viewer.getControl().setVisible(false);
} else {
// emptyOccStoreLabel.setVisible(false);
// viewer.getControl().setVisible(true);
}
}
}
示例2: canExecute
@CanExecute
public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART)
@Optional MPart part) {
if (part!=null && part.isDirty())
return true;
return false;
}
示例3: execute
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part) {
eventBroker.post(TermSuiteEvents.PREVIOUS_OCCURRENCE, part.getObject());
}
示例4: execute
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part) {
eventBroker.post(TermSuiteEvents.NEXT_OCCURRENCE, part.getObject());
}
示例5: execute
@Execute
void execute(EPartService partService,@Named(IServiceConstants.ACTIVE_PART) MPart part) {
partService.savePart(part, false);
}
示例6: execute
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, MToolItem item) {
if(part != null && part.getObject() instanceof FileEditorPart) {
((FileEditorPart)part.getObject()).wrap(item.isSelected());
}
}