3m9 compatible;
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceField.java
index 14094cd..60e88ae 100644 (file)
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package net.sourceforge.phpdt.internal.core;
 
+import net.sourceforge.phpdt.core.IJavaElement;
+import net.sourceforge.phpdt.internal.core.JavaElement;
+
 import net.sourceforge.phpdt.core.IField;
 import net.sourceforge.phpdt.core.IType;
 import net.sourceforge.phpdt.core.JavaModelException;
@@ -22,12 +25,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 +49,12 @@ public Object getConstant() throws JavaModelException {
        return info.initializationSource;
 }
 /**
+ * @see IJavaElement
+ */
+public int getElementType() {
+       return FIELD;
+}
+/**
  * @see JavaElement#getHandleMemento()
  */
 protected char getHandleMementoDelimiter() {