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] Wed, 03 July 2013 02:41
Noritaka Sekiyama is currently offline Noritaka SekiyamaFriend
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 14:51]

Report message to a moderator

Previous Topic:&quot;Run as -&gt; Ant Build ...&quot; disappears if certain Editor active
Next Topic:How to inherit quick fix behaviour of problems view in custom markers view?
Goto Forum:
  


Current Time: Sat Sep 23 09:23:22 GMT 2017

Powered by FUDForum. Page generated in 0.02995 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software