1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import org.eclipse.jface.text.Position;
4 import org.eclipse.jface.resource.ImageDescriptor;
5 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
6 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
10 * define(expression,expression)
11 * @author Matthieu Casanova
13 public class Define extends Statement implements Outlineable {
15 public Expression defineName,defineValue;
17 private Object parent;
18 private Position position;
20 public Define(Object parent,
21 Expression defineName,
22 Expression defineValue,
25 super(sourceStart, sourceEnd);
27 this.defineName = defineName;
28 this.defineValue = defineValue;
29 position = new Position(sourceStart, sourceEnd);
32 public String toString(int tab) {
33 final StringBuffer buff = new StringBuffer(tabString(tab));
34 buff.append("define(");
35 buff.append(defineName.toStringExpression());
36 buff.append(defineValue.toStringExpression());
38 return buff.toString();
41 public String toString() {
42 final StringBuffer buff = new StringBuffer(defineName.toStringExpression());
44 buff.append(defineValue.toStringExpression());
45 return buff.toString();
48 public ImageDescriptor getImage() {
49 return PHPUiImages.DESC_VAR;
52 public Object getParent() {
56 public Position getPosition() {