Skip to content
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

upgrade with preview in Eclipse throws exception #1258

Closed
martinlippert opened this issue May 31, 2024 · 2 comments
Closed

upgrade with preview in Eclipse throws exception #1258

martinlippert opened this issue May 31, 2024 · 2 comments
Assignees
Labels
for: eclipse something that is specific for Eclipse theme: refactoring type: bug

Comments

@martinlippert
Copy link
Member

Testing latest CI builds for 4.32.0 for Eclipse, RestService sample application, invoking the quick fix to upgrade to boot 3.3.0, showing the preview, pressing OK.

I also clicked around a lot in the preview before pressing OK so take a look at the various edits and diffs.
(as a side note, it shows the GreetingController in the list of changes, but doesn't show any change in the diff and I can easily break the UI by clicking on the different files in the tree)

org.eclipse.core.runtime.AssertionFailedException: assertion failed: Root edit can only be set once
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:119)
	at org.eclipse.ltk.core.refactoring.TextChange.setEdit(TextChange.java:104)
	at org.eclipse.lsp4e.refactoring.LSPTextChange.acquireDocument(LSPTextChange.java:116)
	at org.eclipse.lsp4e.refactoring.LSPTextChange.perform(LSPTextChange.java:178)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.lambda$0(PerformChangeOperation.java:247)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2451)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2476)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:284)
	at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:94)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:213)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2451)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2476)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)

A related internal error also shows up with this:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: Root edit can only be set once
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:119)
	at org.eclipse.ltk.core.refactoring.TextChange.setEdit(TextChange.java:104)
	at org.eclipse.lsp4e.refactoring.LSPTextChange.acquireDocument(LSPTextChange.java:116)
	at org.eclipse.ltk.core.refactoring.TextChange.getCurrentDocument(TextChange.java:310)
	at org.eclipse.ltk.core.refactoring.TextChange.getCurrentContent(TextChange.java:320)
	at org.eclipse.ltk.internal.ui.refactoring.TextEditChangePreviewViewer.setInput(TextEditChangePreviewViewer.java:215)
	at org.eclipse.ltk.internal.ui.refactoring.AbstractChangeNode.feedInput(AbstractChangeNode.java:108)
	at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.showPreview(PreviewWizardPage.java:629)
	at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.lambda$0(PreviewWizardPage.java:606)
	at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132)
	at org.eclipse.jface.viewers.ColumnViewer.updateSelection(ColumnViewer.java:1055)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1170)
	at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:299)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1199)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:262)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:420)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4660)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1622)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1645)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1630)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1392)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4427)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5572)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5979)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:239)
	at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1214)
	at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2190)
	at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1206)
	at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2593)
	at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2157)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6285)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:239)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2372)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2502)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6401)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5705)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5845)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4000)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.lambda$0(RefactoringWizardOpenOperation.java:190)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:209)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:126)
	at org.eclipse.lsp4e.LSPEclipseUtils.lambda$4(LSPEclipseUtils.java:1009)
	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:4382)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4005)
	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:152)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	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)
@BoykoAlex
Copy link
Contributor

BoykoAlex commented Jun 4, 2024

Looks like it occurs on e4.32 only. My attempt to fix it in LSP4E: eclipse-lsp4e/lsp4e#1025

@BoykoAlex
Copy link
Contributor

PR merged in LSP4E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse theme: refactoring type: bug
Projects
None yet
Development

No branches or pull requests

2 participants