@Override
	public void locationGenerated(ProgramLocation loc) {

		tool.firePluginEvent(new ProgramLocationPluginEvent("test", loc, program));

		ProgramSelection sel = getCurrentSelection();
		boolean useSelection = (sel != null && !sel.isEmpty());

		Set<DockingActionIf> actions = getDataPluginActions();

		for (DockingActionIf element : actions) {
			MenuData menuBarData = element.getMenuBarData();
			String[] menuPath = menuBarData == null ? null : menuBarData.getMenuPath();
			if (menuPath == null) {
				// TODO: ???
			}
			else if (menuPath.length == 3) {
				assertEquals("Data", menuPath[0]);
				assertEquals("Cycle", menuPath[1]);
				assertTrue(menuPath[2] != null && menuPath[2].startsWith("Cycle:"));
			}
			else {
				assertEquals(2, menuPath.length);
				assertEquals("Data", menuPath[0]);
				assertNotNull(menuPath[1]);
			}
		}

		Address addr = loc.getAddress();
		String caseName = "At " + addr;
		if (!loc.equals(getCurrentLocation())) {
			return;
		}
		Data data = getContextData();

		boolean hasSettings = false;
		boolean editStructOK = false;

		if (useSelection) {
			// Data actions not available if selection contains instructions
			if (program.getListing().getInstructions(sel, true).hasNext()) {
				data = null;
				useSelection = false;
			}
		}
		else if (data != null) {

			DataType dt = data.getBaseDataType();
			hasSettings = (dt.getSettingsDefinitions().length != 0);
			editStructOK = (dt instanceof Structure);

			// Array elements may not be manipulated
			Data pdata = data.getParent();
			if (pdata != null && pdata.isArray()) {
				data = null;
			}
		}

		if (data != null) {

			DataType dt = data.getDataType();
			if (dt instanceof DefaultDataType) {
				checkOnUndefined(actions);
				return;
			}
			else if (dt instanceof Composite) {
				checkOnStructure(actions, -1);
				return;
			}
			else if (dt instanceof Array) {
				checkOnArray(actions, ((Array) dt).getDataType(), -1);
				return;
			}
			else {
				checkOnDefined(actions, dt.getClass());
				return;
			}
		}

		// All actions should be disabled for non-data locations
		checkAction(actions, CREATE_STRUCTURE, false, caseName);
		checkAction(actions, EDIT_DATA_TYPE, editStructOK, caseName);
		checkAction(actions, CREATE_ARRAY, false, caseName);
		checkAction(actions, DEFAULT_SETTINGS, hasSettings, caseName);
		checkAction(actions, DATA_SETTINGS, hasSettings, caseName);
		checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, false, caseName);
		checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, false, caseName);
		checkAction(actions, CYCLE_CHAR_STRING_UNICODE, false, caseName);
		checkAction(actions, DEFINE_BYTE, false, caseName);
		checkAction(actions, DEFINE_WORD, false, caseName);
		checkAction(actions, DEFINE_DWORD, false, caseName);
		checkAction(actions, DEFINE_QWORD, false, caseName);
		checkAction(actions, DEFINE_FLOAT, false, caseName);
		checkAction(actions, DEFINE_DOUBLE, false, caseName);
		checkAction(actions, DEFINE_TERM_CSTRING, false, caseName);
		checkAction(actions, DEFINE_POINTER, false, caseName);

		DockingActionIf recentlyUsedAction = getAction(RECENTLY_USED);
		if (recentlyUsedAction != null) {
			checkAction(recentlyUsedAction, false, caseName);
		}

	}
Test MNEMONIC data setting
@param testDefaultSetting if true test default setting, else test instance setting for data2
@param insideStruct data are inside two structure instances
@param commonStruct data structures are the same type
@param data1 data at some location with same type as data2
@param data2 data at current location
@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java