1 /*******************************************************************************
\r
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
\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 java.util.List;
\r
15 import org.eclipse.jface.action.Action;
\r
16 import org.simantics.db.Graph;
\r
17 import org.simantics.db.Resource;
\r
18 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;
\r
22 * Context / selection dependent action
\r
24 * @author Marko Luukkainen
\r
27 public abstract class ContextAction extends Action {
\r
28 protected ThreeDimensionalEditorBase parent;
\r
30 public ContextAction(ThreeDimensionalEditorBase parent) {
\r
31 this.parent = parent;
\r
38 public void init(){};
\r
43 public abstract void run();
\r
46 * Used to check if action is usable for given resources
\r
50 public abstract boolean usable(Graph graph, List<Resource> resources);
\r