<commit_before>package ui;

import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import model.Model;
import model.TurboIssue;

public class IssuePanelContextMenu {

	private Model model;
	private SidePanel sidePanel;
//	private ColumnControl parentColumnControl;
	private int issueIndex = -1;

	public IssuePanelContextMenu(Model model, SidePanel sidePanel, ColumnControl parentColumnControl, int issueIndex) {
		this.model = model;
		this.sidePanel = sidePanel;
//		this.parentColumnControl = parentColumnControl;
		this.issueIndex  = issueIndex;
	}
	
	public ContextMenu get() {
		ContextMenu menu = new ContextMenu();
		
		MenuItem newChild = new MenuItem("New Child Issue");
		newChild.setOnAction(e -> {
			TurboIssue issue = new TurboIssue("New issue", "", model);
			assert issueIndex != -1;
			issue.setParentIssue(issueIndex);
			sidePanel.triggerIssueCreate(issue);
		});
		menu.getItems().addAll(newChild);
		
		return menu;
	}
	
}<commit_msg>New Child Issue no longer creates an issue with a default title<commit_after>package ui;

import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import model.Model;
import model.TurboIssue;

public class IssuePanelContextMenu {

	private Model model;
	private SidePanel sidePanel;
//	private ColumnControl parentColumnControl;
	private int issueIndex = -1;

	public IssuePanelContextMenu(Model model, SidePanel sidePanel, ColumnControl parentColumnControl, int issueIndex) {
		this.model = model;
		this.sidePanel = sidePanel;
//		this.parentColumnControl = parentColumnControl;
		this.issueIndex  = issueIndex;
	}
	
	public ContextMenu get() {
		ContextMenu menu = new ContextMenu();
		
		MenuItem newChild = new MenuItem("New Child Issue");
		newChild.setOnAction(e -> {
			TurboIssue issue = new TurboIssue("", "", model);
			assert issueIndex != -1;
			issue.setParentIssue(issueIndex);
			sidePanel.triggerIssueCreate(issue);
		});
		menu.getItems().addAll(newChild);
		
		return menu;
	}
	
}
{'fraction_non_alphanumeric': 0.09895052473763119, 'fraction_numerical': 0.001999000499750125, 'mean_word_length': 4.769452449567724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '344642', 'n_tokens_mistral': 646, 'n_tokens_neox': 578, 'n_words': 152}