| Summary: | No hovers for completion proposals based on IEObjectDescriptions from the index | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Vladimir Piskarev <vpiskarov> | ||||||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | christophkulla, dpwegener, Holger.Schill, sebastian.zarnekow | ||||||||
| Version: | 2.0.1 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Vladimir Piskarev
Created attachment 202410 [details]
call stack
Created attachment 202411 [details]
Sample language projects
Created attachment 202412 [details]
'example' project
We'd have to load the resource for the currently selected proposal and extract the documentation on demand. I am a little bit scared to resolve the currently selected proposal. I would suggest to avoid hovercomputation for proxies with a guard in the DefaultEobjectHoverprovider. If someone would like to have such things a custom hoverprovider is the way to go. For Xbase I already introduced this guard. Well only the documentation of the selected proposal will be displayed and therefore only the proxy has to be resolved. I don't think this imposes a problem. Why did you introduce the guard in Xbase? Did you face any problems with resource loading? I introduced the guard to avoid Nullpointer because at the moment we do not resolve proxies. But when this is the way to go I will remove it and introduce the proxy resolution. Do not see problems with resource loading. Just was a little bit scared to resolve proxies to show hover on proposals. We will see if it is expensive or not. This issue is causing a NullPointer exception in the example arithmetics project provided with Xtext. If you import a module, all of the definitions in the imported module result in NullPointerExceptions being thrown in the log and no hover window being displayed. Steps to reproduce: 1. File->New->Xtext->arithmetic example. 2. Launch workspace and create Java Project adding Xtext nature 3. Create lib.calc with the following: module lib def abc(a,b): a+b; 4. Create main.calc with the following: module main import lib def xxx(a,b): a-b; 5. Open up main.calc and invoke content assist at the end of the file after the def xxx. Content proposals window is shown including both abc and xxx. NullPointerException should be immediately throw as abc should be selected in the proposal list. Each time the proposal list changes to abc, the exception is thrown. Stack Trace: !ENTRY org.eclipse.jface.text 2 0 2012-07-04 11:29:35.639 !MESSAGE !STACK 0 java.lang.NullPointerException at org.eclipse.xtext.example.arithmetics.arithmetics.util.ArithmeticsSwitch.doSwitch(ArithmeticsSwitch.java:58) at org.eclipse.xtext.example.arithmetics.scoping.NameProvider$1.caseDefinition(NameProvider.java:43) at org.eclipse.xtext.example.arithmetics.scoping.NameProvider$1.caseDefinition(NameProvider.java:1) at org.eclipse.xtext.example.arithmetics.arithmetics.util.ArithmeticsSwitch.doSwitch(ArithmeticsSwitch.java:119) at org.eclipse.xtext.example.arithmetics.arithmetics.util.ArithmeticsSwitch.doSwitch(ArithmeticsSwitch.java:72) at org.eclipse.xtext.example.arithmetics.arithmetics.util.ArithmeticsSwitch.doSwitch(ArithmeticsSwitch.java:58) at org.eclipse.xtext.example.arithmetics.scoping.NameProvider.getFullyQualifiedName(NameProvider.java:66) at org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider.hasHover(DefaultEObjectHoverProvider.java:103) at org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider.getHoverInfoAsHtml(DefaultEObjectHoverProvider.java:76) at org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider.getHoverInfo(DefaultEObjectHoverProvider.java:91) at org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider$2.getInfo(DefaultEObjectHoverProvider.java:519) at org.eclipse.xtext.ui.editor.hover.DispatchingEObjectTextHover.getHoverInfo(DispatchingEObjectTextHover.java:38) at org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal.getAdditionalProposalInfo(ConfigurableCompletionProposal.java:540) at org.eclipse.jface.text.contentassist.AdditionalInfoController$3.run(AdditionalInfoController.java:106) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Moved issue from comment #8 to bug 384334 pushed fix and test to master Requested via bug 522520. -M. Requested via bug 522520. -M. |