Move platform-specific utilities into net.filebot.platform.* package

This commit is contained in:
Reinhard Pointner 2017-03-06 20:52:04 +08:00
parent 3f418672eb
commit e2105771c0
25 changed files with 28 additions and 26 deletions

View File

@ -38,7 +38,8 @@ import net.filebot.cli.ArgumentBean;
import net.filebot.cli.ArgumentProcessor;
import net.filebot.cli.CmdlineException;
import net.filebot.format.ExpressionFormat;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.platform.windows.WinAppUtilities;
import net.filebot.ui.FileBotMenuBar;
import net.filebot.ui.GettingStartedStage;
import net.filebot.ui.MainFrame;
@ -49,7 +50,6 @@ import net.filebot.ui.SupportDialog;
import net.filebot.ui.transfer.FileTransferable;
import net.filebot.util.PreferencesMap.PreferencesEntry;
import net.filebot.util.ui.SwingEventBus;
import net.filebot.win.WinAppUtilities;
import net.miginfocom.swing.MigLayout;
public class Main {

View File

@ -17,7 +17,7 @@ import java.util.Set;
import com.sun.jna.Platform;
import net.filebot.mac.MacXattrView;
import net.filebot.platform.mac.MacXattrView;
public class MetaAttributeView extends AbstractMap<String, String> {

View File

@ -27,7 +27,7 @@ import javax.swing.JFileChooser;
import com.apple.eio.FileManager;
import com.sun.jna.platform.FileUtils;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.util.FileUtilities;
import net.filebot.util.FileUtilities.ExtensionFileFilter;

View File

@ -19,7 +19,7 @@ import com.sun.jna.Platform;
import groovy.lang.Closure;
import groovy.util.XmlSlurper;
import net.filebot.ApplicationFolder;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.util.FileUtilities;
/**

View File

@ -1,4 +1,4 @@
package net.filebot.gio;
package net.filebot.platform.gnome;
import java.io.File;
import java.net.URI;

View File

@ -1,5 +1,5 @@
package net.filebot.gio;
package net.filebot.platform.gnome;
import com.sun.jna.Library;
import com.sun.jna.Pointer;

View File

@ -1,5 +1,5 @@
package net.filebot.gio;
package net.filebot.platform.gnome;
import java.io.File;
import java.net.URI;

View File

@ -1,5 +1,5 @@
package net.filebot.gio;
package net.filebot.platform.gnome;
import static java.util.Arrays.*;
import static java.util.stream.Collectors.*;

View File

@ -1,10 +1,10 @@
package net.filebot.mac;
package net.filebot.platform.mac;
import static java.util.Collections.*;
import static javax.swing.BorderFactory.*;
import static net.filebot.Logging.*;
import static net.filebot.UserFiles.*;
import static net.filebot.mac.MacAppUtilities.*;
import static net.filebot.platform.mac.MacAppUtilities.*;
import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.ui.SwingUI.*;

View File

@ -1,4 +1,4 @@
package net.filebot.mac;
package net.filebot.platform.mac;
import static ca.weblite.objc.util.CocoaUtils.*;
import static net.filebot.Logging.*;

View File

@ -1,4 +1,4 @@
package net.filebot.mac;
package net.filebot.platform.mac;
import java.nio.file.Path;
import java.text.Normalizer;

View File

@ -1,4 +1,4 @@
package net.filebot.win;
package net.filebot.platform.windows;
import static net.filebot.Logging.*;

View File

@ -37,7 +37,7 @@ import com.google.common.eventbus.Subscribe;
import net.filebot.CacheManager;
import net.filebot.Settings;
import net.filebot.cli.GroovyPad;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.util.PreferencesMap.PreferencesEntry;
import net.filebot.util.ui.DefaultFancyListCellRenderer;
import net.filebot.util.ui.ShadowBorder;

View File

@ -15,7 +15,7 @@ import java.util.logging.Level;
import javax.swing.tree.TreeNode;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.ui.filter.FileTree.FileNode;
import net.filebot.ui.filter.FileTree.FolderNode;
import net.filebot.ui.transfer.BackgroundFileTransferablePolicy;

View File

@ -65,8 +65,8 @@ import net.filebot.format.ExpressionFileFormat;
import net.filebot.format.ExpressionFormat;
import net.filebot.format.MediaBindingBean;
import net.filebot.format.SuppressedThrowables;
import net.filebot.mac.MacAppUtilities;
import net.filebot.media.MetaAttributes;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.util.DefaultThreadFactory;
import net.filebot.util.PreferencesList;
import net.filebot.util.PreferencesMap.PreferencesEntry;

View File

@ -72,10 +72,10 @@ import javax.swing.table.TableRowSorter;
import net.filebot.History;
import net.filebot.History.Element;
import net.filebot.History.Sequence;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.HistorySpooler;
import net.filebot.ResourceManager;
import net.filebot.StandardRenameAction;
import net.filebot.mac.MacAppUtilities;
import net.filebot.ui.transfer.FileExportHandler;
import net.filebot.ui.transfer.FileTransferablePolicy;
import net.filebot.ui.transfer.LoadAction;

View File

@ -40,7 +40,7 @@ import net.filebot.WebServices;
import net.filebot.format.ExpressionFileFormat;
import net.filebot.format.ExpressionFilter;
import net.filebot.format.MediaBindingBean;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.ui.HeaderPanel;
import net.filebot.util.FileUtilities.ExtensionFileFilter;
import net.filebot.web.Datasource;

View File

@ -36,7 +36,7 @@ import net.filebot.NativeRenameAction;
import net.filebot.ResourceManager;
import net.filebot.StandardRenameAction;
import net.filebot.UserFiles;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.similarity.Match;
import net.filebot.util.ui.ProgressMonitor;
import net.filebot.util.ui.ProgressMonitor.ProgressWorker;

View File

@ -68,8 +68,8 @@ import net.filebot.UserFiles;
import net.filebot.WebServices;
import net.filebot.format.ExpressionFileFormat;
import net.filebot.format.MediaBindingBean;
import net.filebot.mac.MacAppUtilities;
import net.filebot.media.MetaAttributes;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.similarity.Match;
import net.filebot.ui.SelectDialog;
import net.filebot.ui.rename.FormatDialog.Mode;

View File

@ -21,7 +21,7 @@ import java.util.logging.Level;
import net.filebot.hash.HashType;
import net.filebot.hash.VerificationFileReader;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.ui.transfer.BackgroundFileTransferablePolicy;
import net.filebot.util.ExceptionUtilities;
import net.filebot.util.FileSet;

View File

@ -62,7 +62,7 @@ import javax.swing.table.DefaultTableCellRenderer;
import net.filebot.ResourceManager;
import net.filebot.WebServices;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.subtitle.SubtitleMetrics;
import net.filebot.subtitle.SubtitleNaming;
import net.filebot.util.ui.AbstractBean;

View File

@ -34,7 +34,7 @@ import javax.swing.JDialog;
import javax.swing.SwingUtilities;
import net.filebot.ResourceManager;
import net.filebot.mac.MacAppUtilities;
import net.filebot.platform.mac.MacAppUtilities;
import net.filebot.ui.subtitle.upload.SubtitleUploadDialog;
import net.filebot.util.FileUtilities;
import net.filebot.util.FileUtilities.ParentFilter;

View File

@ -17,7 +17,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Scanner;
import net.filebot.gio.GVFS;
import net.filebot.platform.gnome.GVFS;
public class FileTransferable implements Transferable {

View File

@ -7,6 +7,9 @@ import java.net.URI;
import org.junit.Test;
import net.filebot.platform.gnome.GVFS;
import net.filebot.platform.gnome.PlatformGVFS;
public class PlatformGVFSTest {
GVFS gvfs = new PlatformGVFS(new File("gvfs"));

View File

@ -6,7 +6,6 @@ import static org.junit.Assert.*;
import java.net.URL;
import java.time.Duration;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;