Parser detects wrong include files now
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceField.java
index 14094cd..1854e1c 100644 (file)
@@ -11,7 +11,7 @@
 package net.sourceforge.phpdt.internal.core;
 
 import net.sourceforge.phpdt.core.IField;
-import net.sourceforge.phpdt.core.IType;
+import net.sourceforge.phpdt.core.IJavaElement;
 import net.sourceforge.phpdt.core.JavaModelException;
 import net.sourceforge.phpdt.core.Signature;
 import net.sourceforge.phpdt.core.jdom.IDOMNode;
@@ -22,12 +22,16 @@ import net.sourceforge.phpdt.core.jdom.IDOMNode;
 
 /* package */ class SourceField extends Member implements IField {
 
-/**
- * Constructs a handle to the field with the given name in the specified type. 
- */
-protected SourceField(IType parent, String name) {
-       super(FIELD, parent, name);
-}
+       /**
+        * Constructs a handle to the field with the given name in the specified type. 
+        */
+       protected SourceField(JavaElement parent, String name) {
+               super(parent, name);
+       }
+       public boolean equals(Object o) {
+               if (!(o instanceof SourceField)) return false;
+               return super.equals(o);
+       }
 /**
  * @see JavaElement#equalsDOMNode
  */
@@ -42,6 +46,12 @@ public Object getConstant() throws JavaModelException {
        return info.initializationSource;
 }
 /**
+ * @see IJavaElement
+ */
+public int getElementType() {
+       return FIELD;
+}
+/**
  * @see JavaElement#getHandleMemento()
  */
 protected char getHandleMementoDelimiter() {
@@ -51,8 +61,9 @@ protected char getHandleMementoDelimiter() {
  * @see IField
  */
 public String getTypeSignature() throws JavaModelException {
-       SourceFieldElementInfo info = (SourceFieldElementInfo) getElementInfo();
-       return info.getTypeSignature();
+//     SourceFieldElementInfo info = (SourceFieldElementInfo) getElementInfo();
+//     return info.getTypeSignature();
+       return "";
 }
 /**
  * @private Debugging purposes