Bug 76416 Method signature using QuickFix incorrect in static methods
Very Minor bug, When using quickfix to create method in an static anonymous inner class.. then the resulting method created is not static... but it needs to be. Example: 1. Create Class: public class SwingApplication { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run() { createGui(); } } ); } } 2. Eclipse will give error that createGui() does not exist. 3. Use quickfix, and select 'Create method 'createGui()' in SwingApplication'. 4. Notice that the created method should be static...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewMethodCompletionProposal.java
addLinkedPositionProposal(KEY_TYPE, otherProposals[i]);
			}
		}
		return newTypeNode;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.AbstractMethodCompletionProposal#addNewParameters(org.eclipse.jdt.core.dom.rewrite.ASTRewrite, java.util.List, java.util.List)
	 */
	protected void addNewParameters(ASTRewrite rewrite, List takenNames, List params) throws CoreException {
		AST ast= rewrite.getAST();
		List arguments= fArguments;
		for (int i= 0; i < arguments.size(); i++) {
			Expression elem= (Expression) arguments.get(i);
			SingleVariableDeclaration param= ast.newSingleVariableDeclaration();
			
			String argTypeKey= "arg_type_" + i; 
			Type type= evaluateParameterType(ast, elem, argTypeKey);
			param.setType(type);
			
			String argNameKey= "arg_name_" + i; 
			String name= evaluateParameterName(takenNames, elem, type, argNameKey);
			param.setName(ast.newSimpleName(name));
			params.add(param);
			addLinkedPosition(rewrite.track(param.getType()), false, argTypeKey);
			addLinkedPosition(rewrite.track(param.getName()), false, argNameKey);
		}
	}
	private Type evaluateParameterType(AST ast, Expression elem, String key) throws CoreException {
		ITypeBinding binding= Bindings.normalizeTypeBinding(elem.resolveTypeBinding());
		if (binding != null && binding.isWildcardType()) {