|How to restore WorkingSets in a View in Eclipse 4? [message #955274]
||Tue, 23 October 2012 17:05
| Kevin O
Registered: October 2012
We have an Eclipse 3 RCP Application that we are trying to get working in Eclipse 4.|
One of our Views, which extends ViewPart, uses IWorkingSets via the standard IWorkingSetManager. The exact objects displayed are not IResource objects, so it has its own factory, etc. Everything as far as the ability to select the inclusions for a workingset, the filtering, and the saving of the selections and named working sets into the workingsets.xml file all works fine.
However, when the view is restored, the AggregateWorkingSet for the View is not restored from the workingsets.xml file. I have verified through debugging that the WorkingSetManager properly executes the restoreState() code which reads and creates the various working sets, but it does not appear that the part (well, actually the IWorkbenchPage that is accessible via the getSite().getPage() call in the View) ever receives the setting for the aggregate working set.
Worse, now if one starts and stops the application repeatedly, a new entry is created every time in the workingsets.xml due to the fact a new aggregate working set for the View is created with the timestamp.
I believe the reason for the functionality in 3.7 is that the WorkbenchPage class had a restoreState() method that was called by WorkbenchWindow.restoreState(). In the WorkbenchPage.restoreState() there is code which specifically handled restoring working sets. It would appear in the Eclipse 4 system, neither WorkbenchPage nor WorkbenchWindow has a restoreState() method.
With Eclipse 4, what is the proper way to have the AggregateWorkingSet restored for a View?
Powered by FUDForum
. Page generated in 0.01987 seconds