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

Open method/class declaration fails #217

Closed
etricky opened this issue Mar 14, 2019 · 3 comments
Closed

Open method/class declaration fails #217

etricky opened this issue Mar 14, 2019 · 3 comments

Comments

@etricky
Copy link

etricky commented Mar 14, 2019

I installed STS4 on a fresh installation of eclipse and I'm not able to CTRL+CLICK on a variable, method or class that is located inside a class that belongs to one of my Maven Dependencies. I can do it if the file is located in the src folder. The real example is, my main.java class is located in the src folder. In this class I have the following code:
SpringApplication.run(CryptoBotApplication.class, args);

I can CTRL+CLICK on SpringApplication and this will open a new tab with SpringApplication class which belongs to one of my maven dependencies. Within that class, CTRL+CLICK doesn't work on any variable, method or class. It doesn't even show me the popup with the options Open Declaration and Open Implementation. If I press the keyboard shortcut F3, it goes to the declaration of the variable, method or class.

In eclipse logs, every time I try CTRL+CLICK and it fails, I get the following logs:
!ENTRY org.eclipse.ui 4 0 2019-03-14 18:46:56.436 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.lsp4e.operations.declaration.OpenDeclarationHyperlinkDetector.detectHyperlinks(OpenDeclarationHyperlinkDetector.java:79) at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:81) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:289) at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:262) at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:457) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595) at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

Just to troubleshoot this, I did another fresh install of eclipse and with an empty workspace and once I install STS4, this happens!

Eclipse and OS details:
Version: 2018-12 (4.10.0)
Build id: 20181214-0600
Windows 10 Build 18305

@BoykoAlex
Copy link
Contributor

This is a duplicate of #205 I believe. @etricky do you agree?

@etricky
Copy link
Author

etricky commented Mar 15, 2019

@BoykoAlex Yes, I believe it is. Thank you for the reply!

@BoykoAlex
Copy link
Contributor

Lets close this one then. 4.2.0 will have the fix.

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

No branches or pull requests

2 participants