First submit for debug plugin
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / src / net / sourceforge / phpdt / internal / debug / core / model / PHPExpression.java
1 /**********************************************************************
2 Copyright (c) 2000, 2002 IBM Corp. and others.
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Common Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/cpl-v10.html
7
8 Contributors:
9     IBM Corporation - Initial implementation
10     Vicente Fernando - www.alfersoft.com.ar
11 **********************************************************************/
12 package net.sourceforge.phpdt.internal.debug.core.model;
13
14 import org.eclipse.debug.core.ILaunch;
15 import org.eclipse.debug.core.model.IDebugTarget;
16 import org.eclipse.debug.core.model.IExpression;
17 import org.eclipse.debug.core.model.IValue;
18
19 public class PHPExpression implements IExpression {
20
21   private PHPVariable inspectionResult;
22   private String expression;
23   
24   public PHPExpression(String expression, PHPVariable inspectionResult) {
25     this.inspectionResult = inspectionResult;
26     this.expression = expression;
27
28   }
29
30   public String getExpressionText() {
31     return expression;
32   }
33
34   public IValue getValue() {
35     return inspectionResult.getValue();
36   }
37
38   public IDebugTarget getDebugTarget() {    
39     return inspectionResult.getDebugTarget();
40   }
41
42   public void dispose() {
43
44   }
45
46   public String getModelIdentifier() {
47     return this.getDebugTarget().getModelIdentifier();
48   }
49
50   public ILaunch getLaunch() {
51     return this.getDebugTarget().getLaunch();
52   }
53
54   public Object getAdapter(Class arg0) {
55     return null;
56   }
57
58 }