Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.tests/src/org/eclipse/debug/tests/logicalstructure/TestValue.java')
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/logicalstructure/TestValue.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/logicalstructure/TestValue.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/logicalstructure/TestValue.java
new file mode 100644
index 000000000..742f34853
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/logicalstructure/TestValue.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Julian Honnen
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Julian Honnen <julian.honnen@vector.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.logicalstructure;
+
+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 org.eclipse.debug.tests.TestsPlugin;
+
+class TestValue implements IValue {
+
+ private final String value;
+
+ private boolean allocated = true;
+
+ public TestValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String getModelIdentifier() {
+ return TestsPlugin.PLUGIN_ID;
+ }
+
+ @Override
+ public IDebugTarget getDebugTarget() {
+ return null;
+ }
+
+ @Override
+ public ILaunch getLaunch() {
+ return null;
+ }
+
+ @Override
+ public <T> T getAdapter(Class<T> adapter) {
+ return null;
+ }
+
+ @Override
+ public String getReferenceTypeName() throws DebugException {
+ return null;
+ }
+
+ @Override
+ public String getValueString() {
+ return value;
+ }
+
+ @Override
+ public boolean isAllocated() {
+ return allocated;
+ }
+
+ @Override
+ public IVariable[] getVariables() throws DebugException {
+ return new IVariable[0];
+ }
+
+ @Override
+ public boolean hasVariables() throws DebugException {
+ return false;
+ }
+
+ public void release() {
+ allocated = false;
+ }
+
+ @Override
+ public String toString() {
+ return getValueString();
+ }
+}

Back to the top