From 487f733618b70ceff37391944bb7cf4891716872 Mon Sep 17 00:00:00 2001 From: coanghel Date: Tue, 22 Oct 2024 20:36:11 -0400 Subject: [PATCH] feat: default names for eft export feat: skip-all-tests profile --- pom.xml | 12 ++++++++++++ .../eve/jeveasset/gui/tabs/loadout/LoadoutsTab.java | 9 +++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 7e9f43d2a..f6c53b584 100644 --- a/pom.xml +++ b/pom.xml @@ -674,6 +674,18 @@ **/*OnlineTest.java + + skip-all-tests + + + skip-all-tests + true + + + + true + + skip-online-price-tests diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/loadout/LoadoutsTab.java b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/loadout/LoadoutsTab.java index f426251a8..1316bfc2e 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/loadout/LoadoutsTab.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/loadout/LoadoutsTab.java @@ -375,7 +375,7 @@ private void exportEFT() { if (exportAsset == null) { return; } - String buildName = getBuildName(); + String buildName = getBuildName(exportAsset.getName()); if (buildName == null) { return; //Cancel } @@ -459,8 +459,9 @@ private void writeCount(StringBuilder builder, Map modules) { } } - private String getBuildName() { - String buildName = JOptionInput.showInputDialog(program.getMainWindow().getFrame(), "Enter Build Name", "Export EFT", JOptionPane.PLAIN_MESSAGE); + private String getBuildName(String shipName) { + String defaultName = shipName.replaceFirst("\\s*\\([^)]*\\)\\s*$", ""); + String buildName = (String) JOptionInput.showInputDialog(program.getMainWindow().getFrame(), "Enter Build Name", "Export EFT", JOptionPane.PLAIN_MESSAGE, null, null, defaultName); if (buildName == null) { return null; //Cancel } else if (buildName.isEmpty()) { @@ -468,7 +469,7 @@ private String getBuildName() { TabsLoadout.get().name1(), TabsLoadout.get().empty(), JOptionPane.PLAIN_MESSAGE); - return getBuildName(); + return getBuildName(defaultName); } else { return buildName; }