colored "operators and brackets"
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceField.java
index 14094cd..b8ea749 100644 (file)
  *******************************************************************************/
 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;
 import net.sourceforge.phpdt.core.Signature;
 import net.sourceforge.phpdt.core.jdom.IDOMNode;
@@ -22,12 +24,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 +48,12 @@ public Object getConstant() throws JavaModelException {
        return info.initializationSource;
 }
 /**
+ * @see IJavaElement
+ */
+public int getElementType() {
+       return FIELD;
+}
+/**
  * @see JavaElement#getHandleMemento()
  */
 protected char getHandleMementoDelimiter() {
@@ -51,8 +63,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