@@ -924,17 +924,29 @@ public boolean visit(ClassInstanceCreation node) {
924924// return super.visit(node);
925925// }
926926
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)
929935 */
930936 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+ */
931941 IMethodBinding resolveMethodBinding = node .resolveMethodBinding ();
932- if (resolveMethodBinding != null && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
942+ if (resolveMethodBinding != null
943+ && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
933944 Expression expression = node .getExpression ();
934945 if (expression instanceof Name ) {
935946 Name name = (Name ) expression ;
936947 ITypeBinding resolveTypeBinding = name .resolveTypeBinding ();
937- ITypeBinding declaringClass = resolveTypeBinding .getDeclaringClass ();
948+ ITypeBinding declaringClass = resolveTypeBinding
949+ .getDeclaringClass ();
938950 QNTypeBinding qn = new QNTypeBinding ();
939951 String qualifiedName = null ;
940952 if (declaringClass != null ) {
@@ -950,26 +962,15 @@ public boolean visit(MethodInvocation node) {
950962 }
951963 qualifiedName = discardGenericType (qualifiedName );
952964 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 )) {
956967 optionals .add (qn );
957968 }
958969 }
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- }
970970 }
971971 return super .visit (node );
972972 }
973+
973974 public boolean isDebugging () {
974975 return isDebugging ;
975976 }
0 commit comments