1// BEGIN LICENSE BLOCK 2// Version: CMPL 1.1 3// 4// The contents of this file are subject to the Cisco-style Mozilla Public 5// License Version 1.1 (the "License"); you may not use this file except 6// in compliance with the License. You may obtain a copy of the License 7// at www.eclipse-clp.org/license. 8// 9// Software distributed under the License is distributed on an "AS IS" 10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11// the License for the specific language governing rights and limitations 12// under the License. 13// 14// The Original Code is The ECLiPSe Constraint Logic Programming System. 15// The Initial Developer of the Original Code is Cisco Systems, Inc. 16// Portions created by the Initial Developer are 17// Copyright (C) 2006 Cisco Systems, Inc. All Rights Reserved. 18// 19// Contributor(s): 20// 21// END LICENSE BLOCK 22 23/** 24 * Command to set the propagation steps of a viewer 25 */ 26package com.parctechnologies.eclipse.visualisation; 27import com.parctechnologies.eclipse.Atom; 28 29public class ViewerSetPropagationStepsCommand extends ViewerSetPropertyCommand { 30 // So as to avoid storing an Atom (which cannot be serialised) in a command 31 private String atom; 32 33 public ViewerSetPropagationStepsCommand(Viewer viewer, 34 Atom atom) { 35 super(viewer, "viewPropagationSteps"); 36 this.atom = atom.functor(); 37 } 38 39 /** 40 * Define the 'newValue' for this property to be the atom "atom" 41 */ 42 Object getNewValue() { 43 return new Atom(atom); 44 } 45} 46