Bug 3041 - magic 'aux' name not handled by refactoring (1GEUO7L)
Summary: magic 'aux' name not handled by refactoring (1GEUO7L)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All Windows All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 3561 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 22:48 EDT by Jeff McAffer CLA
Modified: 2001-11-01 09:55 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2001-10-10 22:48:19 EDT
AK (6/5/01 3:40:43 PM)
	on Windows, renaming to 'aux' (types/packages) should not be allowed or handled better

	you get the walkback below (the recovery option works fine though!)

4 org.eclipse.jdt.ui 566 Internal Error
org.eclipse.core.internal.resources.ResourceException: Resource already exists on disk: d:\eclipseTestPass\d\fgf\fg\aux.java.
	at org.eclipse.core.internal.localstore.FileSystemStore.move(FileSystemStore.java:113)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.move(FileSystemResourceManager.java:191)
	at org.eclipse.core.internal.resources.Resource.moveInFileSystem(Resource.java:881)
	at org.eclipse.core.internal.resources.Resource.move(Resource.java:840)
	at org.eclipse.core.internal.resources.Resource.move(Resource.java:810)
	at org.eclipse.jdt.internal.core.refactoring.RenameResourceChange.perform(RenameResourceChange.java:68)
	at org.eclipse.jdt.internal.core.refactoring.CompositeChange.createUndoList(CompositeChange.java:67)
	at org.eclipse.jdt.internal.core.refactoring.CompositeChange.perform(CompositeChange.java:111)
	at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation$1.execute(PerformChangeOperation.java:78)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:64)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1183)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:78)
	at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:83)
	at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:114)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:714)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:311)
	at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:182)
	at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:305)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:571)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:313)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:210)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code))
	at org.eclipse.jface.window.Window.open(Window.java:520)
	at org.eclipse.jdt.internal.ui.refactoring.AbstractOpenRefactoringWizardAction.run(AbstractOpenRefactoringWizardAction.java:56)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:408)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java(Compiled Code))
	at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled Code))
	at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:620)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:815)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:69)
	at org.eclipse.core.launcher.Main.run(Main.java:311)
	at org.eclipse.core.launcher.Main.main(Main.java:198)

NOTES:
EG (6/5/2001 4:05:05 AM)
	rare corner case, we should handle it more gracefully, but not critical.

EG (7/12/01 12:45:38 PM)
	workbench provides a name validation method that we should use.

AK (8/14/2001 3:08:17 PM)
	how do i find that method?

NE (8/20/01 9:04:57 AM)
	Check out IWorkspace.validatePath and validateName.

AK (10/9/2001 12:58:24 PM)
	does not work
	IWorkspace.validateName fails to recognize 'aux' as an invalid file name on windows
	we need a platform-aware file name validation routine
	moving to CORE
Comment 1 John Arthorne CLA 2001-10-22 12:06:54 EDT
*** Bug 3561 has been marked as a duplicate of this bug. ***
Comment 2 Rodrigo Peretti CLA 2001-10-22 12:22:01 EDT
From bug 3029:
  The following directory names are not allowed by Win98 or WinNT:
	con, com1, com2, ..., com9, lpt1, lpt2, ..., lpt9.  
  Checking for existence on these files always returns true.
Comment 3 DJ Houghton CLA 2001-10-24 06:42:00 EDT
PRODUCT VERSION:
	118

Comment 4 John Arthorne CLA 2001-10-29 16:59:57 EST
Fixed.  Added platform specific resource name validation checks to 
IWorkspace#validateName.  The given refactoring case still doesn't give pretty 
results (big error dialog), but there's no more walkbacks.
Comment 5 Rodrigo Peretti CLA 2001-11-01 09:55:29 EST
Fixed in v207