THE MEGA-FORMATTING COMMIT! TABS RULE, SPACES DROOL
This commit is contained in:
parent
6e292212fd
commit
408a52512b
|
@ -98,9 +98,7 @@ public class Ernie implements ActionListener {
|
||||||
});
|
});
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
} else { System.out.println("Updater: No updates."); }
|
} else { System.out.println("Updater: No updates."); }
|
||||||
} catch (IOException ex) {
|
} catch (IOException | JSONException ex) {
|
||||||
Logger.getLogger(Ernie.class.getName()).log(Level.SEVERE, null, ex);
|
|
||||||
} catch (JSONException ex) {
|
|
||||||
Logger.getLogger(Ernie.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(Ernie.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public class FirescriptFormatException extends Exception {
|
public class FirescriptFormatException extends Exception {
|
||||||
public FirescriptFormatException() {
|
public FirescriptFormatException() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.github.difflib.DiffUtils;
|
|
||||||
import com.github.difflib.UnifiedDiffUtils;
|
|
||||||
import com.github.difflib.patch.Patch;
|
|
||||||
import net.lingala.zip4j.ZipFile;
|
import net.lingala.zip4j.ZipFile;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
@ -35,9 +32,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
public class Gonzo {
|
public class Gonzo {
|
||||||
JFrame frame = new JFrame();
|
JFrame frame = new JFrame();
|
||||||
|
@ -354,11 +348,8 @@ public class Gonzo {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void listAllFiles(Path currentPath, List<String> allFiles)
|
private static void listAllFiles(Path currentPath, List<String> allFiles) throws IOException {
|
||||||
throws IOException
|
try (DirectoryStream<Path> stream = Files.newDirectoryStream(currentPath)) {
|
||||||
{
|
|
||||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(currentPath))
|
|
||||||
{
|
|
||||||
for (Path entry : stream) {
|
for (Path entry : stream) {
|
||||||
if (Files.isDirectory(entry)) {
|
if (Files.isDirectory(entry)) {
|
||||||
listAllFiles(entry, allFiles);
|
listAllFiles(entry, allFiles);
|
||||||
|
|
|
@ -284,13 +284,14 @@ public class MissPiggy implements ActionListener {
|
||||||
System.out.println("Initializing modList to GUI with length of " + Main.Mods.size() + " units"); //debug
|
System.out.println("Initializing modList to GUI with length of " + Main.Mods.size() + " units"); //debug
|
||||||
while (i < Main.Mods.size()) {
|
while (i < Main.Mods.size()) {
|
||||||
if (Main.Mods.get(i).friendlyName == null || Main.Mods.get(i).friendlyName.isEmpty())
|
if (Main.Mods.get(i).friendlyName == null || Main.Mods.get(i).friendlyName.isEmpty())
|
||||||
{Main.Mods.get(i).friendlyName = Main.Mods.get(i).path;}
|
Main.Mods.get(i).friendlyName = Main.Mods.get(i).path;
|
||||||
if (Main.Mods.get(i).enabled) {contents[i] = Main.Mods.get(i).friendlyName;}
|
if (Main.Mods.get(i).enabled) {contents[i] = Main.Mods.get(i).friendlyName;}
|
||||||
else {contents[i] = Main.Mods.get(i).friendlyName + " (Disabled)";}
|
else {contents[i] = Main.Mods.get(i).friendlyName + " (Disabled)";}
|
||||||
|
|
||||||
//debug
|
//debug
|
||||||
String authorDisplay;
|
String authorDisplay;
|
||||||
if (Main.Mods.get(i).author == null || Main.Mods.get(i).author.isEmpty()) {authorDisplay = "Anonymous";} else {authorDisplay = "\"" + Main.Mods.get(i).author + "\"";}
|
if (Main.Mods.get(i).author == null || Main.Mods.get(i).author.isEmpty()) {authorDisplay = "Anonymous";}
|
||||||
|
else {authorDisplay = "\"" + Main.Mods.get(i).author + "\"";}
|
||||||
System.out.println("Added " + Main.Mods.get(i).friendlyName + " by " + authorDisplay);
|
System.out.println("Added " + Main.Mods.get(i).friendlyName + " by " + authorDisplay);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
@ -593,7 +594,6 @@ public class MissPiggy implements ActionListener {
|
||||||
int result = JOptionPane.showConfirmDialog(frame, "Firestar encountered an internal error.\n" + ex.getMessage(), "Fatal Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
|
int result = JOptionPane.showConfirmDialog(frame, "Firestar encountered an internal error.\n" + ex.getMessage(), "Fatal Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
|
||||||
if (result == JOptionPane.OK_OPTION) {System.exit(1);} //user safety
|
if (result == JOptionPane.OK_OPTION) {System.exit(1);} //user safety
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Created by simon on 8/29/17.
|
* Created by simon on 8/29/17.
|
||||||
* Copyright 2017 Simon Haoran Liang
|
* Copyright 2017 Simon Haoran Liang
|
||||||
*
|
*
|
||||||
|
@ -130,8 +130,7 @@ public class ReplacingInputStream extends FilterInputStream {
|
||||||
}
|
}
|
||||||
b[off + i] = (byte)c;
|
b[off + i] = (byte)c;
|
||||||
}
|
}
|
||||||
} catch (IOException ee) {
|
} catch (IOException ee) { }
|
||||||
}
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -297,9 +297,13 @@ public class Suggs implements ActionListener, ListSelectionListener {
|
||||||
String dTitleInList; // avoid editing the actual list
|
String dTitleInList; // avoid editing the actual list
|
||||||
String dArtistInList; // otherwise we cause weird JTextField behavior
|
String dArtistInList; // otherwise we cause weird JTextField behavior
|
||||||
if (tracklist.get(i).title == null || tracklist.get(i).title.isEmpty())
|
if (tracklist.get(i).title == null || tracklist.get(i).title.isEmpty())
|
||||||
{dTitleInList = tracklist.get(i).path.getName();} else {dTitleInList = tracklist.get(i).title;}
|
dTitleInList = tracklist.get(i).path.getName();
|
||||||
|
else
|
||||||
|
dTitleInList = tracklist.get(i).title;
|
||||||
if (tracklist.get(i).artist == null || tracklist.get(i).artist.isEmpty())
|
if (tracklist.get(i).artist == null || tracklist.get(i).artist.isEmpty())
|
||||||
{dArtistInList = "Unknown Artist";} else {dArtistInList = tracklist.get(i).artist;}
|
dArtistInList = "Unknown Artist";
|
||||||
|
else
|
||||||
|
dArtistInList = tracklist.get(i).artist;
|
||||||
contents[i] = dArtistInList + " - " + dTitleInList;
|
contents[i] = dArtistInList + " - " + dTitleInList;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user