1 11 package org.eclipse.ui.console.actions; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.ui.console.ConsolePlugin; 15 import org.eclipse.ui.console.IConsole; 16 import org.eclipse.ui.internal.console.ConsoleMessages; 17 import org.eclipse.ui.internal.console.ConsolePluginImages; 18 import org.eclipse.ui.internal.console.IInternalConsoleConstants; 19 20 28 public class CloseConsoleAction extends Action { 29 30 private IConsole fConsole; 31 32 public CloseConsoleAction(IConsole console) { 33 super(ConsoleMessages.CloseConsoleAction_0, ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLOSE)); 34 setToolTipText(ConsoleMessages.CloseConsoleAction_1); 35 fConsole = console; 36 } 37 38 public void run() { 39 ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole}); 40 } 41 } 42 | Popular Tags |