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

Content Assist not working when 3.4.0 update is installed in Eclipse for Java Developers #486

Closed
crapo opened this issue Jul 23, 2020 · 21 comments · Fixed by #492
Closed

Comments

@crapo
Copy link
Collaborator

crapo commented Jul 23, 2020

@kittaakos , this one has me stumped. The development branch has jena3.16 merged with it, updating Apache Jena from a 5+ year-old version and updating the SADL version to 3.4.0. The Jena logging changed, which required some tweaks. But now when run from the development environment everything seems to work OK but when I install the update zip file into an Eclipse 2020-03, content assist does not work at all. This is true for two different installations on two different machines. I'm kind of clueless as to how to identify a problem only existing in an installed plugin, not in the development environment.

@crapo
Copy link
Collaborator Author

crapo commented Jul 23, 2020

This was apparently due to the logger issues. Once that got sorted out a bit CA started working.

@crapo crapo closed this as completed Jul 23, 2020
@crapo
Copy link
Collaborator Author

crapo commented Jul 27, 2020

Has stopped working again.

@kittaakos
Copy link
Contributor

The Jena logging changed, which required some tweaks. But now when run from the development environment everything seems to work OK but when I install the update zip file into an Eclipse 2020-03, content assist does not work at all. This is true for two different installations on two different machines. I'm kind of clueless as to how to identify a problem only existing in an installed plugin, not in the development environment.

I need to know what did you change. Do you have a branch or a PR with the changeset? I can look into the issue this week.

@crapo
Copy link
Collaborator Author

crapo commented Jul 27, 2020

The branch on which the update occurred was "jena3.16". When it appeared that all was well (all tests passed) it was merged into development.

@crapo
Copy link
Collaborator Author

crapo commented Jul 27, 2020

@kittaakos , I went through the warnings and fixed a) easy ones, e.g., unused imports, and b) ones that looked like they might have significant consequences. I didn't know how to fix the first 3.
image. Would you like me to push these or would that just cloud the water? I would appreciate your help. I don't know how to proceed.

@kittaakos
Copy link
Contributor

I didn't know how to fix the first 3.

I will look into it tomorrow, please commit your changeset to somewhere.

@kittaakos
Copy link
Contributor

kittaakos commented Jul 27, 2020

Here is the changeset so far: 6af2b08...85fad7c

@crapo
Copy link
Collaborator Author

crapo commented Jul 27, 2020

As all tests pass, I have pushed my changes to resolve warnings to development branch.

@kittaakos
Copy link
Contributor

I could not reproduce the problem. It worked for me.

I did the following:

  • Download Eclipse for DSL developers 2020-03.
  • Pull and build SADL from thedevelopment branch with commit ea95d79. I used git clean -ffxqd && mvn clean && mvn install -U.
  • Install the p2 into the brand new Eclipse 2020-03.
  • Verified it.

Screen Shot 2020-07-28 at 09 09 41
Screen Shot 2020-07-28 at 09 09 59

screencast 2020-07-28 09-11-00

@crapo
Copy link
Collaborator Author

crapo commented Jul 28, 2020

@kittaakos , if I do what you outline above it works for me as well. However, if I install the SADL p2 into a brand new Eclipse for Java Developers 2020-03 it does not work. This is a change. In the past I could install the SADL p2 into either Eclipse for DSL Developers OR Eclipse for Java Developers and it worked equally well. So has something dropped out of the SADL p2 that is in the DSL version but not the Java version? @tuxji , want to include you in this question.

@kittaakos
Copy link
Contributor

However, if I install the SADL p2 into a brand new Eclipse for Java Developers 2020-03 it does not work.

I do not know what you mean, but I did exactly that. Built the SADL p2 from the sources and installed it into a 2020-03 Eclipse for DSL developers: #486 (comment).

  • Pull and build SADL from thedevelopment branch with commit ea95d79. I used git clean -ffxqd && mvn clean && mvn install -U.
  • Install the p2 into the brand new Eclipse 2020-03.

@crapo
Copy link
Collaborator Author

crapo commented Jul 28, 2020

If I install into a brand new Eclipse for DSL Developers 2020-03 it works.
If I install into a brand new Eclipse for Java Developers 2020-03 it does not work.

@crapo
Copy link
Collaborator Author

crapo commented Jul 28, 2020

BTW, what does git clean -ffxqd do?

@kittaakos
Copy link
Contributor

If I install into a brand new Eclipse for Java Developers 2020-03 it does not work.

Thank you!

BTW, what does git clean -ffxqd do?

Resets the repository to a fresh-clone state.

@kittaakos kittaakos changed the title Content Assist not working when 3.4.0 update is installed in Eclipse Content Assist not working when 3.4.0 update is installed in Eclipse for Java Developers Jul 28, 2020
@kittaakos
Copy link
Contributor

This is the error I see when I install the p2 into Eclipse 2020-03 for Java developers.

java.lang.NoSuchMethodError: 'java.util.ArrayList org.eclipse.xtext.ide.editor.contentassist.ContentAssistEntry.getEditPositions()'
	at com.ge.research.sadl.ui.contentassist.SADLProposalProvider$SADLUiToIdeContentProposalProvider.applySelection(SADLProposalProvider.java:87)
	at com.ge.research.sadl.ui.contentassist.SADLProposalProvider$SADLUiToIdeContentProposalProvider.lambda$0(SADLProposalProvider.java:80)
	at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtensions.java:449)
	at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:414)
	at com.ge.research.sadl.ui.contentassist.SADLProposalProvider$SADLUiToIdeContentProposalProvider.createProposals(SADLProposalProvider.java:83)
	at com.ge.research.sadl.ui.contentassist.SADLProposalProvider.createProposals(SADLProposalProvider.java:114)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:53)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:1)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:70)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:525)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.priorityReadOnly(XtextDocument.java:489)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.priorityReadOnly(XtextDocument.java:145)
	at org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor.computeCompletionProposals(XtextContentAssistProcessor.java:77)
	at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2015)
	at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:4797)
	at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:2014)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2011)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:576)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.lambda$0(CompletionProposalPopup.java:506)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:501)
	at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1825)
	at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:978)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1466)
	at org.eclipse.ui.texteditor.ContentAssistAction.lambda$0(ContentAssistAction.java:85)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
	at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:84)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1113)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4382)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1549)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1545)
	at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:522)
	at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1081)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6205)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:59)
	at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:606)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6037)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2150)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2401)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6157)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5407)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5543)
	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:3788)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	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:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)

I am checking why...

@kittaakos
Copy link
Contributor

@crapo, I downloaded the latest 3.3 SADL release from here: https://github.com/crapo/sadlos2/releases/latest
Installed it into a 2020-03 Eclipse for Java developers based on the wiki, and the content assist does not work. It seems it's not a regression but rather a new feature request. Do you want me to work on that?

@kittaakos
Copy link
Contributor

The problem here is that we pull Xtext 2.22 although we develop against 2.21. I'll try to set an upper bound for Xtext: [2.21.0, 2.22.0).

@crapo
Copy link
Collaborator Author

crapo commented Jul 28, 2020

I don't fully understand. I think that you're saying that the previous release also did not work if installed on the Java Developer Eclipse and I just didn't notice.

The problem here is that we pull Xtext 2.22

not sure what pulls... the Installation of the SADL p2?

we develop against 2.21

Should we be developing against 2.22? I think you're saying that you'll try to make it pull 2..21, correct?

@kittaakos
Copy link
Contributor

Do you want me to update Xtext to 2.22?

@crapo
Copy link
Collaborator Author

crapo commented Jul 28, 2020

I'm asking what you recommend. I don't have enough information to have an informed opinion... Unless there's a good reason, we should do what takes the least effort.

@kittaakos
Copy link
Contributor

I have pinned the versions. The PR is here: #492

As a verification:

  • I built a SADL p2 update from the sources,
  • Installed it into Eclipse 2020-03 DSL and Java developers,
  • The content assist worked in both Eclipse installations.

crapo pushed a commit that referenced this issue Jul 28, 2020
GH-486: Pinned Xtext version to [2.21.0,2.22.0)
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