Bug 55325 [typing] Starting Javadoc comment inserts @param tags for next method
build I20040318 - open type TrimLayout - before method setSpacing, start a new method by typing a Javadoc comment - you get @param tags for the next method (even though it has its own Javadoc) For example: Type this: /**<Enter> Before this: /** * Sets the empty space surrounding the center area. This whitespace is * located between the trim and the central widget. */ public void setSpacing(int left, int right, int top, int bottom) { leftSpacing = left; rightSpacing = right; topSpacing = top; bottomSpacing = bottom; } You get: /** * * @param left * @param right * @param top * @param bottom */
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
ITypeHierarchy typeHierarchy= SuperTypeHierarchyCache.getTypeHierarchy(declaringType);
		return JavaModelUtil.findMethodDeclarationInHierarchy(typeHierarchy, declaringType,
			method.getElementName(), method.getParameterTypes(), method.isConstructor());
	}
	
	/**
	 * Returns the compilation unit of the CompilationUnitEditor invoking the AutoIndentStrategy,
	 * might return <code>null</code> on error.
	 * @return aa
	 */
	private static ICompilationUnit getCompilationUnit() {
		IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		if (window == null)
			return null;
			
		IWorkbenchPage page= window.getActivePage();
		if (page == null)	
			return null;
		IEditorPart editor= page.getActiveEditor();
		if (editor == null)
			return null;
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
		ICompilationUnit unit= manager.getWorkingCopy(editor.getEditorInput());
		if (unit == null)
			return null;
		return unit;
	}
			
}