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

IllegalArgumentException when applying fix #579

Closed
ghentschke opened this issue Mar 29, 2023 · 1 comment
Closed

IllegalArgumentException when applying fix #579

ghentschke opened this issue Mar 29, 2023 · 1 comment

Comments

@ghentschke
Copy link
Contributor

When applying a quick fix in the editor:
image

I get an IllegalArgumentException:

!ENTRY org.eclipse.core.jobs 4 2 2023-03-29 17:21:37.910
!MESSAGE An internal error occurred during: "apply resolution - change 'typedef struct{
…' to 'using data = struct{
…'".
!STACK 0
java.lang.IllegalArgumentException
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:572)
	at org.eclipse.lsp4e.LSPEclipseUtils.openEditor(LSPEclipseUtils.java:749)
	at org.eclipse.lsp4e.LSPEclipseUtils.openFileLocationInEditor(LSPEclipseUtils.java:708)
	at org.eclipse.lsp4e.LSPEclipseUtils.open(LSPEclipseUtils.java:624)
	at org.eclipse.lsp4e.LSPEclipseUtils.open(LSPEclipseUtils.java:610)
	at org.eclipse.lsp4e.LSPEclipseUtils.open(LSPEclipseUtils.java:606)
	at org.eclipse.lsp4e.LSPEclipseUtils.lambda$1(LSPEclipseUtils.java:866)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.eclipse.lsp4e.LSPEclipseUtils.applyWorkspaceEdit(LSPEclipseUtils.java:862)
	at org.eclipse.lsp4e.operations.codeactions.CodeActionMarkerResolution.run(CodeActionMarkerResolution.java:66)
	at org.eclipse.ui.internal.genericeditor.markers.MarkerInformationControl$1$1.run(MarkerInformationControl.java:141)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The reason is that the page returned by UI.getActivePage() in org.eclipse.lsp4e.LSPEclipseUtils.open(String, Range) is null

ghentschke added a commit to ghentschke/lsp4e-bachmann-fixes that referenced this issue Mar 31, 2023
Fix for IllegalArgumentException when applying fix eclipse-lsp4e#579
ghentschke added a commit to ghentschke/lsp4e-bachmann-fixes that referenced this issue Apr 17, 2023
Fix for IllegalArgumentException when applying fix eclipse-lsp4e#579
@sebthom
Copy link
Member

sebthom commented Aug 16, 2024

Resolved by #612

@sebthom sebthom closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants