@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(); }); }
private void initializeAttributes() { fModel = (IDSModel) getPage().getModel(); fModel.addModelChangedListener(this); fComponent = fModel.getDSComponent(); }