Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » SavePerspectiveAction does not work in eclipse 4.2
SavePerspectiveAction does not work in eclipse 4.2 [message #1066531] Tue, 02 July 2013 22:41
Noritaka Sekiyama is currently offline Noritaka Sekiyama
Messages: 3
Registered: July 2013
Junior Member
This topic is moved to RCP forum <http://www.eclipse.org/forums/index.php/t/489870/>.
I'm sorry about my mistake.

---

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.

[Updated on: Wed, 03 July 2013 10:51]

Report message to a moderator

Previous Topic:&quot;Run as -&gt; Ant Build ...&quot; disappears if certain Editor active
Next Topic:Could not find context menu New->Category for an extension
Goto Forum:
  


Current Time: Wed Aug 27 09:06:31 EDT 2014

Powered by FUDForum. Page generated in 0.14786 seconds