コード例 #1
0
  @Override
  public void modelChanged(IModelChangedEvent e) {
    fComponent = fModel.getDSComponent();

    if (e.getChangeType() == IModelChangedEvent.WORLD_CHANGED) {
      markStale();
    }

    Display display = fEnabledButton.getDisplay();
    if (display.getThread() == Thread.currentThread()) updateUIFields();
    else
      display.asyncExec(
          () -> {
            if (!fEnabledButton.isDisposed()) updateUIFields();
          });
  }
コード例 #2
0
 private void initializeAttributes() {
   fModel = (IDSModel) getPage().getModel();
   fModel.addModelChangedListener(this);
   fComponent = fModel.getDSComponent();
 }