Projects >> sip-creator >>2cc318ff2e13ebadad3a29c87df0d1320d571904

Chunk
Conflicting content
        }
    }

<<<<<<< HEAD
    private static class Launcher extends AbstractAction implements Swing {
        private String[] args;
        private Set instances = new TreeSet();

        private Launcher(String[] args) {
            super("New Application Instance");
            this.args = args;
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            new Thread(this).start(); // todo: this whole launcher should change
        }

        @Override
        public void run() {
            final File storageDirectory = StorageFinder.getStorageDirectory(args);
            if (storageDirectory == null) return;
            try {
                int instance = 1;
                while (instances.contains(String.valueOf(instance))) instance++;
                Application application = new Application(storageDirectory, this, String.valueOf(instance));
                application.home.setVisible(true);
                application.allFrames.restore();
            }
            catch (StorageException e) {
                JOptionPane.showMessageDialog(null, "Unable to create the storage directory");
                e.printStackTrace();
=======
//    private static class Launcher extends AbstractAction implements Runnable {
//        private String[] args;
//        private Set instances = new TreeSet();
//
//        private Launcher(String[] args) {
//            super("New Application Instance");
//            this.args = args;
//        }
//
//        @Override
//        public void actionPerformed(ActionEvent e) {
//            Exec.swingAny(this);
//        }
//
//        @Override
//        public void run() {
//            final File storageDirectory = StorageFinder.getStorageDirectory(args);
//            if (storageDirectory == null) return;
//            try {
//                int instance = 1;
//                while (instances.contains(String.valueOf(instance))) instance++;
//                Application application = new Application(storageDirectory, this, String.valueOf(instance));
//                application.home.setVisible(true);
//                application.allFrames.restore();
//            }
//            catch (StorageException e) {
//                JOptionPane.showMessageDialog(null, "Unable to create the storage directory");
//                e.printStackTrace();
//            }
//        }
//    }

    // todo: this is for later.  just one instance now

    private static Set instances = new TreeSet();

    public static void main(final String[] args) throws StorageException {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                final File storageDirectory = StorageFinder.getStorageDirectory(args);
                if (storageDirectory == null) return;
                try {
                    int instance = 1;
                    while (instances.contains(String.valueOf(instance))) instance++;
                    Application application = new Application(storageDirectory, String.valueOf(instance));
                    application.home.setVisible(true);
                    application.allFrames.restore();
                }
                catch (StorageException e) {
                    JOptionPane.showMessageDialog(null, "Unable to create the storage directory");
                    e.printStackTrace();
                }
>>>>>>> 254b37fd35a1505e17ec6e55b91c1e0691681949
            }
        });
    }
Solution content
        }
    }

//    private static class Launcher extends AbstractAction implements Swing {
//        private String[] args;
//        private Set instances = new TreeSet();
//
//    // todo: this is for later.  just one instance now
//
//        @Override
//        public void actionPerformed(ActionEvent e) {
//            new Thread(this).start(); // todo: this whole launcher should change
//        }
//    }

    public static void main(final String[] args) throws StorageException {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                final File storageDirectory = StorageFinder.getStorageDirectory(args);
                if (storageDirectory == null) return;
                try {
                    int instance = 1;
                    Application application = new Application(storageDirectory, String.valueOf(instance));
                    application.home.setVisible(true);
                    application.allFrames.restore();
                }
                catch (StorageException e) {
                    JOptionPane.showMessageDialog(null, "Unable to create the storage directory");
                    e.printStackTrace();
                }
            }
        });
    }
File
Application.java
Developer's decision
Manual
Kind of conflict
Annotation
Attribute
Catch clause
Class signature
Comment
If statement
Method declaration
Method invocation
Method signature
Try statement
Variable
While statement
Chunk
Conflicting content
    public TargetFrame(JDesktopPane desktop, final SipModel sipModel) {
        super(Which.TARGET, desktop, sipModel, "Target", false);
<<<<<<< HEAD
        sipModel.getMappingModel().addSetListener(new MappingModel.SetListener() {
            @Override
            public void recMappingSet(MappingModel mappingModel) {
                exec(new TreeUpdater(mappingModel.hasRecMapping() ? mappingModel.getRecMapping().getPrefix() : "?"));
            }
        });
=======
>>>>>>> 254b37fd35a1505e17ec6e55b91c1e0691681949
        createRecDefTree(sipModel);
        timer.setRepeats(false);
        recDefTree.setDropMode(DropMode.ON);
Solution content
    public TargetFrame(JDesktopPane desktop, final SipModel sipModel) {
        super(Which.TARGET, desktop, sipModel, "Target", false);
        createRecDefTree(sipModel);
        timer.setRepeats(false);
        recDefTree.setDropMode(DropMode.ON);
File
TargetFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import eu.delving.metadata.NodeMapping;
import eu.delving.metadata.Path;
<<<<<<< HEAD
import eu.delving.sip.base.Swing;
=======
import eu.delving.sip.base.Exec;
import eu.delving.sip.files.DataSetState;
>>>>>>> 254b37fd35a1505e17ec6e55b91c1e0691681949
import eu.delving.sip.files.Storage;

import javax.swing.tree.TreePath;
Solution content
import eu.delving.metadata.NodeMapping;
import eu.delving.metadata.Path;
import eu.delving.sip.base.Swing;
import eu.delving.sip.base.Work;
import eu.delving.sip.files.DataSetState;
import eu.delving.sip.files.Storage;

import javax.swing.tree.TreePath;
File
CreateModel.java
Developer's decision
Manual
Kind of conflict
Import