mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-17 20:48:19 +00:00
Merge origin/master
This commit is contained in:
@@ -228,6 +228,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
|
||||
public void setAbc(ABC abc) {
|
||||
this.abc = abc;
|
||||
setDecompiledEditMode(false);
|
||||
navigator.setAbc(abc);
|
||||
updateConstList();
|
||||
}
|
||||
@@ -629,7 +630,11 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
|
||||
public void reload() {
|
||||
lastDecompiled = "";
|
||||
getSwf().clearScriptCache();
|
||||
SWF swf = getSwf();
|
||||
if (swf != null) {
|
||||
swf.clearScriptCache();
|
||||
}
|
||||
|
||||
decompiledTextArea.reloadClass();
|
||||
detailPanel.methodTraitPanel.methodCodePanel.clear();
|
||||
}
|
||||
@@ -760,12 +765,13 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<ABC
|
||||
String as = decompiledTextArea.getText();
|
||||
abc.replaceScriptPack(pack, as);
|
||||
lastDecompiled = as;
|
||||
setDecompiledEditMode(false);
|
||||
mainPanel.updateClassesList();
|
||||
|
||||
if (oldSp != null) {
|
||||
hilightScript(getSwf(), oldSp);
|
||||
}
|
||||
setDecompiledEditMode(false);
|
||||
|
||||
reload();
|
||||
View.showMessageDialog(this, AppStrings.translate("message.action.saved"), AppStrings.translate("dialog.message.title"), JOptionPane.INFORMATION_MESSAGE, Configuration.showCodeSavedMessage);
|
||||
} catch (AVM2ParseException ex) {
|
||||
|
||||
@@ -46,15 +46,11 @@ public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel
|
||||
}
|
||||
|
||||
public ClassesListTreeModel(SWF swf) {
|
||||
this(swf, null);
|
||||
}
|
||||
|
||||
public ClassesListTreeModel(SWF swf, String filter) {
|
||||
super(null, null);
|
||||
root = new AS3Package(null, swf);
|
||||
this.swf = swf;
|
||||
this.list = swf.getAS3Packs();
|
||||
setFilter(filter);
|
||||
setFilter(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,4 +187,18 @@ public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel
|
||||
public boolean isModified() {
|
||||
return root.isModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof ClassesListTreeModel)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return swf.equals(((ClassesListTreeModel) obj).swf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ClassesListTreeModel.class.hashCode() ^ swf.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,10 @@ public class UndoFixedEditorPane extends JEditorPane {
|
||||
|
||||
private void setText(String t, String contentType) {
|
||||
synchronized (setTextLock) {
|
||||
if (t == null) {
|
||||
t = "";
|
||||
}
|
||||
|
||||
if (!t.equals(getText())) {
|
||||
boolean plain = t.length() > Configuration.syntaxHighlightLimit.get();
|
||||
if (plain) {
|
||||
|
||||
Reference in New Issue
Block a user