* Organize Imports

This commit is contained in:
Reinhard Pointner 2013-09-11 17:22:00 +00:00
parent 3a8d8d22d5
commit 169959c813
30 changed files with 107 additions and 199 deletions

View File

@ -2,11 +2,9 @@
package net.sourceforge.filebot;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static net.sourceforge.filebot.Settings.getApplicationName;
import static net.sourceforge.filebot.Settings.getApplicationProperty;
import static net.sourceforge.filebot.Settings.getApplicationVersion;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.Settings.*;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -2,11 +2,19 @@
package net.sourceforge.filebot.archive;
import java.io.*;
import java.util.*;
import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.HashMap;
import java.util.Map;
import net.sf.sevenzipjbinding.*;
import net.sf.sevenzipjbinding.impl.*;
import net.sf.sevenzipjbinding.IArchiveOpenCallback;
import net.sf.sevenzipjbinding.IArchiveOpenVolumeCallback;
import net.sf.sevenzipjbinding.IInStream;
import net.sf.sevenzipjbinding.PropID;
import net.sf.sevenzipjbinding.SevenZipException;
import net.sf.sevenzipjbinding.impl.RandomAccessFileInStream;
class ArchiveOpenVolumeCallback implements IArchiveOpenVolumeCallback, IArchiveOpenCallback, Closeable {

View File

@ -2,7 +2,9 @@
package net.sourceforge.filebot.archive;
import java.io.*;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
public interface ExtractOutProvider {

View File

@ -2,9 +2,12 @@
package net.sourceforge.filebot.archive;
import java.io.*;
import java.io.Closeable;
import java.io.IOException;
import java.io.OutputStream;
import net.sf.sevenzipjbinding.*;
import net.sf.sevenzipjbinding.ISequentialOutStream;
import net.sf.sevenzipjbinding.SevenZipException;
class ExtractOutStream implements ISequentialOutStream, Closeable {

View File

@ -1,59 +1,16 @@
package net.sourceforge.filebot.cli;
import static java.lang.String.format;
import static java.util.Arrays.asList;
import static java.util.Collections.addAll;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;
import static java.util.Collections.sort;
import static net.sourceforge.filebot.MediaTypes.AUDIO_FILES;
import static net.sourceforge.filebot.MediaTypes.NFO_FILES;
import static net.sourceforge.filebot.MediaTypes.SUBTITLE_FILES;
import static net.sourceforge.filebot.MediaTypes.VIDEO_FILES;
import static net.sourceforge.filebot.Settings.isUnixFS;
import static net.sourceforge.filebot.Settings.useExtendedFileAttributes;
import static net.sourceforge.filebot.WebServices.AcoustID;
import static net.sourceforge.filebot.WebServices.TheTVDB;
import static net.sourceforge.filebot.WebServices.getEpisodeListProvider;
import static net.sourceforge.filebot.WebServices.getMovieIdentificationService;
import static net.sourceforge.filebot.WebServices.getMusicIdentificationService;
import static net.sourceforge.filebot.cli.CLILogging.CLILogger;
import static net.sourceforge.filebot.hash.VerificationUtilities.computeHash;
import static net.sourceforge.filebot.hash.VerificationUtilities.getHashType;
import static net.sourceforge.filebot.hash.VerificationUtilities.getHashTypeByExtension;
import static net.sourceforge.filebot.media.MediaDetection.detectMovie;
import static net.sourceforge.filebot.media.MediaDetection.detectSeriesNames;
import static net.sourceforge.filebot.media.MediaDetection.getClutterFileFilter;
import static net.sourceforge.filebot.media.MediaDetection.grepMovie;
import static net.sourceforge.filebot.media.MediaDetection.guessMovieFolder;
import static net.sourceforge.filebot.media.MediaDetection.isDiskFolder;
import static net.sourceforge.filebot.media.MediaDetection.isEpisode;
import static net.sourceforge.filebot.media.MediaDetection.mapSeriesNamesByFiles;
import static net.sourceforge.filebot.media.MediaDetection.stripReleaseInfo;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.exportSubtitles;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.fetchSubtitle;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.findSubtitles;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.formatSubtitle;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.getSubtitleFormatByName;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.matchSubtitles;
import static net.sourceforge.tuned.FileUtilities.FILES;
import static net.sourceforge.tuned.FileUtilities.FOLDERS;
import static net.sourceforge.tuned.FileUtilities.containsOnly;
import static net.sourceforge.tuned.FileUtilities.createTextReader;
import static net.sourceforge.tuned.FileUtilities.filter;
import static net.sourceforge.tuned.FileUtilities.getExtension;
import static net.sourceforge.tuned.FileUtilities.getName;
import static net.sourceforge.tuned.FileUtilities.isDerived;
import static net.sourceforge.tuned.FileUtilities.isInvalidFilePath;
import static net.sourceforge.tuned.FileUtilities.listPath;
import static net.sourceforge.tuned.FileUtilities.mapByExtension;
import static net.sourceforge.tuned.FileUtilities.mapByFolder;
import static net.sourceforge.tuned.FileUtilities.normalizePathSeparators;
import static net.sourceforge.tuned.FileUtilities.not;
import static net.sourceforge.tuned.FileUtilities.validateFileName;
import static net.sourceforge.tuned.FileUtilities.validateFilePath;
import static net.sourceforge.tuned.FileUtilities.writeFile;
import static java.lang.String.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.MediaTypes.*;
import static net.sourceforge.filebot.Settings.*;
import static net.sourceforge.filebot.WebServices.*;
import static net.sourceforge.filebot.cli.CLILogging.*;
import static net.sourceforge.filebot.hash.VerificationUtilities.*;
import static net.sourceforge.filebot.media.MediaDetection.*;
import static net.sourceforge.filebot.subtitle.SubtitleUtilities.*;
import static net.sourceforge.tuned.FileUtilities.*;
import java.io.File;
import java.io.FileFilter;

View File

@ -1,26 +1,16 @@
package net.sourceforge.filebot.format;
import static java.util.Arrays.asList;
import static java.util.Arrays.sort;
import static java.util.Collections.singleton;
import static net.sourceforge.filebot.MediaTypes.SUBTITLE_FILES;
import static net.sourceforge.filebot.MediaTypes.VIDEO_FILES;
import static net.sourceforge.filebot.Settings.useExtendedFileAttributes;
import static net.sourceforge.filebot.format.Define.undefined;
import static net.sourceforge.filebot.hash.VerificationUtilities.computeHash;
import static net.sourceforge.filebot.hash.VerificationUtilities.getEmbeddedChecksum;
import static net.sourceforge.filebot.hash.VerificationUtilities.getHashFromVerificationFile;
import static net.sourceforge.filebot.media.MediaDetection.releaseInfo;
import static net.sourceforge.filebot.media.MediaDetection.stripReleaseInfo;
import static net.sourceforge.filebot.similarity.Normalization.removeTrailingBrackets;
import static net.sourceforge.filebot.web.EpisodeFormat.SeasonEpisode;
import static net.sourceforge.tuned.FileUtilities.filter;
import static net.sourceforge.tuned.FileUtilities.hasExtension;
import static net.sourceforge.tuned.FileUtilities.isDerived;
import static net.sourceforge.tuned.FileUtilities.listFiles;
import static net.sourceforge.tuned.FileUtilities.readFile;
import static net.sourceforge.tuned.FileUtilities.replacePathSeparators;
import static net.sourceforge.tuned.StringUtilities.join;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.MediaTypes.*;
import static net.sourceforge.filebot.Settings.*;
import static net.sourceforge.filebot.format.Define.*;
import static net.sourceforge.filebot.hash.VerificationUtilities.*;
import static net.sourceforge.filebot.media.MediaDetection.*;
import static net.sourceforge.filebot.similarity.Normalization.*;
import static net.sourceforge.filebot.web.EpisodeFormat.*;
import static net.sourceforge.tuned.FileUtilities.*;
import static net.sourceforge.tuned.StringUtilities.*;
import java.io.File;
import java.io.IOException;

View File

@ -7,9 +7,9 @@ import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.logging.Logger;

View File

@ -1,22 +1,12 @@
package net.sourceforge.filebot.media;
import static java.util.Collections.addAll;
import static java.util.Collections.emptyList;
import static java.util.Collections.reverseOrder;
import static java.util.Collections.singleton;
import static java.util.Collections.sort;
import static java.util.Collections.synchronizedMap;
import static java.util.regex.Pattern.compile;
import static net.sourceforge.filebot.MediaTypes.NFO_FILES;
import static net.sourceforge.filebot.Settings.useExtendedFileAttributes;
import static net.sourceforge.filebot.similarity.CommonSequenceMatcher.getLenientCollator;
import static net.sourceforge.filebot.similarity.Normalization.normalizeBrackets;
import static net.sourceforge.filebot.similarity.Normalization.normalizePunctuation;
import static net.sourceforge.tuned.FileUtilities.filter;
import static net.sourceforge.tuned.FileUtilities.getName;
import static net.sourceforge.tuned.FileUtilities.listFiles;
import static net.sourceforge.tuned.FileUtilities.mapByFolder;
import static net.sourceforge.tuned.FileUtilities.readFile;
import static java.util.Collections.*;
import static java.util.regex.Pattern.*;
import static net.sourceforge.filebot.MediaTypes.*;
import static net.sourceforge.filebot.Settings.*;
import static net.sourceforge.filebot.similarity.CommonSequenceMatcher.*;
import static net.sourceforge.filebot.similarity.Normalization.*;
import static net.sourceforge.tuned.FileUtilities.*;
import java.io.File;
import java.io.FileFilter;

View File

@ -1,16 +1,13 @@
package net.sourceforge.filebot.media;
import static java.lang.Integer.parseInt;
import static java.util.Arrays.asList;
import static java.util.Arrays.copyOfRange;
import static java.util.Collections.unmodifiableMap;
import static java.util.ResourceBundle.getBundle;
import static java.util.regex.Pattern.CASE_INSENSITIVE;
import static java.util.regex.Pattern.UNICODE_CASE;
import static java.util.regex.Pattern.compile;
import static net.sourceforge.filebot.similarity.Normalization.normalizePunctuation;
import static net.sourceforge.tuned.FileUtilities.readCSV;
import static net.sourceforge.tuned.StringUtilities.join;
import static java.lang.Integer.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.util.ResourceBundle.*;
import static java.util.regex.Pattern.*;
import static net.sourceforge.filebot.similarity.Normalization.*;
import static net.sourceforge.tuned.FileUtilities.*;
import static net.sourceforge.tuned.StringUtilities.*;
import java.io.File;
import java.io.FileFilter;

View File

@ -1,23 +1,12 @@
package net.sourceforge.filebot.similarity;
import static java.lang.Math.ceil;
import static java.lang.Math.floor;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;
import static java.util.Collections.singleton;
import static java.util.Collections.synchronizedMap;
import static net.sourceforge.filebot.Settings.useExtendedFileAttributes;
import static net.sourceforge.filebot.similarity.Normalization.normalizePunctuation;
import static net.sourceforge.filebot.similarity.Normalization.removeEmbeddedChecksum;
import static net.sourceforge.filebot.similarity.Normalization.removeTrailingBrackets;
import static net.sourceforge.tuned.FileUtilities.getName;
import static net.sourceforge.tuned.FileUtilities.getNameWithoutExtension;
import static net.sourceforge.tuned.FileUtilities.getRelativePathTail;
import static net.sourceforge.tuned.FileUtilities.normalizePathSeparators;
import static net.sourceforge.tuned.StringUtilities.join;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.Settings.*;
import static net.sourceforge.filebot.similarity.Normalization.*;
import static net.sourceforge.tuned.FileUtilities.*;
import static net.sourceforge.tuned.StringUtilities.*;
import java.io.File;
import java.io.IOException;

View File

@ -2,11 +2,9 @@
package net.sourceforge.filebot.similarity;
import static java.util.Arrays.asList;
import static java.util.Collections.singleton;
import static java.util.regex.Pattern.CASE_INSENSITIVE;
import static java.util.regex.Pattern.UNICODE_CASE;
import static java.util.regex.Pattern.compile;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.util.regex.Pattern.*;
import java.io.File;
import java.util.ArrayList;

View File

@ -1,6 +1,6 @@
package net.sourceforge.filebot.similarity;
import static net.sourceforge.filebot.similarity.Normalization.normalizePunctuation;
import static net.sourceforge.filebot.similarity.Normalization.*;
public class SubstringMetric implements SimilarityMetric {

View File

@ -11,8 +11,8 @@ import java.util.regex.Pattern;
import javax.swing.BorderFactory;
import javax.swing.JSpinner;
import javax.swing.SwingConstants;
import javax.swing.JSpinner.DefaultEditor;
import javax.swing.SwingConstants;
import javax.swing.text.DefaultFormatter;
import javax.swing.text.DefaultFormatterFactory;

View File

@ -25,10 +25,10 @@ import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.JSpinner.NumberEditor;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.SpinnerNumberModel;
import javax.swing.JSpinner.NumberEditor;
import net.miginfocom.swing.MigLayout;
import net.sourceforge.filebot.format.ExpressionFormat;

View File

@ -14,13 +14,12 @@ import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.ListSelectionModel;
import ca.odell.glazedlists.EventList;
import net.miginfocom.swing.MigLayout;
import net.sourceforge.filebot.ResourceManager;
import net.sourceforge.filebot.ui.FileBotList;
import net.sourceforge.filebot.ui.transfer.LoadAction;
import net.sourceforge.filebot.ui.transfer.TransferablePolicy;
import ca.odell.glazedlists.EventList;
class RenameList<E> extends FileBotList<E> {

View File

@ -11,7 +11,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import net.sourceforge.tuned.ByteBufferOutputStream;
import de.innosystec.unrar.Archive;
import de.innosystec.unrar.exception.RarException;
import de.innosystec.unrar.rarfile.FileHeader;

View File

@ -1,12 +1,8 @@
package net.sourceforge.filebot.web;
import static net.sourceforge.filebot.web.EpisodeUtilities.sortEpisodes;
import static net.sourceforge.filebot.web.WebRequest.getDocument;
import static net.sourceforge.tuned.XPathUtilities.getAttribute;
import static net.sourceforge.tuned.XPathUtilities.getChild;
import static net.sourceforge.tuned.XPathUtilities.getTextContent;
import static net.sourceforge.tuned.XPathUtilities.selectNodes;
import static net.sourceforge.tuned.XPathUtilities.selectString;
import static net.sourceforge.filebot.web.EpisodeUtilities.*;
import static net.sourceforge.filebot.web.WebRequest.*;
import static net.sourceforge.tuned.XPathUtilities.*;
import java.net.URI;
import java.net.URISyntaxException;

View File

@ -2,9 +2,7 @@
package net.sourceforge.filebot.web;
import static java.util.Calendar.DAY_OF_MONTH;
import static java.util.Calendar.MONTH;
import static java.util.Calendar.YEAR;
import static java.util.Calendar.*;
import java.io.Serializable;
import java.text.ParseException;

View File

@ -2,9 +2,8 @@
package net.sourceforge.filebot.web;
import static net.sourceforge.filebot.web.WebRequest.getDocument;
import static net.sourceforge.tuned.XPathUtilities.getAttribute;
import static net.sourceforge.tuned.XPathUtilities.selectNodes;
import static net.sourceforge.filebot.web.WebRequest.*;
import static net.sourceforge.tuned.XPathUtilities.*;
import java.io.File;
import java.io.Serializable;

View File

@ -2,13 +2,8 @@
package net.sourceforge.filebot.web;
import static net.sourceforge.filebot.web.WebRequest.encode;
import static net.sourceforge.filebot.web.WebRequest.getDocument;
import static net.sourceforge.filebot.web.WebRequest.getHtmlDocument;
import static net.sourceforge.filebot.web.WebRequest.getReader;
import static net.sourceforge.tuned.XPathUtilities.getAttribute;
import static net.sourceforge.tuned.XPathUtilities.selectNodes;
import static net.sourceforge.tuned.XPathUtilities.selectString;
import static net.sourceforge.filebot.web.WebRequest.*;
import static net.sourceforge.tuned.XPathUtilities.*;
import java.io.File;
import java.io.FileNotFoundException;

View File

@ -1,8 +1,7 @@
package net.sourceforge.filebot.web;
import static java.util.Collections.singleton;
import static java.util.Collections.sort;
import static net.sourceforge.filebot.similarity.Normalization.normalizePunctuation;
import static java.util.Collections.*;
import static net.sourceforge.filebot.similarity.Normalization.*;
import java.util.AbstractList;
import java.util.AbstractMap.SimpleEntry;

View File

@ -1,8 +1,7 @@
package net.sourceforge.filebot.web;
import static net.sourceforge.filebot.web.EpisodeUtilities.sortEpisodes;
import static net.sourceforge.filebot.web.WebRequest.createIgnoreCertificateSocketFactory;
import static net.sourceforge.filebot.web.WebRequest.getReader;
import static net.sourceforge.filebot.web.EpisodeUtilities.*;
import static net.sourceforge.filebot.web.WebRequest.*;
import java.io.IOException;
import java.io.Reader;

View File

@ -1,9 +1,8 @@
package net.sourceforge.filebot.web;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonMap;
import static java.util.Collections.unmodifiableList;
import static net.sourceforge.filebot.web.WebRequest.encodeParameters;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.web.WebRequest.*;
import java.io.File;
import java.io.FileNotFoundException;

View File

@ -1,15 +1,9 @@
package net.sourceforge.filebot.web;
import static java.util.Arrays.asList;
import static net.sourceforge.filebot.web.EpisodeUtilities.filterBySeason;
import static net.sourceforge.filebot.web.EpisodeUtilities.sortEpisodes;
import static net.sourceforge.filebot.web.WebRequest.encode;
import static net.sourceforge.filebot.web.WebRequest.getDocument;
import static net.sourceforge.tuned.XPathUtilities.getIntegerContent;
import static net.sourceforge.tuned.XPathUtilities.getTextContent;
import static net.sourceforge.tuned.XPathUtilities.selectNode;
import static net.sourceforge.tuned.XPathUtilities.selectNodes;
import static net.sourceforge.tuned.XPathUtilities.selectString;
import static java.util.Arrays.*;
import static net.sourceforge.filebot.web.EpisodeUtilities.*;
import static net.sourceforge.filebot.web.WebRequest.*;
import static net.sourceforge.tuned.XPathUtilities.*;
import java.io.FileNotFoundException;
import java.io.Serializable;

View File

@ -2,10 +2,6 @@
package net.sourceforge.filebot;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import net.sourceforge.filebot.format.ExpressionFormatTest;
import net.sourceforge.filebot.hash.VerificationFormatTest;
import net.sourceforge.filebot.media.ReleaseInfoTest;
@ -15,6 +11,10 @@ import net.sourceforge.filebot.subtitle.SubtitleReaderTestSuite;
import net.sourceforge.filebot.ui.rename.MatchModelTest;
import net.sourceforge.filebot.web.WebTestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses( { SimilarityTestSuite.class, WebTestSuite.class, ExpressionFormatTest.class, VerificationFormatTest.class, MatchModelTest.class, EpisodeMetricsTest.class, SubtitleReaderTestSuite.class, ReleaseInfoTest.class })

View File

@ -1,8 +1,8 @@
package net.sourceforge.filebot.similarity;
import static java.util.Arrays.asList;
import static net.sourceforge.filebot.similarity.SeasonEpisodeMatcher.SxE.UNDEFINED;
import static org.junit.Assert.assertEquals;
import static java.util.Arrays.*;
import static net.sourceforge.filebot.similarity.SeasonEpisodeMatcher.SxE.*;
import static org.junit.Assert.*;
import net.sourceforge.filebot.similarity.SeasonEpisodeMatcher.SxE;
import org.junit.Test;

View File

@ -3,11 +3,10 @@ package net.sourceforge.filebot.similarity;
import static org.junit.Assert.*;
import net.sourceforge.filebot.similarity.SeriesNameMatcher.SeriesNameCollection;
import org.junit.Test;
import net.sourceforge.filebot.similarity.SeriesNameMatcher.SeriesNameCollection;
public class SeriesNameMatcherTest {

View File

@ -1,6 +1,6 @@
package net.sourceforge.filebot.web;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import java.util.List;
import java.util.Locale;

View File

@ -2,7 +2,7 @@
package net.sourceforge.filebot.web;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import java.util.List;
import java.util.Locale;

View File

@ -11,13 +11,13 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.prefs.Preferences;
import net.sourceforge.tuned.PreferencesMap.SerializableAdapter;
import net.sourceforge.tuned.PreferencesMap.SimpleAdapter;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import net.sourceforge.tuned.PreferencesMap.SerializableAdapter;
import net.sourceforge.tuned.PreferencesMap.SimpleAdapter;
public class PreferencesMapTest {