protected void updateState() {
/* **********************************************************************************
* The code below was added to track the view with focus
* in order to support save actions from a view (see bug 10234).
*/
ISaveablePart saveable = getSaveableView();
if (saveable == null) {
saveable = getActiveEditor();
}
/* **********************************************************************************/
if (saveable instanceof ISaveablesSource) {
ISaveablesSource modelSource = (ISaveablesSource) saveable;
setEnabled(SaveableHelper.needsSave(modelSource));
return;
}
setEnabled(saveable != null && saveable.isDirty());
}