protected void checkOnStructure(Set<DockingActionIf> actions, int structSize) {

		if (actions == null) {
			actions = getDataPluginActions();
		}

		Data d = getContextData();
		assertNotNull("Expected Structure", d);
		assertTrue("Expected Structure", d.isStructure());
		DataType dt = d.getDataType();
		assertTrue("Expected Structure", Structure.class.isInstance(dt));

		String caseName = "On Structure at: " + getCurrentLocation();

		if (structSize >= 0) {
			assertEquals(structSize, dt.getLength());
		}

		ProgramSelection sel = getCurrentSelection();

		boolean hasSelection = sel != null && !sel.isEmpty();
		boolean hasInteriorSelection = hasSelection && sel.getInteriorSelection() != null;
		boolean hasNormalUnitSelection = hasSelection && !hasInteriorSelection;

		checkAction(actions, CREATE_STRUCTURE, sel != null && !sel.isEmpty(), caseName);
		checkAction(actions, EDIT_DATA_TYPE, true, caseName);
		checkAction(actions, CREATE_ARRAY, true, caseName);
		checkAction(actions, DEFAULT_SETTINGS, false, caseName);
		checkAction(actions, DATA_SETTINGS, hasNormalUnitSelection, caseName);
		checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true, caseName);
		checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, true, caseName);
		checkAction(actions, CYCLE_CHAR_STRING_UNICODE, true, caseName);
		checkAction(actions, DEFINE_BYTE, true, caseName);
		checkAction(actions, DEFINE_WORD, true, caseName);
		checkAction(actions, DEFINE_DWORD, true, caseName);
		checkAction(actions, DEFINE_QWORD, true, caseName);
		checkAction(actions, DEFINE_FLOAT, true, caseName);
		checkAction(actions, DEFINE_DOUBLE, true, caseName);
		checkAction(actions, DEFINE_TERM_CSTRING, true, caseName);
		checkAction(actions, DEFINE_POINTER, true, caseName);

	}
Check actions on structure
@param actions
@param structSize structure size or -1 to disable size check
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java