Bug 62868 Error introduced by "create method definition in super class/interface" Quick Assist [quick assist]
I200405190010 I used this quick assist but did not notice that my method was protected and that the method got created in an interface. If a method is protected and it only implements an interface then the quick assist should not be enabled.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewDefiningMethodProposal.java
return fMethod.getModifiers() & (Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.ABSTRACT | Modifier.STRICTFP);
		}
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.AbstractMethodCompletionProposal#getNewMethodType(org.eclipse.jdt.core.dom.rewrite.ASTRewrite)
	 */
	protected Type getNewMethodType(ASTRewrite rewrite) throws CoreException {
		String typeName= getImportRewrite().addImport(fMethod.getReturnType());
		Type newTypeNode= ASTNodeFactory.newType(rewrite.getAST(), typeName);
		
		addLinkedPosition(rewrite.track(newTypeNode), false, KEY_TYPE);
		return newTypeNode;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.AbstractMethodCompletionProposal#addNewExceptions(org.eclipse.jdt.core.dom.AST, java.util.List)
	 */
	protected void addNewExceptions(ASTRewrite rewrite, List exceptions) throws CoreException {
		AST ast= rewrite.getAST();
		ImportRewrite importRewrite= getImportRewrite();
		ITypeBinding[] bindings= fMethod.getExceptionTypes();
		for (int i= 0; i < bindings.length; i++) {
			String typeName= importRewrite.addImport(bindings[i]);
			Name newNode= ASTNodeFactory.newName(ast, typeName);
			exceptions.add(newNode);
			
			addLinkedPosition(rewrite.track(newNode), false, "exc_type_" + i); 
		}
	}
}