|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun * Microsystems, Inc. All Rights Reserved. */ package org.openide.actions; import java.util.Locale; import org.openide.ErrorManager; import org.openide.util.HelpCtx; import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.util.actions.ActionPerformer; import org.openide.util.actions.CallbackSystemAction; import org.openide.util.actions.SystemAction; /** Toggle a breakpoint (for example in the Editor). * * @see org.openide.debugger.Debugger#findBreakpoint * @author Jan Jancura */ public class ToggleBreakpointAction extends CallbackSystemAction { /** generated Serialized Version UID */ static final long serialVersionUID = 2293420959009110628L; protected void initialize() { super.initialize(); // XXX revisit: setSurviveFocusChange(true); } /* * Tries to also delegate to the new impl, for compatibility. */ public void setActionPerformer(ActionPerformer p) { super.setActionPerformer(p); try { ClassLoader l = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class); Class c = l.loadClass("org.netbeans.modules.debugger.support.actions.ToggleBreakpointAction"); // NOI18N CallbackSystemAction a = (CallbackSystemAction)SystemAction.get(c); a.setActionPerformer(p); } catch (ClassNotFoundException cnfe) { // Not installed, ignore it. } catch (Exception e) { // Oh well, ignore it. ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } } /* @return the action's icon */ public String getName() { return NbBundle.getBundle("org.openide.deprecated.Bundle", Locale.getDefault(), StepOutAction.class.getClassLoader()).getString("ToggleBreakpoint"); } /* @return the action's help context */ public HelpCtx getHelpCtx() { return new HelpCtx (ToggleBreakpointAction.class); } /* Icon resource. * @return name of resource for icon */ protected String iconResource () { return "org/openide/deprecated/toggleBreakpoint.gif"; // NOI18N } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.