public void resultsChanged() {\r
resultsChanged(false);\r
}\r
+\r
+ protected void onPublishResults() {\r
+ resultsChanged(true);\r
+ }\r
\r
public void setPublishResults(boolean value) {\r
publishResults = value;\r
- if(publishResults) resultsChanged(true);\r
+ if(publishResults) {\r
+ onPublishResults();\r
+ }\r
}\r
\r
public void resultsChanged(boolean force) {\r
\r
Variable base = Variables.getVariable(graph, run);\r
\r
+ SysdynExperiments.setPublishResults(graph, base, false);\r
+ \r
PartialIC data = graph.getPossibleRelatedValue(ic, SYSDYN.InitialCondition_HasInitialValues, PartialIC.BINDING);\r
data.apply(graph, base);\r
+ \r
+ SysdynExperiments.setPublishResults(graph, base, true);\r
+\r
\r
}\r
\r
import java.util.HashMap;\r
\r
import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.NullProgressMonitor;\r
import org.eclipse.core.runtime.jobs.Job;\r
import org.simantics.db.AsyncReadGraph;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
+import org.simantics.db.common.utils.Logger;\r
import org.simantics.db.exception.DatabaseException;\r
import org.simantics.db.procedure.AsyncListener;\r
import org.simantics.db.request.Read;\r
}\r
\r
}\r
+\r
+ @Override\r
+ protected void onPublishResults() {\r
+ try {\r
+ setSubscribedResults(new NullProgressMonitor(), getSolver().getTime());\r
+ } catch (FMUJNIException e) {\r
+ Logger.defaultLogError(e);\r
+ }\r
+ ((MemoryResult)getCurrentResult()).setResult(new GameResult(this, this.results, this.subscription));\r
+ super.onPublishResults();\r
+ }\r
\r
}\r
@Override\r
public void refresh() {\r
try {\r
- setSubscribedResults(new NullProgressMonitor(), solver.getTime());\r
- \r
- ((MemoryResult)getCurrentResult()).setResult(new GameResult(this, this.results, this.subscription));\r
+ \r
+ if(publishResults) {\r
+ setSubscribedResults(new NullProgressMonitor(), solver.getTime());\r
+ ((MemoryResult)getCurrentResult()).setResult(new GameResult(this, this.results, this.subscription));\r
+ }\r
\r
resultsChanged(true);\r
} catch (Exception e) {\r