#1601 Option to hide AS3 docs panel and traitslist/constants panel

This commit is contained in:
Jindra Petřík
2021-02-24 08:02:24 +01:00
parent ae75ed9805
commit 3c940d1b91
5 changed files with 25 additions and 2 deletions

View File

@@ -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

View File

@@ -685,6 +685,14 @@ public final class Configuration {
@ConfigurationCategory("ui")
public static ConfigurationItem<Boolean> parametersPanelInSearchResults = null;
@ConfigurationDefaultBoolean(true)
@ConfigurationCategory("ui")
public static ConfigurationItem<Boolean> displayAs3PCodeDocsPanel = null;
@ConfigurationDefaultBoolean(true)
@ConfigurationCategory("ui")
public static ConfigurationItem<Boolean> displayAs3TraitsListAndConstantsPanel = null;
private enum OSId {
WINDOWS, OSX, UNIX
}

View File

@@ -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;
}

View File

@@ -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());

View File

@@ -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