blob: 18960168f9b0452cbc767973ca9c61910e7bd345 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2016 CEA LIST.
*
* 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:
* CEA LIST Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.moka.debug.model.data.mapping.values;
import org.eclipse.debug.core.DebugException;
import org.eclipse.papyrus.moka.debug.engine.MokaDebugTarget;
import org.eclipse.papyrus.moka.fuml.Semantics.Loci.LociL1.ISemanticVisitor;
public abstract class VisitorValueAdapter<T extends ISemanticVisitor> extends MokaValueAdapter<T> {
public VisitorValueAdapter(MokaDebugTarget debugTarget, T visitor) {
super(debugTarget, visitor);
}
@Override
public String getValueString() throws DebugException {
// Returns this value as a String.
// The string representation of this value is given by the toString
// operation implemented by a semantic visitor.
if (this.adaptedObject != null) {
return this.adaptedObject.toString();
}
return "<empty>";
}
}