]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/EvaluatorCheckedState.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.graph.impl / src / org / simantics / browsing / ui / graph / impl / EvaluatorCheckedState.java
1 package org.simantics.browsing.ui.graph.impl;
2
3 import org.simantics.browsing.ui.BuiltinKeys.CheckedStateKey;
4 import org.simantics.browsing.ui.CheckedState;
5 import org.simantics.browsing.ui.NodeContext;
6 import org.simantics.browsing.ui.PrimitiveQueryUpdater;
7 import org.simantics.browsing.ui.graph.impl.contribution.CheckedStateContributionImpl;
8 import org.simantics.browsing.ui.model.browsecontexts.BrowseContext;
9 import org.simantics.db.ReadGraph;
10 import org.simantics.db.exception.DatabaseException;
11
12 public class EvaluatorCheckedState extends CheckedStateContributionImpl {
13
14         final BrowseContext browseContext;
15         final boolean useNodeBrowseContexts;
16         
17     public EvaluatorCheckedState(PrimitiveQueryUpdater updater, NodeContext context,
18                 CheckedStateKey key,
19                         BrowseContext browseContext, boolean useNodeBrowseContexts) {
20                 super(updater, context, key);
21                 this.browseContext = browseContext;
22                 this.useNodeBrowseContexts = useNodeBrowseContexts;
23         }
24     
25     @Override
26     public CheckedState getState(ReadGraph graph, NodeContext context) throws DatabaseException {
27         return BrowseContext.get(graph,context,browseContext,useNodeBrowseContexts).getCheckedState(graph, context);
28     }
29
30 }