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
+23 -1
View File
@@ -1634,7 +1634,7 @@ public class Main {
if (conf != null) {
String abcDependencies = conf.getCustomData(CustomConfigurationKeys.KEY_ABC_DEPENDENCIES, "");
if (!abcDependencies.isEmpty()) {
String[] parts = (abcDependencies + LinkDialog.ABC_DEPS_SEPARATOR).split(Pattern.quote(LinkDialog.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()) {
@@ -1642,6 +1642,9 @@ public class Main {
}
}
swf.setAbcIndexDependencies(namesToSwfs(preselectedNames));
if (mainFrame != null && mainFrame.getPanel() != null && mainFrame.getPanel().getABCPanel() != null) {
mainFrame.getPanel().getABCPanel().updateLinksLabel();
}
}
}
}
@@ -3245,4 +3248,23 @@ public class Main {
throw new RuntimeException("Problems with creating the log files");
}
}
public static List<SWF> getDependencies(SWF swf) {
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(swf.getShortPathTitle());
List<SWF> dependencies = new ArrayList<>();
if (conf != null) {
String abcDependencies = conf.getCustomData(CustomConfigurationKeys.KEY_ABC_DEPENDENCIES, "");
if (!abcDependencies.isEmpty()) {
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()) {
preselectedNames.add(part);
}
}
dependencies = Main.namesToSwfs(preselectedNames);
}
}
return dependencies;
}
}