jbosstools / jbosstools-quarkus

Quarkus tooling for Eclipse
https://tools.jboss.org
Apache License 2.0
16 stars 20 forks source link

Implements resolveCodeAction on QuarkusLanguageClient side #208

Closed angelozerr closed 1 year ago

angelozerr commented 1 year ago

Fixes https://github.com/eclipse/lsp4mp/issues/362

sbouchet commented 1 year ago

i reproduce the initial issue but resolveCodeAction is not called when i click on the quickFix using this fix.

angelozerr commented 1 year ago

I suspect that you have LSP4E issue https://github.com/eclipse/lsp4e/issues/337

You need to use last version of lsp4e

sbouchet commented 1 year ago

I suspect that you have LSP4E issue eclipse/lsp4e#337

You need to use last version of lsp4e

probably, i'm using latest release. moving to snapshot and re-test

sbouchet commented 1 year ago

@angelozerr : can't get any quickfixes using latest lsp4e snaphost:


Thread [main] (Suspended (exception java.lang.NullPointerException))    
    java.lang.String.compareTo(java.lang.String) line: 2013 
    java.lang.String.compareTo(java.lang.Object) line: 140  
    java.util.Comparator<T>.lambda$comparing$77a9974f$1(java.util.function.Function, java.lang.Object, java.lang.Object) line: 473  
    java.util.Comparator$$Lambda$69.0x0000000800cc0b48.compare(java.lang.Object, java.lang.Object) line: not available  
    java.util.Comparators$NullComparator<T>.compare(T, T) line: 85  
    java.util.TimSort<T>.countRunAndMakeAscending(T[], int, int, java.util.Comparator<? super T>) line: 355 
    java.util.TimSort<T>.sort(T[], int, int, java.util.Comparator<? super T>, T[], int, int) line: 220  
    java.util.Arrays.sort(T[], int, int, java.util.Comparator<? super T>) line: 1307    
    java.util.ArrayList<E>.sort(java.util.Comparator<? super E>) line: 1721 
    org.eclipse.lsp4e.LanguageServers$LanguageServerProjectExecutor.getServers() line: 347  
    org.eclipse.lsp4e.LanguageServers$LanguageServerProjectExecutor(org.eclipse.lsp4e.LanguageServers<E>).anyMatching() line: 222   
    org.eclipse.lsp4e.operations.codeactions.LSPCodeActionMarkerResolution.checkMarkerResoultion(org.eclipse.core.resources.IMarker) line: 128  
    org.eclipse.lsp4e.operations.codeactions.LSPCodeActionMarkerResolution.hasResolutions(org.eclipse.core.resources.IMarker) line: 214 
    org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.hasResolution(org.eclipse.core.resources.IMarker, org.eclipse.core.runtime.IConfigurationElement, org.eclipse.ui.IMarkerResolutionGenerator) line: 264  
    org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.hasResolutions(org.eclipse.core.resources.IMarker) line: 234    
    org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(org.eclipse.core.resources.IMarker) line: 148    
    org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasCorrections(org.eclipse.jface.text.source.Annotation) line: 138  
    org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.processAnnotation(org.eclipse.jface.text.source.Annotation, org.eclipse.jface.text.Position, int, int) line: 275    
    org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.collectQuickFixableAnnotations(org.eclipse.ui.texteditor.ITextEditor, int, boolean, java.util.ArrayList<org.eclipse.jface.text.source.Annotation>) line: 237    
    org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.showPossibleQuickAssists() line: 179    
    org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(int) line: 201 
    org.eclipse.ui.texteditor.TextOperationAction.lambda$0() line: 130  
    org.eclipse.ui.texteditor.TextOperationAction$$Lambda$1416.0x0000000801685808.run() line: not available 
    org.eclipse.swt.custom.BusyIndicator.showWhile(org.eclipse.swt.widgets.Display, java.lang.Runnable) line: 67    
    org.eclipse.ui.texteditor.TextOperationAction.run() line: 130   
    org.eclipse.ui.texteditor.TextOperationAction(org.eclipse.jface.action.Action).runWithEvent(org.eclipse.swt.widgets.Event) line: 474    
    org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(org.eclipse.swt.widgets.Event, boolean) line: 580 
    org.eclipse.jface.action.ActionContributionItem.lambda$4(org.eclipse.swt.widgets.Event) line: 414   
    org.eclipse.jface.action.ActionContributionItem$$Lambda$506.0x00000008011d98c0.handleEvent(org.eclipse.swt.widgets.Event) line: not available   
    org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 89    
    org.eclipse.swt.widgets.Display.sendEvent(org.eclipse.swt.widgets.EventTable, org.eclipse.swt.widgets.Event) line: 5855 
    org.eclipse.swt.widgets.MenuItem(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1529    
    org.eclipse.swt.widgets.Display.runDeferredEvents() line: 5065  
    org.eclipse.swt.widgets.Display.readAndDispatch() line: 4517    
    org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run() line: 1155 
    org.eclipse.core.databinding.observable.Realm.runWithDefault(org.eclipse.core.databinding.observable.Realm, java.lang.Runnable) line: 338   
    org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(org.eclipse.e4.ui.model.application.MApplicationElement, org.eclipse.e4.core.contexts.IEclipseContext) line: 1046  
    org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(org.eclipse.e4.ui.model.application.MApplicationElement) line: 155  
    org.eclipse.ui.internal.Workbench.lambda$3(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor, int[]) line: 643   
    org.eclipse.ui.internal.Workbench$$Lambda$203.0x0000000800f07000.run() line: not available  
    org.eclipse.core.databinding.observable.Realm.runWithDefault(org.eclipse.core.databinding.observable.Realm, java.lang.Runnable) line: 338   
    org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 550 
    org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 171 
    org.eclipse.ui.internal.ide.application.IDEApplication.start(org.eclipse.equinox.app.IApplicationContext) line: 152 
    org.eclipse.equinox.internal.app.EclipseAppHandle.run(java.lang.Object) line: 203   
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(java.lang.Object) line: 136 
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(java.lang.Object) line: 104  
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object) line: 402 
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String[], java.lang.Runnable) line: 255   
    jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]   
    jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 77 
    jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 43 
    java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 568    
    org.eclipse.equinox.launcher.Main.invokeFramework(java.lang.String[], java.net.URL[]) line: 659 
    org.eclipse.equinox.launcher.Main.basicRun(java.lang.String[]) line: 596    
    org.eclipse.equinox.launcher.Main.run(java.lang.String[]) line: 1467    
    org.eclipse.equinox.launcher.Main.main(java.lang.String[]) line: 1440   
angelozerr commented 1 year ago

I dont know why you have this problem. Please create an issue to lsp4e.

sbouchet commented 1 year ago

I dont know why you have this problem. Please create an issue to lsp4e.

opened https://github.com/eclipse/lsp4e/issues/492

sbouchet commented 1 year ago

local build is passing. please wait for end of CF before merge please.

sbouchet commented 1 year ago

fixed by #215