Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Wolfsblvt/BlossomsPokemonGoManager
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.6
Choose a base ref
...
head repository: Wolfsblvt/BlossomsPokemonGoManager
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 849 additions and 382 deletions.
  1. +8 −8 .idea/artifacts/BlossomsPogoManager_jar.xml
  2. +1 −2 BlossomsPokemonGoManager.iml
  3. +2 −2 checkstyle.xml
  4. +7 −10 pom.xml
  5. +1 −1 src/main/resources/version.txt
  6. +34 −30 src/me/corriekay/pokegoutil/BlossomsPoGoManager.java
  7. +10 −0 src/me/corriekay/pokegoutil/data/enums/ColumnType.java
  8. +107 −16 src/me/corriekay/pokegoutil/data/enums/PokeColumn.java
  9. +36 −25 src/me/corriekay/pokegoutil/data/managers/AccountController.java
  10. +14 −13 src/me/corriekay/pokegoutil/data/managers/AccountManager.java
  11. +33 −75 src/me/corriekay/pokegoutil/data/models/PokemonModel.java
  12. +22 −2 src/me/corriekay/pokegoutil/data/models/operations/EvolveOperation.java
  13. +23 −4 src/me/corriekay/pokegoutil/data/models/operations/TransferOperation.java
  14. +4 −0 src/me/corriekay/pokegoutil/utils/ConfigKey.java
  15. +130 −0 src/me/corriekay/pokegoutil/utils/SolveCaptcha.java
  16. +1 −0 src/me/corriekay/pokegoutil/utils/StringLiterals.java
  17. +72 −0 src/me/corriekay/pokegoutil/utils/helpers/LoginHelper.java
  18. +19 −19 src/me/corriekay/pokegoutil/utils/helpers/UnicodeHelper.java
  19. +15 −16 src/me/corriekay/pokegoutil/utils/pokemon/PokeHandler.java
  20. +39 −39 src/me/corriekay/pokegoutil/utils/pokemon/PokemonCalculationUtils.java
  21. +11 −13 src/me/corriekay/pokegoutil/utils/pokemon/PokemonPerformanceCache.java
  22. +13 −15 src/me/corriekay/pokegoutil/utils/pokemon/PokemonUtils.java
  23. +72 −0 src/me/corriekay/pokegoutil/utils/windows/PokemonTable.java
  24. +1 −1 src/me/corriekay/pokegoutil/utils/windows/PokemonTableModel.java
  25. +2 −0 src/me/corriekay/pokegoutil/utils/windows/renderer/CellRendererHelper.java
  26. +40 −0 src/me/corriekay/pokegoutil/utils/windows/renderer/DpsCellRenderer.java
  27. +13 −2 src/me/corriekay/pokegoutil/windows/MenuBar.java
  28. +19 −0 src/me/corriekay/pokegoutil/windows/PokemonGoMainWindow.java
  29. +100 −89 src/me/corriekay/pokegoutil/windows/PokemonTab.java
16 changes: 8 additions & 8 deletions .idea/artifacts/BlossomsPogoManager_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions BlossomsPokemonGoManager.iml
Original file line number Diff line number Diff line change
@@ -6,13 +6,12 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/prep" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.github.Wolfsblvt:PokeGOAPI-Java:f75f306df7b399adb3a3d258551f0cb3e5d2a377" level="project" />
<orderEntry type="library" name="Maven: com.github.Grover-c13:PokeGOAPI-Java:7317a049fe3cbb38e219e0056c21b29505133db4" level="project" />
<orderEntry type="library" name="Maven: svarzee.gps:gpsoauth:0.3" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.9" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.9.0" level="project" />
4 changes: 2 additions & 2 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -224,14 +224,14 @@
<property name="max" value="20"/>
<!-- Default classes are also listed-->
<property name="excludedClasses"
value="boolean, byte, char, double, float, int, long, short, void, Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void, Object, Class, String, StringBuffer, StringBuilder, ArrayIndexOutOfBoundsException, Exception, RuntimeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, NullPointerException, Throwable, SecurityException, UnsupportedOperationException, List, ArrayList, Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map, HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException, UnsupportedEncodingException, BuildException, ConversionException, FileNotFoundException, TestException, Log, Sets, Multimap, TokenStreamRecognitionException, RecognitionException, TokenStreamException, IOException"/>
value="boolean, byte, char, double, float, int, long, short, void, Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void, Object, Class, String, StringBuffer, StringBuilder, ArrayIndexOutOfBoundsException, Exception, RuntimeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, NullPointerException, Throwable, SecurityException, UnsupportedOperationException, List, ArrayList, Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map, HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException, UnsupportedEncodingException, BuildException, ConversionException, FileNotFoundException, TestException, Log, Sets, Multimap, TokenStreamRecognitionException, RecognitionException, TokenStreamException, IOException, AsyncPokemonGoException"/>
</module>
<module name="ClassFanOutComplexity">
<property name="severity" value="warning"/>
<property name="max" value="25"/>
<!-- Default classes are also listed-->
<property name="excludedClasses"
value="boolean, byte, char, double, float, int, long, short, void, Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void, Object, Class, String, StringBuffer, StringBuilder, ArrayIndexOutOfBoundsException, Exception, RuntimeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, NullPointerException, Throwable, SecurityException, UnsupportedOperationException, List, ArrayList, Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map, HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException, UnsupportedEncodingException, BuildException, ConversionException, FileNotFoundException, TestException, Log, Sets, Multimap, TokenStreamRecognitionException, RecognitionException, TokenStreamException, IOException"/>
value="boolean, byte, char, double, float, int, long, short, void, Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void, Object, Class, String, StringBuffer, StringBuilder, ArrayIndexOutOfBoundsException, Exception, RuntimeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, NullPointerException, Throwable, SecurityException, UnsupportedOperationException, List, ArrayList, Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map, HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException, UnsupportedEncodingException, BuildException, ConversionException, FileNotFoundException, TestException, Log, Sets, Multimap, TokenStreamRecognitionException, RecognitionException, TokenStreamException, IOException, AsyncPokemonGoException"/>
</module>
<module name="CyclomaticComplexity">
<property name="severity" value="info"/>
17 changes: 7 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>PokeGoBot</groupId>
<artifactId>PokeGoBot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<groupId>BPGM</groupId>
<artifactId>BPGM</artifactId>
<version>0.1.7-beta572-3</version>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
@@ -67,6 +67,8 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.name}_v${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
@@ -99,15 +101,10 @@
</repository>
</repositories>
<dependencies>
<!--<dependency>-->
<!--<groupId>com.pokegoapi</groupId>-->
<!--<artifactId>PokeGOAPI-library</artifactId>-->
<!--<version>0.4.1</version>-->
<!--</dependency>-->
<dependency>
<groupId>com.github.Wolfsblvt</groupId>
<groupId>com.github.gegy1000</groupId>
<artifactId>PokeGOAPI-Java</artifactId>
<version>f75f306df7b399adb3a3d258551f0cb3e5d2a377</version>
<version>fb759f0b51461d0e047ecf04bb33b12829b3e8fe</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.5
v0.1.7
64 changes: 34 additions & 30 deletions src/me/corriekay/pokegoutil/BlossomsPoGoManager.java
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

import javafx.stage.Stage;
import me.corriekay.pokegoutil.data.managers.AccountController;
import me.corriekay.pokegoutil.data.managers.GlobalSettingsController;
import me.corriekay.pokegoutil.gui.controller.ChooseGuiWindowController;
@@ -15,13 +16,10 @@
import me.corriekay.pokegoutil.utils.helpers.UIHelper;
import me.corriekay.pokegoutil.utils.windows.WindowStuffHelper;

import javafx.application.Application;
import javafx.stage.Stage;

/**
* The main project class. Contains the runtime stuff.
*/
public class BlossomsPoGoManager extends Application {
public class BlossomsPoGoManager {

private static Stage sPrimaryStage;

@@ -32,7 +30,8 @@ public class BlossomsPoGoManager extends Application {
*/
public static void main(final String[] args) {
GlobalSettingsController.setup();
launch(args);
// launch(args);
new BlossomsPoGoManager().start(null);
}

/**
@@ -56,7 +55,11 @@ public static void setNewPrimaryStage(final Stage stage) {
sPrimaryStage = stage;
}

@Override
// @Override
/**
* Legacy start method from JavaFX nature.
* @param primaryStage Received when have JavaFX nature
*/
public void start(final Stage primaryStage) {
setupGlobalExceptionHandling();

@@ -82,36 +85,37 @@ private static void setupGlobalExceptionHandling() {
result.add(current.getClass().getSimpleName() + StringLiterals.COLON_SEPARATOR + current.getLocalizedMessage());
current = current.getCause();
}

final String[] options = new String[] {"Continue anyway", "Exit"};
final int continueChoice = JOptionPane.showOptionDialog(
WindowStuffHelper.ALWAYS_ON_TOP_PARENT,
String.join(StringLiterals.NEWLINE, result)
+ StringLiterals.NEWLINE
+ StringLiterals.NEWLINE + "Application got a critical error."
+ StringLiterals.NEWLINE + "You can report the error on GitHub or Discord."
+ StringLiterals.NEWLINE
+ StringLiterals.NEWLINE + "It is possible to continue here, but do note that the application might not work as expected."
+ StringLiterals.NEWLINE + "Close and restart if that's the case.",
"General Unhandled Error",
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE,
null, options, options[0]);
if (continueChoice == 1) {
// If exit is chosen, we exit here.
System.exit(-1);
}
SwingUtilities.invokeLater(() -> {
final String[] options = new String[] {"Continue anyway", "Exit"};
final int continueChoice = JOptionPane.showOptionDialog(
WindowStuffHelper.ALWAYS_ON_TOP_PARENT,
String.join(StringLiterals.NEWLINE, result)
+ StringLiterals.NEWLINE
+ StringLiterals.NEWLINE + "Application got a critical error."
+ StringLiterals.NEWLINE + "You can report the error on GitHub or Discord."
+ StringLiterals.NEWLINE
+ StringLiterals.NEWLINE + "It is possible to continue here, but do note that the application might not work as expected."
+ StringLiterals.NEWLINE + "Close and restart if that's the case.",
"General Unhandled Error",
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE,
null, options, options[0]);
if (continueChoice == 1) {
// If exit is chosen, we exit here.
System.exit(-1);
}
});
});
}

/**
* Opens the old GUI.
*/
private void openOldGui() {
SwingUtilities.invokeLater(() -> {
UIHelper.setNativeLookAndFeel();
AccountController.initialize();
AccountController.logOn();
});
// SwingUtilities.invokeLater(() -> {
UIHelper.setNativeLookAndFeel();
AccountController.initialize();
AccountController.logOn();
// });
}
}
10 changes: 10 additions & 0 deletions src/me/corriekay/pokegoutil/data/enums/ColumnType.java
Original file line number Diff line number Diff line change
@@ -47,6 +47,16 @@ public enum ColumnType {
Comparators.DOUBLE,
CellRendererHelper.PERCENTAGE
),
DPS1VALUE(
Double.class,
Comparators.DOUBLE,
CellRendererHelper.DPS1VALUE
),
DPS2VALUE(
Double.class,
Comparators.DOUBLE,
CellRendererHelper.DPS2VALUE
),
STRING(
String.class,
Comparators.STRING
Loading