@Override
	public boolean isEnabledForContext(SymbolTreeActionContext context) {

		TreePath[] selectionPaths = context.getSelectedSymbolTreePaths();
		if (selectionPaths.length == 1) {
			Object object = selectionPaths[0].getLastPathComponent();
			if (object instanceof LibrarySymbolNode || object instanceof ImportsCategoryNode) {
				return true;
			}
		}
		return false;
	}
Creates the action for creating a new external location or external function in the 
symbol tree.
@param plugin the symbol tree plugin, which owns this action.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/CreateExternalLocationAction.java