Community
Participate
Working Groups
For the moment the auto-refresh feature refreshes all opened representations when a semantic change occurs. It causes performance problems when many representations are opened. A basic solution could be to refresh only opened and visible editors (IWorkbenchPage.isPartVisible(IWorkbenchPart)). This solution implies to: - refresh a representation when an editor becomes visible and the auto-refresh is enabled - not refresh a representation on opening and the auto refresh is enabled (the representation should be refreshed when the editor becomes visible).
Note that refreshing a representation on setFocus/setVisible might cause performance issues too. The current behavor can take time to refresh all opened editors, but then the switch to other editors is nearly free. With the proposed behavior, the user might not understand why making an editor visible takes time and make the session dirty.
With the proposed solution, a new status is needed to know if an editor is already refreshed. Indeed, if a refresh is launched between each editor change (without changes in the model), this will be problematic for performance.
For information: We have already notice some problems around setFocus notification that is not handled by the same way in different OS (linux, windows, mac). I do not remember in which context but it will have that in mind.
The method IWorkbenchPage.isPartVisible(IWorkbenchPart) uses LayoutPart.getVisible(): Returns true if this part was set visible. This returns whatever was last passed into setVisible, but does not necessarily indicate that the part can be seen (ie: one of its ancestors may be invisible)...