X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Flaunch%2FMachineValue.java;fp=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Flaunch%2FMachineValue.java;h=02b84b9e716908711a00479527b9ef542b737f96;hb=79fe4ef5f67bdf3b7a9d8002d1759ce87b3f90be;hp=0000000000000000000000000000000000000000;hpb=c59feb481f39dc2af89475a1ea53c1b234913cb7;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineValue.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineValue.java new file mode 100644 index 00000000..02b84b9e --- /dev/null +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineValue.java @@ -0,0 +1,74 @@ +package net.mograsim.plugin.launch; + +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.debug.core.DebugException; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.model.IDebugTarget; +import org.eclipse.debug.core.model.IValue; +import org.eclipse.debug.core.model.IVariable; + +import net.mograsim.machine.Machine; +import net.mograsim.plugin.MograsimActivator; + +public class MachineValue extends PlatformObject implements IValue +{ + private final MachineRegister register; + + public MachineValue(MachineRegister register) + { + this.register = register; + } + + @Override + public String getModelIdentifier() + { + return MograsimActivator.PLUGIN_ID; + } + + public Machine getMachine() + { + return register.getMachine(); + } + + @Override + public IDebugTarget getDebugTarget() + { + return register.getDebugTarget(); + } + + @Override + public ILaunch getLaunch() + { + return register.getLaunch(); + } + + @Override + public String getReferenceTypeName() throws DebugException + { + return register.getReferenceTypeName(); + } + + @Override + public String getValueString() throws DebugException + { + return register.getValueString(); + } + + @Override + public boolean isAllocated() throws DebugException + { + return false; + } + + @Override + public IVariable[] getVariables() throws DebugException + { + return new IVariable[0]; + } + + @Override + public boolean hasVariables() throws DebugException + { + return false; + } +} \ No newline at end of file