<commit_before>package com.itmill.toolkit.terminal.gwt.client.ui;

import com.google.gwt.user.client.Command;
import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection;

/**
 *
 */
public abstract class Action implements Command {
	
	protected IActionOwner owner;
	
	protected String iconUrl = null;
	
	protected String caption = "";
	
	public Action(IActionOwner owner) {
		this.owner = owner;
	}
	
	/**
	 * Executed when action fired
	 */
	public abstract void execute();
	
	public String getHTML() {
		StringBuffer sb = new StringBuffer();
		if(getIconUrl() != null) {
			sb.append("<img src=\""+getIconUrl()+"\" alt=\"icon\" />");
		}

		sb.append(getCaption());
		return sb.toString();
	}

	public String getCaption() {
		return caption;
	}

	public void setCaption(String caption) {
		this.caption = caption;
	}
	
	public String getIconUrl() {
		return iconUrl;
	}
}

/**
 * Action owner must provide a set of actions for context menu
 * and IAction objects.
 */
interface IActionOwner {
	
	/**
	 * @return Array of IActions
	 */
	public Action[] getActions();

	public ApplicationConnection getClient();
	
	public String getPaintableId();
}<commit_msg>Refactoring for new package convention.<commit_after>package com.itmill.toolkit.terminal.gwt.client.ui;

import com.google.gwt.user.client.Command;
import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection;

/**
 * 
 */
public abstract class Action implements Command {

	protected ActionOwner owner;

	protected String iconUrl = null;

	protected String caption = "";

	public Action(ActionOwner owner) {
		this.owner = owner;
	}

	/**
	 * Executed when action fired
	 */
	public abstract void execute();

	public String getHTML() {
		StringBuffer sb = new StringBuffer();
		if (getIconUrl() != null) {
			sb.append("<img src=\"" + getIconUrl() + "\" alt=\"icon\" />");
		}

		sb.append(getCaption());
		return sb.toString();
	}

	public String getCaption() {
		return caption;
	}

	public void setCaption(String caption) {
		this.caption = caption;
	}

	public String getIconUrl() {
		return iconUrl;
	}
}

/**
 * Action owner must provide a set of actions for context menu and IAction
 * objects.
 */
interface ActionOwner {

	/**
	 * @return Array of IActions
	 */
	public Action[] getActions();

	public ApplicationConnection getClient();

	public String getPaintableId();
}
{'fraction_non_alphanumeric': 0.12765055131467345, 'fraction_numerical': 0.0, 'mean_word_length': 3.7849898580121706, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2978535', 'n_tokens_mistral': 779, 'n_tokens_neox': 701, 'n_words': 196}