1 package net.sourceforge.phpeclipse.phpeditor.phpparser;
3 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
4 import org.eclipse.jface.resource.ImageDescriptor;
7 * A require, require_once, include or include_once declaration strongly inspired by the PHPFunctionDeclaration of Khartlage (:.
8 * @author khartlage, Matthieu Casanova
10 public class PHPReqIncDeclaration extends PHPSegment {
12 /** What is required/included. */
15 * Create an include declaration.
16 * @param parent the parent object (it should be a php class or function)
17 * @param name it should be require, require_once, include or include_once
18 * @param index where the keyword is in the file
19 * @param value what is included
21 public PHPReqIncDeclaration(Object parent, String name, int index, String value) {
22 super(parent, name, index);
27 * Create an include declaration.
28 * @param parent the parent object (it should be a php class or function)
29 * @param name it should be require, require_once, include or include_once
30 * @param index where the keyword is in the file
32 public PHPReqIncDeclaration(Object parent, String name, int index) {
33 this(parent, name, index,null);
37 * Get the image of a variable.
38 * @return the image that represents a php variable
40 public ImageDescriptor getImage() {
41 return PHPUiImages.DESC_INC;
44 public String toString() {
45 return name + " : " + value;