X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph.profile%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fprofile%2FEvaluationContext.java;fp=bundles%2Forg.simantics.scenegraph.profile%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fprofile%2FEvaluationContext.java;h=c66495acfdf800afaf10061cd7197064ca8c7018;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=96b99552331b4fcac571d8613b7356b5dc517d8f;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/EvaluationContext.java b/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/EvaluationContext.java index 96b995523..c66495acf 100644 --- a/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/EvaluationContext.java +++ b/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/EvaluationContext.java @@ -1,92 +1,92 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.scenegraph.profile; - -import org.simantics.db.Resource; -import org.simantics.scenegraph.INode; -import org.simantics.scenegraph.g2d.G2DSceneGraph; - -/** - * @author Antti Villberg - * - * @see ProfileKeys - */ -public interface EvaluationContext extends Observer { - - /** - * @return the runtime resource this evaluation context is attached to (i.e. - * runtime diagram resource) - */ - Resource getResource(); - - /** - * @return the scene graph this profile evaluation context is attached to - */ - G2DSceneGraph getSceneGraph(); - - /** - * Get a constant data item attached to the evaluation context by the - * evaluation system. - * - * @param key - * @return - * @see ProfileKeys - */ - T getConstant(String key); - - /** - * Get the specified temporary property for the specified node. Temporary - * properties are removed between each round of application of currently - * active profile entries. - * - * @param node node to get the property for - * @param key key of property to get - * @return null if property is not set for the specified node - */ - T getTemporaryProperty(INode node, String key); - - /** - * Set value of temporary property for the evaluation process where this - * evaluation context is used. Temporary properties are removed between each - * round of application of currently active profile entries. - * - * @param node node to set the property for - * @param key key of property to set - * @param value value of the property to set - */ - void setTemporaryProperty(INode node, String key, T value); - - /** - * Get the specified (persistent) property for the specified node. These - * properties stay available through the lifetime of the evaluation context - * i.e. the lifetime of the runtime diagram it is associated with. - * - * @param node node to get the property for - * @param key key of property to get - * @return null if property is not set for the specified node - */ - T getProperty(INode node, String key); - - /** - * Set value of temporary property for the evaluation process where this - * evaluation context is used. These properties stay available through the - * lifetime of the evaluation context i.e. the lifetime of the runtime - * diagram it is associated with. - * - * @param node node to set the property for - * @param key key of property to set - * @param value value of the property to set - * @return previous value of property - */ - T setProperty(INode node, String key, T value); - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.scenegraph.profile; + +import org.simantics.db.Resource; +import org.simantics.scenegraph.INode; +import org.simantics.scenegraph.g2d.G2DSceneGraph; + +/** + * @author Antti Villberg + * + * @see ProfileKeys + */ +public interface EvaluationContext extends Observer { + + /** + * @return the runtime resource this evaluation context is attached to (i.e. + * runtime diagram resource) + */ + Resource getResource(); + + /** + * @return the scene graph this profile evaluation context is attached to + */ + G2DSceneGraph getSceneGraph(); + + /** + * Get a constant data item attached to the evaluation context by the + * evaluation system. + * + * @param key + * @return + * @see ProfileKeys + */ + T getConstant(String key); + + /** + * Get the specified temporary property for the specified node. Temporary + * properties are removed between each round of application of currently + * active profile entries. + * + * @param node node to get the property for + * @param key key of property to get + * @return null if property is not set for the specified node + */ + T getTemporaryProperty(INode node, String key); + + /** + * Set value of temporary property for the evaluation process where this + * evaluation context is used. Temporary properties are removed between each + * round of application of currently active profile entries. + * + * @param node node to set the property for + * @param key key of property to set + * @param value value of the property to set + */ + void setTemporaryProperty(INode node, String key, T value); + + /** + * Get the specified (persistent) property for the specified node. These + * properties stay available through the lifetime of the evaluation context + * i.e. the lifetime of the runtime diagram it is associated with. + * + * @param node node to get the property for + * @param key key of property to get + * @return null if property is not set for the specified node + */ + T getProperty(INode node, String key); + + /** + * Set value of temporary property for the evaluation process where this + * evaluation context is used. These properties stay available through the + * lifetime of the evaluation context i.e. the lifetime of the runtime + * diagram it is associated with. + * + * @param node node to set the property for + * @param key key of property to set + * @param value value of the property to set + * @return previous value of property + */ + T setProperty(INode node, String key, T value); + +}