mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-13 21:58:15 +00:00
base class for ParseException, avm2.ConstantPool renamed to AVM2ConstantPool
This commit is contained in:
@@ -24,18 +24,17 @@ import com.jpexs.decompiler.flash.SWFBundle;
|
||||
import com.jpexs.decompiler.flash.SWFSourceInfo;
|
||||
import com.jpexs.decompiler.flash.SearchMode;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.ABCInputStream;
|
||||
import com.jpexs.decompiler.flash.abc.ClassPath;
|
||||
import com.jpexs.decompiler.flash.abc.RenameType;
|
||||
import com.jpexs.decompiler.flash.abc.ScriptPack;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.UnknownInstructionCode;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.ASM3Parser;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.MissingSymbolHandler;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScriptParser;
|
||||
import com.jpexs.decompiler.flash.abc.types.MethodBody;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
|
||||
import com.jpexs.decompiler.flash.action.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationItem;
|
||||
@@ -85,7 +84,6 @@ import com.jpexs.decompiler.flash.types.sound.SoundFormat;
|
||||
import com.jpexs.decompiler.flash.xfl.FLAVersion;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import com.jpexs.helpers.MemoryInputStream;
|
||||
import com.jpexs.helpers.Path;
|
||||
import com.jpexs.helpers.streams.SeekableInputStream;
|
||||
import com.sun.jna.Platform;
|
||||
@@ -1426,7 +1424,7 @@ public class CommandLineArgumentParser {
|
||||
} else {
|
||||
try {
|
||||
src.setActions(ASMParser.parse(0, true, text, src.getSwf().version, false));
|
||||
} catch (ParseException ex) {
|
||||
} catch (ActionParseException ex) {
|
||||
System.err.println("%error% on line %line%".replace("%error%", ex.text).replace("%line%", "" + ex.line));
|
||||
System.exit(1);
|
||||
}
|
||||
@@ -1440,7 +1438,7 @@ public class CommandLineArgumentParser {
|
||||
com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser par = new com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser(src.getSwf().version);
|
||||
try {
|
||||
src.setActions(par.actionsFromString(as));
|
||||
} catch (ParseException ex) {
|
||||
} catch (ActionParseException ex) {
|
||||
System.err.println("%error% on line %line%".replace("%error%", ex.text).replace("%line%", "" + ex.line));
|
||||
System.exit(1);
|
||||
} catch (CompilationException ex) {
|
||||
@@ -1484,7 +1482,7 @@ public class CommandLineArgumentParser {
|
||||
}, abc.bodies.get(bodyIndex), abc.method_info.get(abc.bodies.get(bodyIndex).method_info));
|
||||
acode.getBytes(abc.bodies.get(bodyIndex).codeBytes);
|
||||
abc.bodies.get(bodyIndex).setCode(acode);
|
||||
} catch (com.jpexs.decompiler.flash.abc.avm2.parser.ParseException ex) {
|
||||
} catch (AVM2ParseException ex) {
|
||||
System.err.println("%error% on line %line%".replace("%error%", ex.text).replace("%line%", "" + ex.line));
|
||||
System.exit(1);
|
||||
}
|
||||
@@ -1507,7 +1505,7 @@ public class CommandLineArgumentParser {
|
||||
|
||||
try {
|
||||
pack.abc.replaceSciptPack(pack, as);
|
||||
} catch (com.jpexs.decompiler.flash.abc.avm2.parser.ParseException ex) {
|
||||
} catch (AVM2ParseException ex) {
|
||||
System.err.println("%error% on line %line%".replace("%error%", ex.text).replace("%line%", "" + ex.line));
|
||||
System.exit(1);
|
||||
} catch (CompilationException ex) {
|
||||
|
||||
@@ -35,8 +35,8 @@ import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Multiline;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Optional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.AnnotationParseException;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.ConditionEvaluator;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.ParseException;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
@@ -546,7 +546,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener {
|
||||
((Component) dependentEditor).setVisible(conditionMet);
|
||||
dependentLabel.setVisible(conditionMet);
|
||||
dependentTypeLabel.setVisible(conditionMet);
|
||||
} catch (ParseException ex) {
|
||||
} catch (AnnotationParseException ex) {
|
||||
Logger.getLogger(GenericTagPanel.class.getName()).log(Level.SEVERE, "Invalid condition", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Multiline;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.AnnotationParseException;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.ConditionEvaluator;
|
||||
import com.jpexs.decompiler.flash.types.annotations.parser.ParseException;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
@@ -529,7 +529,7 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (ParseException ex) {
|
||||
} catch (AnnotationParseException ex) {
|
||||
Logger.getLogger(GenericTagTreePanel.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
@@ -812,7 +812,7 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
if (!ev.eval(fieldMap)) {
|
||||
continue;
|
||||
}
|
||||
} catch (ParseException | IllegalArgumentException | IllegalAccessException ex) {
|
||||
} catch (AnnotationParseException | IllegalArgumentException | IllegalAccessException ex) {
|
||||
Logger.getLogger(GenericTagTreePanel.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.SoundStreamHeadTypeTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.SoundTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.TextTag;
|
||||
import com.jpexs.decompiler.flash.tags.text.ParseException;
|
||||
import com.jpexs.decompiler.flash.tags.text.TextParseException;
|
||||
import com.jpexs.decompiler.flash.timeline.DepthState;
|
||||
import com.jpexs.decompiler.flash.timeline.Frame;
|
||||
import com.jpexs.decompiler.flash.timeline.Timeline;
|
||||
@@ -1919,7 +1919,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
textTag.setModified(true);
|
||||
return true;
|
||||
}
|
||||
} catch (ParseException ex) {
|
||||
} catch (TextParseException ex) {
|
||||
View.showMessageDialog(null, translate("error.text.invalid").replace("%text%", ex.text).replace("%line%", "" + ex.line), translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.gui;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.gui.player.FlashPlayerPanel;
|
||||
@@ -684,7 +685,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
|
||||
doa = new DoActionTag(swf, null);
|
||||
actions = ASMParser.parse(0, false,
|
||||
"ConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\"\n"
|
||||
"ActionConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\"\n"
|
||||
+ "Push \"_root\"\n"
|
||||
+ "GetVariable\n"
|
||||
+ "Push \"my_sound\" 0.0 \"Sound\"\n"
|
||||
@@ -703,7 +704,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
new ShowFrameTag(swf).writeTag(sos2);
|
||||
|
||||
actions = ASMParser.parse(0, false,
|
||||
"ConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\" \"start\"\n"
|
||||
"ActionConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\" \"start\"\n"
|
||||
+ "StopSounds\n"
|
||||
+ "Push \"_root\"\n"
|
||||
+ "GetVariable\n"
|
||||
@@ -730,7 +731,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
new ShowFrameTag(swf).writeTag(sos2);
|
||||
|
||||
actions = ASMParser.parse(0, false,
|
||||
"ConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\" \"onSoundComplete\" \"start\" \"execParam\"\n"
|
||||
"ActionConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\" \"onSoundComplete\" \"start\" \"execParam\"\n"
|
||||
+ "StopSounds\n"
|
||||
+ "Push \"_root\"\n"
|
||||
+ "GetVariable\n"
|
||||
@@ -829,7 +830,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
flashPanel.displaySWF(tempFile.getAbsolutePath(), backgroundColor, frameRate);
|
||||
}
|
||||
showFlashViewerPanel();
|
||||
} catch (IOException | com.jpexs.decompiler.flash.action.parser.ParseException ex) {
|
||||
} catch (IOException | ActionParseException ex) {
|
||||
Logger.getLogger(PreviewPanel.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnVoidIns;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushScopeIns;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.types.ABCException;
|
||||
import com.jpexs.decompiler.flash.abc.types.MethodBody;
|
||||
import com.jpexs.decompiler.flash.abc.types.MethodInfo;
|
||||
@@ -790,7 +790,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
setDecompiledEditMode(false);
|
||||
View.showMessageDialog(this, AppStrings.translate("message.action.saved"));
|
||||
//reload();
|
||||
} catch (ParseException ex) {
|
||||
} catch (AVM2ParseException ex) {
|
||||
abc.script_info.get(oldIndex).delete(abc, false);
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
decompiledTextArea.gotoLine((int) ex.line);
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.gui.abc;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.graph.AVM2Graph;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.ASM3Parser;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.MissingSymbolHandler;
|
||||
import com.jpexs.decompiler.flash.abc.types.MethodBody;
|
||||
@@ -220,7 +220,7 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
|
||||
((Tag) abc.parentTag).setModified(true);
|
||||
} catch (IOException ex) {
|
||||
} catch (InterruptedException ex) {
|
||||
} catch (ParseException ex) {
|
||||
} catch (AVM2ParseException ex) {
|
||||
View.showMessageDialog(this, (ex.text + " on line " + ex.line));
|
||||
selectLine((int) ex.line);
|
||||
return false;
|
||||
|
||||
@@ -1,103 +1,103 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2014 JPEXS
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.ConstantPool;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.ListModel;
|
||||
import javax.swing.event.ListDataListener;
|
||||
|
||||
public class ConstantsListModel implements ListModel {
|
||||
|
||||
private final ConstantPool constants;
|
||||
public static final int TYPE_UINT = 0;
|
||||
public static final int TYPE_INT = 1;
|
||||
public static final int TYPE_DOUBLE = 2;
|
||||
public static final int TYPE_DECIMAL = 3;
|
||||
public static final int TYPE_STRING = 4;
|
||||
public static final int TYPE_NAMESPACE = 5;
|
||||
public static final int TYPE_NAMESPACESET = 6;
|
||||
public static final int TYPE_MULTINAME = 7;
|
||||
private int type = TYPE_INT;
|
||||
|
||||
public ConstantsListModel(ConstantPool constants, int type) {
|
||||
this.type = type;
|
||||
this.constants = constants;
|
||||
}
|
||||
|
||||
private int makeUp(int i) {
|
||||
if (i < 0) {
|
||||
return 0;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
switch (type) {
|
||||
case TYPE_UINT:
|
||||
return makeUp(constants.getUIntCount() - 1);
|
||||
case TYPE_INT:
|
||||
return makeUp(constants.getIntCount() - 1);
|
||||
case TYPE_DOUBLE:
|
||||
return makeUp(constants.getDoubleCount() - 1);
|
||||
case TYPE_DECIMAL:
|
||||
return makeUp(constants.getDecimalCount() - 1);
|
||||
case TYPE_STRING:
|
||||
return makeUp(constants.getStringCount() - 1);
|
||||
case TYPE_NAMESPACE:
|
||||
return makeUp(constants.getNamespaceCount() - 1);
|
||||
case TYPE_NAMESPACESET:
|
||||
return makeUp(constants.getNamespaceSetCount() - 1);
|
||||
case TYPE_MULTINAME:
|
||||
return makeUp(constants.getMultinameCount() - 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
switch (type) {
|
||||
case TYPE_UINT:
|
||||
return "" + (index + 1) + ":" + constants.getUInt(index + 1);
|
||||
case TYPE_INT:
|
||||
return "" + (index + 1) + ":" + constants.getInt(index + 1);
|
||||
case TYPE_DOUBLE:
|
||||
return "" + (index + 1) + ":" + constants.getDouble(index + 1);
|
||||
case TYPE_DECIMAL:
|
||||
return "" + (index + 1) + ":" + constants.getDecimal(index + 1);
|
||||
case TYPE_STRING:
|
||||
return "" + (index + 1) + ":" + Helper.escapeString(constants.getString(index + 1));
|
||||
case TYPE_NAMESPACE:
|
||||
return "" + (index + 1) + ":" + constants.getNamespace(index + 1).getNameWithKind(constants);
|
||||
case TYPE_NAMESPACESET:
|
||||
return "" + (index + 1) + ":" + constants.getNamespaceSet(index + 1).toString(constants);
|
||||
case TYPE_MULTINAME:
|
||||
return "" + (index + 1) + ":" + constants.getMultiname(index + 1).toString(constants, new ArrayList<String>());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListDataListener(ListDataListener l) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListDataListener(ListDataListener l) {
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2010-2014 JPEXS
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.ListModel;
|
||||
import javax.swing.event.ListDataListener;
|
||||
|
||||
public class ConstantsListModel implements ListModel {
|
||||
|
||||
private final AVM2ConstantPool constants;
|
||||
public static final int TYPE_UINT = 0;
|
||||
public static final int TYPE_INT = 1;
|
||||
public static final int TYPE_DOUBLE = 2;
|
||||
public static final int TYPE_DECIMAL = 3;
|
||||
public static final int TYPE_STRING = 4;
|
||||
public static final int TYPE_NAMESPACE = 5;
|
||||
public static final int TYPE_NAMESPACESET = 6;
|
||||
public static final int TYPE_MULTINAME = 7;
|
||||
private int type = TYPE_INT;
|
||||
|
||||
public ConstantsListModel(AVM2ConstantPool constants, int type) {
|
||||
this.type = type;
|
||||
this.constants = constants;
|
||||
}
|
||||
|
||||
private int makeUp(int i) {
|
||||
if (i < 0) {
|
||||
return 0;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
switch (type) {
|
||||
case TYPE_UINT:
|
||||
return makeUp(constants.getUIntCount() - 1);
|
||||
case TYPE_INT:
|
||||
return makeUp(constants.getIntCount() - 1);
|
||||
case TYPE_DOUBLE:
|
||||
return makeUp(constants.getDoubleCount() - 1);
|
||||
case TYPE_DECIMAL:
|
||||
return makeUp(constants.getDecimalCount() - 1);
|
||||
case TYPE_STRING:
|
||||
return makeUp(constants.getStringCount() - 1);
|
||||
case TYPE_NAMESPACE:
|
||||
return makeUp(constants.getNamespaceCount() - 1);
|
||||
case TYPE_NAMESPACESET:
|
||||
return makeUp(constants.getNamespaceSetCount() - 1);
|
||||
case TYPE_MULTINAME:
|
||||
return makeUp(constants.getMultinameCount() - 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
switch (type) {
|
||||
case TYPE_UINT:
|
||||
return "" + (index + 1) + ":" + constants.getUInt(index + 1);
|
||||
case TYPE_INT:
|
||||
return "" + (index + 1) + ":" + constants.getInt(index + 1);
|
||||
case TYPE_DOUBLE:
|
||||
return "" + (index + 1) + ":" + constants.getDouble(index + 1);
|
||||
case TYPE_DECIMAL:
|
||||
return "" + (index + 1) + ":" + constants.getDecimal(index + 1);
|
||||
case TYPE_STRING:
|
||||
return "" + (index + 1) + ":" + Helper.escapeString(constants.getString(index + 1));
|
||||
case TYPE_NAMESPACE:
|
||||
return "" + (index + 1) + ":" + constants.getNamespace(index + 1).getNameWithKind(constants);
|
||||
case TYPE_NAMESPACESET:
|
||||
return "" + (index + 1) + ":" + constants.getNamespaceSet(index + 1).toString(constants);
|
||||
case TYPE_MULTINAME:
|
||||
return "" + (index + 1) + ":" + constants.getMultiname(index + 1).toString(constants, new ArrayList<String>());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListDataListener(ListDataListener l) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListDataListener(ListDataListener l) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.ASM3Parser;
|
||||
import com.jpexs.decompiler.flash.abc.types.ValueKind;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst;
|
||||
@@ -116,7 +116,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
if (!ASM3Parser.parseSlotConst(new StringReader(slotConstEditor.getText()), abc.constants, trait)) {
|
||||
return false;
|
||||
}
|
||||
} catch (ParseException ex) {
|
||||
} catch (AVM2ParseException ex) {
|
||||
View.showMessageDialog(slotConstEditor, ex.text, AppStrings.translate("error.slotconst.typevalue"), JOptionPane.ERROR_MESSAGE);
|
||||
return false;
|
||||
} catch (IOException ex) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionGraph;
|
||||
import com.jpexs.decompiler.flash.action.ActionList;
|
||||
import com.jpexs.decompiler.flash.action.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionPush;
|
||||
@@ -739,7 +739,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
|
||||
editor.setEditable(false);
|
||||
editMode = false;
|
||||
} catch (IOException ex) {
|
||||
} catch (ParseException ex) {
|
||||
} catch (ActionParseException ex) {
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
editor.gotoLine((int) ex.line);
|
||||
}
|
||||
@@ -763,7 +763,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
|
||||
setDecompiledEditMode(false);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(ActionPanel.class.getName()).log(Level.SEVERE, "IOException during action compiling", ex);
|
||||
} catch (ParseException ex) {
|
||||
} catch (ActionParseException ex) {
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
} catch (CompilationException ex) {
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.ABCInputStream;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionListReader;
|
||||
import com.jpexs.decompiler.flash.action.model.ConstantPool;
|
||||
import com.jpexs.decompiler.flash.action.model.ActionConstantPool;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
|
||||
import com.jpexs.decompiler.flash.dumpview.DumpInfoSwfNode;
|
||||
@@ -253,7 +253,7 @@ public class DumpTree extends JTree implements ActionListener {
|
||||
di.parent = dumpInfo;
|
||||
rri.dumpInfo = di;
|
||||
rri.seek(action.getAddress());
|
||||
rri.readAction(new ConstantPool());
|
||||
rri.readAction(new ActionConstantPool());
|
||||
dumpInfo.getChildInfos().add(di);
|
||||
}
|
||||
repaint();
|
||||
|
||||
Reference in New Issue
Block a user