ContextHelp now in new module net.sourceforge.phpeclipse.phphelp
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / phpparser / PHPSegment.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegment.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPSegment.java
new file mode 100644 (file)
index 0000000..9e387f4
--- /dev/null
@@ -0,0 +1,34 @@
+package net.sourceforge.phpeclipse.phpeditor.phpparser;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.Position;
+
+/**
+ * 
+ * @author khartlage
+ */
+public abstract class PHPSegment {
+  private String name;
+  private Position position;
+  private Object parent;
+
+  public PHPSegment(Object parent, String name, int index) {
+    this.parent = parent;
+    this.name = name;
+    this.position = new Position(index, name.length());
+  }
+
+  public String toString() {
+    return name;
+  }
+
+  public Position getPosition() {
+    return position;
+  }
+
+  public Object getParent() {
+    return parent;
+  }
+
+  public abstract ImageDescriptor getImage();
+};
\ No newline at end of file