/**
* This <CODE>Action</CODE> will copy the simple object names of all objects
* currently in the object tree and place on the system clipboard.
*
* @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
*/
/**
* This <CODE>Action</CODE> will copy the qualified object names of all objects
* currently in the object tree and place on the system clipboard.
*
* @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
*/
public class [[#variable18dada80]]extends SquirrelAction implements IObjectTreeAction, CopyObjectNameCommand.ICopyTypes {
/** Logger for this class. */
private final static ILogger s_log = LoggerController.createLogger( [[#variable18dada80]].class );
/** API for the current tree. */
private IObjectTreeAPI _tree;
/**
* Ctor.
*
* @param app Application API.
*/
public [[#variable18dada80]](IApplication app) {
super(app);
}
/**
* Set the current object tree API.
*
* @param tree Current ObjectTree
*/
public void setObjectTree(IObjectTreeAPI tree) {
_tree = tree;
setEnabled(null != _tree);
}
/**
* Perform this action. Use the <TT>CopyObjectNameCommand</TT>.
*
* @param evt The current event.
*/
public void actionPerformed(ActionEvent evt) {
if (_tree != null) {
try {
new CopyObjectNameCommand(_tree, [[#variable18db4c20]]).execute();
}
catch (Throwable
ex) {
final String msg = "Error occured copying object names";
_tree.getSession().showErrorMessage(msg + ": " + ex);
s_log.error(msg, ex);
}
}
}
}
|