KickJava   Java API By Example, From Geeks To Geeks.

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


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 implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
12
13 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointSetOrganizer;
14 import org.eclipse.jface.action.IAction;
15
16 /**
17  * An action which clears (sets the null) the default breakpoint group.
18  * @see org.eclipse.debug.core.IBreakpointManager#setAutoGroup(String)
19  */

20 public class ClearDefaultBreakpointGroupAction extends BreakpointWorkingSetAction {
21     
22     /* (non-Javadoc)
23      * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
24      */

25     public void run(IAction action) {
26         BreakpointSetOrganizer.setDefaultWorkingSet(null);
27     }
28
29     protected void update() {
30         fAction.setEnabled(BreakpointSetOrganizer.getDefaultWorkingSet() != null);
31     }
32 }
33
Popular Tags