osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
36 stars 8 forks source link

Outline view loses its context menu #2050

Closed lwrage closed 4 years ago

lwrage commented 4 years ago

Summary

Every once in a while the context menu in the outline view disappears. It appears again after a restart.

Steps to Reproduce

  1. Close all editors
  2. Open an AADL file, say P.aadl. -> The context menu in the outline view works.
  3. Open another AADL file, say Q.aadl, leaving P.aadl open. -> The context menu in the outline view works.
  4. Switch to the editor tab for P.aadl. -> The context menu does not appear any more.

Workaround

Close and reopen the text editor. Only the outline view for editor opened last will work.

Environment

jjhugues commented 4 years ago

I have a workspace that also exhibits this weird behavior Closing the outline and reopening it restores it

Interesting enough, this bug (in my case) is on a per-AADL package basis. In a given workspace, some packages have this bug, others do not.

Also, I do have occurrences of the menu being partially complete, the missing parts being resolute menus

right click leads to the following stack trace

java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showPopup(MenuManagerShowProcessor.java:243) at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToShow(MenuManagerShowProcessor.java:89) at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPreHelper(MenuManagerEventHelper.java:84) at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:470) at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:466) at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:498) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:259) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4406) 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:1516) at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:808) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6180) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSMenu.popUpContextMenu(NSMenu.java:80) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:270) at org.eclipse.swt.widgets.Display.runPopups(Display.java:4270) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3803) 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:633) 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:150) 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: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:660) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) at org.eclipse.equinox.launcher.Main.run(Main.java:1468)

lwrage commented 4 years ago

This is not an OSATE issue as it happens for Xtend files, too.

joeseibel commented 4 years ago

See https://github.com/eclipse/xtext-eclipse/issues/1252

lwrage commented 4 years ago

Looks like it will be fixed as soon as we upgrade to the next eclipse version.