*** empty log message ***
authorkpouer <kpouer>
Thu, 1 May 2003 13:29:55 +0000 (13:29 +0000)
committerkpouer <kpouer>
Thu, 1 May 2003 13:29:55 +0000 (13:29 +0000)
12 files changed:
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractCase.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractPHPComment.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractSuffixExpression.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayDeclarator.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayInitializer.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayVariableDeclaration.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BinaryExpression.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BranchStatement.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Break.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Case.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java

diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractCase.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractCase.java
deleted file mode 100644 (file)
index e31da6b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * @author Matthieu Casanova
- */
-public abstract class AbstractCase extends Statement {
-  public Statement[] statements;
-
-  public AbstractCase(Statement[] statements, int sourceStart, int sourceEnd) {
-    super(sourceStart, sourceEnd);
-    this.statements = statements;
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractPHPComment.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractPHPComment.java
deleted file mode 100644 (file)
index 0d3f2f0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * Here are php comment.
- * @author Matthieu Casanova
- */
-public abstract class AbstractPHPComment extends AstNode {
-
-  /**
-   * Create a comment giving starting and ending offset
-   * @param sourceStart starting offset
-   * @param sourceEnd ending offset
-   */
-  public AbstractPHPComment(int sourceStart, int sourceEnd) {
-    super(sourceStart, sourceEnd);
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractSuffixExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de AbstractSuffixExpression.java
deleted file mode 100644 (file)
index b429e48..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * Variable suffix.
- * class access or [something]
- * Should it be an expression ?
- * @author Matthieu Casanova
- */
-public abstract class AbstractSuffixExpression extends Expression {
-
-  public AbstractSuffixExpression(int sourceStart, int sourceEnd) {
-    super(sourceStart, sourceEnd);
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayDeclarator.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayDeclarator.java
deleted file mode 100644 (file)
index 9b8fd9d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * @author Matthieu Casanova
- */
-public class ArrayDeclarator extends AbstractSuffixExpression {
-
-  public Expression prefix;
-  public Expression vars;
-
-  public ArrayDeclarator(Expression prefix,
-                         Expression vars,
-                         int sourceEnd) {
-    super(prefix.sourceStart, sourceEnd);
-    this.prefix = prefix;
-    this.vars = vars;
-  }
-
-  /**
-   * Return the expression as String.
-   * @return the expression
-   */
-  public String toStringExpression() {
-    final StringBuffer buff = new StringBuffer(prefix.toStringExpression());
-    buff.append('[');
-    if (vars != null) {
-      buff.append(vars.toStringExpression());
-    }
-    buff.append(']');
-    return buff.toString();
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayInitializer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayInitializer.java
deleted file mode 100644 (file)
index 3d9cb87..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * @author Matthieu Casanova
- */
-public class ArrayInitializer extends Expression {
-
-  public ArrayVariableDeclaration[] vars;
-
-  public ArrayInitializer(ArrayVariableDeclaration[] vars,
-                          int sourceStart,
-                          int sourceEnd) {
-    super(sourceStart, sourceEnd);
-    this.vars = vars;
-  }
-
-  /**
-   * Return the expression as String.
-   * @return the expression
-   */
-  public String toStringExpression() {
-    final StringBuffer buff = new StringBuffer("array(");
-    for (int i = 0; i < vars.length; i++) {
-      ArrayVariableDeclaration var = vars[i];
-      if (var != null) {
-        buff.append(var.toStringExpression());
-      }
-      if (i != 0) {
-        buff.append(',');
-      }
-    }
-    return buff.toString();
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayVariableDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de ArrayVariableDeclaration.java
deleted file mode 100644 (file)
index b9a0d6b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * This variable declaration do not extend AbstractVariableDeclaration because
- * it could take Expression as key
- * @author Matthieu Casanova
- */
-public class ArrayVariableDeclaration extends Expression {
-
-  public Expression key,value;
-
-  public ArrayVariableDeclaration(Expression key,Expression value) {
-    super(key.sourceStart, value.sourceEnd);
-    this.key = key;
-    this.value = value;
-  }
-
-  /**
-   * Return the expression as String.
-   * @return the expression
-   */
-  public String toStringExpression() {
-    final StringBuffer buff = new StringBuffer();
-    buff.append(key.toStringExpression());
-    if (value != null) {
-      buff.append(" => ");
-      buff.append(value.toStringExpression());
-    }
-    return buff.toString();
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BinaryExpression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BinaryExpression.java
deleted file mode 100644 (file)
index ff93371..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * @author Matthieu Casanova
- */
-public class BinaryExpression extends OperatorExpression {
-
-  /** The two expressions. */
-  public Expression left,right;
-
-  public BinaryExpression(Expression left,
-                          Expression right,
-                          int operator) {
-    super(operator, left.sourceStart, right.sourceEnd);
-    this.left = left;
-    this.right = right;
-  }
-
-  public String toStringExpressionNoParenthesis() {
-    final StringBuffer buff = new StringBuffer(left.toStringExpression());
-    buff.append(operatorToString());
-    buff.append(right.toStringExpression());
-    return buff.toString();
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BranchStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de BranchStatement.java
deleted file mode 100644 (file)
index f38d816..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * Here is a branchstatement : break or continue
- * @author Matthieu Casanova
- */
-public abstract class BranchStatement extends Statement {
-
-  public Expression expression;
-
-  public BranchStatement(Expression expression,int sourceStart, int sourceEnd) {
-    super(sourceStart, sourceEnd);
-    this.expression = expression;
-  }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Break.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Break.java
deleted file mode 100644 (file)
index e7ef3ee..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * A break statement.
- * @author Matthieu Casanova
- */
-public class Break extends BranchStatement {
-
-  public Break(Expression expression, int sourceStart, int sourceEnd) {
-    super(expression, sourceStart, sourceEnd);
-  }
-
-  public String toString(int tab) {
-    String s = tabString(tab);
-    if (expression == null) {
-      return s + "break " + expression.toString();//$NON-NLS-1$
-    }
-    return s + "break";//$NON-NLS-1$
-       }
-}
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Case.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Copie de Case.java
deleted file mode 100644 (file)
index da70a1e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-/**
- * A Case statement for a Switch.
- * @author Matthieu Casanova
- */
-public class Case extends AbstractCase {
-
-  public Expression value;
-  public Statement[] statements;
-
-  public Case(Expression value,
-              Statement[] statements,
-              int sourceStart,
-              int sourceEnd) {
-    super(statements, sourceStart, sourceEnd);
-    this.value = value;
-  }
-
-  /**
-   * Return the object into String.
-   * @param tab how many tabs (not used here
-   * @return a String
-   */
-  public String toString(int tab) {
-    final StringBuffer buff = new StringBuffer(tabString(tab));
-    buff.append("case ");
-    buff.append(value.toStringExpression());
-    buff.append(" :\n");
-    for (int i = 0; i < statements.length; i++) {
-      Statement statement = statements[i];
-      buff.append(statement.toString(tab + 1));
-    }
-    return buff.toString();
-  }
-}
index bdc86d8..78afe4e 100644 (file)
@@ -18,9 +18,7 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.TreeSet;
 
-import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
-import net.sourceforge.phpdt.internal.compiler.parser.PHPSegment;
-import net.sourceforge.phpdt.internal.compiler.parser.PHPSegmentWithChildren;
+import net.sourceforge.phpdt.internal.compiler.parser.*;
 import net.sourceforge.phpdt.internal.ui.viewsupport.ImageDescriptorRegistry;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
@@ -61,7 +59,7 @@ public class PHPContentOutlinePage extends ContentOutlinePage {
       if (o2 instanceof PHPSegmentWithChildren && !(o1 instanceof PHPSegmentWithChildren)) {
         return -1;
       }
-      return ((PHPSegment) o1).toString().compareToIgnoreCase(((PHPSegment) o2).toString());
+      return ((Outlineable) o1).toString().compareToIgnoreCase(((Outlineable) o2).toString());
     }
   }
 
@@ -106,14 +104,13 @@ public class PHPContentOutlinePage extends ContentOutlinePage {
       PHPOutlineInfo outlineInfo = parser.parseInfo(fInput, text);
       fVariables = outlineInfo.getVariables();
 
-      PHPSegmentWithChildren declarations = outlineInfo.getDeclarations();
-      PHPSegment temp;
+      OutlineableWithChildren declarations = outlineInfo.getDeclarations();
+      Outlineable temp;
       for (int i = 0; i < declarations.size(); i++) {
         temp = declarations.get(i);
         fContent.add(temp);
       }
       Collections.sort(fContent, new SegmentComparator());
-
     }
 
     /*
@@ -194,8 +191,8 @@ public class PHPContentOutlinePage extends ContentOutlinePage {
      * @see ITreeContentProvider#getParent(Object)
      */
     public Object getParent(Object element) {
-      if (element instanceof PHPSegment) {
-        return ((PHPSegment) element).getParent();
+      if (element instanceof Outlineable) {
+        return ((Outlineable) element).getParent();
       }
       return null;
     }
@@ -225,8 +222,8 @@ public class PHPContentOutlinePage extends ContentOutlinePage {
     * override.
     */
     public Image getImage(Object element) {
-      if (element instanceof PHPSegment) {
-        ImageDescriptor descriptor = ((PHPSegment) element).getImage();
+      if (element instanceof Outlineable) {
+        ImageDescriptor descriptor = ((Outlineable) element).getImage();
         return fRegistry.get(descriptor);
       }
       return null;
index 774fbf1..7dc47c4 100644 (file)
@@ -31,7 +31,7 @@ import test.PHPParserSuperclass;
 import test.PHPParserManager;
 
 /**
- * Class that defines the action for parsing the current PHP file
+ * ClassDeclaration that defines the action for parsing the current PHP file
  */
 public class PHPParserAction extends TextEditorAction {