<commit_before>package org.subshare.gui.localrepo;

import static co.codewizards.cloudstore.core.util.AssertUtil.*;
import static org.subshare.gui.util.FxmlUtil.*;
import javafx.beans.property.adapter.JavaBeanStringProperty;
import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;

import org.subshare.core.repo.LocalRepo;

public class LocalRepoPane extends GridPane {
	private final LocalRepo localRepo;

	@FXML
	private TextField nameTextField;

	@FXML
	private TextField localRootTextField;

	private JavaBeanStringProperty nameProperty;

	public LocalRepoPane(final LocalRepo localRepo) {
		this.localRepo = assertNotNull("localRepo", localRepo);
		loadDynamicComponentFxml(LocalRepoPane.class, this);
		bind();
	}

	private void bind() {
		try {
			nameProperty = JavaBeanStringPropertyBuilder.create()
				    .bean(localRepo)
				    .name(LocalRepo.PropertyEnum.name.name())
				    .build();
			nameTextField.textProperty().bindBidirectional(nameProperty);
		} catch (NoSuchMethodException e) {
			throw new RuntimeException(e);
		}
	}

}<commit_msg>Added comment.<commit_after>package org.subshare.gui.localrepo;

import static co.codewizards.cloudstore.core.util.AssertUtil.*;
import static org.subshare.gui.util.FxmlUtil.*;
import javafx.beans.property.adapter.JavaBeanStringProperty;
import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;

import org.subshare.core.repo.LocalRepo;

public class LocalRepoPane extends GridPane {
	private final LocalRepo localRepo;

	@FXML
	private TextField nameTextField;

	@FXML
	private TextField localRootTextField;

	private JavaBeanStringProperty nameProperty;

	public LocalRepoPane(final LocalRepo localRepo) {
		this.localRepo = assertNotNull("localRepo", localRepo);
		loadDynamicComponentFxml(LocalRepoPane.class, this);
		bind();
	}

	private void bind() {
		try {
			// nameProperty must be kept as field to prevent garbage-collection!
			nameProperty = JavaBeanStringPropertyBuilder.create()
				    .bean(localRepo)
				    .name(LocalRepo.PropertyEnum.name.name())
				    .build();
			nameTextField.textProperty().bindBidirectional(nameProperty);
		} catch (NoSuchMethodException e) {
			throw new RuntimeException(e);
		}
	}

}
{'fraction_non_alphanumeric': 0.09714758164530798, 'fraction_numerical': 0.0, 'mean_word_length': 5.189258312020461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6350568', 'n_tokens_mistral': 772, 'n_tokens_neox': 732, 'n_words': 142}