From 3c940d1b91778b65d3a2ca5def2ec984dd8b40e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Wed, 24 Feb 2021 08:02:24 +0100 Subject: [PATCH] #1601 Option to hide AS3 docs panel and traitslist/constants panel --- CHANGELOG.md | 1 + .../decompiler/flash/configuration/Configuration.java | 8 ++++++++ src/com/jpexs/decompiler/flash/gui/MainPanel.java | 6 +++++- .../jpexs/decompiler/flash/gui/abc/MethodCodePanel.java | 6 +++++- .../flash/gui/locales/AdvancedSettingsDialog.properties | 6 ++++++ 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3241644dc..cc2df5f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. - Ignore case and RegExp options displayed on search results dialog - #1611 Warning about initializers has do not show again checkbox - Scoped script text search and search across multiple SWFs +- #1601 Option to hide AS3 docs panel and traitslist/constants panel ### Fixed - #1298 AS1/2 properly decompiled setProperty/getProperty 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 192fbc85b..e2246a2ef 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 @@ -685,6 +685,14 @@ public final class Configuration { @ConfigurationCategory("ui") public static ConfigurationItem parametersPanelInSearchResults = null; + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem displayAs3PCodeDocsPanel = null; + + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem displayAs3TraitsListAndConstantsPanel = null; + private enum OSId { WINDOWS, OSX, UNIX } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 13b3afe20..10abd2607 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -3587,7 +3587,11 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se abcPanel.decompiledTextArea.setNoTrait(); } - showDetail(DETAILCARDAS3NAVIGATOR); + if (Configuration.displayAs3TraitsListAndConstantsPanel.get()) { + showDetail(DETAILCARDAS3NAVIGATOR); + } else { + showDetail(DETAILCARDEMPTYPANEL); + } showCard(CARDACTIONSCRIPT3PANEL); return; } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java b/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java index 6d5b88cbd..d9b607c49 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java @@ -118,7 +118,11 @@ public class MethodCodePanel extends JPanel { docsPanel = new DocsPanel(); sourceTextArea.addDocsListener(docsPanel); - add(new JPersistentSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane(sourceTextArea), new JScrollPane(docsPanel), Configuration.guiAvm2DocsSplitPaneDividerLocationPercent)); + if (Configuration.displayAs3PCodeDocsPanel.get()) { + add(new JPersistentSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane(sourceTextArea), new JScrollPane(docsPanel), Configuration.guiAvm2DocsSplitPaneDividerLocationPercent)); + } else { + add(new JScrollPane(sourceTextArea)); + } sourceTextArea.changeContentType("text/flasm3"); sourceTextArea.setFont(Configuration.getSourceFont()); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index 067bddc04..69e65b377 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -510,3 +510,9 @@ config.description.warning.initializers = Show warning on AS3 slot/const editati config.name.parametersPanelInSearchResults = Show parameters panel in search results config.description.parametersPanelInSearchResults = Show panel with parameters like search text / ignore case / regexp in search results window + +config.name.displayAs3PCodeDocsPanel = Show docs panel in AS3 P-code +config.description.displayAs3PCodeDocsPanel = Show panel with documentation of instructions and code structure in AS3 P-code editation and display + +config.name.displayAs3TraitsListAndConstantsPanel = Show AS3 traits list and constants panel +config.description.displayAs3TraitsListAndConstantsPanel = Show panel with list of traits and constants under the tag tree for AS3