Some work on improving BitVector<->String conversions
[Mograsim.git] / plugins / net.mograsim.plugin.core / src / net / mograsim / plugin / launch / MachineValue.java
1 package net.mograsim.plugin.launch;
2
3 import org.eclipse.core.runtime.PlatformObject;
4 import org.eclipse.debug.core.DebugException;
5 import org.eclipse.debug.core.ILaunch;
6 import org.eclipse.debug.core.model.IDebugTarget;
7 import org.eclipse.debug.core.model.IValue;
8 import org.eclipse.debug.core.model.IVariable;
9
10 import net.mograsim.machine.Machine;
11 import net.mograsim.plugin.MograsimActivator;
12
13 public class MachineValue extends PlatformObject implements IValue
14 {
15         private final MachineRegister register;
16
17         public MachineValue(MachineRegister register)
18         {
19                 this.register = register;
20         }
21
22         @Override
23         public String getModelIdentifier()
24         {
25                 return MograsimActivator.PLUGIN_ID;
26         }
27
28         public Machine getMachine()
29         {
30                 return register.getMachine();
31         }
32
33         @Override
34         public IDebugTarget getDebugTarget()
35         {
36                 return register.getDebugTarget();
37         }
38
39         @Override
40         public ILaunch getLaunch()
41         {
42                 return register.getLaunch();
43         }
44
45         @Override
46         public String getReferenceTypeName() throws DebugException
47         {
48                 return register.getReferenceTypeName();
49         }
50
51         @Override
52         public String getValueString() throws DebugException
53         {
54                 return register.getValueString();
55         }
56
57         @Override
58         public boolean isAllocated() throws DebugException
59         {
60                 return false;
61         }
62
63         @Override
64         public IVariable[] getVariables() throws DebugException
65         {
66                 return new IVariable[0];
67         }
68
69         @Override
70         public boolean hasVariables() throws DebugException
71         {
72                 return false;
73         }
74 }