From 5f07ec366295a20027151a2ad93df8b31a4f9665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 24 Jun 2025 21:10:57 +0200 Subject: [PATCH] Added: Option to turn off code completion on dot(.) key --- CHANGELOG.md | 1 + .../jpexs/decompiler/flash/configuration/Configuration.java | 4 ++++ .../jpexs/decompiler/flash/gui/editor/VariableMarker.java | 2 +- .../flash/gui/locales/AdvancedSettingsDialog.properties | 5 ++++- .../flash/gui/locales/AdvancedSettingsDialog_cs.properties | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 293da6f0d..c2cb6f71d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ All notable changes to this project will be documented in this file. - AS3 - code completion (properties and methods) - [#2470] Transformation - Copy individual transforms to clipboard, load/apply from clipboard buttons +- Option to turn off code completion on dot(.) key ### Changed - AS1/2 - Single DoAction tag inside frame is now displayed directly as frame node 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 452868f6a..c9938f0d4 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 @@ -1145,6 +1145,10 @@ public final class Configuration { @ConfigurationName("warning.linkTypes") @ConfigurationCategory("script") public static ConfigurationItem warningLinkTypes = null; + + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("script") + public static ConfigurationItem showCodeCompletionOnDot = null; private static Map configurationDescriptions = new LinkedHashMap<>(); private static Map configurationTitles = new LinkedHashMap<>(); diff --git a/src/com/jpexs/decompiler/flash/gui/editor/VariableMarker.java b/src/com/jpexs/decompiler/flash/gui/editor/VariableMarker.java index 915c4d706..95fe97601 100644 --- a/src/com/jpexs/decompiler/flash/gui/editor/VariableMarker.java +++ b/src/com/jpexs/decompiler/flash/gui/editor/VariableMarker.java @@ -706,7 +706,7 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC tim.cancel(); tim = null; } - if (e.getKeyChar() == '.') { + if (e.getKeyChar() == '.' && com.jpexs.decompiler.flash.configuration.Configuration.showCodeCompletionOnDot.get()) { if (!editor.isEditable()) { return; } diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index 2b1f6cbcd..7ab82a584 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -622,4 +622,7 @@ config.description.snapAlignCenterAlignmentVertical = Enables snap align of obje #after 23.0.1 config.name.warning.linkTypes = Show warning when clicking external file link -config.name.warning.linkTypes = Warn on clicking a link in the script editor which leads to another SWF file. \ No newline at end of file +config.description.warning.linkTypes = Warn on clicking a link in the script editor which leads to another SWF file. + +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. 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 d09d90bb4..f95c75add 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties @@ -624,3 +624,5 @@ config.description.snapAlignCenterAlignmentVertical = Povol\u00ed p\u0159ichycen config.name.warning.linkTypes = Varovat p\u0159i kliknut\u00ed na link na extern\u00ed soubor config.description.warning.linkTypes = Zobrazovat varov\u00e1n\u00ed p\u0159i kliknut\u00ed na odkaz v editoru skript\u016f, kter\u00fd vede do jin\u00e9ho SWF souboru. +config.name.showCodeCompletionOnDot = Zobrazit dokon\u010dov\u00e1n\u00ed k\u00f3du po kl\u00e1vese te\u010dka(.) +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.