]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/StandardGraphPropertyFactoryAdapter.java
Check if root allows paste only for non-null target root to prevent NPE
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / adapter / StandardGraphPropertyFactoryAdapter.java
1 package org.simantics.db.layer0.adapter;
2
3 import org.simantics.db.AsyncReadGraph;
4 import org.simantics.db.RelationContext;
5 import org.simantics.db.Resource;
6 import org.simantics.db.adaption.Adapter;
7 import org.simantics.db.layer0.variable.GraphPropertyFactory;
8 import org.simantics.db.layer0.variable.StandardGraphPropertyFactory;
9 import org.simantics.db.procedure.AsyncProcedure;
10
11 public class StandardGraphPropertyFactoryAdapter implements Adapter<GraphPropertyFactory, RelationContext> {
12
13     @Override
14     public void adapt(AsyncReadGraph graph, Resource source, RelationContext s, final AsyncProcedure<GraphPropertyFactory> procedure) {
15         procedure.execute(graph, StandardGraphPropertyFactory.INSTANCE);
16     }
17     
18 }