import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.PageBookView;
+import org.simantics.Simantics;
import org.simantics.browsing.ui.common.ErrorLogger;
import org.simantics.browsing.ui.common.property.IProperty;
import org.simantics.db.Resource;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.management.ISessionContext;
-import org.simantics.ui.SimanticsUI;
import org.simantics.ui.workbench.IPropertyPage;
-import org.simantics.utils.datastructures.Callback;
import org.simantics.utils.ui.ISelectionUtils;
// Cannot use this, since the property view does not contribute a selection back to the workbench.
//HandlerUtil.getCurrentSelection(event);
- ISessionContext sc = SimanticsUI.getSessionContext();
+ ISessionContext sc = Simantics.getSessionContext();
if (sc == null)
return null;
}
graph.addMetadata(cm);
}
- }, new Callback<DatabaseException>() {
- @Override
- public void run(DatabaseException parameter) {
- if (parameter != null)
- ErrorLogger.defaultLogError("Failed to restore default property values, see exception for details.", parameter);
- }
+ }, e -> {
+ if (e != null)
+ ErrorLogger.defaultLogError("Failed to restore default property values, see exception for details.", e);
});
}
}
}
}
- }, new Callback<DatabaseException>() {
- @Override
- public void run(DatabaseException parameter) {
- if (parameter != null)
- ErrorLogger.defaultLogError("Failed to restore default property values, see exception for details.", parameter);
- }
+ }, e -> {
+ if (e != null)
+ ErrorLogger.defaultLogError("Failed to restore default property values, see exception for details.", e);
});
}
return changes;