X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph.loader%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Floader%2FScenegraphVariableAdapter.java;h=3402a7ff9b6d1abb4ed03c64d013ef74603ef527;hb=HEAD;hp=2bcbe5e3a6380aaaac4937f2773275c978b85d63;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph.loader/src/org/simantics/scenegraph/loader/ScenegraphVariableAdapter.java b/bundles/org.simantics.scenegraph.loader/src/org/simantics/scenegraph/loader/ScenegraphVariableAdapter.java index 2bcbe5e3a..3402a7ff9 100644 --- a/bundles/org.simantics.scenegraph.loader/src/org/simantics/scenegraph/loader/ScenegraphVariableAdapter.java +++ b/bundles/org.simantics.scenegraph.loader/src/org/simantics/scenegraph/loader/ScenegraphVariableAdapter.java @@ -1,21 +1,21 @@ -package org.simantics.scenegraph.loader; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.adaption.SimpleContextualAdapter; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.variable.StandardGraphChildVariable; -import org.simantics.db.layer0.variable.Variable; - -public class ScenegraphVariableAdapter extends SimpleContextualAdapter { - - @Override - public Variable adapt(ReadGraph g, Resource source, Variable context) throws DatabaseException { - SceneGraphContext vc = ScenegraphLoaderUtils.getContext(g, context); - if(vc != null) - return new ScenegraphVariable(context, source, null, /*context.adapt(g, SceneGraphContext.class).getRuntime()*/ null); - else - return new StandardGraphChildVariable(context, null, source); - } - -} +package org.simantics.scenegraph.loader; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.adaption.SimpleContextualAdapter; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.StandardGraphChildVariable; +import org.simantics.db.layer0.variable.Variable; + +public class ScenegraphVariableAdapter extends SimpleContextualAdapter { + + @Override + public Variable adapt(ReadGraph g, Resource source, Variable context) throws DatabaseException { + SceneGraphContext vc = ScenegraphLoaderUtils.getContext(g, context); + if(vc != null) + return new ScenegraphVariable(context, source, null, /*context.adapt(g, SceneGraphContext.class).getRuntime()*/ null); + else + return new StandardGraphChildVariable(context, null, source); + } + +}