@Test
	public void testStructures2() throws Exception {

		showTool(tool);
		Structure struct = new StructureDataType("aStruct", 0);
		DataType floatDt = new FloatDataType();
		DataTypeComponent dtc = struct.add(floatDt);
		dtc = struct.add(floatDt);
		dtc.setComment("this is another float");
		Listing listing = program.getListing();

		int transactionID = program.startTransaction("test");
		try {
			DataType dt = program.getDataTypeManager()
					.addDataType(struct, DataTypeConflictHandler.DEFAULT_HANDLER);
			floatDt = program.getDataTypeManager()
					.addDataType(new FloatDataType(), DataTypeConflictHandler.DEFAULT_HANDLER);
			listing.createData(addr(0x0100689b), dt);
			listing.createData(addr(0x0100688c), floatDt);
			listing.createData(addr(0x01006890), floatDt);

			Data data = listing.getDataAt(addr(0x0100688c));
			data.setComment(CommentType.EOL, "this is a float data type");
			data = listing.getDataAt(addr(0x01006890));
			data.setComment(CommentType.EOL, "this is another float data type");

		}
		finally {
			program.endTransaction(transactionID, true);
		}
		program.flushEvents();
		waitForSwing();

		// open the structure
		cb.goToField(addr(0x0100689b), "+", 0, 0);
		click(cb, 1);
		waitForSwing();

		ProgramSelection sel = new ProgramSelection(addr(0x0100688c), addr(0x0100689f));
		tool.firePluginEvent(new ProgramSelectionPluginEvent("test", sel, program));
		SearchOptions options = new SearchOptions("float", false, true, false); // all fields

		ProgramLocation startLoc = new EolCommentFieldLocation(program, addr(0x0100688c), null,
			new String[] { "this is a float data type" }, 0, 3, 0);
		searcher =
			new ListingDisplaySearcher(tool, program, startLoc, sel, options, TaskMonitor.DUMMY);

		ProgramLocation loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x0100688c), loc.getByteAddress());
		assertTrue(loc instanceof CommentFieldLocation);
		//
		assertTrue("Search result not found: " + addr(0x01006890), searcher.hasNext());
		loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x01006890), loc.getByteAddress());
		assertTrue(loc instanceof MnemonicFieldLocation);
		MnemonicFieldLocation mloc = (MnemonicFieldLocation) loc;
		assertEquals("float", mloc.getMnemonic());
		//
		assertTrue("Search result not found: " + addr(0x01006890), searcher.hasNext());
		loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x01006890), loc.getByteAddress());
		assertTrue(loc instanceof CommentFieldLocation);
		//
		assertTrue("Search result not found: " + addr(0x0100689b), searcher.hasNext());
		loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x0100689b), loc.getByteAddress());
		assertTrue(loc instanceof MnemonicFieldLocation);
		mloc = (MnemonicFieldLocation) loc;
		assertEquals("float", mloc.getMnemonic());
		//
		assertTrue("Search result not found: " + addr(0x0100689f), searcher.hasNext());
		loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x0100689f), loc.getByteAddress());
		assertTrue(loc instanceof MnemonicFieldLocation);
		mloc = (MnemonicFieldLocation) loc;
		assertEquals("float", mloc.getMnemonic());
		//
		assertTrue("Search result not found: " + addr(0x0100689f), searcher.hasNext());
		loc = searcher.next().programLocation();
		assertNotNull(loc);
		assertEquals(addr(0x0100689f), loc.getByteAddress());
		assertTrue(loc instanceof CommentFieldLocation);

		assertTrue(!searcher.hasNext());
		assertNull(searcher.next());
	}
Test the searcher that searches fields in the Code Browser
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcherTest.java