@Override
	public boolean isEnabledForContext(ActionContext context) {

		Component component = context.getSourceComponent();
		if (component != table) {
			return false;
		}

		Program program = table.getProgram();
		if (program == null) {
			return false;
		}

		if (program.isClosed()) {
			return false;
		}

		int n = table.getSelectedRowCount();
		return n > 0;
	}
The normal constructor for this action.
<p>
The given plugin will be used along with the given table to fire program selection events as
the action is executed.

@param plugin the plugin
@param table the table
Ghidra/Features/Base/src/main/java/ghidra/util/table/actions/MakeProgramSelectionAction.java