Skip to content

Cannot rename folders using the Project Explorer view #1686

@acarstoiu

Description

@acarstoiu

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:

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2025-01-16 10:12:52.297
!MESSAGE Internal Error
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Problems encountered while moving resources.
	at org.eclipse.core.internal.resources.Resource.move(Resource.java:1555)
	at org.eclipse.ltk.core.refactoring.resource.RenameResourceChange.perform(RenameResourceChange.java:118)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.internal.ui.refactoring.actions.RenameResourceHandler.performRename(RenameResourceHandler.java:110)
	at org.eclipse.ltk.internal.ui.refactoring.actions.RenameResourceHandler.execute(RenameResourceHandler.java:58)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:277)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:98)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:299)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:233)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:436)
	at org.eclipse.ui.internal.ide.actions.LTKLauncher.runCommand(LTKLauncher.java:140)
	at org.eclipse.ui.internal.ide.actions.LTKLauncher.renameResource(LTKLauncher.java:86)
	at org.eclipse.ui.actions.RenameResourceAction.lambda$5(RenameResourceAction.java:550)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5042)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4522)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:663)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:570)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:178)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1454)
Contains: Resource is out of sync with the file system: '/Back-end engine/connectors'.
!SUBENTRY 1 org.eclipse.core.resources 1 4 2025-01-16 10:12:52.297
!MESSAGE Problems encountered while moving resources.
!SUBENTRY 2 org.eclipse.core.resources 1 4 2025-01-16 10:12:52.297
!MESSAGE Resource is out of sync with the file system: '/Back-end engine/connectors'.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneedinfo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions