Bug 21857 Javadoc code completion does not work for public method of public inner class
Consider the following example, where the cursor is placed at the end of the javadoc comment line. Pressing Ctrl-Space now should complete with "someMethod()", shouldn't it? However, in Build 200206271827, it doesn't. public class TestCompletion { /** * {@link InnerTest#so */ public TestCompletion() { super(); } public class InnerTest { public void someMethod() {} } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionEvaluator.java
};
			try {
				preparedCU.codeComplete(fCurrentPos, requestor);
				if (currElem.getDeclaringType() == null && fCurrentPos > wordStart) {
					IType type= (IType) currElem;
					char[] name= type.getElementName().toCharArray();
					fResult.add(createSeeTypeCompletion(type.isClass(), wordStart, fCurrentPos, name, name, JavaModelUtil.getTypeContainerName(type).toCharArray(), 50));
				}
			} finally {
				preparedCU.destroy();
			}
		}
	}
		
	private IType getTypeNameResolve(IMember elem, int wordStart, int wordEnd) throws JavaModelException {
		ICompilationUnit preparedCU= createPreparedCU(elem, wordStart, wordEnd);
		if (preparedCU != null) {
			try {
				IJavaElement[] elements= preparedCU.codeSelect(wordStart, wordEnd - wordStart);
				if (elements != null && elements.length == 1 && elements[0] instanceof IType) {
					return (IType) elements[0];
				}
			} finally {
				preparedCU.getBuffer().setContents(fCompilationUnit.getBuffer().getCharacters());
				preparedCU.destroy();
			}
		}
		return null;
	}