Project: JDT
Bug 107637 CopyParticipant needs more detailed information about refactoring destination (Java)
Reported: 2005-08-22 13:02:44 | Status: verified fixed

Hi, I'm using a custom CopyParticipant to participate in Java refactorings. With the public API, it's only possible to find out the compilation unit which is the destination (e.g. of a copied method). More precisely, the method CopyArguments.getDestination():Object returns an instance of org.eclipse.jdt.internal.core.CompilationUnit which can be cast to ICompilationUnit. Thus, when an inner class is the destination of the refacotring, it's not possible to get a reference to that class (only the compilation unit containing it). It would be possible to get a reference to the inner class (or another specific java element) by using internal API (via JavaCopyProcessor, ICopyPolicy...). Is there a chance that the public API could be enhanced, like CopyArguments.getDestination() returning the IType instead of the ICompilationUnit? Thanks, Joachim

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java