Community
Participate
Working Groups
It will be nice to have a restart action in the file menu (and an associated keyboard short cut). Each time we add plugin to our plugin directory the platform must be restarted, to do this i actually have to do: file -> switch workspace -> other -> ok
We would want a command now
(In reply to comment #1) > We would want a command now > I have already written a plugin doing this. I can integrate this plugin inside the workbench one and submit a patch. Where is the best place to integrate such capability, the same place as the file -> exit command ? Last week i just had a quick look on this, and think to remember that there is may be several plugins to patch ? What key shortcut associated to this action (alt + f6, alt + ..., ctrl + ... ) ?
(In reply to comment #2) > I have already written a plugin doing this. > I can integrate this plugin inside the workbench one and submit a patch. Where > is the best place to integrate such capability, the same place as the file -> > exit command ? Last week i just had a quick look on this, and think to remember > that there is may be several plugins to patch ? How I'd lay it out: 1) put the restart command in org.eclipse.ui/plugin.xml: org.eclipse.ui.file.restartWorkbench 2) put the handler (based off of org.eclipse.core.commands.AbstractHandler) in org.eclipse.ui.workbench in the org.eclipse.ui.internal.handlers package 3) add a CommandContributionItem in WorkbenchActionBuilder (in org.eclipse.ui.ide) to add it to the mainMenu/File menu > > What key shortcut associated to this action (alt + f6, alt + ..., ctrl + ... ) > ? We're really trying hard to not add keybindings in the platform workbench. There's no common keybinding for "restart app", so you'll probably still have to bind it in the keys preference page or still use your own little plugin to contribute it to your eclipse installations. PW
> How I'd lay it out: > 1) put the restart command in org.eclipse.ui/plugin.xml: > org.eclipse.ui.file.restartWorkbench > 2) put the handler (based off of org.eclipse.core.commands.AbstractHandler) in > org.eclipse.ui.workbench in the org.eclipse.ui.internal.handlers package > 3) add a CommandContributionItem in WorkbenchActionBuilder (in > org.eclipse.ui.ide) to add it to the mainMenu/File menu > After looking how it works for example for file -> exit i have one question about your suggestion: - I didn't find any QuitHandler, but only one QuitAction responsible for exiting the workbench (in org.eclipse.ui.workbench, org.eclipse.ui.internal), so why do not implement the restart action the same way. Do you see one reason to have several handler for the restart command ? > > We're really trying hard to not add keybindings in the platform workbench. > There's no common keybinding for "restart app", so you'll probably still have > to bind it in the keys preference page or still use your own little plugin to > contribute it to your eclipse installations. OK ;o) > > PW >
(In reply to comment #4) > After looking how it works for example for file -> exit i have one question > about your suggestion: > > - I didn't find any QuitHandler, but only one QuitAction responsible for > exiting the workbench (in org.eclipse.ui.workbench, org.eclipse.ui.internal), > so why do not implement the restart action the same way. Do you see one reason > to have several handler for the restart command ? Actions are the "old" way ... if you look at ActionFactory.ABOUT we've started converting things like the AboutAction to the AboutHandler (we haven't arrived at QuitAction yet :-) Just like the command org.eclipse.ui.help.aboutAction, you would provide your RestartHandler as the defaultHandler for the restartWorkbench command. PW
> Actions are the "old" way ... if you look at ActionFactory.ABOUT we've started > converting things like the AboutAction to the AboutHandler (we haven't arrived > at QuitAction yet :-) > > Just like the command org.eclipse.ui.help.aboutAction, you would provide your > RestartHandler as the defaultHandler for the restartWorkbench command. > > PW > Thanks Paul, I have now understood how things are managed. I will submit a patch containing the added handler and the diff result of plugin.xml (org.eclipse.ui) and the diff result of Workbench action builder. Is it the right way to submit a patch ?
(In reply to comment #6) > > I have now understood how things are managed. I will submit a patch containing > the added handler and the diff result of plugin.xml (org.eclipse.ui) and the > diff result of Workbench action builder. Is it the right way to submit a patch > ? That sounds correct, you can just attach the patch to the bug. A good way to generate a one-off patch is to get a new workspace and use the platform-ui module (at the bottom of CVS Repository Exploring view for anonymous@dev.ecilpse.org:/cvsroot/eclipse when you expand HEAD) to check out the platform ui projects. You'll get about 18 projects, and then you can close org.eclipse.ui.win32 and org.eclipse.ui.carbon. If you make your changes (add the handler to org.eclipse.ui.workbench, the command definition to org.eclipse.ui, and update WorkbenchActionBuilder) you can use the Team Synchronizing Perspective to generate one patch that contains all of your modifications. But don't worry if it's not quite correct, we'll review it and spin a new patch if necessary. PW
Ok. I will do my first (first real contribution. It's a little one, but it s the good way to start :-) ) contribution this week end. Manuel
Created attachment 75690 [details] Patch created using Team Synchronizing view As suggested, one patch for all modification has been created using Team Synchronizing view. Let me know if something is wrong Regards Manuel
Created attachment 76569 [details] restart command v02 Manuel, I've updated your patch to remove ActionFactory and WorkbenchActionBuilder (those were my legacy suggestions) and add an org.eclipse.ui.menus extension into org.eclipse.ui.ide.application/plugin.xml Could you please try out this patch? If it is good, please update the contributor information for RestartWorkbenchHandler to include something like: * Remy Chi Jian Suen <remy.suen@gmail.com> - Bug 12116 [Contributions] widgets: MenuManager.setImageDescriptor() method needed It goes in the copyright comment above the package statement. You don't need the title, just the bug number will do. Re-spin the patch with that, and then I'll see if I can get it in this week. PW
(In reply to comment #10) Hi Paul, Sorry for my late answer but i was on holydays during the last three weeks. I will try your patch soon (tommorow in the worst case) and let you know. Your request concerning the patch comment will be included in the next Eclipse release ? With my name for such little modifications ? Regards Manuel
ping ... I'm trying to do contributions this week and next week, if you want to get this patch in. PW
(In reply to comment #12) > ping ... I'm trying to do contributions this week and next week, if you want to > get this patch in. > > PW > Hi Paul, I have been very busy the last weeks (cause of a house moving and a lot of work). I tried this morning, today is Eclipse bug day, to test your patch, but i can't access Eclipse' CVS repositories from my work (we are behind a firewall). I will do it this evening (i am in France), this time it's sure and let you know. Manuel
ping
Created attachment 79780 [details] restar command v03
Hi Paul, First of all, thank you for your patience since i already told twice: "I am going to do this tommorow". This time is the good one. After a one hour hard battle on a very old 256 Ram Windows XP station here is the patch with just the contributor information for RestartWorkbenchHandler class added. Your patch works fine for me, the only problem i got was the time to build the 16 projects with 256M of Ram ;o) Please let me know if all is ok. Manuel
*** Bug 206268 has been marked as a duplicate of this bug. ***
Hi all, I just want to have news about this feature ?? Thanks Manuel
Released to HEAD >20080203 PW
In I20080205-0010 PW
Using 't' for the mnemonic wasn't a good idea (see bug 249433).