protected ResourceFile createNewScriptUsingGUI()
			throws InterruptedException, InvocationTargetException {

		pressNewButton();

		chooseJavaProvider();

		SaveDialog saveDialog = waitForDialogComponent(SaveDialog.class);
		pressButtonByText(saveDialog, "OK");
		waitForSwing();

		// initialize our editor variable to the newly opened editor
		editor = waitForComponentProvider(GhidraScriptEditorComponentProvider.class);
		editorTextArea = (JTextArea) findComponentByName(editor.getComponent(),
			GhidraScriptEditorComponentProvider.EDITOR_COMPONENT_NAME);

		waitForSwing();

		return saveDialog.getFile();
	}
This call will:
-open the file in an editor
-update the text area and buffer fields of this test
@param file the file to open
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java