// Path: src/main/java/org/madlonkay/supertmxmerge/util/LocString.java
// public class LocString {
//     
//     private static final ResourceBundle bundle = ResourceBundle.getBundle("org/madlonkay/supertmxmerge/Strings");
//     
//     private static final List<ResourceBundle> moreBundles = new ArrayList<ResourceBundle>();
//     
//     private static final Logger LOGGER = Logger.getLogger(LocString.class.getName());
//     
//     public static String get(String id) {
//         for (int i = moreBundles.size() - 1; i >= 0; i--) {
//             try {
//                 return moreBundles.get(i).getString(id);
//             } catch (MissingResourceException ex) {
//                 LOGGER.log(Level.FINE, "Resource " + id + " not found in supplied resource bundle", ex);
//             }
//         }
//         return bundle.getString(id);
//     }
//     
//     public static String getFormat(String id, Object... var) {
//         return MessageFormat.format(get(id), var);
//     }
//     
//     public static void addBundle(ResourceBundle bundle) {
//         if (bundle == null) {
//             return;
//         }
//         if (!moreBundles.contains(bundle)) {
//             moreBundles.add(bundle);
//         }
//     }
// }


import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.madlonkay.supertmxmerge.util.LocString;
                if (i < args.length - 1) {
                    outputFile = new File(args[i + 1]);
                }
                SuperTmxMerge.combineTo(outputFile, files.toArray(new File[0]));
                return;
            } else if (args.length == 2) {
                SuperTmxMerge.diff(new File(args[0]), new File(args[1]));
                return;
            } else if (args.length == 3) {
                SuperTmxMerge.merge(new File(args[0]), new File(args[1]), new File(args[2]));
                return;
            } else if (args.length == 4) {

                if (args[2].equals("-o")) {
                    SuperTmxMerge.diffTo(new File(args[0]), new File(args[1]), new File(args[3]));
                    return;
                } else {
                    SuperTmxMerge.mergeTo(new File(args[0]), new File(args[1]), new File(args[2]),
                            new File(args[3]));
                    return;
                }
            }

            printUsage();
        } catch (Exception ex) {
            System.err.println(ex.getLocalizedMessage());
        }
    }
    
    private static void printUsage() {
// Path: src/main/java/org/madlonkay/supertmxmerge/util/LocString.java
// public class LocString {
//     
//     private static final ResourceBundle bundle = ResourceBundle.getBundle("org/madlonkay/supertmxmerge/Strings");
//     
//     private static final List<ResourceBundle> moreBundles = new ArrayList<ResourceBundle>();
//     
//     private static final Logger LOGGER = Logger.getLogger(LocString.class.getName());
//     
//     public static String get(String id) {
//         for (int i = moreBundles.size() - 1; i >= 0; i--) {
//             try {
//                 return moreBundles.get(i).getString(id);
//             } catch (MissingResourceException ex) {
//                 LOGGER.log(Level.FINE, "Resource " + id + " not found in supplied resource bundle", ex);
//             }
//         }
//         return bundle.getString(id);
//     }
//     
//     public static String getFormat(String id, Object... var) {
//         return MessageFormat.format(get(id), var);
//     }
//     
//     public static void addBundle(ResourceBundle bundle) {
//         if (bundle == null) {
//             return;
//         }
//         if (!moreBundles.contains(bundle)) {
//             moreBundles.add(bundle);
//         }
//     }
// }


// Path: src/main/java/org/madlonkay/supertmxmerge/Main.java
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.madlonkay.supertmxmerge.util.LocString;

                if (i < args.length - 1) {
                    outputFile = new File(args[i + 1]);
                }
                SuperTmxMerge.combineTo(outputFile, files.toArray(new File[0]));
                return;
            } else if (args.length == 2) {
                SuperTmxMerge.diff(new File(args[0]), new File(args[1]));
                return;
            } else if (args.length == 3) {
                SuperTmxMerge.merge(new File(args[0]), new File(args[1]), new File(args[2]));
                return;
            } else if (args.length == 4) {

                if (args[2].equals("-o")) {
                    SuperTmxMerge.diffTo(new File(args[0]), new File(args[1]), new File(args[3]));
                    return;
                } else {
                    SuperTmxMerge.mergeTo(new File(args[0]), new File(args[1]), new File(args[2]),
                            new File(args[3]));
                    return;
                }
            }

            printUsage();
        } catch (Exception ex) {
            System.err.println(ex.getLocalizedMessage());
        }
    }
    
    private static void printUsage() {
        System.out.print(LocString.get("STM_USAGE_DIRECTIONS"));