Community
Participate
Working Groups
This issue has been reported before as bug#462610. I am observing this issue now in my customer application. In this context a job is running on startup. As a result of the job tool items are updated. This seems to happen too early. java.lang.IllegalStateException: Application does not have an active window at org.eclipse.e4.ui.internal.workbench.ApplicationPartServiceImpl.getActiveWindowService(ApplicationPartServiceImpl.java:42) at org.eclipse.e4.ui.internal.workbench.ApplicationPartServiceImpl.findPart(ApplicationPartServiceImpl.java:103) at (CUSTOM CODE) at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:185) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) This might not be valid to call findPart at this time, but it shows that the contract is still violated. As originally proposed in the bug I think the ISE should be catched and return null. It may be argued that this should be logged as a warning, as it is likely covering an implementation problem.
This potentially affects other methods implemented from EPartService also. The all access getActiveWindowService() and will throw an ISE when called.