You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified I can reproduce this issue against [latest Integration Build of Eclipse SDK]Eclipse IDE for Java Developers (includes Incubating components)
Steps to reproduce
From a fresh installation and clean workspace:
From Package Explorer (or any explorer)
Crdate a new general project using menu New > Project and select General > Project.
Select that general project and from its context menu select New -> File
Create file "abc.txt" in that project.
Again, select that general project and from its context menu select New -> File
Create file "ABC.txt" in that project. (Same file name, different casing)
You will see an error dialog with message: "A resource exists with a different case: '/project/abc.txt'"
After pression OK on the error dialog, the IDE will then still attempt to open that non-existant file in an Editor.
Depending on the file extension, it may open the existing file with matching name in a System Editor, other times it will try to open the non-existant file in an internal editor so that the editor just displays the error message: Resource '/project/ABC.txt' does not exist
I expected: that it would not try to open an editor to the file name that could not be created due to a an existing file with similar name but in a different case.
But got: Sometimes an extenral system editor open on the 'wrong' file, sometimes an internal editor w/ the Resource not found eror.
Here is some relevant source code
BasicNewFileResourceWizard:
@Override
public boolean performFinish() {
IFile file = mainPage.createNewFile();
if (file == null) {
return false;
}
mainPage.createNewFile() will trigger the display of the error message dialog showing "A resource exists with a different case", but it will return a non-null File object whose .exists() method would return false, but is not checked before invoking IDE.openEditor(page, file, true); just below
I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
From a fresh installation and clean workspace:
Resource '/project/ABC.txt' does not exist
I expected: that it would not try to open an editor to the file name that could not be created due to a an existing file with similar name but in a different case.
But got: Sometimes an extenral system editor open on the 'wrong' file, sometimes an internal editor w/ the Resource not found eror.
Here is some relevant source code
BasicNewFileResourceWizard:
mainPage.createNewFile() will trigger the display of the error message dialog showing "A resource exists with a different case", but it will return a non-null File object whose .exists() method would return false, but is not checked before invoking
IDE.openEditor(page, file, true);
just belowwithin WizardNewFileCreationPage.createNewFile() method, the error is caught and thrown here... but nothing is done to cause a return of null:
https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java#L409
Tested under this environment:
Community
The text was updated successfully, but these errors were encountered: