<commit_before>package org.sagebionetworks.web.client.widget.entity.renderer;

import org.gwtbootstrap3.client.ui.Alert;
import org.gwtbootstrap3.client.ui.constants.AlertType;
import org.gwtbootstrap3.client.ui.html.Div;
import org.sagebionetworks.web.client.DisplayConstants;
import org.sagebionetworks.web.client.DisplayUtils;
import org.sagebionetworks.web.client.DisplayUtils.ButtonType;
import org.sagebionetworks.web.client.DisplayUtils.MessagePopup;
import org.sagebionetworks.web.client.utils.Callback;
import org.sagebionetworks.web.shared.WidgetConstants;
import org.sagebionetworks.web.shared.WikiPageKey;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

public class SubmitToEvaluationWidgetViewImpl extends FlowPanel implements SubmitToEvaluationWidgetView {
	private Presenter presenter;
	private Div evaluationSubmitterContainer = new Div();
	@Inject
	public SubmitToEvaluationWidgetViewImpl() {
	}
	
	@Override
	public void configure(WikiPageKey wikiKey, String buttonText) {
		this.clear();
		//include the evaluation submitter widget on the page
		add(evaluationSubmitterContainer);
		
		String primaryButtonText = buttonText == null ? WidgetConstants.SUBMIT_TO_CHALLENGE : buttonText;
		Button button = DisplayUtils.createButton(primaryButtonText, ButtonType.PRIMARY);
		button.addClickHandler(new ClickHandler() {			
			@Override
			public void onClick(ClickEvent event) {
				presenter.submitToChallengeClicked();
			}
		});				
		add(button);
	}
	
	@Override
	public void showUnavailable(String message) {
		if (message != null && message.trim().length() > 0) {
			Alert alert = new Alert(SafeHtmlUtils.htmlEscape(message), AlertType.INFO);
			alert.addStyleName("displayInlineBlock");
			add(alert);
		}
	}
	
	@Override
	public void setEvaluationSubmitterWidget(Widget widget) {
		evaluationSubmitterContainer.clear();
		evaluationSubmitterContainer.add(widget);
	}<commit_msg>add space between submit button and neighbors<commit_after>package org.sagebionetworks.web.client.widget.entity.renderer;

import org.gwtbootstrap3.client.ui.Alert;
import org.gwtbootstrap3.client.ui.constants.AlertType;
import org.gwtbootstrap3.client.ui.html.Div;
import org.sagebionetworks.web.client.DisplayConstants;
import org.sagebionetworks.web.client.DisplayUtils;
import org.sagebionetworks.web.client.DisplayUtils.ButtonType;
import org.sagebionetworks.web.client.DisplayUtils.MessagePopup;
import org.sagebionetworks.web.client.utils.Callback;
import org.sagebionetworks.web.shared.WidgetConstants;
import org.sagebionetworks.web.shared.WikiPageKey;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

public class SubmitToEvaluationWidgetViewImpl extends FlowPanel implements SubmitToEvaluationWidgetView {
	private Presenter presenter;
	private Div evaluationSubmitterContainer = new Div();
	@Inject
	public SubmitToEvaluationWidgetViewImpl() {
	}
	
	@Override
	public void configure(WikiPageKey wikiKey, String buttonText) {
		this.clear();
		//include the evaluation submitter widget on the page
		add(evaluationSubmitterContainer);
		
		String primaryButtonText = buttonText == null ? WidgetConstants.SUBMIT_TO_CHALLENGE : buttonText;
		Button button = DisplayUtils.createButton(primaryButtonText, ButtonType.PRIMARY);
		button.addStyleName("margin-5");
		button.addClickHandler(new ClickHandler() {			
			@Override
			public void onClick(ClickEvent event) {
				presenter.submitToChallengeClicked();
			}
		});				
		add(button);
	}
	
	@Override
	public void showUnavailable(String message) {
		if (message != null && message.trim().length() > 0) {
			Alert alert = new Alert(SafeHtmlUtils.htmlEscape(message), AlertType.INFO);
			alert.addStyleName("displayInlineBlock");
			add(alert);
		}
	}
	
	@Override
	public void setEvaluationSubmitterWidget(Widget widget) {
		evaluationSubmitterContainer.clear();
		evaluationSubmitterContainer.add(widget);
	}
{'fraction_non_alphanumeric': 0.10227523746410426, 'fraction_numerical': 0.0019880715705765406, 'mean_word_length': 5.75820895522388, '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': '7666060', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1413, 'n_words': 239}