1 package com.bull.eclipse.jonas.actions; 2 3 7 8 9 import org.eclipse.jface.action.IAction; 10 import org.eclipse.jface.viewers.ISelection; 11 import org.eclipse.ui.IWorkbenchWindow; 12 import org.eclipse.ui.IWorkbenchWindowActionDelegate; 13 14 import com.bull.eclipse.jonas.JonasLauncherPlugin; 15 16 public class RestartActionDelegate implements IWorkbenchWindowActionDelegate { 17 private IWorkbenchWindow window; 18 19 22 public void dispose() { 23 } 24 25 28 public void init(IWorkbenchWindow window) { 29 this.window = window; 30 } 31 32 35 public void run(IAction action) { 36 JonasLauncherPlugin.log(JonasLauncherPlugin.getResourceString("msg.restart")); 37 try { 38 JonasLauncherPlugin.getDefault().getJonasBootstrap().restart(); 39 } catch (Exception ex) { 40 String msg = JonasLauncherPlugin.getResourceString("msg.restart.failed"); 41 JonasLauncherPlugin.log(msg + "/n"); 42 JonasLauncherPlugin.log(ex); 43 } 44 45 } 46 47 50 public void selectionChanged(IAction action, ISelection selection) { 51 52 } 53 54 } 55 56 | Popular Tags |