public Structure showCreateStructureDialog(Program program, Structure structure)
			throws NullPointerException {

		if (program == null) {
			throw new NullPointerException(
				"Cannot show Create Structure dialog without a non-null Program.");
		}

		if (structure == null) {
			throw new NullPointerException(
				"Non-null structure is required when showing the Create Structure dialog.");
		}

		// init the return value, which will be updated if the user presses the OK button
		currentStructure = structure;

		nameTextField.setText(currentStructure.getName());
		updateStatusText(true, currentStructure.getName());
		searchForMatchingStructures(program, structure);

		// modal block
		pluginTool.showDialog(this);

		return currentStructure;
	}
Shows a dialog that allows the user to create a new structure.
<p>
This method expects that {@code program} and {@code structure} be
non-null.

@param  program The current program which will be used to obtain current
        structures in the system.
@param  structure The new structure shell that will be used to find
        matching structures in memory.
@return The new structure that will be added to memory.  This will be
        a new structure with a new name, or an existing structure.
@throws NullPointerException if either of the parameters are null.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateStructureDialog.java