|
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-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.i18n; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import javax.swing.JMenuItem; import org.openide.filesystems.FileStateInvalidException; import org.openide.loaders.DataFolder; import org.openide.loaders.DataObject; import org.openide.nodes.Node; import org.openide.util.actions.Presenter; import org.openide.util.RequestProcessor; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; /** * I18n group action which is present in nodes Tools popup menu if the nodes * contains some "i18n-izable" data objects. I never presents icon. * * @author Peter Zavadsky */ public class I18nGroupPopupAction extends I18nGroupAction implements Presenter.Popup { /** Generated serial version UID. */ static final long serialVersionUID = -2577653086544960835L; /** * Queried by any popup containg ToolsAction. It does not proxy * to enable(Activated nodes). */ public boolean isEnabled() { //??? if you see here a performance problem please change superclass // to extend NodeAction instead of using hard to understand ad-hoc logic return enable(WindowManager.getDefault().getRegistry().getActivatedNodes()); } /** * Indicates if action becomes enabled based on activated nodes. Implements superclass abstract method. * @return |
... 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.