Closed reteprelief closed 11 years ago
There seems to be a race condition as it does not always occur. We need to make sure the registerInjector for aadl2 gets called before the property viewer, which resides in the properties.ui plug-in, asks for it. Probably have brake the dependency cycle and maybe place the viewer in a separate plugin ?
What is the package that should initialize the Injector first ? Maybe we have to introduce a manual dependency to it so that we make sure it is started first.
I also get the following sometimes, when I have the tesxt editor and the instance model editor open and its is reopened when OSATE starts again.
org.eclipse.core.runtime.CoreException: Plug-in org.osate.xtext.aadl2.ui was unable to load class org.osate.xtext.aadl2.ui.Aadl2ExecutableExtensionFactory. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:273) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
Fixed with 00ee7be0ea5c79d4e8a19c5e5fc64e3c990d8cbc by moving the property view from org.osate.ui to org.osate.xtext.aadl2.ui. Note that I also changed the property view's extension ID to match its new location. This means that workspaces with an open property view will complain about the view not being found. Simply close the property view and reopen it. This will only happen once per workspace.
If you exit OSATE with the AADL Properties view open, OSATE will encounter a null pointer exception when trying to initialize the property viewer. It tries to retrieve the injector for aadl2, but that may not have been initialized.