I am trying to migrate my RCP app from eclipse 3.6 to 4.2.
I focus on the feature "Save perspective as ..." and try to use SavePerspectiveAction class.
Following code is the part of my implementation in view action.
This code worked fine in eclipse 3.6 but does not work in eclipse 4.2.
org.eclipse.ui.internal.SavePerspectiveAction savePerspective = new org.eclipse.ui.internal.SavePerspectiveAction(window);
savePerspective.run();
I analyzed eclipse source code,
and I found that the method 'run' in SavePerspectiveAction is not implemented (comment out) in eclipse 4.2.
org.eclipse.ui.internal.SavePerspectiveAction (eclipse 4.2)
/* (non-Javadoc)
* Method declared on PerspectiveAction.
*/
protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
PerspectiveDescriptor desc = (PerspectiveDescriptor) persp;
if (desc != null) {
// saveNonSingleton(page, desc);
}
}
org.eclipse.ui.internal.SavePerspectiveAction (eclipse 3.6)
/* (non-Javadoc)
* Method declared on PerspectiveAction.
*/
protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
PerspectiveDescriptor desc = (PerspectiveDescriptor) persp;
if (desc != null) {
if (desc.isSingleton()) {
saveSingleton(page);
} else {
saveNonSingleton(page, desc);
}
}
}
Please tell me how to implement the feature "Save perspective as ..." in eclipse 4.2.