1 package net.sourceforge.phpdt.internal.compiler.parser;
3 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
5 import org.eclipse.jface.resource.ImageDescriptor;
8 * A require, require_once, include or include_once declaration strongly inspired by the PHPFunctionDeclaration of Khartlage (:.
9 * @author khartlage, Matthieu Casanova
11 public class PHPReqIncDeclaration extends PHPSegment {
13 /** What is required/included. */
16 * Create an include declaration.
17 * @param parent the parent object (it should be a php class or function)
18 * @param name it should be require, require_once, include or include_once
19 * @param index where the keyword is in the file
20 * @param value what is included
22 public PHPReqIncDeclaration(Object parent, String name, int index, String value) {
23 super(parent, name, index);
28 * Create an include declaration.
29 * @param parent the parent object (it should be a php class or function)
30 * @param name it should be require, require_once, include or include_once
31 * @param index where the keyword is in the file
33 public PHPReqIncDeclaration(Object parent, String name, int index) {
34 this(parent, name, index,null);
38 * Get the image of a variable.
39 * @return the image that represents a php variable
41 public ImageDescriptor getImage() {
42 return PHPUiImages.DESC_INC;
45 public String toString() {
46 return name + " : " + value;