mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 00:47:46 +00:00
Avoid multiname not found exception.
This commit is contained in:
@@ -135,7 +135,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
}
|
||||
|
||||
public void setNoTrait() {
|
||||
abcPanel.detailPanel.showCard(DetailPanel.UNSUPPORTED_TRAIT_CARD, null, 0);
|
||||
abcPanel.detailPanel.showCard(DetailPanel.UNSUPPORTED_TRAIT_CARD, null, 0, null);
|
||||
}
|
||||
|
||||
public void hilightSpecial(HighlightSpecialType type, long index) {
|
||||
@@ -224,7 +224,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
trait = null;
|
||||
}
|
||||
}
|
||||
abcPanel.detailPanel.showCard(DetailPanel.METHOD_GETTER_SETTER_TRAIT_CARD, trait, traitIndex);
|
||||
abcPanel.detailPanel.showCard(DetailPanel.METHOD_GETTER_SETTER_TRAIT_CARD, trait, traitIndex, abc);
|
||||
MethodCodePanel methodCodePanel = abcPanel.detailPanel.methodTraitPanel.methodCodePanel;
|
||||
if (reset || (methodCodePanel.getBodyIndex() != bi)) {
|
||||
methodCodePanel.setBodyIndex(scriptName, bi, abc, name, trait, script.scriptIndex);
|
||||
@@ -658,7 +658,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
final Trait ftrait = currentTrait;
|
||||
final int ftraitIndex = lastTraitIndex;
|
||||
View.execInEventDispatch(() -> {
|
||||
abcPanel.detailPanel.showCard(DetailPanel.SLOT_CONST_TRAIT_CARD, ftrait, ftraitIndex);
|
||||
abcPanel.detailPanel.showCard(DetailPanel.SLOT_CONST_TRAIT_CARD, ftrait, ftraitIndex, abc);
|
||||
});
|
||||
abcPanel.detailPanel.setEditMode(false);
|
||||
currentMethodHighlight = null;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.types.Multiname;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
@@ -194,7 +195,7 @@ public class DetailPanel extends JPanel implements TagEditorPanel {
|
||||
selectedLabel.setIcon(val ? View.getIcon("editing16") : null);
|
||||
}
|
||||
|
||||
public void showCard(final String name, final Trait trait, int traitIndex) {
|
||||
public void showCard(final String name, final Trait trait, int traitIndex, ABC abc) {
|
||||
View.execInEventDispatch(() -> {
|
||||
CardLayout layout = (CardLayout) innerPanel.getLayout();
|
||||
layout.show(innerPanel, name);
|
||||
@@ -286,8 +287,8 @@ public class DetailPanel extends JPanel implements TagEditorPanel {
|
||||
if (trait == null) {
|
||||
traitNameLabel.setText("-");
|
||||
} else if (abcPanel != null) {
|
||||
Multiname traitName = trait.getName(abcPanel.abc);
|
||||
String traitNameStr = traitName == null ? "" : traitName.getName(abcPanel.abc.constants, null, false, true);
|
||||
Multiname traitName = trait.getName(abc);
|
||||
String traitNameStr = traitName == null ? "" : traitName.getName(abc.constants, null, false, true);
|
||||
traitNameLabel.setText(traitNameStr);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user