private void updatePanel() {
		int selectedTab = tabbedPane.getSelectedIndex();

		//set the number of files and the number of functions 
		numFunctionsField.setText(Integer.toString(patternReader.getNumFuncs()));
		numFilesField.setText(Integer.toString(patternReader.getNumFiles()));

		//set the gathering info fields
		DataGatheringParams params = patternReader.getDataGatheringParams();
		firstInstructionsField.setText(Integer.toString(params.getNumFirstInstructions()));
		preInstructionsField.setText(Integer.toString(params.getNumPreInstructions()));
		returnInstructionsField.setText(Integer.toString(params.getNumReturnInstructions()));
		firstBytesField.setText(Integer.toString(params.getNumFirstBytes()));
		preBytesField.setText(Integer.toString(params.getNumPreBytes()));
		returnBytesField.setText(Integer.toString(params.getNumReturnBytes()));

		//update context register info
		tabbedPane.removeTabAt(CONTEXT_REGISTER_PANEL_INDEX);
		contextRegisterPanel =
			new ContextRegisterPanelBuilder(patternReader.getContextRegisterExtent().toString());
		tabbedPane.insertTab(CONTEXT_REGISTER_TITLE, null,
			contextRegisterPanel.buildContextRegisterPanel(), null, CONTEXT_REGISTER_PANEL_INDEX);

		//update the tree of first instructions
		firstInstPanel.setFsReaderAndUpdateExtent(patternReader);

		//update the tree of pre instructions
		preInstPanel.setFsReaderAndUpdateExtent(patternReader);

		//update the tree of return instructions
		returnInstPanel.setFsReaderAndUpdateExtent(patternReader);

		//enable the analyze sequence buttons
		//these should only be null if no xml has been loaded (i.e. on startup, or if the user selected
		//a directory with no xml files)
		if (!firstInstPanel.isTreeEmpty()) {
			firstInstPanel.enablePercentageFilterButtons(true);
		}
		if (!preInstPanel.isTreeEmpty()) {
			preInstPanel.enablePercentageFilterButtons(true);
		}

		//update the first bytes panel
		firstBytesPanel.setFsReader(patternReader);
		firstBytesPanel.enableLengthFilterButtons(true);

		//update the pre bytes panel
		preBytesPanel.setFsReader(patternReader);
		preBytesPanel.enableLengthFilterButtons(true);

		//update the return bytes panel
		returnBytesPanel.setFsReader(patternReader);
		returnBytesPanel.enableLengthFilterButtons(true);

		//update the alignment information	
		alignmentPanel.resetModulus();
		alignmentPanel.updateExtentAndClearFilter(patternReader.getContextRegisterExtent());
		alignmentPanel.setFsReader(patternReader);
		alignmentPanel.updateAlignmentPanel();

		//enable or disable the context register filter buttons
		boolean shouldBeOn =
			(!patternReader.getContextRegisterExtent().getContextRegisters().isEmpty());
		firstInstPanel.enableFilterButtons(shouldBeOn);
		preInstPanel.enableFilterButtons(shouldBeOn);
		alignmentPanel.enableFilterButtons(shouldBeOn);
		firstBytesPanel.enableFilterButtons(shouldBeOn);
		preBytesPanel.enableFilterButtons(shouldBeOn);
		returnInstPanel.enableFilterButtons(shouldBeOn);
		returnBytesPanel.enableFilterButtons(shouldBeOn);

		//restore the selected tab
		tabbedPane.setSelectedIndex(selectedTab);

		//clear any patterns in the clipboard
		plugin.clearPatterns();
		clipboard.updateClipboard();

		return;
	}
Removes the action from the tool.
Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/FunctionBitPatternsMainProvider.java