Bug 46088 Create method quick fix declares Object as return type [quick fix]
When you write the following code Bla var = getMyBla(); and press Ctrl-1, you can have the method "getMyBla" created. However, if the type Bla is not (yet) known, the method gets declared as private Object getMyBla() { ... } If you press Ctrl-1 again, the import for Bla is added. If the order of the two quickfixes was reversed, you'd get the correct method declaration.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewVariableCompletionProposal.java
}
		int modifiers= 0;
		ASTNode parent= fOriginalNode.getParent();	
		if (parent instanceof QualifiedName) {
			IBinding qualifierBinding= ((QualifiedName)parent).getQualifier().resolveBinding();
			if (qualifierBinding instanceof ITypeBinding) {
				modifiers |= Modifier.STATIC;
			}			
		} else if (ASTResolving.isInStaticContext(fOriginalNode)) {
			modifiers |= Modifier.STATIC;
		}
		ASTNode node= ASTResolving.findParentType(fOriginalNode);
		if (newTypeDecl.equals(node)) {
			modifiers |= Modifier.PRIVATE;
		} else if (node instanceof AnonymousClassDeclaration) {
			modifiers |= Modifier.PROTECTED;
		} else {
			modifiers |= Modifier.PUBLIC;
		}
		return modifiers;
	}	
	/**
	 * Returns the variable kind.
	 * @return int
	 */
	public int getVariableKind() {
		return fVariableKind;
	}
}