Community
Participate
Working Groups
Build ID: 351I20090714 Steps To Reproduce: Our product has a requirement to persist diagram editors such that we remember the layout and placement of the editor stack each diagram existed in. The diagram editors we are persisting most likely will not implement the IPersistableEditor interface, and we do not have any control over this. Also, the timing of when we need to create a memento of the editor layout is specific, it does not simply align with shut down and restart of the workbench. Rather we need to grab a snap shot and restore it possibly multiple times throughout the workbench's lifetime. In our case at least, we only care about persisting editors with a specific IEditorInput. What I would like to request, is some public API, perhaps available on the workbench or the workbench page (?) that allows one to grab a snapshot/memento of the current layout of the workbench parts. For example, /* Each 'selected' workbench part will be added to the * memento such that its position in the workbench can * be later restored */ public IStatus saveState(IMemento memento, IPartSelector selector); where: interface IPartSelector { // Returns true if this part is interesting // for the memento boolean shouldSavePart(IWorkbenchPart part); } /* * Extracts the workbench parts from the given memento and * will re-open them in the same layout as they were when * they were persisted. * * @param forceRelocation * <code>true</code> if already opened parts should be moved to the * location specified in the memento * <code>false</code> if already opened parts should not be moved * */ public IStatus restoreState(IMemento menento, boolean forceRelocation); Note: This is not the required API, just a suggestion...
Any chance of this enhancement being tackled for 3.6?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.