Bug 120850 Import Jar with refactoring history: after import, jar should have new name
I20051214-0010 - export project JUnit to junit1.jar - copy junit1.jar into another project and add to build path - apply some refactorings to JUnit, then export with history to junit2.jar - import junit2.jar with Jar import wizard and choose to update junit1.jar => junit2.jar is copied into the project, but changes its name to junit1.jar. I would expect that the name of a jar is not changed, since it may contain version information which would be wrong after renaming. Rather, the classpath should be updated to the new name. Maybe, we even need a refactoring 'Rename Jar', which would also inform participants about the name change.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizard.java
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.jarpackager.JarPackagerUtil;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
/**
 * Import wizard to import a refactoring-aware Java Archive (JAR) file.
 * <p>
 * This class may be instantiated and used without further configuration; this
 * class is not intended to be subclassed.
 * </p>
 * <p>
 * Example:
 * 
 * <pre>
 * IWizard wizard= new JarImportWizard();
 * wizard.init(workbench, selection);
 * WizardDialog dialog= new WizardDialog(shell, wizard);
 * dialog.open();
 * </pre>
 * 
 * During the call to <code>open</code>, the wizard dialog is presented to
 * the user. When the user hits Finish, the user-selected JAR file is inspected
 * for associated refactorings, the wizard executes eventual refactorings,
 * copies the JAR file over its old version, the dialog closes, and the call to
 * <code>open</code> returns.
 * </p>
 * 
 * @since 3.2
 */
public final class JarImportWizard extends RefactoringHistoryWizard implements IImportWizard {