Bug 8730 wrong method deleted (packages view)
from the newsgroup: public class TestClass { public void foo(String s) { } public void foo(String[] s) { } public void otherfoo(String s) { } } 2. click right on "foo(String s)" in package view, select "delete" ->foo(String s) vanishes in source view, package view is not updated (bug or feature?) 3. click right on "foo(String[] s)" in package view, select "delete" -> otherfoo(String s) vanishes in source view ------------------------------------------------------ 2 is a feature 3 is a bug
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
return false;			
			
		if (elem instanceof IMember) 
			return true;
		if (elem instanceof IImportContainer)
			return true;
		if (elem instanceof IImportDeclaration)
			return true;
		if (elem instanceof IPackageDeclaration)
			return true;			
		
		
		return false;	
	}
	private static boolean isDeletedFromEditor(ISourceReference elem) throws JavaModelException{
		ICompilationUnit cu= SourceReferenceUtil.getCompilationUnit(elem);
		ICompilationUnit wc= WorkingCopyUtil.getWorkingCopyIfExists(cu);
		if (wc.equals(cu))
			return false;
		IJavaElement element= (IJavaElement)elem;
		IJavaElement wcElement= JavaModelUtil.findInCompilationUnit(wc, element);
		return wcElement == null || ! wcElement.exists();
	}
			
	protected ISourceReference[] getSelectedElements(){
		List l= getStructuredSelection().toList();
		return (ISourceReference[]) l.toArray(new ISourceReference[l.size()]);
	}	
}