KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > actions > breakpointGroups > AdvancedGroupBreakpointsByAction


1 /*******************************************************************************
2  * Copyright (c) 2004, 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 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
12
13 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
14 import org.eclipse.jface.action.Action;
15 import org.eclipse.jface.action.IAction;
16 import org.eclipse.jface.window.Window;
17
18 /**
19  * Action that opens a dialog to select which breakpoint
20  * container factories should be applies to the breakpoints
21  * view.
22  */

23 public class AdvancedGroupBreakpointsByAction extends Action {
24     
25     private BreakpointsView fView;
26     
27     public AdvancedGroupBreakpointsByAction(BreakpointsView view) {
28         super("", IAction.AS_RADIO_BUTTON); //$NON-NLS-1$
29
fView= view;
30     }
31     
32     /* (non-Javadoc)
33      * @see org.eclipse.jface.action.IAction#run()
34      */

35     public void run() {
36         if (isChecked()) {
37             GroupBreakpointsByDialog dialog = new GroupBreakpointsByDialog(fView);
38             if (dialog.open() == Window.OK) {
39                 fView.setBreakpointOrganizers(dialog.getOrganizers());
40             }
41         }
42     }
43
44 }
45
Popular Tags