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/NewMethodCompletionProposal.java
}
			MethodDeclaration newStub= getStub(rewrite, newTypeDecl);
			
			if (isConstructor()) {
				members.add(findConstructorInsertIndex(members), newStub);
			} else if (!isInDifferentCU) {
				members.add(findMethodInsertIndex(members, fNode.getStartPosition()), newStub);
			} else {
				members.add(newStub);
			}
			rewrite.markAsInserted(newStub);
			if (!isInDifferentCU) {
				Name invocationName= getInvocationName();
				if (invocationName != null) {
					markAsLinked(rewrite, invocationName, true, KEY_NAME);
				}				
			}
			markAsLinked(rewrite, newStub.getName(), false, KEY_NAME);  
			if (!newStub.isConstructor()) {
				markAsLinked(rewrite, newStub.getReturnType(), false, KEY_TYPE);  
			}			
			
			return rewrite;
		}
		return null;
	}
	
	private boolean isConstructor() {
		return fNode.getNodeType() != ASTNode.METHOD_INVOCATION && fNode.getNodeType() != ASTNode.SUPER_METHOD_INVOCATION;
	}