removed some unnecesary fields/parameters

This commit is contained in:
2015-01-18 19:04:46 +01:00
parent b3880ab5de
commit c06dd3193c
34 changed files with 291 additions and 311 deletions
@@ -32,7 +32,6 @@ import com.jpexs.decompiler.flash.abc.types.Namespace;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.console.CommandLineArgumentParser;
import com.jpexs.decompiler.flash.console.ContextMenuTools;
import com.jpexs.decompiler.flash.exporters.swf.SwfFile;
import com.jpexs.decompiler.flash.gui.debugger.Debugger;
import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame;
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
@@ -318,7 +317,6 @@ public class Main {
startWork(AppStrings.translate("work.reading.swf"), p);
}
}, Configuration.parallelSpeedUp.get());
swf = new SwfFile().getSwf();
swf.file = sourceInfo.getFile();
swf.fileTitle = sourceInfo.getFileTitle();
result.add(swf);
@@ -636,7 +636,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
boolean hasAbc = !abcList.isEmpty();
if (hasAbc) {
getABCPanel().setSwf(swf);
getABCPanel().setAbc(abcList.get(0).getABC());
}
if (isWelcomeScreen) {
@@ -706,7 +706,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
swfs.remove(swfList);
if (abcPanel != null) {
for (SWF swf : swfList) {
if (abcPanel.swf == swf) {
if (abcPanel.getSwf() == swf) {
abcPanel.clearSwf();
}
}
@@ -857,7 +857,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
updateClassesList();
reload(true);
getABCPanel().hilightScript(getABCPanel().swf, getABCPanel().decompiledTextArea.getScriptLeaf().getClassPath().toString());
getABCPanel().hilightScript(getABCPanel().getSwf(), getABCPanel().decompiledTextArea.getScriptLeaf().getClassPath().toString());
}
}
}
@@ -1095,10 +1095,13 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
String documentClass = swf.getDocumentClass();
if (documentClass != null && !Configuration.dumpView.get()) {
showDetail(DETAILCARDAS3NAVIGATOR);
showCard(CARDACTIONSCRIPT3PANEL);
getABCPanel().setSwf(swf);
getABCPanel().hilightScript(swf, documentClass);
List<ABCContainerTag> abcList = swf.getAbcList();
if (!abcList.isEmpty()) {
showDetail(DETAILCARDAS3NAVIGATOR);
showCard(CARDACTIONSCRIPT3PANEL);
getABCPanel().setAbc(abcList.get(0).getABC());
getABCPanel().hilightScript(swf, documentClass);
}
}
}
@@ -1690,7 +1693,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
protected Object doInBackground() throws Exception {
int cnt = 0;
if (all) {
for (ABCContainerTag tag : getABCPanel().swf.getAbcList()) {
for (ABCContainerTag tag : getABCPanel().getAbcList()) {
tag.getABC().restoreControlFlow();
}
} else {
@@ -1778,7 +1781,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
protected Object doInBackground() throws Exception {
try {
if (deobfuscationDialog.processAllCheckbox.isSelected()) {
for (ABCContainerTag tag : getABCPanel().swf.getAbcList()) {
for (ABCContainerTag tag : getABCPanel().getAbcList()) {
if (deobfuscationDialog.codeProcessingLevel.getValue() == DeobfuscationDialog.LEVEL_REMOVE_DEAD_CODE) {
tag.getABC().removeDeadCode();
} else if (deobfuscationDialog.codeProcessingLevel.getValue() == DeobfuscationDialog.LEVEL_REMOVE_TRAPS) {
@@ -2324,7 +2327,6 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
stopFlashPlayer();
if (treeItem instanceof ScriptPack) {
final ScriptPack scriptLeaf = (ScriptPack) treeItem;
final List<ABCContainerTag> abcList = scriptLeaf.abc.swf.getAbcList();
if (setSourceWorker != null) {
setSourceWorker.cancel(true);
setSourceWorker = null;
@@ -2343,10 +2345,10 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
}
getABCPanel().detailPanel.methodTraitPanel.methodCodePanel.clear();
getABCPanel().navigator.setAbc(abcList, scriptLeaf.abc);
getABCPanel().navigator.setAbc(scriptLeaf.abc);
getABCPanel().navigator.setClassIndex(classIndex, scriptLeaf.scriptIndex);
getABCPanel().setAbc(scriptLeaf.abc);
getABCPanel().decompiledTextArea.setScript(scriptLeaf, abcList);
getABCPanel().decompiledTextArea.setScript(scriptLeaf);
getABCPanel().decompiledTextArea.setClassIndex(classIndex);
getABCPanel().decompiledTextArea.setNoTrait();
return null;
@@ -116,7 +116,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
private MainPanel mainPanel;
public TraitsList navigator;
public ABC abc;
public SWF swf;
public JComboBox<ABCContainerTag> abcComboBox;
public DecompiledEditorPane decompiledTextArea;
public JScrollPane decompiledScrollPane;
@@ -253,24 +252,21 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
//colModel.getColumn(0).setMaxWidth(50);
}
public SWF getSwf() {
return abc == null ? null : abc.getSwf();
}
public List<ABCContainerTag> getAbcList() {
SWF swf = getSwf();
return swf == null ? null : swf.getAbcList();
}
public void clearSwf() {
this.swf = null;
this.abc = null;
constantTable.setModel(new DefaultTableModel());
navigator.clearAbc();
}
public void setSwf(SWF swf) {
if (this.swf != swf) {
this.swf = swf;
List<ABCContainerTag> abcList = swf.getAbcList();
if (abcList.size() > 0) {
this.abc = abcList.get(0).getABC();
}
navigator.setAbc(abcList, abc);
}
}
public void initSplits() {
//splitPaneTreeVSNavigator.setDividerLocation(splitPaneTreeVSNavigator.getHeight() / 2);
try {
@@ -408,7 +404,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
public void actionPerformed(ActionEvent e) {
int multinameIndex = decompiledTextArea.getMultinameUnderCaret();
if (multinameIndex > -1) {
UsageFrame usageFrame = new UsageFrame(swf.getAbcList(), abc, multinameIndex, ABCPanel.this, false);
UsageFrame usageFrame = new UsageFrame(abc, multinameIndex, ABCPanel.this, false);
usageFrame.setVisible(true);
}
}
@@ -470,7 +466,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
}
int multinameIndex = constantTable.convertRowIndexToModel(rowIndex);
if (multinameIndex > 0) {
UsageFrame usageFrame = new UsageFrame(t.swf.getAbcList(), abc, multinameIndex, t, false);
UsageFrame usageFrame = new UsageFrame(abc, multinameIndex, t, false);
usageFrame.setVisible(true);
}
}
@@ -504,19 +500,19 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
if (multinameIndex == 0) {
return false;
}
List<MultinameUsage> usages = abc.findMultinameDefinition(swf.getAbcList(), multinameIndex);
List<MultinameUsage> usages = abc.findMultinameDefinition(multinameIndex);
Multiname m = abc.constants.constant_multiname.get(multinameIndex);
//search other ABC tags if this is not private multiname
if (m.namespace_index > 0 && abc.constants.constant_namespace.get(m.namespace_index).kind != Namespace.KIND_PRIVATE) {
for (ABCContainerTag at : swf.getAbcList()) {
for (ABCContainerTag at : getAbcList()) {
ABC a = at.getABC();
if (a == abc) {
continue;
}
int mid = a.constants.getMultinameId(m, false);
if (mid > 0) {
usages.addAll(a.findMultinameDefinition(swf.getAbcList(), mid));
usages.addAll(a.findMultinameDefinition(mid));
}
}
}
@@ -538,32 +534,32 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
Reference<Integer> multinameIndexRef = new Reference<>(0);
if (decompiledTextArea.getPropertyTypeAtPos(pos, abcIndex, classIndex, traitIndex, classTrait, multinameIndexRef)) {
UsageFrame.gotoUsage(ABCPanel.this, new TraitMultinameUsage(swf.getAbcList(), swf.getAbcList().get(abcIndex.getVal()).getABC(), multinameIndexRef.getVal(), classIndex.getVal(), traitIndex.getVal(), classTrait.getVal(), null, -1) {
UsageFrame.gotoUsage(ABCPanel.this, new TraitMultinameUsage(getAbcList().get(abcIndex.getVal()).getABC(), multinameIndexRef.getVal(), classIndex.getVal(), traitIndex.getVal(), classTrait.getVal(), null, -1) {
});
return;
}
int multinameIndex = decompiledTextArea.getMultinameAtPos(pos);
if (multinameIndex > -1) {
List<MultinameUsage> usages = abc.findMultinameDefinition(swf.getAbcList(), multinameIndex);
List<MultinameUsage> usages = abc.findMultinameDefinition(multinameIndex);
Multiname m = abc.constants.constant_multiname.get(multinameIndex);
//search other ABC tags if this is not private multiname
if (m.namespace_index > 0 && abc.constants.constant_namespace.get(m.namespace_index).kind != Namespace.KIND_PRIVATE) {
for (ABCContainerTag at : swf.getAbcList()) {
for (ABCContainerTag at : getAbcList()) {
ABC a = at.getABC();
if (a == abc) {
continue;
}
int mid = a.constants.getMultinameId(m, false);
if (mid > 0) {
usages.addAll(a.findMultinameDefinition(swf.getAbcList(), mid));
usages.addAll(a.findMultinameDefinition(mid));
}
}
}
//more than one? display list
if (usages.size() > 1) {
UsageFrame usageFrame = new UsageFrame(swf.getAbcList(), abc, multinameIndex, ABCPanel.this, true);
UsageFrame usageFrame = new UsageFrame(abc, multinameIndex, ABCPanel.this, true);
usageFrame.setVisible(true);
return;
} else if (!usages.isEmpty()) { //one
@@ -643,7 +639,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
public void reload() {
lastDecompiled = "";
swf.clearScriptCache();
getSwf().clearScriptCache();
decompiledTextArea.reloadClass();
detailPanel.methodTraitPanel.methodCodePanel.clear();
}
@@ -698,7 +694,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
public void updateSearchPos(ABCPanelSearchResult item) {
ScriptPack pack = item.scriptPack;
setAbc(pack.abc);
decompiledTextArea.setScript(pack, swf.getAbcList());
decompiledTextArea.setScript(pack);
hilightScript(pack);
decompiledTextArea.setCaretPosition(0);
@@ -795,7 +791,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
mainPanel.updateClassesList();
if (oldSp != null) {
hilightScript(swf, oldSp);
hilightScript(getSwf(), oldSp);
}
setDecompiledEditMode(false);
reload();
@@ -61,7 +61,6 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
private List<Highlighting> classHighlights = new ArrayList<>();
private Highlighting currentMethodHighlight;
private Highlighting currentTraitHighlight;
private ABC abc;
private ScriptPack script;
public int lastTraitIndex = 0;
public boolean ignoreCarret = false;
@@ -91,7 +90,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
}
public Trait getCurrentTrait() {
return abc.findTraitByTraitId(classIndex, lastTraitIndex);
return script.abc.findTraitByTraitId(classIndex, lastTraitIndex);
}
public ScriptPack getScriptLeaf() {
@@ -175,6 +174,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
}
private boolean displayMethod(int pos, int methodIndex, String name, Trait trait, boolean isStatic) {
ABC abc = getABC();
if (abc == null) {
return false;
}
@@ -261,6 +261,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
if ("this".equals(lname)) {
Highlighting ch = Highlighting.searchPos(classHighlights, pos);
int cindex = (int) ch.getProperties().index;
ABC abc = getABC();
type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants, true));
return ch.startPos;
}
@@ -327,6 +328,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
t = sd.getNextToken(t);
String ident = t.getString(sd);
found = false;
List<ABCContainerTag> abcList = getABC().getSwf().getAbcList();
loopi:
for (int i = 0; i < abcList.size(); i++) {
ABC a = abcList.get(i).getABC();
@@ -383,6 +385,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
Highlighting tm = Highlighting.searchPos(methodHighlights, pos);
Trait currentTrait = null;
int currentMethod = -1;
ABC abc = getABC();
if (tm != null) {
int mi = (int) tm.getProperties().index;
@@ -491,6 +494,8 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
});
return;
}
ABC abc = getABC();
if (abc == null) {
return;
}
@@ -622,9 +627,8 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
addCaretListener(this);
this.abcPanel = abcPanel;
}
private List<ABCContainerTag> abcList;
public void setScript(ScriptPack scriptLeaf, List<ABCContainerTag> abcList) {
public void setScript(ScriptPack scriptLeaf) {
abcPanel.scriptNameLabel.setText(scriptLeaf.getClassPath().toString());
int scriptIndex = scriptLeaf.scriptIndex;
ScriptInfo script = null;
@@ -642,8 +646,6 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
}
setText("// " + AppStrings.translate("pleasewait") + "...");
this.abc = abc;
this.abcList = abcList;
this.script = scriptLeaf;
CachedDecompilation cd = null;
try {
@@ -665,8 +667,8 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
public void reloadClass() {
int ci = classIndex;
SWF.uncache(script);
if ((script != null) && (abc != null)) {
setScript(script, abcList);
if (script != null && getABC() != null) {
setScript(script);
}
setNoTrait();
setClassIndex(ci);
@@ -676,11 +678,10 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
return classIndex;
}
public void setABC(ABC abc) {
this.abc = abc;
setText("");
private ABC getABC() {
return script == null ? null : script.abc;
}
@Override
public void setText(String t) {
super.setText(t);
@@ -16,6 +16,7 @@
*/
package com.jpexs.decompiler.flash.gui.abc;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
@@ -30,6 +31,11 @@ public class RootABCContainerTag implements ABCContainerTag {
return null;
}
@Override
public SWF getSwf() {
return null;
}
@Override
public int compareTo(ABCContainerTag t) {
if (t instanceof RootABCContainerTag) {
@@ -30,9 +30,8 @@ import javax.swing.event.ListSelectionListener;
public class TraitsList extends JList<Object> implements ListSelectionListener {
ABC abc;
List<ABCContainerTag> abcTags;
int classIndex = -1;
private ABC abc;
private int classIndex = -1;
private final ABCPanel abcPanel;
private boolean sorted = false;
@@ -57,16 +56,18 @@ public class TraitsList extends JList<Object> implements ListSelectionListener {
public void clearAbc() {
this.abc = null;
this.abcTags = null;
setModel(new DefaultListModel<>());
}
public void setAbc(List<ABCContainerTag> abcTags, ABC abc) {
public void setAbc(ABC abc) {
this.abc = abc;
this.abcTags = abcTags;
setModel(new DefaultListModel<>());
setClassIndex(-1, -1);
}
private List<ABCContainerTag> getAbcTags() {
return abc == null ? null : abc.getSwf().getAbcList();
}
public void setClassIndex(int classIndex, int scriptIndex) {
if (classIndex >= abc.instance_info.size()) {
@@ -77,7 +78,7 @@ public class TraitsList extends JList<Object> implements ListSelectionListener {
setModel(new DefaultListModel<>());
} else {
if (abc != null) {
setModel(new TraitsListModel(abcTags, abc, classIndex, scriptIndex, sorted));
setModel(new TraitsListModel(abc, classIndex, scriptIndex, sorted));
}
}
}
@@ -25,9 +25,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.gui.AppStrings;
import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
import com.jpexs.decompiler.flash.helpers.NulWriter;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -39,7 +37,6 @@ public class TraitsListItem {
private final Type type;
private final boolean isStatic;
private final List<ABCContainerTag> abcTags;
private final ABC abc;
private final int classIndex;
private final int index;
@@ -47,11 +44,10 @@ public class TraitsListItem {
public String STR_INSTANCE_INITIALIZER = AppStrings.translate("abc.traitslist.instanceinitializer");
public String STR_CLASS_INITIALIZER = AppStrings.translate("abc.traitslist.classinitializer");
public TraitsListItem(Type type, int index, boolean isStatic, List<ABCContainerTag> abcTags, ABC abc, int classIndex, int scriptIndex) {
public TraitsListItem(Type type, int index, boolean isStatic, ABC abc, int classIndex, int scriptIndex) {
this.type = type;
this.index = index;
this.isStatic = isStatic;
this.abcTags = abcTags;
this.abc = abc;
this.classIndex = classIndex;
this.scriptIndex = scriptIndex;
@@ -89,14 +85,14 @@ public class TraitsListItem {
String s = "";
try {
if ((type != Type.INITIALIZER) && isStatic) {
abc.class_info.get(classIndex).static_traits.traits.get(index).convertHeader(null, "", abcTags, abc, true, ScriptExportMode.AS, scriptIndex, classIndex, new NulWriter(), new ArrayList<String>(), false);
abc.class_info.get(classIndex).static_traits.traits.get(index).convertHeader(null, "", abc, true, ScriptExportMode.AS, scriptIndex, classIndex, new NulWriter(), new ArrayList<String>(), false);
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), false);
abc.class_info.get(classIndex).static_traits.traits.get(index).toStringHeader(null, "", abcTags, abc, true, ScriptExportMode.AS, scriptIndex, classIndex, writer, new ArrayList<String>(), false);
abc.class_info.get(classIndex).static_traits.traits.get(index).toStringHeader(null, "", abc, true, ScriptExportMode.AS, scriptIndex, classIndex, writer, new ArrayList<String>(), false);
s = writer.toString();
} else if ((type != Type.INITIALIZER) && (!isStatic)) {
abc.instance_info.get(classIndex).instance_traits.traits.get(index).convertHeader(null, "", abcTags, abc, false, ScriptExportMode.AS, scriptIndex, classIndex, new NulWriter(), new ArrayList<String>(), false);
abc.instance_info.get(classIndex).instance_traits.traits.get(index).convertHeader(null, "", abc, false, ScriptExportMode.AS, scriptIndex, classIndex, new NulWriter(), new ArrayList<String>(), false);
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), false);
abc.instance_info.get(classIndex).instance_traits.traits.get(index).toStringHeader(null, "", abcTags, abc, false, ScriptExportMode.AS, scriptIndex, classIndex, writer, new ArrayList<String>(), false);
abc.instance_info.get(classIndex).instance_traits.traits.get(index).toStringHeader(null, "", abc, false, ScriptExportMode.AS, scriptIndex, classIndex, writer, new ArrayList<String>(), false);
s = writer.toString();
} else if (!isStatic) {
s = STR_INSTANCE_INITIALIZER;
@@ -17,7 +17,6 @@
package com.jpexs.decompiler.flash.gui.abc;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -28,7 +27,6 @@ import javax.swing.event.ListDataListener;
public final class TraitsListModel implements ListModel<Object> {
private List<TraitsListItem> items;
private final List<ABCContainerTag> abcTags;
private final ABC abc;
private final int classIndex;
private final int scriptIndex;
@@ -49,17 +47,16 @@ public final class TraitsListModel implements ListModel<Object> {
private void reset() {
items = new ArrayList<>();
for (int t = 0; t < abc.class_info.get(classIndex).static_traits.traits.size(); t++) {
items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.class_info.get(classIndex).static_traits.traits.get(t)), t, true, abcTags, abc, classIndex, scriptIndex));
items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.class_info.get(classIndex).static_traits.traits.get(t)), t, true, abc, classIndex, scriptIndex));
}
for (int t = 0; t < abc.instance_info.get(classIndex).instance_traits.traits.size(); t++) {
items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.instance_info.get(classIndex).instance_traits.traits.get(t)), t, false, abcTags, abc, classIndex, scriptIndex));
items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.instance_info.get(classIndex).instance_traits.traits.get(t)), t, false, abc, classIndex, scriptIndex));
}
items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, false, abcTags, abc, classIndex, scriptIndex));
items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, true, abcTags, abc, classIndex, scriptIndex));
items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, false, abc, classIndex, scriptIndex));
items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, true, abc, classIndex, scriptIndex));
}
public TraitsListModel(List<ABCContainerTag> abcTags, ABC abc, int classIndex, int scriptIndex, boolean sorted) {
this.abcTags = abcTags;
public TraitsListModel(ABC abc, int classIndex, int scriptIndex, boolean sorted) {
this.abc = abc;
this.classIndex = classIndex;
this.scriptIndex = scriptIndex;
@@ -55,20 +55,20 @@ public class UsageFrame extends AppDialog implements ActionListener, MouseListen
private final UsageListModel usageListModel;
private final ABCPanel abcPanel;
public UsageFrame(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, ABCPanel abcPanel, boolean definitions) {
public UsageFrame(ABC abc, int multinameIndex, ABCPanel abcPanel, boolean definitions) {
super(abcPanel.getMainPanel().getMainFrame().getWindow());
this.abcPanel = abcPanel;
List<MultinameUsage> usages = definitions ? abc.findMultinameDefinition(abcTags, multinameIndex) : abc.findMultinameUsage(abcTags, multinameIndex);
List<MultinameUsage> usages = definitions ? abc.findMultinameDefinition(multinameIndex) : abc.findMultinameUsage(multinameIndex);
Multiname m = abc.constants.constant_multiname.get(multinameIndex);
if (m.namespace_index > 0 && abc.constants.constant_namespace.get(m.namespace_index).kind != Namespace.KIND_PRIVATE) {
for (ABCContainerTag at : abcTags) {
for (ABCContainerTag at : abc.getAbcTags()) {
ABC a = at.getABC();
if (a == abc) {
continue;
}
int mid = a.constants.getMultinameId(m, false);
if (mid > 0) {
usages.addAll(definitions ? a.findMultinameDefinition(abcTags, mid) : a.findMultinameUsage(abcTags, mid));
usages.addAll(definitions ? a.findMultinameDefinition(mid) : a.findMultinameUsage(mid));
}
}
}
@@ -134,7 +134,7 @@ public class UsageFrame extends AppDialog implements ActionListener, MouseListen
settrait.run();
} else {
abcPanel.decompiledTextArea.addScriptListener(settrait);
abcPanel.hilightScript(abcPanel.swf, abcPanel.abc.instance_info.get(icu.classIndex).getName(abcPanel.abc.constants).getNameWithNamespace(abcPanel.abc.constants, false));
abcPanel.hilightScript(abcPanel.getSwf(), abcPanel.abc.instance_info.get(icu.classIndex).getName(abcPanel.abc.constants).getNameWithNamespace(abcPanel.abc.constants, false));
}
}
}