@@ -924,17 +924,29 @@ public boolean visit(ClassInstanceCreation node) {
924
924
// return super.visit(node);
925
925
// }
926
926
927
- /* (non-Javadoc)
928
- * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodInvocation)
927
+
928
+
929
+
930
+ /*
931
+ * (non-Javadoc)
932
+ *
933
+ * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.
934
+ * MethodInvocation)
929
935
*/
930
936
public boolean visit (MethodInvocation node ) {
937
+ /*
938
+ * sgurin: last fix: returning to original version of the method because
939
+ * a bug was introduced in my last modifications.
940
+ */
931
941
IMethodBinding resolveMethodBinding = node .resolveMethodBinding ();
932
- if (resolveMethodBinding != null && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
942
+ if (resolveMethodBinding != null
943
+ && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
933
944
Expression expression = node .getExpression ();
934
945
if (expression instanceof Name ) {
935
946
Name name = (Name ) expression ;
936
947
ITypeBinding resolveTypeBinding = name .resolveTypeBinding ();
937
- ITypeBinding declaringClass = resolveTypeBinding .getDeclaringClass ();
948
+ ITypeBinding declaringClass = resolveTypeBinding
949
+ .getDeclaringClass ();
938
950
QNTypeBinding qn = new QNTypeBinding ();
939
951
String qualifiedName = null ;
940
952
if (declaringClass != null ) {
@@ -950,26 +962,15 @@ public boolean visit(MethodInvocation node) {
950
962
}
951
963
qualifiedName = discardGenericType (qualifiedName );
952
964
qn .qualifiedName = qualifiedName ;
953
- if (isQualifiedNameOK (qualifiedName , node )
954
- && !musts .contains (qn )
955
- && !requires .contains (qn )) {
965
+ if (isQualifiedNameOK (qualifiedName , node )
966
+ && !musts .contains (qn ) && !requires .contains (qn )) {
956
967
optionals .add (qn );
957
968
}
958
969
}
959
- //sgurin bugfix for http://sourceforge.net/tracker/?func=detail&aid=3037341&group_id=155436&atid=795800
960
- else if (expression == null ) { //statically imported method invocation
961
- QNTypeBinding qn = new QNTypeBinding ();
962
- String qualifiedName = resolveMethodBinding .getDeclaringClass ().getQualifiedName ();
963
- if (qualifiedName != null && isQualifiedNameOK (qualifiedName , node )) {
964
- qn .qualifiedName = qualifiedName ;
965
- if (!musts .contains (qn ) && !requires .contains (qn )) {
966
- optionals .add (qn );
967
- }
968
- }
969
- }
970
970
}
971
971
return super .visit (node );
972
972
}
973
+
973
974
public boolean isDebugging () {
974
975
return isDebugging ;
975
976
}
0 commit comments