@Override
	public ActionContext getActionContext(MouseEvent event) {

		if (event == null) {
			return null;
		}
		int selectedTab = tabbedPane.getSelectedIndex();

		switch (selectedTab) {
			case FIRST_INSTRUCTION_PANEL_INDEX:
				return new InstructionTreeContext(firstInstPanel);
			case PRE_INSTRUCTION_PANEL_INDEX:
				return new InstructionTreeContext(preInstPanel);
			case RETURN_INSTRUCTION_PANEL_INDEX:
				return new InstructionTreeContext(returnInstPanel);
			case FIRST_BYTES_PANEL_INDEX:
				return new ByteSequenceContext(firstBytesPanel);
			case PRE_BYTES_PANEL_INDEX:
				return new ByteSequenceContext(preBytesPanel);
			case RETURN_BYTES_PANEL_INDEX:
				return new ByteSequenceContext(returnBytesPanel);
			case CLIPBOARD_PANEL_INDEX:
				return new EvaluateContext(clipboard.getLastSelectedObjects());
			default:
				break;
		}

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