export/import symbol classes/export asset tags

This commit is contained in:
2015-03-13 00:18:11 +01:00
parent eb9d783442
commit 7f68a43079
35 changed files with 359 additions and 72 deletions
@@ -152,7 +152,7 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
ConfigurationCategory cat = field.getAnnotation(ConfigurationCategory.class);
String scat = cat == null ? "other" : cat.value();
if (!categorized.containsKey(scat)) {
categorized.put(scat, new HashMap<String, Field>());
categorized.put(scat, new HashMap<>());
}
categorized.get(scat).put(name, field);
}
@@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.exporters.modes.MovieExportMode;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.exporters.modes.ShapeExportMode;
import com.jpexs.decompiler.flash.exporters.modes.SoundExportMode;
import com.jpexs.decompiler.flash.exporters.modes.SymbolClassExportMode;
import com.jpexs.decompiler.flash.exporters.modes.TextExportMode;
import com.jpexs.decompiler.flash.gui.tagtree.TagTreeModel;
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
@@ -37,6 +38,7 @@ import com.jpexs.decompiler.flash.tags.base.ImageTag;
import com.jpexs.decompiler.flash.tags.base.MorphShapeTag;
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
import com.jpexs.decompiler.flash.tags.base.SoundTag;
import com.jpexs.decompiler.flash.tags.base.SymbolClassTypeTag;
import com.jpexs.decompiler.flash.tags.base.TextTag;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
@@ -75,7 +77,8 @@ public class ExportDialog extends AppDialog {
TagTreeModel.FOLDER_BINARY_DATA,
TagTreeModel.FOLDER_FRAMES,
TagTreeModel.FOLDER_FONTS,
TagTreeModel.FOLDER_MORPHSHAPES
TagTreeModel.FOLDER_MORPHSHAPES,
"symbolclass"
};
//Display options only when these classes found
@@ -89,7 +92,8 @@ public class ExportDialog extends AppDialog {
{DefineBinaryDataTag.class},
{Frame.class},
{FontTag.class},
{MorphShapeTag.class}
{MorphShapeTag.class},
{SymbolClassTypeTag.class}
};
//Enum classes for values
@@ -103,7 +107,8 @@ public class ExportDialog extends AppDialog {
BinaryDataExportMode.class,
FramesExportMode.class,
FontExportMode.class,
MorphShapeExportMode.class
MorphShapeExportMode.class,
SymbolClassExportMode.class
};
Class[] zoomClasses = {
@@ -179,7 +179,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener {
private void generateEditControls(Tag tag, boolean readonly) {
clear();
generateEditControlsRecursive(tag, "", new ArrayList<Field>(), new ArrayList<Integer>(), readonly);
generateEditControlsRecursive(tag, "", new ArrayList<>(), new ArrayList<>(), readonly);
change(null);
}
@@ -65,7 +65,7 @@ public class GraphDialog extends AppDialog {
public GraphPanel(Graph graph) throws InterruptedException {
graph.init(null);
size = getPartPositions(head = graph.heads.get(0), SPACE_VERTICAL + SPACE_VERTICAL + BLOCK_HEIGHT / 2, getPartWidth(graph.heads.get(0), new HashSet<GraphPart>()) * (BLOCK_WIDTH + SPACE_HORIZONTAL) / 2 - SPACE_HORIZONTAL, partPos, true);
size = getPartPositions(head = graph.heads.get(0), SPACE_VERTICAL + SPACE_VERTICAL + BLOCK_HEIGHT / 2, getPartWidth(graph.heads.get(0), new HashSet<>()) * (BLOCK_WIDTH + SPACE_HORIZONTAL) / 2 - SPACE_HORIZONTAL, partPos, true);
backLinksLeft = 1;
backLinksRight = 1;
for (GraphPart part : partPos.keySet()) {
@@ -562,7 +562,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
stillFrame = true;
zoomAvailable = false;
iconPanel.setImg(image);
iconPanel.setOutlines(new ArrayList<DepthState>(), new ArrayList<Shape>());
iconPanel.setOutlines(new ArrayList<>(), new ArrayList<>());
drawReady = true;
}
@@ -596,13 +596,13 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
}
iconPanel.setImg(image);
iconPanel.setOutlines(new ArrayList<DepthState>(), new ArrayList<Shape>());
iconPanel.setOutlines(new ArrayList<>(), new ArrayList<>());
drawReady = true;
}
private synchronized void clearImagePanel() {
iconPanel.setImg(null);
iconPanel.setOutlines(new ArrayList<DepthState>(), new ArrayList<Shape>());
iconPanel.setOutlines(new ArrayList<>(), new ArrayList<>());
}
@Override
@@ -162,6 +162,10 @@ public abstract class MainFrameMenu {
mainFrame.getPanel().importText(swf);
}
protected void importSymbolClass() {
mainFrame.getPanel().importSymbolClass(swf);
}
protected boolean export(boolean onlySelected) {
if (swf != null) {
mainFrame.getPanel().export(onlySelected);
@@ -137,6 +137,8 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
private static final String ACTION_IMPORT_TEXT = "IMPORTTEXT";
private static final String ACTION_IMPORT_SYMBOL_CLASS = "IMPORTSYMBOLCLASS";
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
private static final String ACTION_HELP_US = "HELPUS";
@@ -201,6 +203,8 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
private JCommandButton importTextCommandButton;
private JCommandButton importSymbolClassCommandButton;
private JCommandButton importXmlCommandButton;
private JCommandButton exportXmlCommandButton;
@@ -446,11 +450,15 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
importTextCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.import.text")), View.getResizableIcon("importtext32"));
assignListener(importTextCommandButton, ACTION_IMPORT_TEXT);
importSymbolClassCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.import.symbolClass")), View.getResizableIcon("importtext32"));
assignListener(importSymbolClassCommandButton, ACTION_IMPORT_SYMBOL_CLASS);
importXmlCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.import.xml")), View.getResizableIcon("importxml32"));
assignListener(importXmlCommandButton, ACTION_IMPORT_SWF_XML);
importBand.addCommandButton(importXmlCommandButton, RibbonElementPriority.TOP);
importBand.addCommandButton(importTextCommandButton, RibbonElementPriority.TOP);
importBand.addCommandButton(importSymbolClassCommandButton, RibbonElementPriority.TOP);
JRibbonBand viewBand = new JRibbonBand(translate("menu.view"), null);
viewBand.setResizePolicies(getResizePolicies(viewBand));
@@ -738,6 +746,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
exportXmlCommandButton.setEnabled(swfLoaded);
exportSelectionCommandButton.setEnabled(swfLoaded);
importTextCommandButton.setEnabled(swfLoaded);
importSymbolClassCommandButton.setEnabled(swfLoaded);
importXmlCommandButton.setEnabled(swfLoaded);
reloadCommandButton.setEnabled(swfLoaded);
@@ -949,6 +958,9 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
case ACTION_IMPORT_TEXT:
importText();
break;
case ACTION_IMPORT_SYMBOL_CLASS:
importSymbolClass();
break;
case ACTION_EXPORT_SWF_XML:
mainFrame.getPanel().exportSwfXml();
@@ -37,6 +37,7 @@ import com.jpexs.decompiler.flash.exporters.MorphShapeExporter;
import com.jpexs.decompiler.flash.exporters.MovieExporter;
import com.jpexs.decompiler.flash.exporters.ShapeExporter;
import com.jpexs.decompiler.flash.exporters.SoundExporter;
import com.jpexs.decompiler.flash.exporters.SymbolClassExporter;
import com.jpexs.decompiler.flash.exporters.TextExporter;
import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode;
import com.jpexs.decompiler.flash.exporters.modes.FontExportMode;
@@ -77,6 +78,7 @@ import com.jpexs.decompiler.flash.importers.BinaryDataImporter;
import com.jpexs.decompiler.flash.importers.ImageImporter;
import com.jpexs.decompiler.flash.importers.ShapeImporter;
import com.jpexs.decompiler.flash.importers.SwfXmlImporter;
import com.jpexs.decompiler.flash.importers.SymbolClassImporter;
import com.jpexs.decompiler.flash.importers.TextImporter;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
@@ -98,6 +100,7 @@ import com.jpexs.decompiler.flash.tags.base.MorphShapeTag;
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.SymbolClassTypeTag;
import com.jpexs.decompiler.flash.tags.base.TextImportErrorHandler;
import com.jpexs.decompiler.flash.tags.base.TextTag;
import com.jpexs.decompiler.flash.tags.text.TextAlign;
@@ -380,7 +383,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
private JPanel createFolderPreviewCard() {
JPanel folderPreviewCard = new JPanel(new BorderLayout());
folderPreviewPanel = new FolderPreviewPanel(this, new ArrayList<TreeItem>());
folderPreviewPanel = new FolderPreviewPanel(this, new ArrayList<>());
folderPreviewCard.add(new JScrollPane(folderPreviewPanel), BorderLayout.CENTER);
return folderPreviewCard;
@@ -1012,6 +1015,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
List<Tag> binaryData = new ArrayList<>();
Map<Integer, List<Integer>> frames = new HashMap<>();
List<Tag> fonts = new ArrayList<>();
List<Tag> symbolNames = new ArrayList<>();
SWF swf = allSwfs.get(j);
for (TreeItem d : sel) {
@@ -1060,6 +1064,11 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
if (nodeType == TreeNodeType.FONT) {
fonts.add((Tag) d);
}
if (nodeType == TreeNodeType.OTHER_TAG) {
if (d instanceof SymbolClassTypeTag) {
symbolNames.add((Tag) d);
}
}
}
if (d instanceof Frame) {
@@ -1071,7 +1080,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
parentId = ((CharacterTag) parent).getCharacterId();
}
if (!frames.containsKey(parentId)) {
frames.put(parentId, new ArrayList<Integer>());
frames.put(parentId, new ArrayList<>());
}
frames.get(parentId).add(frame);
}
@@ -1106,11 +1115,14 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
new BinaryDataExportSettings(export.getValue(BinaryDataExportMode.class)), evl));
ret.addAll(new FontExporter().exportFonts(handler, selFile + File.separator + "fonts", fonts,
new FontExportSettings(export.getValue(FontExportMode.class)), evl));
ret.addAll(new SymbolClassExporter().exportNames(selFile, symbolNames, evl));
FrameExporter frameExporter = new FrameExporter();
FramesExportSettings fes = new FramesExportSettings(export.getValue(FramesExportMode.class), export.getZoom());
for (Entry<Integer, List<Integer>> entry : frames.entrySet()) {
ret.addAll(frameExporter.exportFrames(handler, selFile + File.separator + "frames", swf, entry.getKey(), entry.getValue(), fes, evl));
int containerId = entry.getKey();
String subFolder = containerId == 0 ? "frames" : "sprites";
ret.addAll(frameExporter.exportFrames(handler, selFile + File.separator + subFolder, swf, containerId, entry.getValue(), fes, evl));
}
if (swf.isAS3()) {
@@ -1145,13 +1157,14 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
new BinaryDataExportSettings(export.getValue(BinaryDataExportMode.class)), evl);
new FontExporter().exportFonts(handler, selFile + File.separator + "fonts", swf.tags,
new FontExportSettings(export.getValue(FontExportMode.class)), evl);
new SymbolClassExporter().exportNames(selFile, swf.tags, evl);
FrameExporter frameExporter = new FrameExporter();
FramesExportSettings fes = new FramesExportSettings(export.getValue(FramesExportMode.class), export.getZoom());
frameExporter.exportFrames(handler, selFile + File.separator + "frames", swf, 0, null, fes, evl);
for (CharacterTag c : swf.getCharacters().values()) {
if (c instanceof DefineSpriteTag) {
frameExporter.exportFrames(handler, selFile + File.separator + "frames", swf, c.getCharacterId(), null, fes, evl);
frameExporter.exportFrames(handler, selFile + File.separator + "sprites", swf, c.getCharacterId(), null, fes, evl);
}
}
@@ -1660,6 +1673,23 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
}
public void importSymbolClass(final SWF swf) {
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get()));
chooser.setDialogTitle(translate("import.select.directory"));
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setAcceptAllFileFilterUsed(false);
if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
String selFile = Helper.fixDialogFile(chooser.getSelectedFile()).getAbsolutePath();
File importFile = new File(Path.combine(selFile, SymbolClassExporter.SYMBOL_CLASS_EXPORT_FILENAME));
SymbolClassImporter importer = new SymbolClassImporter();
if (importFile.exists()) {
importer.importSymbolClasses(importFile, swf);
}
}
}
private String selectExportDir() {
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get()));
@@ -2784,7 +2814,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
if (tim != null) {
return tim;
}
tim = new Timeline(tag.getSwf(), null, new ArrayList<Tag>(), ((CharacterTag) tag).getCharacterId(), getRect());
tim = new Timeline(tag.getSwf(), null, new ArrayList<>(), ((CharacterTag) tag).getCharacterId(), getRect());
if (tag instanceof MorphShapeTag) {
tim.frameRate = MORPH_SHAPE_ANIMATION_FRAME_RATE;
int framesCnt = tim.frameRate * MORPH_SHAPE_ANIMATION_LENGTH;
@@ -2822,7 +2852,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
@Override
public RECT getRect() {
return getRect(new HashSet<BoundedTag>());
return getRect(new HashSet<>());
}
@Override
@@ -866,7 +866,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
nskind = newTraitDialog.getNamespaceKind();
name = newTraitDialog.getTraitName();
isStatic = newTraitDialog.getStatic();
m = new Multiname(Multiname.QNAME, abc.constants.getStringId(name, true), abc.constants.getNamespaceId(new Namespace(nskind, abc.constants.getStringId("", true)), 0, true), 0, 0, new ArrayList<Integer>());
m = new Multiname(Multiname.QNAME, abc.constants.getStringId(name, true), abc.constants.getNamespaceId(new Namespace(nskind, abc.constants.getStringId("", true)), 0, true), 0, 0, new ArrayList<>());
int mid = abc.constants.getMultinameId(m);
if (mid == 0) {
break;
@@ -33,7 +33,6 @@ import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.ScopeStack;
import com.jpexs.helpers.Helper;
import java.io.IOException;
@@ -180,7 +179,7 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane 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<Integer, GraphTargetItem>(), new ScopeStack(), new HashMap<Integer, String>(), new ArrayList<String>(), new HashMap<Integer, Integer>(), abc.bodies.get(bodyIndex).getCode().visitCode(abc.bodies.get(bodyIndex)));
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)));
(new GraphDialog(getAbcPanel().getMainPanel().getMainFrame().getWindow(), gr, name)).setVisible(true);
} catch (InterruptedException ex) {
Logger.getLogger(ASMSourceEditorPane.class.getName()).log(Level.SEVERE, null, ex);
@@ -97,7 +97,7 @@ public class ConstantsListModel implements ListModel {
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 (index + 1) + ":" + constants.getMultiname(index + 1).toString(constants, new ArrayList<>());
}
return null;
}
@@ -350,7 +350,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
InstanceInfo ii = a.instance_info.get(cindex);
for (int j = 0; j < ii.instance_traits.traits.size(); j++) {
Trait tr = ii.instance_traits.traits.get(j);
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), false /*NOT RAW!*/))) {
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<>(), false /*NOT RAW!*/))) {
classIndex.setVal(cindex);
abcIndex.setVal(i);
traitIndex.setVal(j);
@@ -365,7 +365,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
ClassInfo ci = a.class_info.get(cindex);
for (int j = 0; j < ci.static_traits.traits.size(); j++) {
Trait tr = ci.static_traits.traits.get(j);
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), false /*NOT RAW!*/))) {
if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList<>(), false /*NOT RAW!*/))) {
classIndex.setVal(cindex);
abcIndex.setVal(i);
traitIndex.setVal(j);
@@ -541,7 +541,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
currentTrait = getCurrentTrait();
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
if (currentTrait != null) {
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<String>(), false);
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<>(), false);
}
}
}
@@ -582,7 +582,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
currentTrait = getCurrentTrait();
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
if (currentTrait != null) {
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<String>(), false);
name += ":" + currentTrait.getName(abc).getName(abc.constants, new ArrayList<>(), false);
}
displayMethod(pos, abc.findMethodIdByTraitId(classIndex, lastTraitIndex), name, currentTrait, isStatic);
@@ -190,7 +190,7 @@ public class DetailPanel extends JPanel implements ActionListener {
traitNameLabel.setText("-");
} else {
if (abcPanel != null) {
traitNameLabel.setText(trait.getName(abcPanel.abc).getName(abcPanel.abc.constants, new ArrayList<String>(), false));
traitNameLabel.setText(trait.getName(abcPanel.abc).getName(abcPanel.abc.constants, new ArrayList<>(), false));
}
}
}
@@ -77,9 +77,9 @@ public class TraitsListItem {
public String toStringName() {
if ((type != Type.INITIALIZER) && isStatic) {
return abc.class_info.get(classIndex).static_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<String>(), false);
return abc.class_info.get(classIndex).static_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<>(), false);
} else if ((type != Type.INITIALIZER) && (!isStatic)) {
return abc.instance_info.get(classIndex).instance_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<String>(), false);
return abc.instance_info.get(classIndex).instance_traits.traits.get(index).getName(abc).getName(abc.constants, new ArrayList<>(), false);
} else if (!isStatic) {
return "__" + STR_INSTANCE_INITIALIZER;
} else {
@@ -92,14 +92,14 @@ public class TraitsListItem {
String s = "";
try {
if ((type != Type.INITIALIZER) && isStatic) {
abc.class_info.get(classIndex).static_traits.traits.get(index).convertHeader(null, "", 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<>(), false);
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), false);
abc.class_info.get(classIndex).static_traits.traits.get(index).toStringHeader(null, "", 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<>(), false);
s = writer.toString();
} else if ((type != Type.INITIALIZER) && (!isStatic)) {
abc.instance_info.get(classIndex).instance_traits.traits.get(index).convertHeader(null, "", 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<>(), false);
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), false);
abc.instance_info.get(classIndex).instance_traits.traits.get(index).toStringHeader(null, "", 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<>(), false);
s = writer.toString();
} else if (!isStatic) {
s = STR_INSTANCE_INITIALIZER;
@@ -128,7 +128,7 @@ public class MultinameTableModel implements TableModel {
if (abc.constants.getMultiname(rowIndex).name_index == -1) {
return "";
}
return abc.constants.getMultiname(rowIndex).getName(abc.constants, new ArrayList<String>(), true);
return abc.constants.getMultiname(rowIndex).getName(abc.constants, new ArrayList<>(), true);
case 3:
if (rowIndex == 0) {
return "";
@@ -48,7 +48,6 @@ import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
import com.jpexs.decompiler.flash.tags.base.ASMSource;
import com.jpexs.decompiler.graph.CompilationException;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.helpers.CancellableWorker;
import com.jpexs.helpers.Helper;
import java.awt.BorderLayout;
@@ -752,7 +751,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
case ACTION_GRAPH:
if (lastCode != null) {
try {
GraphDialog gf = new GraphDialog(mainPanel.getMainFrame().getWindow(), new ActionGraph(lastCode, new HashMap<Integer, String>(), new HashMap<String, GraphTargetItem>(), new HashMap<String, GraphTargetItem>(), SWF.DEFAULT_VERSION), "");
GraphDialog gf = new GraphDialog(mainPanel.getMainFrame().getWindow(), new ActionGraph(lastCode, new HashMap<>(), new HashMap<>(), new HashMap<>(), SWF.DEFAULT_VERSION), "");
gf.setVisible(true);
} catch (InterruptedException ex) {
Logger.getLogger(ActionPanel.class.getName()).log(Level.SEVERE, null, ex);
@@ -73,3 +73,6 @@ fonts.woff = WOFF
zoom = Zoom
zoom.percent = %
zoom.invalid = Invalid zoom value.
symbolclass = Symbol Class
symbolclass.csv = CSV
@@ -73,3 +73,6 @@ fonts.woff = WOFF
zoom = Nagy\u00edt\u00e1s
zoom.percent = %
zoom.invalid = \u00c9rv\u00e9nytelen nagy\u00edt\u00e1si \u00e9rt\u00e9k.
symbolclass = Szimb\u00f3lum oszt\u00e1ly
symbolclass.csv = CSV
@@ -575,3 +575,4 @@ text.align.translatex.increase = Increase TranslateX
selectPreviousTag = Select previous tag
selectNextTag = Select next tag
button.ignoreAll = Ignore All
menu.file.import.symbolClass = Symbol Class
@@ -573,4 +573,5 @@ menu.file.export.xml = Exportar SWF XML
text.align.translatex.decrease = Decrementar TranslateX
text.align.translatex.increase = Incrementar TranslateX
selectPreviousTag = Seleccionar etiqueta previa
selectNextTag = Seleccionar siguiente etiqueta
selectNextTag = Seleccionar siguiente etiqueta
button.ignoreAll = Ignorar todo
@@ -573,4 +573,5 @@ text.align.translatex.decrease = TranslateX cs\u00f6kkent\u00e9se
text.align.translatex.increase = TranslateX n\u00f6vel\u00e9se
selectPreviousTag = El\u0151z\u0151 tag kiv\u00e1laszt\u00e1sa
selectNextTag = K\u00f6vetkez\u0151 tag kiv\u00e1laszt\u00e1sa
button.ignoreAll = Mell\u0151z mindet
button.ignoreAll = Mell\u0151z mindet
menu.file.import.symbolClass = Szimb\u00f3lum oszt\u00e1ly
@@ -574,3 +574,4 @@ text.align.translatex.decrease = \u0423\u043c\u0435\u043d\u044c\u0448\u0438\u044
text.align.translatex.increase = \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c TranslateX
selectPreviousTag = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0442\u044d\u0433
selectNextTag = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u044d\u0433
button.ignoreAll = \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435
@@ -97,6 +97,7 @@ import com.jpexs.decompiler.flash.tags.base.ButtonTag;
import com.jpexs.decompiler.flash.tags.base.ImageTag;
import com.jpexs.decompiler.flash.tags.base.MorphShapeTag;
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
import com.jpexs.decompiler.flash.tags.base.SymbolClassTypeTag;
import com.jpexs.decompiler.flash.tags.base.TextTag;
import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont;
import com.jpexs.decompiler.flash.timeline.AS2Package;
@@ -506,6 +507,11 @@ public class TagTree extends JTree {
if (nodeType == TreeNodeType.FONT) {
ret.add(d);
}
if (nodeType == TreeNodeType.OTHER_TAG) {
if (d instanceof SymbolClassTypeTag) {
ret.add(d);
}
}
}
if (d instanceof Frame) {