blob: 39237a39d8cafe8c5035ac9a0f19247209a23ba9 [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;
public class DefaultValueAdapter extends MokaValueAdapter<Object> {
public DefaultValueAdapter(MokaDebugTarget debugTarget, Object adapted) {
super(debugTarget, adapted);
}
@Override
public String getReferenceTypeName() throws DebugException {
// No value adapter could handle the object to be adapted.
// Hence the default value adapter is used.
return "<no reference type>";
}
@Override
public String getValueString() throws DebugException {
// No value adapter could handle the object to be adapted.
// Hence the default value adapter is used.
if(this.adaptedObject != null) {
return this.toString();
}
return "<null or no representation>";
}
}