@Override
			public boolean isValidContext(ActionContext context) {
				if (context instanceof ListingActionContext) {
					ProgramSelection selection =
						((ListingActionContext) context).getNavigatable().getSelection();
					return selection != null && selection.getNumAddressRanges() == 1;
				}
				return false;
			}
A {@link Plugin} that supplies menu items and tasks to import files into Ghidra.
Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterPlugin.java