mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 21:20:44 +00:00
Propagate ABCIndex everywhere
This commit is contained in:
@@ -213,15 +213,14 @@ public class Main {
|
||||
public static CancellableWorker deobfuscatePCodeWorker = null;
|
||||
public static CancellableWorker swfPrepareWorker = null;
|
||||
|
||||
public static final int LIBRARY_AIR = 0;
|
||||
public static final int LIBRARY_FLASH = 1;
|
||||
|
||||
|
||||
public static boolean isSwfAir(Openable openable) {
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(openable.getShortPathTitle());
|
||||
if (conf != null) {
|
||||
String libraryAsStr = conf.getCustomData(CustomConfigurationKeys.KEY_LIBRARY, "" + LIBRARY_FLASH);
|
||||
String libraryAsStr = conf.getCustomData(CustomConfigurationKeys.KEY_LIBRARY, "" + SWF.LIBRARY_FLASH);
|
||||
int libraryAsInt = Integer.parseInt(libraryAsStr);
|
||||
return libraryAsInt == LIBRARY_AIR;
|
||||
return libraryAsInt == SWF.LIBRARY_AIR;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -243,9 +243,9 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
}
|
||||
|
||||
if (Main.isSwfAir(abc.getOpenable())) {
|
||||
libraryComboBox.setSelectedIndex(Main.LIBRARY_AIR);
|
||||
libraryComboBox.setSelectedIndex(SWF.LIBRARY_AIR);
|
||||
} else {
|
||||
libraryComboBox.setSelectedIndex(Main.LIBRARY_FLASH);
|
||||
libraryComboBox.setSelectedIndex(SWF.LIBRARY_FLASH);
|
||||
}
|
||||
this.abc = abc;
|
||||
setDecompiledEditMode(false);
|
||||
@@ -972,7 +972,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
libraryComboBox = new JComboBox<>();
|
||||
libraryComboBox.addItem("AIR (airglobal.swc)");
|
||||
libraryComboBox.addItem("Flash (playerglobal.swc)");
|
||||
libraryComboBox.setSelectedIndex(Main.LIBRARY_FLASH);
|
||||
libraryComboBox.setSelectedIndex(SWF.LIBRARY_FLASH);
|
||||
libraryComboBox.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
|
||||
@@ -247,7 +247,7 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
|
||||
|
||||
public void graph() {
|
||||
try {
|
||||
AVM2Graph gr = new AVM2Graph(abc.bodies.get(bodyIndex).getCode(), abc, abc.bodies.get(bodyIndex), false, -1, -1, new HashMap<>(), new ScopeStack(), new HashMap<>(), new ArrayList<>(), new HashMap<>(), abc.bodies.get(bodyIndex).getCode().visitCode(abc.bodies.get(bodyIndex)));
|
||||
AVM2Graph gr = new AVM2Graph(null /*?*/, abc.bodies.get(bodyIndex).getCode(), abc, abc.bodies.get(bodyIndex), false, -1, -1, new HashMap<>(), new ScopeStack(), new HashMap<>(), new ArrayList<>(), new HashMap<>(), abc.bodies.get(bodyIndex).getCode().visitCode(abc.bodies.get(bodyIndex)));
|
||||
(new GraphDialog(getAbcPanel().getMainPanel().getMainFrame().getWindow(), gr, name)).setVisible(true);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(ASMSourceEditorPane.class.getName()).log(Level.SEVERE, null, ex);
|
||||
|
||||
Reference in New Issue
Block a user