Added Label that flex compiler is used (when it's enabled in settings)

Fixed #2111 Flex AS3 editation - use SWF dependencies defined in GUI
Fixed SWF dependencies label was not updated on startup
This commit is contained in:
Jindra Petřík
2023-12-30 18:06:08 +01:00
parent 123a740d22
commit 4125e94ca3
19 changed files with 141 additions and 49 deletions
@@ -52,9 +52,7 @@ import javax.swing.border.BevelBorder;
*
* @author JPEXS
*/
public class LinkDialog extends JDialog {
public static final String ABC_DEPS_SEPARATOR = "{*sep*}";
public class LinkDialog extends JDialog {
private MainPanel mainPanel;
@@ -122,7 +120,7 @@ public class LinkDialog extends JDialog {
if (conf != null) {
String abcDependencies = conf.getCustomData(CustomConfigurationKeys.KEY_ABC_DEPENDENCIES, "");
if (!abcDependencies.isEmpty()) {
String[] parts = (abcDependencies + ABC_DEPS_SEPARATOR).split(Pattern.quote(ABC_DEPS_SEPARATOR));
String[] parts = (abcDependencies + Configuration.ABC_DEPS_SEPARATOR).split(Pattern.quote(Configuration.ABC_DEPS_SEPARATOR));
List<String> preselectedNames = new ArrayList<>();
for (String part : parts) {
if (!part.isEmpty()) {
@@ -145,7 +143,7 @@ public class LinkDialog extends JDialog {
Map<String, SWF> map = getSelectedSwfs();
SwfSpecificCustomConfiguration conf = Configuration.getOrCreateSwfSpecificCustomConfiguration(swf.getShortPathTitle());
String oldValue = conf.getCustomData(CustomConfigurationKeys.KEY_ABC_DEPENDENCIES, "");
String newValue = String.join(ABC_DEPS_SEPARATOR, map.keySet());
String newValue = String.join(Configuration.ABC_DEPS_SEPARATOR, map.keySet());
conf.setCustomData(CustomConfigurationKeys.KEY_ABC_DEPENDENCIES, newValue);
List<SWF> swfs = new ArrayList<>(map.values());
if (!Objects.equals(oldValue, newValue) || force) {