Extended the builder with an index file generator for PHP class- and function-names.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / parser / PHPOutlineInfo.java
1 package net.sourceforge.phpdt.internal.compiler.parser;
2
3 import net.sourceforge.phpdt.internal.compiler.ast.PHPDocument;
4
5 import java.util.TreeSet;
6
7 /**
8  * 
9  * @author khartlage
10  */
11 public class PHPOutlineInfo {
12   TreeSet fVariables;
13   OutlineableWithChildren fDeclarations;
14
15   public PHPOutlineInfo(Object parent) {
16     fVariables = new TreeSet();
17     fDeclarations = new PHPClassDeclaration(parent, "_root", 1);
18   }
19
20   public PHPOutlineInfo(Object parent, OutlineableWithChildren phpDocument) {
21     fVariables = new TreeSet();
22     fDeclarations = phpDocument;
23   }
24
25   public TreeSet getVariables() {
26     return fVariables;
27   }
28
29   public OutlineableWithChildren getDeclarations() {
30     return fDeclarations;
31   }
32
33   public boolean add(OutlineableWithChildren o) {
34     return fDeclarations.add(o);
35   }
36   
37   public boolean addVariable(String variable) {
38     return fVariables.add(variable);
39   }
40 }