improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceRefElement.java
index 9db0a5a..6f89844 100644 (file)
@@ -22,6 +22,8 @@ import net.sourceforge.phpdt.core.ISourceManipulation;
 import net.sourceforge.phpdt.core.ISourceRange;
 import net.sourceforge.phpdt.core.ISourceReference;
 import net.sourceforge.phpdt.core.JavaModelException;
+import net.sourceforge.phpdt.core.WorkingCopyOwner;
+import net.sourceforge.phpdt.internal.core.util.MementoTokenizer;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
@@ -52,7 +54,7 @@ protected Object createElementInfo() {
  */
 //public void copy(IJavaElement container, IJavaElement sibling, String rename, boolean force, IProgressMonitor monitor) throws JavaModelException {
 //     if (container == null) {
-//             throw new IllegalArgumentException(Util.bind("operation.nullContainer")); //$NON-NLS-1$
+//             throw new IllegalArgumentException(ProjectPrefUtil.bind("operation.nullContainer")); //$NON-NLS-1$
 //     }
 //     IJavaElement[] elements= new IJavaElement[] {this};
 //     IJavaElement[] containers= new IJavaElement[] {container};
@@ -101,6 +103,16 @@ public IResource getCorrespondingResource() throws JavaModelException {
        if (!exists()) throw newNotPresentException();
        return null;
 }
+/*
+ * @see JavaElement
+ */
+public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner workingCopyOwner) {
+       switch (token.charAt(0)) {
+               case JEM_COUNT:
+                       return getHandleUpdatingCountFromMemento(memento, workingCopyOwner);
+       }
+       return this;
+}
 /**
  * Return the first instance of IOpenable in the hierarchy of this
  * type (going up the hierarchy from this type);
@@ -115,6 +127,7 @@ public IOpenable getOpenableParent() {
        }
        return null;
 }
+
 /*
  * @see IJavaElement
  */
@@ -170,7 +183,7 @@ public IResource getUnderlyingResource() throws JavaModelException {
  */
 //public void move(IJavaElement container, IJavaElement sibling, String rename, boolean force, IProgressMonitor monitor) throws JavaModelException {
 //     if (container == null) {
-//             throw new IllegalArgumentException(Util.bind("operation.nullContainer")); //$NON-NLS-1$
+//             throw new IllegalArgumentException(ProjectPrefUtil.bind("operation.nullContainer")); //$NON-NLS-1$
 //     }
 //     IJavaElement[] elements= new IJavaElement[] {this};
 //     IJavaElement[] containers= new IJavaElement[] {container};
@@ -189,7 +202,7 @@ public IResource getUnderlyingResource() throws JavaModelException {
  */
 //public void rename(String name, boolean force, IProgressMonitor monitor) throws JavaModelException {
 //     if (name == null) {
-//             throw new IllegalArgumentException(Util.bind("element.nullName")); //$NON-NLS-1$
+//             throw new IllegalArgumentException(ProjectPrefUtil.bind("element.nullName")); //$NON-NLS-1$
 //     }
 //     IJavaElement[] elements= new IJavaElement[] {this};
 //     IJavaElement[] dests= new IJavaElement[] {this.getParent()};