1 /*******************************************************************************
\r
2 * Copyright (c) 2007- VTT Technical Research Centre of Finland.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.proconf.g3d.actions;
\r
13 import org.simantics.db.Graph;
\r
14 import org.simantics.db.GraphRequest;
\r
15 import org.simantics.db.GraphRequestAdapter;
\r
16 import org.simantics.db.GraphRequestStatus;
\r
17 import org.simantics.db.Session;
\r
18 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;
\r
20 public abstract class ReadInteractiveAction extends InteractiveAction {
\r
23 public ReadInteractiveAction(ThreeDimensionalEditorBase parent, boolean sync) {
\r
29 public final void update(){
\r
30 Session session = parent.getSession();
\r
31 GraphRequest r = new GraphRequestAdapter() {
\r
33 public GraphRequestStatus perform(Graph g) throws Exception {
\r
35 return GraphRequestStatus.transactionComplete();
\r
39 session.syncRead(r);
\r
41 session.asyncRead(r);
\r
46 public abstract void doChanges(Graph graph) throws Exception;
\r