From 2e3893313df305aab7a90c0b5a0e2d7494e13ee3 Mon Sep 17 00:00:00 2001 From: Honfika Date: Sat, 8 Feb 2014 20:58:08 +0100 Subject: [PATCH] tag editor: limit values according to basetype --- .../jpexs/decompiler/flash/action/Action.java | 1 + .../flash/action/ActionListReader.java | 2 + .../console/CommandLineArgumentParser.java | 1 + .../flash/gui/FontPreviewDialog.java | 1 + .../decompiler/flash/gui/GenericTagPanel.java | 86 ++++++++++--- .../jpexs/decompiler/flash/gui/MainPanel.java | 5 +- .../gui/generictageditors/BooleanEditor.java | 10 +- .../gui/generictageditors/NumberEditor.java | 115 ++++++++++++++++-- .../generictageditors/ReflectionTools.java | 55 +++++++++ .../gui/generictageditors/StringEditor.java | 14 ++- .../flash/tags/DefineButtonCxformTag.java | 1 + .../flash/tags/DefineButtonSoundTag.java | 1 + .../flash/tags/DefineButtonTag.java | 1 + .../flash/tags/DefineFontInfo2Tag.java | 1 + .../tags/DefineSceneAndFrameLabelDataTag.java | 1 + .../decompiler/flash/tags/DefineSoundTag.java | 1 + .../flash/tags/DefineSpriteTag.java | 1 + .../flash/tags/DefineVideoStreamTag.java | 1 + .../decompiler/flash/tags/DoActionTag.java | 1 + .../flash/tags/DoInitActionTag.java | 1 + .../flash/tags/EnableDebugger2Tag.java | 1 + .../flash/tags/EnableDebuggerTag.java | 1 + .../flash/tags/ExportAssetsTag.java | 1 + .../flash/tags/ImportAssets2Tag.java | 1 + .../flash/tags/ImportAssetsTag.java | 1 + .../decompiler/flash/tags/ProtectTag.java | 1 + .../flash/tags/RemoveObjectTag.java | 1 + .../flash/tags/SoundStreamHeadTag.java | 1 + .../decompiler/flash/tags/StartSound2Tag.java | 1 + .../decompiler/flash/tags/StartSoundTag.java | 1 + .../decompiler/flash/tags/VideoFrameTag.java | 1 + .../decompiler/flash/tags/base/ASMSource.java | 1 + .../flash/types/BUTTONCONDACTION.java | 1 + .../flash/types/CLIPACTIONRECORD.java | 1 + .../src/com/jpexs/decompiler/graph/Graph.java | 1 + .../src/com/sun/jna/platform/win32/WinNT.java | 1 + .../com/sun/jna/platform/win32/WinUser.java | 1 + 37 files changed, 275 insertions(+), 42 deletions(-) create mode 100644 trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/ReflectionTools.java diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index 489380b05..a252e9438 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -709,6 +709,7 @@ public class Action implements GraphSourceItem { * @param actions List of actions * @param version SWF version * @param path + * @param writer * @throws java.lang.InterruptedException */ public static void actionsToSource(ASMSource asm, final List actions, final int version, final String path, GraphTextWriter writer) throws InterruptedException { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java index 063413bc3..1afa175bc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -85,6 +85,7 @@ public class ActionListReader { * @param path * @return List of actions * @throws IOException + * @throws java.lang.InterruptedException * @throws java.util.concurrent.TimeoutException */ public static List readActionListTimeout(final List listeners, final long containerSWFOffset, final MemoryInputStream mis, final int version, final int ip, final int endIp, final String path) throws IOException, InterruptedException, TimeoutException { @@ -528,6 +529,7 @@ public class ActionListReader { * * @param actions * @param index + * @param removeWhenLast * @return */ public static boolean removeAction(List actions, int index, int version, boolean removeWhenLast) { diff --git a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 76dc79064..00dae299f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -122,6 +122,7 @@ public class CommandLineArgumentParser { /** * Parses the console arguments * + * @param arguments * @return path to the file which should be opened or null * @throws java.io.IOException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java index 392a2c8c3..ce2b0b247 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java @@ -38,6 +38,7 @@ public class FontPreviewDialog extends AppDialog { /** * Creates new form FontPreviewDialog * @param font + * @param modal */ public FontPreviewDialog(java.awt.Frame parent, boolean modal, Font font) { super(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java index 8668600a0..ecd9803b6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagPanel.java @@ -23,7 +23,6 @@ import com.jpexs.decompiler.flash.gui.generictageditors.StringEditor; import com.jpexs.decompiler.flash.gui.helpers.SpringUtilities; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.types.BasicType; import com.jpexs.decompiler.flash.types.RECT; import com.jpexs.decompiler.flash.types.RGB; import com.jpexs.decompiler.flash.types.ZONEDATA; @@ -31,8 +30,10 @@ import com.jpexs.decompiler.flash.types.ZONERECORD; import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.BorderLayout; import java.awt.Component; +import java.lang.reflect.Array; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JEditorPane; @@ -75,6 +76,7 @@ public class GenericTagPanel extends JPanel { public void clear() { tag = null; genericTagPropertiesEditPanel.removeAll(); + genericTagPropertiesEditPanel.setSize(0, 0); } public void setEditMode(boolean edit) { @@ -94,7 +96,20 @@ public class GenericTagPanel extends JPanel { for (Field field : fields) { try { field.setAccessible(true); - sb.append(field.getName()).append(": ").append(field.get(tag)); + Object value = field.get(tag); + sb.append(field.getName()).append(": "); + if (field.getType().isArray()) { + sb.append("["); + for (int i = 0; i < Array.getLength(value); i++) { + if (i != 0) { + sb.append(", "); + } + sb.append(Array.get(value, i)); + } + sb.append("]"); + } else { + sb.append(value); + } sb.append(GraphTextWriter.NEW_LINE); } catch (IllegalArgumentException | IllegalAccessException ex) { Logger.getLogger(GenericTagPanel.class.getName()).log(Level.SEVERE, null, ex); @@ -106,11 +121,12 @@ public class GenericTagPanel extends JPanel { public void generateEditControls(Tag tag) { genericTagPropertiesEditPanel.removeAll(); + genericTagPropertiesEditPanel.setSize(0, 0); this.tag = tag; int propCount = generateEditControlsRecursive(tag, ""); //Lay out the panel. SpringUtilities.makeCompactGrid(genericTagPropertiesEditPanel, - propCount, 2, //rows, cols + propCount, 3, //rows, cols 6, 6, //initX, initY 6, 6); //xPad, yPad repaint(); @@ -127,18 +143,23 @@ public class GenericTagPanel extends JPanel { field.setAccessible(true); String name = parent + field.getName(); Object value = field.get(obj); - if (value instanceof Iterable) { - int i = 0; - for (Object obj1 : (Iterable) value) { - propCount += generateEditControlsRecursive(obj1, name + "[" + i++ + "]"); + if (List.class.isAssignableFrom(field.getType())) { + if (value != null) { + int i = 0; + for (Object obj1 : (Iterable) value) { + propCount += addEditor(name + "[" + i + "]", obj, field, i, obj1.getClass(), obj1); + i++; + } } - } else if (value instanceof Object[]) { - Object[] objArr = (Object[]) value; - for (int i = 0; i < objArr.length; i++) { - propCount += generateEditControlsRecursive(objArr[i], name + "[" + i + "]"); + } else if (field.getType().isArray()) { + if (value != null) { + for (int i = 0; i < Array.getLength(value); i++) { + Object item = Array.get(value, i); + propCount += addEditor(name + "[" + i + "]", obj, field, i, item.getClass(), item); + } } } else { - propCount += addEditor(name, obj, field); + propCount += addEditor(name, obj, field, 0, field.getType(), value); } } catch (IllegalArgumentException | IllegalAccessException ex) { Logger.getLogger(GenericTagPanel.class.getName()).log(Level.SEVERE, null, ex); @@ -147,29 +168,27 @@ public class GenericTagPanel extends JPanel { return propCount; } - private int addEditor(String name, Object obj, Field field) throws IllegalArgumentException, IllegalAccessException { + private int addEditor(String name, Object obj, Field field, int index, Class type, Object value) throws IllegalArgumentException, IllegalAccessException { Component editor; - Class type = field.getType(); SWFType swfType = field.getAnnotation(SWFType.class); - BasicType basicType = swfType == null ? BasicType.NONE : swfType.value(); if (type.equals(int.class) || type.equals(Integer.class) || type.equals(short.class) || type.equals(Short.class) || type.equals(long.class) || type.equals(Long.class) || type.equals(double.class) || type.equals(Double.class) || type.equals(float.class) || type.equals(Float.class)) { - editor = new NumberEditor(obj, field, basicType); + editor = new NumberEditor(obj, field, index, type, swfType); } else if (type.equals(boolean.class) || type.equals(Boolean.class)) { - editor = new BooleanEditor(obj, field); + editor = new BooleanEditor(obj, field, index, type); } else if (type.equals(String.class)) { - editor = new StringEditor(obj, field); + editor = new StringEditor(obj, field, index, type); } else if (type.equals(RECT.class) || type.equals(RGB.class) || type.equals(ZONERECORD.class) || type.equals(ZONEDATA.class)) { // todo: add other swf releated classes - return generateEditControlsRecursive(field.get(obj), field.getName() + "."); + return generateEditControlsRecursive(value, field.getName() + "."); } else { - JTextArea textArea = new JTextArea(field.get(obj).toString()); + JTextArea textArea = new JTextArea(value.toString()); textArea.setLineWrap(true); textArea.setEditable(false); editor = textArea; @@ -179,9 +198,32 @@ public class GenericTagPanel extends JPanel { genericTagPropertiesEditPanel.add(label); label.setLabelFor(editor); genericTagPropertiesEditPanel.add(editor); + JLabel typeLabel = new JLabel(swfTypeToString(swfType), JLabel.TRAILING); + genericTagPropertiesEditPanel.add(typeLabel); return 1; } + public String swfTypeToString(SWFType swfType) { + if (swfType == null) { + return null; + } + String result = swfType.value().toString(); + if (swfType.count() > 0) { + result += "[" + swfType.count(); + if (swfType.countAdd() > 0) { + result += " + " + swfType.countAdd(); + } + result += "]"; + } else if (!swfType.countField().equals("")) { + result += "[" + swfType.count(); + if (swfType.countAdd() > 0) { + result += " + " + swfType.countAdd(); + } + result += "]"; + } + return result; + } + public void save() { for (Object component : genericTagPropertiesEditPanel.getComponents()) { if (component instanceof GenericTagEditor) { @@ -191,4 +233,8 @@ public class GenericTagPanel extends JPanel { tag.setModified(true); setTagText(tag); } + + public Tag getTag() { + return tag; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 015e5ba2a..d2a0c06b4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -2141,7 +2141,10 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec break; case ACTION_SAVE_GENERIC_TAG: { genericTagPanel.save(); - tagTree.repaint(); + refreshTree(); + TagTreeModel ttm = (TagTreeModel) tagTree.getModel(); + TreePath tp = ttm.getTagPath(genericTagPanel.getTag()); + tagTree.setSelectionPath(tp); genericEditButton.setVisible(true); genericSaveButton.setVisible(false); genericCancelButton.setVisible(false); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/BooleanEditor.java b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/BooleanEditor.java index 38021aee6..0544d71fa 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/BooleanEditor.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/BooleanEditor.java @@ -28,13 +28,17 @@ public class BooleanEditor extends JCheckBox implements GenericTagEditor { private final Object obj; private final Field field; + private final int index; + private final Class type; - public BooleanEditor(Object obj, Field field) { + public BooleanEditor(Object obj, Field field, int index, Class type) { setBackground(Color.white); this.obj = obj; this.field = field; + this.index = index; + this.type = type; try { - setSelected((boolean) field.get(obj)); + setSelected((boolean) ReflectionTools.getValue(obj, field, index)); } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } @@ -43,7 +47,7 @@ public class BooleanEditor extends JCheckBox implements GenericTagEditor { @Override public void save() { try { - field.set(obj, isSelected()); + ReflectionTools.setValue(obj, field, index, isSelected()); } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/NumberEditor.java b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/NumberEditor.java index 5749fe72f..13427863e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/NumberEditor.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/NumberEditor.java @@ -17,30 +17,37 @@ package com.jpexs.decompiler.flash.gui.generictageditors; import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.awt.Color; import java.lang.reflect.Field; -import javax.swing.JTextArea; +import javax.swing.JSpinner; +import javax.swing.SpinnerModel; +import javax.swing.SpinnerNumberModel; /** * * @author JPEXS */ -public class NumberEditor extends JTextArea implements GenericTagEditor { +public class NumberEditor extends JSpinner implements GenericTagEditor { private final Object obj; private final Field field; - private final BasicType basicType; + private final int index; + private final Class type; + private final SWFType swfType; - public NumberEditor(Object obj, Field field, BasicType basicType) { + public NumberEditor(Object obj, Field field, int index, Class type, SWFType swfType) { setBackground(Color.white); setSize(100, getSize().height); setMaximumSize(getSize()); - setWrapStyleWord(true); this.obj = obj; this.field = field; - this.basicType = basicType; + this.index = index; + this.type = type; + this.swfType = swfType; try { - setText(field.get(obj).toString()); + Object value = ReflectionTools.getValue(obj, field, index); + setModel(getModel(swfType, value)); } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } @@ -49,20 +56,102 @@ public class NumberEditor extends JTextArea implements GenericTagEditor { @Override public void save() { try { - Class type = field.getType(); + Object value = null; if (type.equals(int.class) || type.equals(Integer.class)) { - field.set(obj, Integer.parseInt(getText())); + value = Integer.parseInt(getValue().toString()); } else if (type.equals(short.class) || type.equals(Short.class)) { - field.set(obj, Short.parseShort(getText())); + value = Short.parseShort(getValue().toString()); } else if (type.equals(long.class) || type.equals(Long.class)) { - field.set(obj, Long.parseLong(getText())); + value = Long.parseLong(getValue().toString()); } else if (type.equals(double.class) || type.equals(Double.class)) { - field.set(obj, Double.parseDouble(getText())); + value = Double.parseDouble(getValue().toString()); } else if (type.equals(float.class) || type.equals(Float.class)) { - field.set(obj, Float.parseFloat(getText())); + value = Float.parseFloat(getValue().toString()); + } + + if (value != null) { + ReflectionTools.setValue(obj, field, index, value); } } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } } + + private SpinnerModel getModel(SWFType swfType, Object value) { + SpinnerNumberModel m = null; + BasicType basicType = swfType == null ? BasicType.NONE : swfType.value(); + switch (basicType) { + case UI8: + m = new SpinnerNumberModel(toInt(value), 0, 0xff, 1); + break; + case UI16: + m = new SpinnerNumberModel(toInt(value), 0, 0xffff, 1); + break; + case UB: { + long max = 1; + if (swfType.count() > 0) { + max <<= (swfType.count()); + } + m = new SpinnerNumberModel((Number) toLong(value), 0L, (long) max - 1, 1L); + } + break; + case UI32: + case EncodedU32: + case NONE: + m = new SpinnerNumberModel((Number) toLong(value), 0L, 0xffffffffL, 1L); + break; + case SI8: + m = new SpinnerNumberModel(toInt(value), -0x80, 0x7f, 1); + break; + case SI16: + m = new SpinnerNumberModel(toInt(value), -0x8000, 0x7fff, 1); + break; + case SB: { + long max = 1; + if (swfType.count() > 0) { + max <<= (swfType.count() - 1); + } + m = new SpinnerNumberModel((Number) toLong(value), (long) (-max), (long) max - 1, 1L); + } + break; + case SI32: + m = new SpinnerNumberModel(toDouble(value), -0x80000000, 0x7fffffff, 1); + break; + case FB: + case FLOAT: + case FLOAT16: + case FIXED: + case FIXED8: + m = new SpinnerNumberModel(toDouble(value), -0x80000000, 0x7fffffff, 0.01); + break; + } + return m; + } + + private double toDouble(Object value) { + if (value instanceof Float) { + return (double) (Float) value; + } + if (value instanceof Double) { + return (double) (Double) value; + } + return 0; + } + + private int toInt(Object value) { + if (value instanceof Short) { + return (int) (Short) value; + } + if (value instanceof Integer) { + return (int) (Integer) value; + } + return 0; + } + + private long toLong(Object value) { + if (value instanceof Long) { + return (long) (Long) value; + } + return 0; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/ReflectionTools.java b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/ReflectionTools.java new file mode 100644 index 000000000..bee0ed688 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/ReflectionTools.java @@ -0,0 +1,55 @@ +/* + * 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 . + */ +package com.jpexs.decompiler.flash.gui.generictageditors; + +import java.lang.reflect.Array; +import java.lang.reflect.Field; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ReflectionTools { + + public static Object getValue(Object obj, Field field, int index) throws IllegalArgumentException, IllegalAccessException { + Object value = field.get(obj); + if (List.class.isAssignableFrom(field.getType())) { + return ((List) value).get(index); + } + + if (field.getType().isArray()) { + return Array.get(value, index); + } + + return value; + } + + @SuppressWarnings("unchecked") + public static void setValue(Object obj, Field field, int index, Object newValue) throws IllegalArgumentException, IllegalAccessException { + Object value = field.get(obj); + if (List.class.isAssignableFrom(field.getType())) { + ((List) value).set(index, newValue); + } + else if (field.getType().isArray()) { + Array.set(value, index, newValue); + } + else { + field.set(obj, newValue); + } + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java index 2a4041f26..3aebca422 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/generictageditors/StringEditor.java @@ -26,16 +26,20 @@ import javax.swing.JTextArea; */ public class StringEditor extends JTextArea implements GenericTagEditor { - private final Object tag; + private final Object obj; private final Field field; + private final int index; + private final Class type; - public StringEditor(Object obj, Field field) { + public StringEditor(Object obj, Field field, int index, Class type) { setBackground(Color.white); setLineWrap(true); - this.tag = obj; + this.obj = obj; this.field = field; + this.index = index; + this.type = type; try { - setText((String) field.get(obj)); + setText((String) ReflectionTools.getValue(obj, field, index)); } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } @@ -44,7 +48,7 @@ public class StringEditor extends JTextArea implements GenericTagEditor { @Override public void save() { try { - field.set(tag, getText()); + ReflectionTools.setValue(obj, field, index, getText()); } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index be7027151..d8ccbd9e4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -61,6 +61,7 @@ public class DefineButtonCxformTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index b32e7d3d6..d9bb2dd78 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -101,6 +101,7 @@ public class DefineButtonSoundTag extends CharacterTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 260ff410f..c6f25fc76 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -143,6 +143,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT * Converts actions to ASM source * * @param version SWF version + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index 67611a991..b6e6097bd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -90,6 +90,7 @@ public class DefineFontInfo2Tag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index a04d48eb3..a267f72af 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -76,6 +76,7 @@ public class DefineSceneAndFrameLabelDataTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index 0295e4d6a..6a5d92e3b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -92,6 +92,7 @@ public class DefineSoundTag extends CharacterTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index 269e4a2a5..283ec3a6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -196,6 +196,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT * @param parallel * @param skipUnusualTags * @throws IOException + * @throws java.lang.InterruptedException */ public DefineSpriteTag(SWF swf, byte[] data, int version, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException, InterruptedException { super(swf, ID, "DefineSprite", data, pos); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index 3880b0cd0..ef5500eeb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java @@ -102,6 +102,7 @@ public class DefineVideoStreamTag extends CharacterTag implements BoundedTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index cea05a679..924137621 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -75,6 +75,7 @@ public class DoActionTag extends Tag implements ASMSource { * Converts actions to ASM source * * @param version SWF version + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 51eda88ff..d2eae2750 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -105,6 +105,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { * Converts actions to ASM source * * @param version SWF version + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index 5d764eea2..ee9a274af 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -66,6 +66,7 @@ public class EnableDebugger2Tag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index 807ea43bc..fbda79cf9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -60,6 +60,7 @@ public class EnableDebuggerTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index 67590cf19..17501f5bb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -52,6 +52,7 @@ public class ExportAssetsTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 1a30cdee7..8938ddaf6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -52,6 +52,7 @@ public class ImportAssets2Tag extends Tag implements ImportTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index 51bd29a24..5afedfe74 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -43,6 +43,7 @@ public class ImportAssetsTag extends Tag implements ImportTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index 2dfd6c075..b003110c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -60,6 +60,7 @@ public class ProtectTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java index 8b987e842..24c2082ca 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java @@ -69,6 +69,7 @@ public class RemoveObjectTag extends CharacterIdTag implements RemoveTag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index 6fddc7ad8..46ade6f1f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -117,6 +117,7 @@ public class SoundStreamHeadTag extends CharacterTag implements SoundStreamHeadT /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java index 14806f6dc..b6991b46d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java @@ -57,6 +57,7 @@ public class StartSound2Tag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java index 5fbbeba62..382f8d96d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java @@ -61,6 +61,7 @@ public class StartSoundTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java index d3189142f..4b9865c90 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java @@ -63,6 +63,7 @@ public class VideoFrameTag extends Tag { /** * Constructor * + * @param swf * @param data Data bytes * @param version SWF version * @param pos diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java index d9461faef..abadbc801 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java @@ -35,6 +35,7 @@ public interface ASMSource extends TreeItem { * * @param version SWF version * @param exportMode PCode or hex? + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index d128b39b3..dbf147f66 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -159,6 +159,7 @@ public class BUTTONCONDACTION implements ASMSource, Exportable, ContainerItem { * Converts actions to ASM source * * @param version SWF version + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index 97bbd8463..204e2c8a2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -165,6 +165,7 @@ public class CLIPACTIONRECORD implements ASMSource, Exportable, ContainerItem { * Converts actions to ASM source * * @param version SWF version + * @param actions * @return ASM source * @throws java.lang.InterruptedException */ diff --git a/trunk/src/com/jpexs/decompiler/graph/Graph.java b/trunk/src/com/jpexs/decompiler/graph/Graph.java index 8e4a9489b..e8fe1b0d5 100644 --- a/trunk/src/com/jpexs/decompiler/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/graph/Graph.java @@ -2155,6 +2155,7 @@ public class Graph { * Converts list of TreeItems to string * * @param tree List of TreeItem + * @param writer * @param localData * @return String * @throws java.lang.InterruptedException diff --git a/trunk/src/com/sun/jna/platform/win32/WinNT.java b/trunk/src/com/sun/jna/platform/win32/WinNT.java index 01069c719..2085895cd 100644 --- a/trunk/src/com/sun/jna/platform/win32/WinNT.java +++ b/trunk/src/com/sun/jna/platform/win32/WinNT.java @@ -787,6 +787,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD { /** * Override to the appropriate object for INVALID_HANDLE_VALUE. + * @param context * @return */ @Override diff --git a/trunk/src/com/sun/jna/platform/win32/WinUser.java b/trunk/src/com/sun/jna/platform/win32/WinUser.java index f4631b4ce..2aad0ee3a 100644 --- a/trunk/src/com/sun/jna/platform/win32/WinUser.java +++ b/trunk/src/com/sun/jna/platform/win32/WinUser.java @@ -195,6 +195,7 @@ public interface WinUser extends StdCallLibrary, WinDef { /** * Return whether to continue enumeration. + * @param data * @return */ boolean callback(HWND hWnd, Pointer data);