Skip to content

ActionBarContributor is not found

This issue has been introduced with a wrong bug fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=581660

Steps to reproduce:

  1. Create a first Papyrus model -> the actionbar registry is initialized
  2. Create a second Papyrus model -> the actionbar registry is still the same and the same contribution are used for the two instance Papyrus CoreMultiDiagramEditor
  3. Close one of the CoreMultiDiagramEditor -> the actionabr registry is clear (call of org.eclipse.papyrus.infra.ui.multidiagram.actionbarcontributor.ActionBarContributorRegistry.disposeService()), the other CoreMultiDiagramEditor won't be able to activate the required ActionBar and you will get this exception

ENTRY org.eclipse.papyrus.infra.textedit.xtext 4 0 2025-07-04 10:28:40.053

!MESSAGE Unexpected Error

!STACK 0

org.eclipse.papyrus.infra.core.extension.NotFoundException: No ActionBarContributor registered under id 'org.eclipse.papyrus.infra.textedit.xtext.PapyrusXTextActionBarContributor'.

at org.eclipse.papyrus.infra.ui.multidiagram.actionbarcontributor.ActionBarContributorRegistry.getActionBarContributor(ActionBarContributorRegistry.java:82)

at org.eclipse.papyrus.infra.textedit.xtext.nested.editor.AbstractPapyrusXtextEditorFactory$TextDocumentViewEditorModel.getActionBarContributor(AbstractPapyrusXtextEditorFactory.java:199)

at org.eclipse.papyrus.infra.core.sasheditor.internal.EditorPart.createEditorActionBarContributor(EditorPart.java:375)

at org.eclipse.papyrus.infra.core.sasheditor.internal.EditorPart.createSite(EditorPart.java:363)

at org.eclipse.papyrus.infra.core.sasheditor.internal.EditorPart.createEditorPartControl(EditorPart.java:256)

at org.eclipse.papyrus.infra.core.sasheditor.internal.EditorPart.createPartControl(EditorPart.java:163)

at org.eclipse.papyrus.infra.core.sasheditor.internal.TabFolderPart.createChildPart(TabFolderPart.java:1059)

at org.eclipse.papyrus.infra.core.sasheditor.internal.TabFolderPart.createTabItem(TabFolderPart.java:980)

at org.eclipse.papyrus.infra.core.sasheditor.internal.TabFolderPart.synchronize2(TabFolderPart.java:904)

at org.eclipse.papyrus.infra.core.sasheditor.internal.RootPart.synchronize2(RootPart.java:141)

at org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer.refreshTabsInternal(SashWindowsContainer.java:760)

at org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer.refreshTabs(SashWindowsContainer.java:713)

at org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer.createPartControl(SashWindowsContainer.java:249)

at org.eclipse.papyrus.infra.core.sasheditor.editor.AbstractMultiPageSashEditor.activate(AbstractMultiPageSashEditor.java:180)

at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor.activate(CoreMultiDiagramEditor.java:796)

at org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor.activate(PapyrusMultiDiagramEditor.java:44)

at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor.doReload(CoreMultiDiagramEditor.java:1041)

at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor$DeferredReload.reloadEditor(CoreMultiDiagramEditor.java:1314)

at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor$DeferredReload.reload(CoreMultiDiagramEditor.java:1288)

at org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor$4.reloadEditor(CoreMultiDiagramEditor.java:916)

at org.eclipse.papyrus.infra.ui.services.ResourceUpdateService$4.runInUIThread(ResourceUpdateService.java:161)

at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:148)

at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)

at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)

at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4058)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3676)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)

at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)

at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)

at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

at org.eclipse.equinox.launcher.Main.main(Main.java:1454)

Edited by Vincent Lorenzo