Mira: MSC images are visible in the generated HTML report only after a refresh
Current behaviour
When a report from the requirements is generated and a MSC is defined, screenshots are from the MSC are generated and refrenced in the report. If the report is generated in Windows (and Word is installed) then Word opens and shows the report with the images. However, when the report is generated on MacOS (and probably when Word is not installed on a Windows machine) the report is generated as a htm file only which is then opened. On MacOS, it can be observed that a broken reference is shown where the screenshot should be located. When the browser window is refreshed, the images become visible.
Expected behaviour
The screenshots should be displayed immediately.
How to reproduce
Prerequisite: MacOS / (Windows /wo Word installed)
1. Open the simple traffic lights example
2. Generate a report from the context menu of the requrement model
3. In the opening browser window notice the missing images at the bottom
of the report (NOTE: please open the browser before generating the
report, due to false positive behaviour because of timing issues)
Analysis
Due to asynchronous behaviour that was introduced in Eclipse Kepler, the screenshot mechanism has been modified to such that it is realized as a Runnable which is added to asyncEcex queue after the corresponding editor is requested to be opened (See bug #2094). Hence, the correct execution order is kept. So, it seems that the browser window is opened before all screenshots were taken (race condition).
Proposed solution
Implement a “wait section” before the code that opens the browser window which polls whether all images were generated. A queue containing identifiers of all images that need to be taken is required therefore.
(from redmine: issue id 2421, created on 2015-08-26, closed on 2017-07-17)