Right Click Stopped Working

Hi all. I’ve been working in Capella for a couple hours, and I ran into a bug where my right-click has stopped working in most places in Capella. Key areas where it doesn’t work: Project Explorer, Diagrams, Semantic Browser. Some areas where it still works: the “Information” window, Property windows, empty spaces of toolbars, window tabs, git History.

I tried a new workspace, and right click appears to work everywhere there, so I could scrap my workspace and create a new one. Any ideas how this might have happened or how it could be corrected?

I have never heard of such a problem. Have you tried to just close and restart Capella? (without changing workspace) - is the problem still there?
Stephane

Hi Stephane :slight_smile:
I did a closed/reopen of Capella and rebooted Windows, too. Neither made a difference. I’m messing around (just trying to right click a lot), and got some wrong context menus, too. See below, for example.

Another breadcrumb: I’m getting a lot of entries in the .bak_0_.log file in the workspace/.metadata folder. From what I can tell, they all are like the one pasted below. I was doing a lot with m2doc when this happened, so it seems reasonable that it could be related. I’ll keep poking around, but I’m eager for any suggestions!

!ENTRY org.eclipse.ui 4 0 2022-06-22 11:48:43.586
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org/obeonetwork/m2doc/genconf/Generation
	at org.obeonetwork.m2doc.genconf.propertyTester.GenerationPropertyTester.test(GenerationPropertyTester.java:53)
	at org.eclipse.core.internal.expressions.Property.test(Property.java:65)
	at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:103)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:69)
	at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:25)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
	at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:199)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
	at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:81)
	at org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer.isCoreExpressionVisible(ContributionsAnalyzer.java:281)
	at org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer.isVisible(ContributionsAnalyzer.java:255)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.computeVisibility(ContributionRecord.java:170)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:101)
	at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:197)
	at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:115)
	at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:95)
	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:469)
	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:463)
	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
	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:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1042)
	at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5137)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4769)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1480)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2142)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4923)
	at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:237)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java:4071)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3624)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
	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.polarsys.capella.core.platform.sirius.ui.app.CapellaApplication.start(CapellaApplication.java:117)
	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:564)
	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)

thanks, asking internally if someone may have an idea of the root cause…

Thanks Stephane. I think I’m out of the woods and up and running again. I was worried about messing up something I had setup, especially because I had projects tied to git repos, but things worked out! m2doc is working, too. Here’s what I did:

  1. I uninstalled and reinstalled m2doc. This didn’t seem to change anything from what I could tell, but I don’t know for sure.
  2. I created a new workspace, where right click worked like it should. I created a new project just to test out right-click some. After testing it out some, I deleted the project.
  3. Outside of Capella in the file explorer, I copied the .metadata, MDEReport.html, and Usage.log files (the files that seemed to contain workspace-specific data in my mind) from the new, blank workspace to my old, problematic workspace - overriding those files in the old workspace (I think I actually manually deleted them out of my old workspace first, in case file names weren’t identical).
  4. I then loaded up my old (now with workspace data overwritten) workspace folder into Capella. Because I overwrote the workspace files, in Capella’s project explorer the workspace didn’t have any projects in it initially. It was no problem to bring in the ones I wanted.
  5. Things seem to be good now - right click, m2doc gen, and git connection are working.

This felt a little touch-and-go, but seemed to get me back to where I was. Make sure you always have a backup or two before messing around!

Nicely done! Thanks for sharing. Not sure we’ll be able to sort that out, but I will let you know if I receive any feedback!
Yes, always have a backup - there are different options in Eclipse/Capella for backuping your work, but I see you are using Git so that’s a great security!

The feedback I got is that we’ve never seen this problem, something odd probably happened… Unless you had a problem with your initial M2Doc installation.
If the problem happens again or if you have a way to reproduce it, we’ll be interested if you let us know.