Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgibly2008-05-06 07:58:45 -0400
committersgibly2008-05-06 07:58:45 -0400
commit6540e01cdec30b7e7fefa5a91497204b8cbeb2ff (patch)
treed9b063b8404e092501e005e9cd51f0c6afa8fafa
parentb34e88b76214369854a586578616de53a561aae6 (diff)
downloadorg.eclipse.pdt-6540e01cdec30b7e7fefa5a91497204b8cbeb2ff.tar.gz
org.eclipse.pdt-6540e01cdec30b7e7fefa5a91497204b8cbeb2ff.tar.xz
org.eclipse.pdt-6540e01cdec30b7e7fefa5a91497204b8cbeb2ff.zip
binding update
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/Bindings.java3
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/DefaultBindingResolver.java2
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/MethodBinding.java6
3 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/Bindings.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/Bindings.java
index 4fd5d5c03..2890148a0 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/Bindings.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/Bindings.java
@@ -247,6 +247,9 @@ public class Bindings {
}
ITypeBinding type = overriding.getDeclaringClass();
+ if (type == null) {
+ return null;
+ }
if (type.getSuperclass() != null) {
IMethodBinding res = findOverriddenMethodInHierarchy(type.getSuperclass(), overriding);
if (res != null && !Modifier.isPrivate(res.getModifiers())) {
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/DefaultBindingResolver.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/DefaultBindingResolver.java
index 44768f6a4..5ad2db0dc 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/DefaultBindingResolver.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/DefaultBindingResolver.java
@@ -6,10 +6,8 @@ package org.eclipse.php.internal.core.ast.nodes;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.dltk.ast.ASTNode;
import org.eclipse.dltk.core.*;
-import org.eclipse.dltk.core.search.*;
import org.eclipse.dltk.ti.types.IEvaluatedType;
import org.eclipse.php.internal.core.Logger;
import org.eclipse.php.internal.core.typeinference.BindingUtility;
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/MethodBinding.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/MethodBinding.java
index 1d3db8329..80259dd05 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/MethodBinding.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/nodes/MethodBinding.java
@@ -34,8 +34,10 @@ public class MethodBinding extends FunctionBinding implements IMethodBinding {
*/
public ITypeBinding getDeclaringClass() {
if (declaringClassTypeBinding == null) {
- IModelElement parent = modelElement.getParent();
- declaringClassTypeBinding = resolver.getTypeBinding((IType) parent);
+ IModelElement parent = modelElement.getDeclaringType();
+ if (parent instanceof IType) {
+ declaringClassTypeBinding = resolver.getTypeBinding((IType) parent);
+ }
}
return declaringClassTypeBinding;
}

Back to the top