private Symbol getExternalSymbol(ActionContext context) {
		Symbol s = null;
		if (context instanceof ProgramSymbolActionContext) {
			ProgramSymbolActionContext symbolContext = (ProgramSymbolActionContext) context;
			if (symbolContext.getSymbolCount() != 1) {
				return null;
			}
			s = symbolContext.getFirstSymbol();
		}
		if (s == null || !s.isExternal()) {
			return null;
		}
		if (s.getSymbolType() == SymbolType.LABEL || s.getSymbolType() == SymbolType.FUNCTION) {
			return s;
		}
		return null;
	}
Creates the action for editing an existing 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/EditExternalLocationAction.java