@@ -924,17 +924,26 @@ 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+ * (non-Javadoc)
929+ *
930+ * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.
931+ * MethodInvocation)
929932 */
930933 public boolean visit (MethodInvocation node ) {
934+ /*
935+ * sgurin: last fix: returning to original version of the method because
936+ * a bug was introduced in my last modifications.
937+ */
931938 IMethodBinding resolveMethodBinding = node .resolveMethodBinding ();
932- if (resolveMethodBinding != null && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
939+ if (resolveMethodBinding != null
940+ && Modifier .isStatic (resolveMethodBinding .getModifiers ())) {
933941 Expression expression = node .getExpression ();
934942 if (expression instanceof Name ) {
935943 Name name = (Name ) expression ;
936944 ITypeBinding resolveTypeBinding = name .resolveTypeBinding ();
937- ITypeBinding declaringClass = resolveTypeBinding .getDeclaringClass ();
945+ ITypeBinding declaringClass = resolveTypeBinding
946+ .getDeclaringClass ();
938947 QNTypeBinding qn = new QNTypeBinding ();
939948 String qualifiedName = null ;
940949 if (declaringClass != null ) {
@@ -950,23 +959,11 @@ public boolean visit(MethodInvocation node) {
950959 }
951960 qualifiedName = discardGenericType (qualifiedName );
952961 qn .qualifiedName = qualifiedName ;
953- if (isQualifiedNameOK (qualifiedName , node )
954- && !musts .contains (qn )
955- && !requires .contains (qn )) {
962+ if (isQualifiedNameOK (qualifiedName , node )
963+ && !musts .contains (qn ) && !requires .contains (qn )) {
956964 optionals .add (qn );
957965 }
958966 }
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- }
970967 }
971968 return super .visit (node );
972969 }
0 commit comments