-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot rename folders using the Project Explorer view #1686
Comments
@N1k145 please check if this a regression from eclipse-platform/eclipse.platform.ui#2262 |
@jukzi @acarstoiu I don't think this is related. But we have seen this issue already in our RCP product, long before this change was done. What I am noticing is this line: This happens when there is something which is changeing the resource on file basis and the eclipse resouces is not up to date before the action happens. I can reproduce the exact same stracktrace when I first rename the folder on the file system and then in eclipse. But this was always the case |
Can not reproduce. Probably some step is missing. Tried to create new folder "x", F2, "y" -> works. |
@jukzi Did you try this with the git plugin in use and in the presence of a git repository holding files in folder @N1k145 I do not do anything outside Eclipse when renaming those folders. In Preferences -> General -> Workspace, the "Refresh using native hooks or polling" checkbox is ticked. Forgot to mention that renaming files (as opposed to folders) works. |
@acarstoiu can you describe a bit more about your folder structure, or maybe provide a minimal example project where you have the issue. Or can you just create a new "default" eclipse project and test if you have the same issue there. I have the feeling that this could be related to your symlinks I tested the same thing as @jukzi and for this also work's, with enabled git, but I tested in Windows. |
@acarstoiu please describe all the exact steps to reproduce the issue otherwise the issue will be closed. |
What I can definitely say is that the problem is surfaced by ticking the "Refresh using native hooks or polling" checkbox in Preferences -> General -> Workspace. It's not enough to un-tick it and choose File -> Restart, you must stop and start again Eclipse. It has nothing to do with the Git integration for Eclipse plug-in, as folders that are not tracked cannot be renamed either. So, this is a bug showing up in the latest line of Linux kernels (6.12.x), on Gentoo, with the latest Eclipse Adoptium JDK and the latest release of the Eclipse platform when the native hooks (or polling) are employed for refreshing the file system state (the software versions are listed in my first comment ☝️). Note While playing around in order to narrow the possible causes, I found a folder that I can rename, within the same project. The difference between it and the others that I can't rename is the fact that it is "fatter", i.e. it contains considerably more files. |
I've seen problems like this with the automatic refresh in other contexts. It's really nice that the IDE refreshes automatically, unfortunately it will also do that automatically sometimes in the middle of some ongoing operation leading to hard-to-reproduce, unpredictable problems... ☹ |
I haven't checked the code around but someone (either refactoring code or autorefresh hook code) probably works without taking workspace lock? |
Do you mean that Eclipse is taken by surprise by a filesystem change ordered by itself and then tries to revert the operation (in this case a rename)? |
I'm using the latest Eclipse Platform 4.34.0.I20241120-1800 with Git integration for Eclipse 7.1.0.202411261347-r (notice the final "-r" 🧐).
Steps to reproduce
In the Project Explorer view, choose a folder and try to rename it. The operation has no effect, that is, the folder's name remains the same.
I suspect the operation actually takes place, but is somehow immediatelly reverted since it leaves traces in the
git status
output, with the new folder name appearing in the staged changes list as a bunch of renamed files, but also in the not staged changes list as removed files.Log output
After trying to rename the
connectors
folder within a project, the.metadata/.log
file reads:Obtained under this environment:
os.arch=amd64
os.name=Linux
os.version=6.12.9-gentoo
java.runtime.name=OpenJDK Runtime Environment
java.runtime.version=21.0.5+11-LTS
java.vendor=Eclipse Adoptium
java.vendor.url=https://adoptium.net/
java.vendor.version=Temurin-21.0.5+11
The JDK binaries are those prebuilt by the Eclipse Adoptium project, not locally built.
The text was updated successfully, but these errors were encountered: