依赖注入 Annotation

@ProcessAdditions
void initSelection(MApplication application, IEclipseContext context) {

@ProcessAdditions:Use this annotation to describe methods that will participate in the application lifecycle. This  method will be called once the model is loaded.

 

给视图添加最大/最小化按钮

  <addons elementId="MinMax Addon" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon"/>
  <addons elementId="DnD Addon" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon"/>
  <addons elementId="Cleanup Addon" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.cleanupaddon.CleanupAddon"/>

Toolkit Model 的模型与实现事件同步

TM的具体组件事件由ControlBinder的handleEvent(Event event)方法发出,调用模型的control.eSet(feature, event);方法传达给模型。
WidgetsPackageImpl的initializePackageContents方法:
class,IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

相关文章:

  • 2021-12-29
  • 2021-12-23
  • 2021-07-09
  • 2021-04-16
  • 2022-01-12
  • 2021-05-04
  • 2022-01-04
猜你喜欢
  • 2022-12-23
  • 2021-05-30
  • 2021-09-13
  • 2021-11-05
  • 2021-08-05
  • 2021-08-23
  • 2021-10-15
相关资源
相似解决方案