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(final Object parent,
21 final Expression defineName,
22 final Expression defineValue,
23 final int sourceStart,
24 final int sourceEnd) {
25 super(sourceStart, sourceEnd);
27 this.defineName = defineName;
28 this.defineValue = defineValue;
29 position = new Position(sourceStart, sourceEnd);
32 public String toString(final int tab) {
33 final StringBuffer buff = new StringBuffer(tabString(tab));
34 buff.append("define(");
35 buff.append(defineName.toStringExpression());
37 buff.append(defineValue.toStringExpression());
39 return buff.toString();
42 public String toString() {
43 final StringBuffer buff = new StringBuffer(defineName.toStringExpression());
45 buff.append(defineValue.toStringExpression());
46 return buff.toString();
49 public ImageDescriptor getImage() {
50 return PHPUiImages.DESC_VAR;
53 public Object getParent() {
57 public Position getPosition() {