Rewritten Parser/Scanner to package net.sourceforge.phpdt.internal.compiler.parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / phpparser / PHPSegment.java
1 package net.sourceforge.phpeclipse.phpeditor.phpparser;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.jface.text.Position;
5
6 /**
7  * 
8  * @author khartlage
9  */
10 public abstract class PHPSegment {
11   protected String name;
12   private Position position;
13   private Object parent;
14
15   public PHPSegment(Object parent, String name, int index) {
16     this.parent = parent;
17     this.name = name;
18     this.position = new Position(index, name.length());
19   }
20
21   public String toString() {
22     return name;
23   }
24
25   public Position getPosition() {
26     return position;
27   }
28
29   public Object getParent() {
30     return parent;
31   }
32
33   public abstract ImageDescriptor getImage();
34 };