diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index f130b1138..1851d17a3 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -23,6 +23,8 @@ [^/]\.res$ [^/]\.swd$ [^/]\.swf$ +[^/]\.swt$ +[^/]\.fft$ [^/]\.tga$ \.a$ \.ai$ diff --git a/CHANGELOG.md b/CHANGELOG.md index 84519e69b..ef1fb7b6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ All notable changes to this project will be documented in this file. ### Fixed - [#2474] Gotos incorrectly decompiled -- AS1/2/3 highligter - brackets parsing error causing memory leak / crash +- AS1/2/3 highlighter - brackets parsing error causing memory leak / crash - Comments color highlighting - AS1/2 Obfuscated registers names not resolving because of trimming - Escaping HTML in raw tag editor @@ -93,7 +93,7 @@ All notable changes to this project will be documented in this file. - AS1/2 Renaming of identifiers must not rename integer array offsets - [#2517] Loop break detection problems in some cases - [#2519] AS1/2 avoid multi-level loops in cases where possible -- [#2522] Hex view - reseting view when mouse over panel bottom +- [#2522] Hex view - resetting view when mouse over panel bottom - [#2519] AS1/2 direct editation - generating too large ConstantPool - Hex View - incorrect table height when switching tags - [#2525] AMF editor (like in Sol cookie editor) - saving empty standard array `[]` @@ -128,11 +128,11 @@ All notable changes to this project will be documented in this file. - Simple editor - edit parameters of items inside buttons - Simple editor - add/remove frames in buttons, button timeline header - Configuration is now stored in easily readable/editable textual format (TOML) - (saved also to older binary format, but loading is preffered from + (saved also to older binary format, but loading is preferred from the new TOML file, when exists) - `-configFile` and `-storeConfigFile` commandline parameters for loading/storing configuration file - Option to .bat and .sh file to enable J2D_D3D_NO_HWCHECK -- [#2404] Quick find in text/script editors - show number of occurences +- [#2404] Quick find in text/script editors - show number of occurrences - [#1418] Option to make main window Always on top - [#289] Support for Aero Snap on Windows - [#2412] Show coordinates on stage mouse move for up to 2 decimal places @@ -233,7 +233,7 @@ All notable changes to this project will be documented in this file. - Simple editor - change background color - Simple editor - filters - Simple editor - convolution filter presets -- Simple editor - ratio (shapetweens, video) +- Simple editor - ratio (shape tweens, video) ### Fixed - [#2424] DefineEditText handling of letterSpacing, font size on incorrect values diff --git a/lib/jsyntaxpane-0.9.5.jar b/lib/jsyntaxpane-0.9.5.jar index 85bd72e6e..c2a25981b 100644 Binary files a/lib/jsyntaxpane-0.9.5.jar and b/lib/jsyntaxpane-0.9.5.jar differ diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java index 38ce37a12..6cb8f5e85 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java @@ -879,8 +879,8 @@ public class IdentifiersDeobfuscation { } public static Map getReplacementsFromDoc(String s) throws Exception { - ActionScriptDocParser asd = new ActionScriptDocParser(); - List comments = asd.parse(s); + ActionScriptDocParser docParser = new ActionScriptDocParser(); + List comments = docParser.parse(s); Map replacements = new LinkedHashMap<>(); for (AsDocComment comment : comments) { for (AsDocTag tag : comment.tags) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ParseException.java index fd26fb2c6..0d4bc7274 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ParseException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ParseException.java @@ -29,7 +29,7 @@ public abstract class ParseException extends Exception { public long line; /** - * Position in the code where the exception occured. -1 where unknown + * Position in the code where the exception occurred. -1 where unknown */ public long position = -1; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index e472992f7..0fd8657d9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -576,7 +576,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { private volatile Map> uninitializedAs2ClassTraits = null; /** - * Detecting uninitilized class fields + * Detecting uninitialized class fields */ @Internal private boolean detectingUninitializedClassFields = false; @@ -761,7 +761,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { try { SWF.initPlayer(); } catch (IOException ex) { - Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "IOException during SWF.initplayer", ex); + Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "IOException during SWF.initPlayer", ex); } catch (InterruptedException ex) { return new AbcIndexing(); } @@ -3773,11 +3773,11 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { continue; } ip = code.adr2pos(addr); - long nextaddr = addr + size; - int nextip = code.adr2pos(nextaddr); - getVariables(swf, aLocalData.insideDoInitAction, variables, functions, strings, usageTypes, new ActionGraphSource(path, aLocalData.insideDoInitAction, code.getActions().subList(0, nextip), code.version, new HashMap<>(), new HashMap<>(), new HashMap<>(), code.getCharset(), ip), addr, path + (cntName == null ? "" : "/" + cntName)); - ip = nextip; - addr = nextaddr; + long nextAddr = addr + size; + int nextIp = code.adr2pos(nextAddr); + getVariables(swf, aLocalData.insideDoInitAction, variables, functions, strings, usageTypes, new ActionGraphSource(path, aLocalData.insideDoInitAction, code.getActions().subList(0, nextIp), code.version, new HashMap<>(), new HashMap<>(), new HashMap<>(), code.getCharset(), ip), addr, path + (cntName == null ? "" : "/" + cntName)); + ip = nextIp; + addr = nextAddr; } List> r = new ArrayList<>(); r.add(new ArrayList<>()); @@ -6306,7 +6306,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * @return Map of class name to map of trait name to trait */ public Map> getUninitializedAs2ClassTraits() throws InterruptedException { - if (Configuration.skipDetectionOfUnitializedClassFields.get()) { + if (Configuration.skipDetectionOfUninitializedClassFields.get()) { return new LinkedHashMap<>(); } if (CancellableWorker.isInterrupted()) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 8f2c09e9d..be8a98885 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -659,7 +659,7 @@ public class ActionGraph extends Graph { if (insideDoInitAction && !insideFunction) { ActionScript2ClassDetector detector = new ActionScript2ClassDetector(); detector.checkClass(uninitializedClassTraits, ret, ((ActionGraphSource) code).getVariables(), path); - if (needsUninitializedClassFieldsDetection && Configuration.skipDetectionOfUnitializedClassFields.get()) { + if (needsUninitializedClassFieldsDetection && Configuration.skipDetectionOfUninitializedClassFields.get()) { ret.add(0, new CommentItem(AppResources.translate("decompilationWarning.as2.noUninitializedClassFieldsDetection"))); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java index c039e5b0d..bc43988b6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java @@ -118,7 +118,7 @@ public class FunctionActionItem extends ActionItem implements BranchStackResista private List innerFunctions; /** - * Parameter positions in the codde + * Parameter positions in the code */ public List paramPositions; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ActionParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ActionParseException.java index a8d6a1e8f..7a35b78c4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ActionParseException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ActionParseException.java @@ -38,7 +38,7 @@ public class ActionParseException extends ParseException { * Constructs a new parse exception. * @param text Text of the exception * @param line Line number where the exception occurred - * @param position Position where the exception occured + * @param position Position where the exception occurred */ public ActionParseException(String text, long line, long position) { super(text, line, position); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 3aa9b7bc6..4facbaf00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -922,7 +922,7 @@ public class ActionSourceGenerator implements SourceGenerator { int whileJumpOffset = -(whileExprLen + whileBodyLen); if (whileJumpOffset < -32768) { - throw new CompilationException("Generated offset for While is lower than mininum allowed for SI16.", item.line); + throw new CompilationException("Generated offset for While is lower than minimum allowed for SI16.", item.line); } whileajmp.setJumpOffset(whileJumpOffset); whileaif.setJumpOffset(whileBodyLen); @@ -954,7 +954,7 @@ public class ActionSourceGenerator implements SourceGenerator { ret.add(doif); int offset = doBodyLen + doExprLen + doif.getTotalActionLength(); if (-offset < -32768) { - throw new CompilationException("Generated offset for DoWhile is lower than mininum allowed for SI16.", item.line); + throw new CompilationException("Generated offset for DoWhile is lower than minimum allowed for SI16.", item.line); } doif.setJumpOffset(-offset); @@ -980,7 +980,7 @@ public class ActionSourceGenerator implements SourceGenerator { int jmpOffset = -(forExprLen + forBodyLen + forFinalLen + forajmpLen); int ifOffset = forBodyLen + forFinalLen + forajmpLen; if (jmpOffset < -32768) { - throw new CompilationException("Generated offset for For is lower than mininum allowed for SI16.", item.line); + throw new CompilationException("Generated offset for For is lower than minimum allowed for SI16.", item.line); } if (ifOffset > 32767) { throw new CompilationException("Generated offset for For is larger than maximum allowed for SI16.", item.line); @@ -1202,7 +1202,7 @@ public class ActionSourceGenerator implements SourceGenerator { private int checkOffsetBounds(int offset, String errorItem, int errorLine) throws CompilationException { if (offset < -32768) { - throw new CompilationException("Generated offset for " + errorItem + " is lower than mininum allowed for SI16.", errorLine); + throw new CompilationException("Generated offset for " + errorItem + " is lower than minimum allowed for SI16.", errorLine); } if (offset > 32767) { throw new CompilationException("Generated offset for " + errorItem + " is larger than maximum allowed for SI16.", errorLine); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index d39e472d7..39e338ed2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -1148,7 +1148,7 @@ public final class Configuration { @ConfigurationDefaultBoolean(false) @ConfigurationCategory("script") - public static ConfigurationItem skipDetectionOfUnitializedClassFields = null; + public static ConfigurationItem skipDetectionOfUninitializedClassFields = null; @ConfigurationDefaultBoolean(false) @ConfigurationInternal @@ -1177,12 +1177,12 @@ public final class Configuration { Configuration.configurationTitles = configurationTitles; } - public static String getConfigurationTitle(String confirationName) { - return configurationTitles.get(confirationName); + public static String getConfigurationTitle(String configurationName) { + return configurationTitles.get(configurationName); } - public static String getConfigurationDescription(String confirationName) { - return configurationDescriptions.get(confirationName); + public static String getConfigurationDescription(String configurationName) { + return configurationDescriptions.get(configurationName); } public static Font getSourceFont() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/TomlConfigurationStorage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/TomlConfigurationStorage.java index fd3ea0ef6..3fc1ee0ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/TomlConfigurationStorage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/TomlConfigurationStorage.java @@ -50,7 +50,7 @@ import org.tomlj.TomlParseResult; import org.tomlj.TomlTable; /** - * TOML file confiraration storage. + * TOML file configuration storage. * @author JPEXS */ public class TomlConfigurationStorage implements ConfigurationStorage { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java index dc1b48181..949fad384 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java @@ -113,7 +113,7 @@ public class AS2ScriptExporter { @Override public void status(String status) { if (evl != null) { - evl.handleEvent("unitializedClassFields", status); + evl.handleEvent("uninitializedClassFields", status); } } }; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java index edc20ac50..85bb2b948 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java @@ -96,7 +96,7 @@ public class SVGShapeExporter extends DefaultSVGShapeExporter { * @param defaultColor Default color * @param colorTransform Color transform * @param zoom Zoom - shape zoom - * @param displayZoom Display zoom - overal SVG zoom + * @param displayZoom Display zoom - overall SVG zoom * @param strokeTransformation Stroke transformation */ public SVGShapeExporter(int windingRule, int shapeNum, SWF swf, SHAPE shape, int id, SVGExporter exporter, Color defaultColor, ColorTransform colorTransform, double zoom, double displayZoom, Matrix strokeTransformation) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/simpleparser/SimpleParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/simpleparser/SimpleParseException.java index b59a146dc..cf4c79027 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/simpleparser/SimpleParseException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/simpleparser/SimpleParseException.java @@ -38,7 +38,7 @@ public class SimpleParseException extends ParseException { * Constructs a new parse exception. * @param text Text of the exception * @param line Line number where the exception occurred - * @param position Position where the exception occured + * @param position Position where the exception occurred */ public SimpleParseException(String text, long line, long position) { super(text, line, position); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 7dcb22c53..25e3a4702 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -160,7 +160,7 @@ public class DoInitActionTag extends Tag implements CharacterIdTag, ASMSource { actions = getActions(); } - return Action.actionsToSource(requiresUninitielizedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), this, actions, getScriptName(), writer, getCharset()); + return Action.actionsToSource(requiresUninitializedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), this, actions, getScriptName(), writer, getCharset()); } @Override @@ -169,10 +169,10 @@ public class DoInitActionTag extends Tag implements CharacterIdTag, ASMSource { actions = getActions(); } - return Action.actionsToSource(requiresUninitielizedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), this, actions, getScriptName(), writer, getCharset(), treeOperations); + return Action.actionsToSource(requiresUninitializedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), this, actions, getScriptName(), writer, getCharset(), treeOperations); } - private boolean requiresUninitielizedClassTraitsDetection() { + private boolean requiresUninitializedClassTraitsDetection() { return swf.needsCalculatingAS2UninitializeClassTraits(this); } @@ -301,7 +301,7 @@ public class DoInitActionTag extends Tag implements CharacterIdTag, ASMSource { @Override public List getActionsToTree() { try { - return Action.actionsToTree(new LinkedHashSet<>(), requiresUninitielizedClassTraitsDetection(), requiresUninitielizedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), true, false, getActions(), swf.version, 0, getScriptName(), swf.getCharset()); + return Action.actionsToTree(new LinkedHashSet<>(), requiresUninitializedClassTraitsDetection(), requiresUninitializedClassTraitsDetection() ? swf.getUninitializedAs2ClassTraits() : new HashMap<>(), true, false, getActions(), swf.version, 0, getScriptName(), swf.getCharset()); } catch (InterruptedException ex) { return new ArrayList<>(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java index 34cea5dd5..709fa8c70 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java @@ -87,6 +87,7 @@ public class TagStub extends Tag { TagTypeInfo selectedTagTypeInfo = classes.get(id).get(0); if (classes.get(id).size() > 1) { for (TagTypeInfo tagTypeInfo : classes.get(id)) { + @SuppressWarnings("unchecked") SWFVersion ver = (SWFVersion) tagTypeInfo.getCls().getAnnotation(SWFVersion.class); if (swfVersion >= ver.from() && swfVersion <= ver.to()) { selectedTagTypeInfo = tagTypeInfo; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RenderContext.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RenderContext.java index 7c29cddb4..53e7f0b24 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RenderContext.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RenderContext.java @@ -87,7 +87,7 @@ public class RenderContext { public int glyphPosUnderCursor = -1; /** - * Bouding rect of the glyph under cursor + * Bounding rect of the glyph under cursor */ public Rectangle2D glyphUnderCursorRect = null; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java index ea0dae933..f70dba3b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java @@ -57,7 +57,7 @@ public class AS3Package extends AS3ClassTreeItem { */ @SuppressWarnings("unchecked") private final Map subPackages = new TreeMap<>(new Comparator() { - NaturalOrderComparator noc = new NaturalOrderComparator(); + NaturalOrderComparator naturalOrderComparator = new NaturalOrderComparator(); @Override @@ -71,7 +71,7 @@ public class AS3Package extends AS3ClassTreeItem { if (DEFAULT_PACKAGE_NAME.equals(o2)) { return 1; } - return noc.compare(o1, o2); + return naturalOrderComparator.compare(o1, o2); } } ); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/ColorMatrixConvertor.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/ColorMatrixConvertor.java index 23878e934..19e26c517 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/ColorMatrixConvertor.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/ColorMatrixConvertor.java @@ -324,7 +324,7 @@ public class ColorMatrixConvertor { double h; double s; - //Magic formulas calculated long time ago with Wolphram Alpha. + //Magic formulas calculated long time ago with Wolfram Alpha. b = (24872168661075.0 * a11 * a11 - 151430415740925.0 * a12 + 341095051289483.0 * a12 * a12 - 15302094789450.0 * a13 + 82428663495404.0 * a12 * a13 - 4592294873812.0 * a13 * a13 + 43556251470.0 * Math.sqrt(216225 * a11 * a11 + 332369 * a12 * a12 - 397828 * a12 * a13 + 281684 * a13 * a13 - 930 * a11 * (287 * a12 + 178 * a13)) + 2384730956550.0 * a12 * a41 + 240977870700.0 * a13 * a41 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index f842d383e..9da9e68ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -1698,12 +1698,12 @@ public class Graph { for (Loop el : loops) { el.backEdges.clear(); Set uniqueRefs = new HashSet<>(el.loopContinue.refs); - loopr: + loopR: for (GraphPart r : uniqueRefs) { for (Loop el2 : loops) { if (el2.phase == 1) { if (el2.loopContinue == r) { - continue loopr; + continue loopR; } } } @@ -2849,22 +2849,22 @@ public class Graph { } - //When some of breakcandidates pass through current stoppart, - //Remove other candidantes. + //When some of breakcandidates pass through current stopPart, + //Remove other candidates. Set removedX = new LinkedHashSet<>(); if (!currentLoop.stopParts.isEmpty()) { - List bcsLeft = new ArrayList<>(); + List breakCandidatesLeft = new ArrayList<>(); for (int c = 0; c < currentLoop.breakCandidates.size(); c++) { GraphPart cand = currentLoop.breakCandidates.get(c); GraphPart sp = currentLoop.stopParts.get(currentLoop.stopParts.size() - 1); - if (cand == sp || cand.leadsTo(localData, this, code, sp, new ArrayList<>() /*ingore existing loop states*/, throwStates, false /* ?? */)) { - bcsLeft.add(c); + if (cand == sp || cand.leadsTo(localData, this, code, sp, new ArrayList<>() /*ignore existing loop states*/, throwStates, false /* ?? */)) { + breakCandidatesLeft.add(c); } } - if (!bcsLeft.isEmpty()) { + if (!breakCandidatesLeft.isEmpty()) { for (int c = currentLoop.breakCandidates.size() - 1; c >= 0; c--) { - if (!bcsLeft.contains(c)) { + if (!breakCandidatesLeft.contains(c)) { GraphPart cand = currentLoop.breakCandidates.get(c); removedX.add(cand); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index efef135eb..5665b181d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -1152,7 +1152,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { /** * Checks set temporary at the end of output and expected dupSource, dup. - * Then removes the last output command when neccessary. + * Then removes the last output command when necessary. * * @param stack Stack * @param output Output @@ -1188,7 +1188,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { /** * Checks whether items are result of dup instruction and removes - * SetTemportary from output when neccessary + * SetTemporary from output when necessary * * @param item1 * @param item2 diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java index 231dde36a..c93492de4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java @@ -4,7 +4,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3.0 of the License, or (at your option) any later version. + * version 3.0 of the License, or (at your o3ption) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -190,9 +190,9 @@ public abstract class CancellableWorker implements RunnableFuture { THREAD_POOL.execute(this); } - public final boolean userCancel(boolean mayIterruptIfRunning) { + public final boolean userCancel(boolean mayInterruptIfRunning) { userCancelled = true; - return cancel(mayIterruptIfRunning); + return cancel(mayInterruptIfRunning); } public boolean isUserCancelled() { diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionDefineFunctionPushRegisterCleanerTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionDefineFunctionPushRegisterCleanerTest.java index 7d697d54d..1d1e11fd8 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionDefineFunctionPushRegisterCleanerTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionDefineFunctionPushRegisterCleanerTest.java @@ -46,7 +46,7 @@ public class ActionDefineFunctionPushRegisterCleanerTest extends ActionScript2Te Configuration.simplifyExpressions.set(false); Configuration.decompile.set(true); Configuration.registerNameFormat.set("_loc%d_"); - Configuration.skipDetectionOfUnitializedClassFields.set(false); + Configuration.skipDetectionOfUninitializedClassFields.set(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2_definefunc_regs/as2_definefunc_regs.swf")), false); } diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ClassesTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ClassesTest.java index ec7954b8b..d297d4a1e 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ClassesTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ClassesTest.java @@ -47,7 +47,7 @@ public class ActionScript2ClassesTest extends ActionScript2TestBase { Configuration.simplifyExpressions.set(false); Configuration.decompile.set(true); Configuration.registerNameFormat.set("_loc%d_"); - Configuration.skipDetectionOfUnitializedClassFields.set(false); + Configuration.skipDetectionOfUninitializedClassFields.set(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/asdoc/ActionScriptDocParserTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/asdoc/ActionScriptDocParserTest.java index 075753d5e..97a2f6e39 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/asdoc/ActionScriptDocParserTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/asdoc/ActionScriptDocParserTest.java @@ -32,13 +32,13 @@ public class ActionScriptDocParserTest { + " * second line\n" + " * @tag1 First tag\n" + " * @secondTag Second\n" - + " * tag\n" + + " * Tag\n" + " */" + "a = a + 2;"); assertTrue(comments.size() == 1); String actual = comments.get(0).toString(); assertEquals(actual, "First text second line\n" + "@tag First tag\n" + -"@secondTag Secondtag\n"); +"@secondTag SecondTag\n"); } } diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java index fec2c4f5c..1484a8f63 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java @@ -51,7 +51,7 @@ public class DocumentSearchData { /** * JPEXS */ - private Map currentOccurenceMap = new WeakHashMap<>(); + private Map currentOccurrenceMap = new WeakHashMap<>(); /** * This prevent creating a new instance. You must call the getFromEditor @@ -184,18 +184,18 @@ public class DocumentSearchData { // go throw all matches, and stop when we reach current pos int start = -1; int end = -1; - int occurenceNumber = 0; //JPEXS + int occurrenceNumber = 0; //JPEXS while (matcher.find()) { if (matcher.end() >= dot) { break; } - occurenceNumber++; + occurrenceNumber++; start = matcher.start(); end = matcher.end(); } if (end > 0) { target.select(start, end); - currentOccurenceMap.put(target, occurenceNumber); + currentOccurrenceMap.put(target, occurrenceNumber); return true; } else { return false; @@ -203,12 +203,12 @@ public class DocumentSearchData { } /** - * Gets search occurences. (JPEXS) + * Gets search occurrences. (JPEXS) * * @param target - * @return Number of occurences + * @return Number of occurrences */ - public int getOccurencesCount(JTextComponent target) { + public int getOccurrencesCount(JTextComponent target) { if (getPattern() == null) { return 0; } @@ -225,15 +225,15 @@ public class DocumentSearchData { } /** - * Gets current occurence number. (JPEXS) + * Gets current occurrence number. (JPEXS) * @param target - * @return Current occurence number. + * @return Current occurrence number. */ - public int getCurrentOccurence(JTextComponent target) { - if (!currentOccurenceMap.containsKey(target)) { + public int getCurrentOccurrence(JTextComponent target) { + if (!currentOccurrenceMap.containsKey(target)) { return 0; } - return currentOccurenceMap.get(target); + return currentOccurrenceMap.get(target); } /** @@ -262,11 +262,11 @@ public class DocumentSearchData { Matcher matcher = sDoc.getMatcher(getPattern()); //JPEXS - int occurenceNumber = 0; + int occurrenceNumber = 0; boolean found = false; if (matcher != null) { while(matcher.find()) { - occurenceNumber++; + occurrenceNumber++; if (matcher.start() >= start) { found = true; break; @@ -276,17 +276,17 @@ public class DocumentSearchData { if (found) { //JPEXS target.select(matcher.start(), matcher.end()); //JPEXS - currentOccurenceMap.put(target, occurenceNumber); + currentOccurrenceMap.put(target, occurrenceNumber); return true; } else { if (isWrap()) { matcher = sDoc.getMatcher(getPattern()); if (matcher != null && matcher.find()) { target.select(matcher.start(), matcher.end()); - currentOccurenceMap.put(target, 1); + currentOccurrenceMap.put(target, 1); return true; } else { - currentOccurenceMap.put(target, 0); + currentOccurrenceMap.put(target, 0); return false; } } else { diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java index 6c4102f02..7eb42dc58 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java @@ -278,7 +278,7 @@ public class QuickFindDialog extends javax.swing.JDialog //JPEXS private void updateOccurences() { - if (dsd.get().getOccurencesCount(target.get()) == 0) + if (dsd.get().getOccurrencesCount(target.get()) == 0) { jLblOccurences.setText( java.util.ResourceBundle.getBundle("jsyntaxpane/Bundle").getString("QuickFindDialog.Occurences.Zero") @@ -287,8 +287,8 @@ public class QuickFindDialog extends javax.swing.JDialog } jLblOccurences.setText( java.util.ResourceBundle.getBundle("jsyntaxpane/Bundle").getString("QuickFindDialog.Occurences") - .replace("%current%", "" + dsd.get().getCurrentOccurence(target.get())) - .replace("%total%", "" + dsd.get().getOccurencesCount(target.get())) + .replace("%current%", "" + dsd.get().getCurrentOccurrence(target.get())) + .replace("%total%", "" + dsd.get().getOccurrencesCount(target.get())) ); } diff --git a/resources/com.jpexs.decompiler.flash.metainfo.xml b/resources/com.jpexs.decompiler.flash.metainfo.xml index 1adf42cdb..4220ca054 100644 --- a/resources/com.jpexs.decompiler.flash.metainfo.xml +++ b/resources/com.jpexs.decompiler.flash.metainfo.xml @@ -80,7 +80,7 @@
  • "Starting Flash content debugger" in status bar when debugging starts
  • Simple editor - edit parameters of items inside buttons
  • Simple editor - add/remove frames in buttons, button timeline header
  • -
  • Configuration is now stored in easily readable/editable textual format (TOML) (saved also to older binary format, but loading is preffered from the new TOML file, when exists)
  • +
  • Configuration is now stored in easily readable/editable textual format (TOML) (saved also to older binary format, but loading is preferred from the new TOML file, when exists)
  • `-configFile` and `-storeConfigFile` commandline parameters for loading/storing configuration file
  • Option to .bat and .sh file to enable J2D_D3D_NO_HWCHECK
  • #2404 Quick find in text/script editors - show number of occurences
  • @@ -183,7 +183,7 @@
  • Simple editor - change background color
  • Simple editor - filters
  • Simple editor - convolution filter presets
  • -
  • Simple editor - ratio (shapetweens, video)
  • +
  • Simple editor - ratio (shape tweens, video)
  • Fixed

      diff --git a/src/com/jpexs/decompiler/flash/console/help.txt b/src/com/jpexs/decompiler/flash/console/help.txt index 023723bda..a65faa8e7 100644 --- a/src/com/jpexs/decompiler/flash/console/help.txt +++ b/src/com/jpexs/decompiler/flash/console/help.txt @@ -326,9 +326,9 @@ Pre-options: shape:webp - WEBP format for Shapes morphshape:svg - SVG format for MorphShapes morphshape:canvas - HTML5 Canvas format for MorphShapes - morpshape:png_start_end - PNG start-end format for MorphShapes - morpshape:bmp_start_end - BMP start-end format for MorphShapes - morpshape:webp_start_end - WEBP start-end format for MorphShapes + morphshape:png_start_end - PNG start-end format for MorphShapes + morphshape:bmp_start_end - BMP start-end format for MorphShapes + morphshape:webp_start_end - WEBP start-end format for MorphShapes frame:png - PNG format for Frames frame:gif - GIF format for Frames frame:avi - AVI format for Frames diff --git a/src/com/jpexs/decompiler/flash/easygui/ConvolutionPreset.java b/src/com/jpexs/decompiler/flash/easygui/ConvolutionPreset.java index 3759c6a0f..54c46285b 100644 --- a/src/com/jpexs/decompiler/flash/easygui/ConvolutionPreset.java +++ b/src/com/jpexs/decompiler/flash/easygui/ConvolutionPreset.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.List; /** - * Convolution prset; + * Convolution preset * * @author JPEXS */ diff --git a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java index 8b7324b26..880c52c99 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java @@ -656,7 +656,7 @@ public class EasySwfPanel extends JPanel { timelineLabel.setText(EasyStrings.translate("timeline.item").replace("%item%", nameResolver.getTagName((Tag) timelined))); closeTimelineButton.setVisible(true); } - timelinePanel.setTimelined(timelined); //tohle se volá blbě rekurzivně!!! + timelinePanel.setTimelined(timelined); if (updateStage) { stagePanel.setTimelined(timelined, swf, 0, true, true, true, true, true, false, true, true, true); diff --git a/src/com/jpexs/decompiler/flash/easygui/properties/ConvolutionMatrixEditor.java b/src/com/jpexs/decompiler/flash/easygui/properties/ConvolutionMatrixEditor.java index 331c9bf7e..6915df47a 100644 --- a/src/com/jpexs/decompiler/flash/easygui/properties/ConvolutionMatrixEditor.java +++ b/src/com/jpexs/decompiler/flash/easygui/properties/ConvolutionMatrixEditor.java @@ -341,7 +341,7 @@ public class ConvolutionMatrixEditor extends JPanel implements PropertyEditor { dialog.setLocation(loc); } - private void enlargeVerticalActionPerformed(ActionEvent aev) { + private void enlargeVerticalActionPerformed(ActionEvent actionEvent) { DefaultTableModel model = (DefaultTableModel) matrixTable.getModel(); int columnCount = model.getColumnCount(); int rowCount = model.getRowCount(); diff --git a/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java b/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java index 1f07ff77f..43d085565 100644 --- a/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java @@ -397,7 +397,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel { }); menu.add(removeAllMenuItem); menu.addSeparator(); - Class[] possilbleFilters = new Class[] { + Class[] possibleFilters = new Class[] { DROPSHADOWFILTER.class, BLURFILTER.class, GLOWFILTER.class, @@ -408,7 +408,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel { CONVOLUTIONFILTER.class }; - for (Class filterClass : possilbleFilters) { + for (Class filterClass : possibleFilters) { String filterName = filterClass.getSimpleName(); filterName = filterName.substring(0, filterName.length() - "FILTER".length()); diff --git a/src/com/jpexs/decompiler/flash/gui/GridDialog.java b/src/com/jpexs/decompiler/flash/gui/GridDialog.java index 14cc851f7..82a53c649 100644 --- a/src/com/jpexs/decompiler/flash/gui/GridDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/GridDialog.java @@ -188,7 +188,7 @@ public class GridDialog extends AppDialog { Configuration.showGrid.set(showGridCheckBox.isSelected()); Configuration.snapToGrid.set(snapToGridCheckBox.isSelected()); Configuration.gridOverObjects.set(showOverObjectsCheckBox.isSelected()); - Configuration.gridSnapAccuracy.set(((AccuracyItem) snapAccuracyComboBox.getSelectedItem()).acurracy); + Configuration.gridSnapAccuracy.set(((AccuracyItem) snapAccuracyComboBox.getSelectedItem()).accuracy); setVisible(false); } @@ -197,20 +197,20 @@ public class GridDialog extends AppDialog { } private class AccuracyItem { - private GridSnapAccuracy acurracy; + private GridSnapAccuracy accuracy; - public AccuracyItem(GridSnapAccuracy acurracy) { - this.acurracy = acurracy; + public AccuracyItem(GridSnapAccuracy accuracy) { + this.accuracy = accuracy; } - public GridSnapAccuracy getAcurracy() { - return acurracy; + public GridSnapAccuracy getAccuracy() { + return accuracy; } @Override public int hashCode() { int hash = 5; - hash = 67 * hash + Objects.hashCode(this.acurracy); + hash = 67 * hash + Objects.hashCode(this.accuracy); return hash; } @@ -226,14 +226,14 @@ public class GridDialog extends AppDialog { return false; } final AccuracyItem other = (AccuracyItem) obj; - return this.acurracy == other.acurracy; + return this.accuracy == other.accuracy; } @Override public String toString() { - switch (acurracy) { + switch (accuracy) { case MUST_BE_CLOSE: return translate("snapAccuracy.mustBeClose"); case NORMAL: diff --git a/src/com/jpexs/decompiler/flash/gui/GuidesDialog.java b/src/com/jpexs/decompiler/flash/gui/GuidesDialog.java index f62555c64..587931df4 100644 --- a/src/com/jpexs/decompiler/flash/gui/GuidesDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/GuidesDialog.java @@ -152,7 +152,7 @@ public class GuidesDialog extends AppDialog { Configuration.showGuides.set(showGuidesCheckBox.isSelected()); Configuration.snapToGuides.set(snapToGuidesCheckBox.isSelected()); Configuration.lockGuides.set(lockGuidesCheckBox.isSelected()); - Configuration.guidesSnapAccuracy.set(((AccuracyItem) snapAccuracyComboBox.getSelectedItem()).acurracy); + Configuration.guidesSnapAccuracy.set(((AccuracyItem) snapAccuracyComboBox.getSelectedItem()).accuracy); setVisible(false); } @@ -161,20 +161,20 @@ public class GuidesDialog extends AppDialog { } private class AccuracyItem { - private GuidesSnapAccuracy acurracy; + private GuidesSnapAccuracy accuracy; - public AccuracyItem(GuidesSnapAccuracy acurracy) { - this.acurracy = acurracy; + public AccuracyItem(GuidesSnapAccuracy accuracy) { + this.accuracy = accuracy; } - public GuidesSnapAccuracy getAcurracy() { - return acurracy; + public GuidesSnapAccuracy getAccuracy() { + return accuracy; } @Override public int hashCode() { int hash = 5; - hash = 67 * hash + Objects.hashCode(this.acurracy); + hash = 67 * hash + Objects.hashCode(this.accuracy); return hash; } @@ -190,14 +190,14 @@ public class GuidesDialog extends AppDialog { return false; } final AccuracyItem other = (AccuracyItem) obj; - return this.acurracy == other.acurracy; + return this.accuracy == other.accuracy; } @Override public String toString() { - switch (acurracy) { + switch (accuracy) { case MUST_BE_CLOSE: return translate("snapAccuracy.mustBeClose"); case NORMAL: diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index ee3200915..eb67ba58b 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -1662,8 +1662,8 @@ public final class ImagePanel extends JPanel implements MediaDisplay { TextTag text = mouseOverText; if (text != null) { if (text instanceof DefineEditTextTag) { - DefineEditTextTag dtext = (DefineEditTextTag) text; - List recs = dtext.getTextRecords(dtext.getSwf()); + DefineEditTextTag defineEditText = (DefineEditTextTag) text; + List recs = defineEditText.getTextRecords(defineEditText.getSwf()); FontTag font = null; int pos = 0; int selStart = getSelectionStartInt(); @@ -1672,7 +1672,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay { int y = 0; for (TEXTRECORD r : recs) { if (r.styleFlagsHasFont) { - font = r.getFont(dtext.getSwf()); + font = r.getFont(defineEditText.getSwf()); } if (r.styleFlagsHasYOffset) { int oldY = y; diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index acbc5b09c..0a93d7d1e 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -1545,7 +1545,7 @@ public class Main { if (event.equals("importing_as")) { startWork(AppStrings.translate("work.importing_as") + "..." + (String) data, importWorker); } - if (event.equals("unitializedClassFields")) { + if (event.equals("uninitializedClassFields")) { continueWork(AppStrings.translate("work.decompiling") + "..." + (String) data); } } @@ -3158,10 +3158,10 @@ public class Main { Helper.decompilationErrorAdd = AppStrings.translate(Configuration.autoDeobfuscate.get() ? "deobfuscation.comment.failed" : "deobfuscation.comment.tryenable"); ResourceBundle advancedSettingsBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(AdvancedSettingsDialog.class)); - Set confirationNames = Configuration.getConfigurationFields(false, true).keySet(); + Set configurationNames = Configuration.getConfigurationFields(false, true).keySet(); Map titles = new LinkedHashMap<>(); Map descriptions = new LinkedHashMap<>(); - for (String name : confirationNames) { + for (String name : configurationNames) { if (advancedSettingsBundle.containsKey("config.name." + name)) { titles.put(name, advancedSettingsBundle.getString("config.name." + name)); } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 7a2f8bedf..25fc15aa6 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -2730,7 +2730,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se gotoScriptName(swf, scriptName); } - public void findOrLoadOpanableListByFilePath(String filePath, OpenableListLoaded executeAfterOpen, boolean loadSession) { + public void findOrLoadOpenableListByFilePath(String filePath, OpenableListLoaded executeAfterOpen, boolean loadSession) { for (OpenableList ol : openables) { String existingFilePath = ol.sourceInfo.getFile(); if (existingFilePath == null) { @@ -2744,7 +2744,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se Main.openFile(filePath, null, new Runnable() { @Override public void run() { - findOrLoadOpanableListByFilePath(filePath, executeAfterOpen, loadSession); + findOrLoadOpenableListByFilePath(filePath, executeAfterOpen, loadSession); } }, loadSession); } @@ -3414,7 +3414,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se reload(true); } - public void skipDetectionOfUnitializedClassFieldsChanged() { + public void skipDetectionOfUninitializedClassFieldsChanged() { clearAllScriptCache(); updateClassesList(); reload(true); diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 19844ba9a..4688955f2 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -1811,10 +1811,10 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener { decompiledEditor.setShowMarkers(false); - if (!Configuration.skipDetectionOfUnitializedClassFields.get() && src.getSwf().needsCalculatingAS2UninitializeClassTraits(src)) { + if (!Configuration.skipDetectionOfUninitializedClassFields.get() && src.getSwf().needsCalculatingAS2UninitializeClassTraits(src)) { setEditorText(asm.getScriptName(), asm.getExportedScriptName(), "; ...", "text/flasm"); setDecompiledText("-", "-", "// " + AppStrings.translate("work.decompiling.allScripts.ucf") + "..." + "\r\n" @@ -1004,10 +1004,10 @@ public class ActionPanel extends JPanel implements SearchListener() { + Configuration.skipDetectionOfUninitializedClassFields.addListener(new ConfigurationItemChangeListener() { @Override public void configurationItemChanged(Boolean newValue) { - mainPanel.skipDetectionOfUnitializedClassFieldsChanged(); + mainPanel.skipDetectionOfUninitializedClassFieldsChanged(); } }); @@ -1028,7 +1028,7 @@ public class ActionPanel extends JPanel implements SearchListener tokenTypes = new HashSet<>(); - private OccurencesMarker marker; + private OccurrencesMarker marker; private Markers.SimpleMarker errorMarker; private Status status; private Map errors = new LinkedHashMap<>(); @@ -472,7 +472,7 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC @Override public void config(Configuration config) { Color markerColor = config.getColor(PROPERTY_COLOR, DEFAULT_COLOR); - Color errorColor = config.getColor(PROPERTY_ERRORCOLOR, DEFAULT_ERRORCOLOR); + Color errorColor = config.getColor(PROPERTY_ERROR_COLOR, DEFAULT_ERROR_COLOR); Color editorBackground = UIManager.getColor("EditorPane.background"); @@ -481,10 +481,9 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC markerColor = new Color(0x443322); } - this.marker = new OccurencesMarker(markerColor); + this.marker = new OccurrencesMarker(markerColor); this.errorMarker = new WavyUnderLinePainter(errorColor); //Markers.SimpleMarker(errorColor); - String types = config.getString( - PROPERTY_TOKENTYPES, DEFAULT_TOKENTYPES); + String types = config.getString(PROPERTY_TOKEN_TYPES, DEFAULT_TOKEN_TYPES); for (String type : types.split("\\s*,\\s*")) { try { @@ -637,8 +636,8 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC }); if (!identText.isEmpty()) { for (int i = suggestions.size() - 1; i >= 0; i--) { - String sug = suggestions.get(i).name.getLast().toString(); - if (!sug.startsWith(identText)) { + String suggestion = suggestions.get(i).name.getLast().toString(); + if (!suggestion.startsWith(identText)) { suggestions.remove(i); } } diff --git a/src/com/jpexs/decompiler/flash/gui/generictageditors/FloatEditor.java b/src/com/jpexs/decompiler/flash/gui/generictageditors/FloatEditor.java index 0d4ac4e1b..49543efd4 100644 --- a/src/com/jpexs/decompiler/flash/gui/generictageditors/FloatEditor.java +++ b/src/com/jpexs/decompiler/flash/gui/generictageditors/FloatEditor.java @@ -168,19 +168,19 @@ public class FloatEditor extends JPanel implements GenericTagEditor { if (linkedField != null && linkEnabled) { Object linkedFieldValue = ReflectionTools.getValue(obj, linkedField); - Object newLinkefFieldValue = null; + Object newLinkedFieldValue = null; if (oldFieldValue instanceof Double) { Double v = (Double) oldFieldValue; Double v2 = (Double) val; Double vL = (Double) linkedFieldValue; - newLinkefFieldValue = v == 0.0 ? v2 : v2 * vL / v; + newLinkedFieldValue = v == 0.0 ? v2 : v2 * vL / v; } else if (oldFieldValue instanceof Float) { Float v = (Float) oldFieldValue; Float v2 = (Float) val; Float vL = (Float) linkedFieldValue; - newLinkefFieldValue = v == 0f ? v2 : v2 * vL / v; + newLinkedFieldValue = v == 0f ? v2 : v2 * vL / v; } - ReflectionTools.setValue(obj, linkedField, -1, newLinkefFieldValue); + ReflectionTools.setValue(obj, linkedField, -1, newLinkedFieldValue); } } catch (IllegalArgumentException | IllegalAccessException ex) { // ignore diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index 9c94caafa..332412490 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -628,8 +628,8 @@ config.name.showCodeCompletionOnDot = Show code completion on dot(.) key config.description.showCodeCompletionOnDot = Automatically show code completion window on pressing dot(.) key. When disabled, it can be shown with Ctrl+space key. #after 24.0.1 -config.name.skipDetectionOfUnitializedClassFields = AS2: Skip detection of uninitialized class fields -config.description.skipDetectionOfUnitializedClassFields = Skips detection of uninitialized attributes in AS2 classes which includes decompilation of all scripts in current SWF before accessing any class. Set this to true if you have large obfuscated file and you want to see at least something (= incomplete class). +config.name.skipDetectionOfUninitializedClassFields = AS2: Skip detection of uninitialized class fields +config.description.skipDetectionOfUninitializedClassFields = Skips detection of uninitialized attributes in AS2 classes which includes decompilation of all scripts in current SWF before accessing any class. Set this to true if you have large obfuscated file and you want to see at least something (= incomplete class). config.name.showHeapStatusWidget = Show heap status widget config.description.showHeapStatusWidget = Displays used memory widget in the titlebar. diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties index bc2c31cdf..98f90d000 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties @@ -628,8 +628,8 @@ config.name.showCodeCompletionOnDot = Zobrazit dokon\u010dov\u00e1n\u00ed k\u00f config.description.showCodeCompletionOnDot = Automaticky zobraz\u00ed okno dokon\u010dov\u00e1n\u00ed k\u00f3du po stisku kl\u00e1vesy te\u010dka(.). P\u0159i zak\u00e1z\u00e1n\u00ed se d\u00e1 dokon\u010dov\u00e1n\u00ed k\u00f3du vyvolat pomoc\u00ed Ctrl+mezera. #after 24.0.1 -config.name.skipDetectionOfUnitializedClassFields = AS2: P\u0159esko\u010dit detekci neinicializovan\u00fdch pol\u00ed t\u0159\u00edd -config.description.skipDetectionOfUnitializedClassFields = P\u0159esko\u010d\u00ed detekci neinicializovan\u00fdch atribut\u016f v AS2 t\u0159\u00edd\u00e1ch kter\u00e1 zahrnuje dekompilaci v\u0161ech skript\u016f v aktu\u00e1ln\u00edm SWF p\u0159ed p\u0159\u00edstupem k jak\u00e9koli t\u0159\u00edd\u011b. Nastavte toto na true pokud m\u00e1te velk\u00fd obfuskovan\u00fd soubor a chcete vid\u011bt alespo\u0148 n\u011bco (= nekompletn\u00ed t\u0159\u00eddu). +config.name.skipDetectionOfUninitializedClassFields = AS2: P\u0159esko\u010dit detekci neinicializovan\u00fdch pol\u00ed t\u0159\u00edd +config.description.skipDetectionOfUninitializedClassFields = P\u0159esko\u010d\u00ed detekci neinicializovan\u00fdch atribut\u016f v AS2 t\u0159\u00edd\u00e1ch kter\u00e1 zahrnuje dekompilaci v\u0161ech skript\u016f v aktu\u00e1ln\u00edm SWF p\u0159ed p\u0159\u00edstupem k jak\u00e9koli t\u0159\u00edd\u011b. Nastavte toto na true pokud m\u00e1te velk\u00fd obfuskovan\u00fd soubor a chcete vid\u011bt alespo\u0148 n\u011bco (= nekompletn\u00ed t\u0159\u00eddu). config.name.showHeapStatusWidget = Zobrazit widget se stavem heapu config.description.showHeapStatusWidget = Zobraz\u00ed widget s pou\u017eitou pam\u011bt\u00ed v titulku okna. diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_tr.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_tr.properties index a4af75ede..2dcae9935 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_tr.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_tr.properties @@ -595,5 +595,5 @@ config.description.warning.linkTypes = Komut dosyas\u0131 d\u00fczenleyicisinde config.name.showCodeCompletionOnDot = Nokta(.) tu\u015funa bas\u0131ld\u0131\u011f\u0131nda kod tamamlamay\u0131 g\u00f6ster config.description.showCodeCompletionOnDot = Nokta(.) tu\u015funa bas\u0131ld\u0131\u011f\u0131nda kod tamamlama penceresini otomatik olarak g\u00f6ster. Devre d\u0131\u015f\u0131 b\u0131rak\u0131ld\u0131\u011f\u0131nda Ctrl+bo\u015fluk tu\u015fu ile g\u00f6sterilebilir. #after 24.0.1 -config.name.skipDetectionOfUnitializedClassFields = AS2: Ba\u015flat\u0131lmam\u0131\u015f s\u0131n\u0131f alanlar\u0131n\u0131n alg\u0131lanmas\u0131n\u0131 atla -config.description.skipDetectionOfUnitializedClassFields = AS2 s\u0131n\u0131flar\u0131nda ba\u015flat\u0131lmam\u0131\u015f \u00f6zniteliklerin alg\u0131lanmas\u0131n\u0131 atlar; bu, herhangi bir s\u0131n\u0131fa eri\u015fmeden \u00f6nce ge\u00e7erli SWF'deki t\u00fcm komut dosyalar\u0131n\u0131n derlenmesini i\u00e7erir. B\u00fcy\u00fck bir gizlenmi\u015f dosyan\u0131z varsa ve en az\u0131ndan bir \u015fey g\u00f6rmek istiyorsan\u0131z (= tamamlanmam\u0131\u015f s\u0131n\u0131f) bunu do\u011fru olarak ayarlay\u0131n. +config.name.skipDetectionOfUninitializedClassFields = AS2: Ba\u015flat\u0131lmam\u0131\u015f s\u0131n\u0131f alanlar\u0131n\u0131n alg\u0131lanmas\u0131n\u0131 atla +config.description.skipDetectionOfUninitializedClassFields = AS2 s\u0131n\u0131flar\u0131nda ba\u015flat\u0131lmam\u0131\u015f \u00f6zniteliklerin alg\u0131lanmas\u0131n\u0131 atlar; bu, herhangi bir s\u0131n\u0131fa eri\u015fmeden \u00f6nce ge\u00e7erli SWF'deki t\u00fcm komut dosyalar\u0131n\u0131n derlenmesini i\u00e7erir. B\u00fcy\u00fck bir gizlenmi\u015f dosyan\u0131z varsa ve en az\u0131ndan bir \u015fey g\u00f6rmek istiyorsan\u0131z (= tamamlanmam\u0131\u015f s\u0131n\u0131f) bunu do\u011fru olarak ayarlay\u0131n.