Opened 4 years ago
Closed 4 years ago
#799 closed defect (fixed)
GritsUIService: Exception opening the part after long running process
Reported by: | sena | Owned by: | sena |
---|---|---|---|
Priority: | normal | Milestone: | GRITS - 1.2 |
Component: | GRITS core | Version: | GRITS 1.1.x |
Severity: | minor | Keywords: | |
Cc: |
Description
While running the gelato annotation I am getting the attached exception ("Application does not have an active window") if I leave the GRITS window and switch to another application (firefox, powerpoint etc.) and stay on the other application by the time the process finishes. Since the annotation process takes a while, this would be a common scenario.
The exception is not thrown if I wait for the process to finish with the focus on GRITS window.
This causes the newly created entry not being opened. But the user needs to double-click again to open it in the editor.
Attachments (1)
Change History (4)
Changed 4 years ago by
Attachment: | Exception.txt added |
---|
comment:1 Changed 4 years ago by
Owner: | changed from shan to sena |
---|---|
Status: | new → assigned |
comment:2 Changed 4 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → review |
I have fixed this bug for now by adding a method in GritsUIService to set the partService from the command handler instead of using the initially injected EPartService of GritsUIService before trying to open the part.
This might be related to the following bug in eclipse:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429936
Also see
Handler's execute method has "EPartService" as an injected parameter and makes the following calls to open the part in the editor after the long running process:
gritsUIService.setPartService(partService);
gritsUIService.openEntryInPart(lastMSEntry);
comment:3 Changed 4 years ago by
Status: | review → closed |
---|
In short Eclipse would use an active window in many of its UI Services and you have to comply with that.
Solution Summary
This could also be incorporated in the Grits UI Service but for a standard behavior one has to add this kind of checking and waiting in lots of places and it would be a waste of effort and resources.