Community
Participate
Working Groups
I have a simple headless IApplication that allows running Eclipse launches (CDI based) from the command line. It seems this is broken in 7 due to the workbench capabilities being added to Launch: Caused by: java.lang.IllegalStateException: Workbench has not been created yet. at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92) at org.eclipse.cdt.launch.LaunchUtils.enableActivity(LaunchUtils.java:127) at org.eclipse.cdt.launch.AbstractCLaunchDelegate.<init>(AbstractCLaunchDelegate.java:128) at com.broadcom.cdt.debug.launch.Launch.<init>(Launch.java:49) at com.broadcom.cdt.debug.launch.GDBLaunch.<init>(GDBLaunch.java:54) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308)
There seem to be a whole bunch of new UI dependencies, including status handlers for save before launch, etc. I'll put together a patch.
Sigh. I'm a little behind HEAD. I see that in 1.70 ken removed #enableActivity call in the AbstractCLaunchDelegate constructor. Seems like there's no CDT specific change required.
(In reply to comment #1) > There seem to be a whole bunch of new UI dependencies, including status > handlers for save before launch, etc. > > I'll put together a patch. James, the launch plugin has had dependency on UI plugins for quite some time, so there are no build-time guards against adding a UI call in a particular part of the plugin. If there was a code path that was UI-free in the past, and we can reasonably keep it that way, then we should try to. But, again, there's no practical/easy way to guarantee those paths remain UI-free going forward other than to refactor the launch plugin into core and ui plugins.
(In reply to comment #3) > James, the launch plugin has had dependency on UI plugins for quite some time, I guess before 7 we've been lucky. We could always add the headless launch IApp to CDT if that's of interest to anyone else.