KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > importexport > breakpoints > ImportBreakpoints


1 /*******************************************************************************
2  * Copyright (c)2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.debug.internal.ui.importexport.breakpoints;
13
14 import org.eclipse.debug.core.DebugException;
15 import org.eclipse.debug.internal.ui.DebugUIPlugin;
16 import org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate;
17 import org.eclipse.jface.action.IAction;
18 import org.eclipse.jface.viewers.ISelection;
19 import org.eclipse.jface.wizard.WizardDialog;
20
21 /**
22  * This class provides the aciton event for both the context menu in breakpoints view
23  * and the drop down menu in the breakpoints view.
24  * <p>
25  * The action simply calls the wizard to import breakpoints.
26  * </p>
27  *
28  * @see WizardImportBreakpoints
29  * @see WizardImportBreakpointsPage
30  *
31  * @since 3.2
32  */

33 public class ImportBreakpoints extends AbstractDebugActionDelegate {
34     
35     /**
36      * Opens import wizard
37      *
38      * @param action IAction the action
39      */

40     public void run(IAction action) {
41         WizardImportBreakpoints wiz = new WizardImportBreakpoints();
42         wiz.init(DebugUIPlugin.getDefault().getWorkbench(), null);
43         WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
44         wizdialog.setBlockOnOpen(true);
45         wizdialog.open();
46     }//end run
47

48     /* (non-Javadoc)
49      * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(java.lang.Object)
50      */

51     protected void doAction(Object JavaDoc element) throws DebugException {}
52
53     /* (non-Javadoc)
54      * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#update(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
55      */

56     protected void update(IAction action, ISelection s) {
57         getAction().setEnabled(true);
58     }//end update
59
}//end class
60
Popular Tags