// Path: src/com/github/kennedyoliveira/ultimatepastebin/i18n/MessageBundle.java
// @Nullable
// public static String getMessage(String key, Object... params) {
//   return CommonBundle.message(getBundle(), key, params);
// }


import com.github.kennedyoliveira.pastebin4j.Paste;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.MutableTreeNode;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Objects;
import static com.github.kennedyoliveira.pastebin4j.PasteExpiration.NEVER;
import static com.github.kennedyoliveira.ultimatepastebin.i18n.MessageBundle.getMessage;
package com.github.kennedyoliveira.ultimatepastebin.ui;




/**
 * Created by kennedy on 11/5/15.
 */
public class PasteNodeUtil {

  private PasteNodeUtil() {}

  private static final DateTimeFormatter DEFAULT_DATETIME_FORMATTER = DateTimeFormatter.ofPattern("dd/MM/yyyy kk:mm");

  /**
   * <p>Creates a {@link MutableTreeNode} representing a {@link Paste} and its infos, wrapping the data in {@link PasteNode} and {@link PasteInfoNode}</p>
   *
   * @param paste The {@link Paste} used to create the nodes.
   * @return a {@link MutableTreeNode} with the info.
   */
  public static MutableTreeNode createNodeForPaste(Paste paste) {
    Objects.requireNonNull(paste);

    final DefaultMutableTreeNode pasteNode = new DefaultMutableTreeNode(new PasteNode(paste));

// Path: src/com/github/kennedyoliveira/ultimatepastebin/i18n/MessageBundle.java
// @Nullable
// public static String getMessage(String key, Object... params) {
//   return CommonBundle.message(getBundle(), key, params);
// }


// Path: src/com/github/kennedyoliveira/ultimatepastebin/ui/PasteNodeUtil.java
import com.github.kennedyoliveira.pastebin4j.Paste;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.MutableTreeNode;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Objects;
import static com.github.kennedyoliveira.pastebin4j.PasteExpiration.NEVER;
import static com.github.kennedyoliveira.ultimatepastebin.i18n.MessageBundle.getMessage;

package com.github.kennedyoliveira.ultimatepastebin.ui;




/**
 * Created by kennedy on 11/5/15.
 */
public class PasteNodeUtil {

  private PasteNodeUtil() {}

  private static final DateTimeFormatter DEFAULT_DATETIME_FORMATTER = DateTimeFormatter.ofPattern("dd/MM/yyyy kk:mm");

  /**
   * <p>Creates a {@link MutableTreeNode} representing a {@link Paste} and its infos, wrapping the data in {@link PasteNode} and {@link PasteInfoNode}</p>
   *
   * @param paste The {@link Paste} used to create the nodes.
   * @return a {@link MutableTreeNode} with the info.
   */
  public static MutableTreeNode createNodeForPaste(Paste paste) {
    Objects.requireNonNull(paste);

    final DefaultMutableTreeNode pasteNode = new DefaultMutableTreeNode(new PasteNode(paste));

    pasteNode.add(new DefaultMutableTreeNode(new PasteInfoNode(getMessage("ultimatepastebin.paste.key", paste.getKey()))));