package org.simantics.browsing.ui.graph.impl; import org.simantics.browsing.ui.BuiltinKeys.CheckedStateKey; import org.simantics.browsing.ui.CheckedState; import org.simantics.browsing.ui.NodeContext; import org.simantics.browsing.ui.PrimitiveQueryUpdater; import org.simantics.browsing.ui.graph.impl.contribution.CheckedStateContributionImpl; import org.simantics.browsing.ui.model.browsecontexts.BrowseContext; import org.simantics.db.ReadGraph; import org.simantics.db.exception.DatabaseException; public class EvaluatorCheckedState extends CheckedStateContributionImpl { final BrowseContext browseContext; final boolean useNodeBrowseContexts; public EvaluatorCheckedState(PrimitiveQueryUpdater updater, NodeContext context, CheckedStateKey key, BrowseContext browseContext, boolean useNodeBrowseContexts) { super(updater, context, key); this.browseContext = browseContext; this.useNodeBrowseContexts = useNodeBrowseContexts; } @Override public CheckedState getState(ReadGraph graph, NodeContext context) throws DatabaseException { return BrowseContext.get(graph,context,browseContext,useNodeBrowseContexts).getCheckedState(graph, context); } }