diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java index 8defee3d..f9bb025b 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java @@ -36,7 +36,7 @@ import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJRadioB import the.bytecode.club.bytecodeviewer.util.*; import the.bytecode.club.bytecodeviewer.resources.ResourceDecompiling; import the.bytecode.club.bytecodeviewer.translation.Language; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJMenu; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJMenuItem; @@ -83,189 +83,189 @@ public class MainViewerGUI extends JFrame public final JMenuBar rootMenu = new JMenuBar(); //all of the files main menu components - public final JMenu fileMainMenu = new TranslatedJMenu("File", Translation.FILE); - public final JMenuItem addResource = new TranslatedJMenuItem("Add...", Translation.ADD); - public final JMenuItem newWorkSpace = new TranslatedJMenuItem("New Workspace", Translation.NEW_WORKSPACE); - public final JMenuItem reloadResources = new TranslatedJMenuItem("Reload Resources", Translation.RELOAD_RESOURCES); - public final JMenuItem runButton = new TranslatedJMenuItem("Run", Translation.RUN); - public final JMenuItem compileButton = new TranslatedJMenuItem("Compile", Translation.COMPILE); - public final JMenuItem saveAsRunnableJar = new TranslatedJMenuItem("Save As Runnable Jar..", Translation.SAVE_AS_RUNNABLE_JAR); - public final JMenuItem saveAsDex = new TranslatedJMenuItem("Save As DEX..", Translation.SAVE_AS_DEX); - public final JMenuItem saveAsAPK = new TranslatedJMenuItem("Save As APK..", Translation.SAVE_AS_APK); - public final JMenuItem saveAsZip = new TranslatedJMenuItem("Save As Zip..", Translation.SAVE_AS_ZIP); - public final JMenuItem decompileSaveOpened = new TranslatedJMenuItem("Decompile & Save Opened Class..", Translation.DECOMPILE_SAVE_OPENED_CLASSES); - public final JMenuItem decompileSaveAll = new TranslatedJMenuItem("Decompile & Save All Classes..", Translation.DECOMPILE_SAVE_ALL_CLASSES); - public final JMenu recentFilesSecondaryMenu = new TranslatedJMenu("Recent Files", Translation.RECENT_FILES); - public final JMenuItem about = new TranslatedJMenuItem("About", Translation.ABOUT); - public final JMenuItem exit = new TranslatedJMenuItem("Exit", Translation.EXIT); + public final JMenu fileMainMenu = new TranslatedJMenu("File", TranslatedComponents.FILE); + public final JMenuItem addResource = new TranslatedJMenuItem("Add...", TranslatedComponents.ADD); + public final JMenuItem newWorkSpace = new TranslatedJMenuItem("New Workspace", TranslatedComponents.NEW_WORKSPACE); + public final JMenuItem reloadResources = new TranslatedJMenuItem("Reload Resources", TranslatedComponents.RELOAD_RESOURCES); + public final JMenuItem runButton = new TranslatedJMenuItem("Run", TranslatedComponents.RUN); + public final JMenuItem compileButton = new TranslatedJMenuItem("Compile", TranslatedComponents.COMPILE); + public final JMenuItem saveAsRunnableJar = new TranslatedJMenuItem("Save As Runnable Jar..", TranslatedComponents.SAVE_AS_RUNNABLE_JAR); + public final JMenuItem saveAsDex = new TranslatedJMenuItem("Save As DEX..", TranslatedComponents.SAVE_AS_DEX); + public final JMenuItem saveAsAPK = new TranslatedJMenuItem("Save As APK..", TranslatedComponents.SAVE_AS_APK); + public final JMenuItem saveAsZip = new TranslatedJMenuItem("Save As Zip..", TranslatedComponents.SAVE_AS_ZIP); + public final JMenuItem decompileSaveOpened = new TranslatedJMenuItem("Decompile & Save Opened Class..", TranslatedComponents.DECOMPILE_SAVE_OPENED_CLASSES); + public final JMenuItem decompileSaveAll = new TranslatedJMenuItem("Decompile & Save All Classes..", TranslatedComponents.DECOMPILE_SAVE_ALL_CLASSES); + public final JMenu recentFilesSecondaryMenu = new TranslatedJMenu("Recent Files", TranslatedComponents.RECENT_FILES); + public final JMenuItem about = new TranslatedJMenuItem("About", TranslatedComponents.ABOUT); + public final JMenuItem exit = new TranslatedJMenuItem("Exit", TranslatedComponents.EXIT); //all of the view main menu components - public final JMenu viewMainMenu = new TranslatedJMenu("View", Translation.VIEW); + public final JMenu viewMainMenu = new TranslatedJMenu("View", TranslatedComponents.VIEW); public final DecompilerSelectionPane viewPane1 = new DecompilerSelectionPane(1); public final DecompilerSelectionPane viewPane2 = new DecompilerSelectionPane(2); public final DecompilerSelectionPane viewPane3 = new DecompilerSelectionPane(3); //all of the plugins main menu components - public final JMenu pluginsMainMenu = new TranslatedJMenu("Plugins", Translation.PLUGINS); - public final JMenuItem openExternalPlugin = new TranslatedJMenuItem("Open Plugin...", Translation.OPEN_PLUGIN); - public final JMenu recentPluginsSecondaryMenu = new TranslatedJMenu("Recent Plugins", Translation.RECENT_PLUGINS); - public final JMenuItem newJavaPlugin = new TranslatedJMenuItem("New Java Plugin...", Translation.NEW_JAVA_PLUGIN); - public final JMenuItem newJavascriptPlugin = new TranslatedJMenuItem("New Javascript Plugin...", Translation.NEW_JAVASCRIPT_PLUGIN); - public final JMenuItem codeSequenceDiagram = new TranslatedJMenuItem("Code Sequence Diagram", Translation.CODE_SEQUENCE_DIAGRAM); - public final JMenuItem maliciousCodeScanner = new TranslatedJMenuItem("Malicious Code Scanner", Translation.MALICIOUS_CODE_SCANNER); - public final JMenuItem showAllStrings = new TranslatedJMenuItem("Show All Strings", Translation.SHOW_ALL_STRINGS); - public final JMenuItem showMainMethods = new TranslatedJMenuItem("Show Main Methods", Translation.SHOW_MAIN_METHODS); - public final JMenuItem replaceStrings = new TranslatedJMenuItem("Replace Strings", Translation.REPLACE_STRINGS); - public final JMenuItem stackFramesRemover = new TranslatedJMenuItem("StackFrames Remover", Translation.STACK_FRAMES_REMOVER); - public final JMenuItem ZKMStringDecrypter = new TranslatedJMenuItem("ZKM String Decrypter", Translation.ZKM_STRING_DECRYPTER); - public final JMenuItem allatoriStringDecrypter = new TranslatedJMenuItem("Allatori String Decrypter", Translation.ALLATORI_STRING_DECRYPTER); - public final JMenuItem zStringArrayDecrypter = new TranslatedJMenuItem("ZStringArray Decrypter", Translation.ZSTRINGARRAY_DECRYPTER); - public final JMenuItem viewAPKAndroidPermissions = new TranslatedJMenuItem("View Android Permissions", Translation.VIEW_ANDROID_PERMISSIONS); - public final JMenuItem viewManifest = new TranslatedJMenuItem("View Manifest", Translation.VIEW_MANIFEST); - public final JMenuItem changeClassFileVersions = new TranslatedJMenuItem("Change ClassFile Versions", Translation.CHANGE_CLASSFILE_VERSIONS); + public final JMenu pluginsMainMenu = new TranslatedJMenu("Plugins", TranslatedComponents.PLUGINS); + public final JMenuItem openExternalPlugin = new TranslatedJMenuItem("Open Plugin...", TranslatedComponents.OPEN_PLUGIN); + public final JMenu recentPluginsSecondaryMenu = new TranslatedJMenu("Recent Plugins", TranslatedComponents.RECENT_PLUGINS); + public final JMenuItem newJavaPlugin = new TranslatedJMenuItem("New Java Plugin...", TranslatedComponents.NEW_JAVA_PLUGIN); + public final JMenuItem newJavascriptPlugin = new TranslatedJMenuItem("New Javascript Plugin...", TranslatedComponents.NEW_JAVASCRIPT_PLUGIN); + public final JMenuItem codeSequenceDiagram = new TranslatedJMenuItem("Code Sequence Diagram", TranslatedComponents.CODE_SEQUENCE_DIAGRAM); + public final JMenuItem maliciousCodeScanner = new TranslatedJMenuItem("Malicious Code Scanner", TranslatedComponents.MALICIOUS_CODE_SCANNER); + public final JMenuItem showAllStrings = new TranslatedJMenuItem("Show All Strings", TranslatedComponents.SHOW_ALL_STRINGS); + public final JMenuItem showMainMethods = new TranslatedJMenuItem("Show Main Methods", TranslatedComponents.SHOW_MAIN_METHODS); + public final JMenuItem replaceStrings = new TranslatedJMenuItem("Replace Strings", TranslatedComponents.REPLACE_STRINGS); + public final JMenuItem stackFramesRemover = new TranslatedJMenuItem("StackFrames Remover", TranslatedComponents.STACK_FRAMES_REMOVER); + public final JMenuItem ZKMStringDecrypter = new TranslatedJMenuItem("ZKM String Decrypter", TranslatedComponents.ZKM_STRING_DECRYPTER); + public final JMenuItem allatoriStringDecrypter = new TranslatedJMenuItem("Allatori String Decrypter", TranslatedComponents.ALLATORI_STRING_DECRYPTER); + public final JMenuItem zStringArrayDecrypter = new TranslatedJMenuItem("ZStringArray Decrypter", TranslatedComponents.ZSTRINGARRAY_DECRYPTER); + public final JMenuItem viewAPKAndroidPermissions = new TranslatedJMenuItem("View Android Permissions", TranslatedComponents.VIEW_ANDROID_PERMISSIONS); + public final JMenuItem viewManifest = new TranslatedJMenuItem("View Manifest", TranslatedComponents.VIEW_MANIFEST); + public final JMenuItem changeClassFileVersions = new TranslatedJMenuItem("Change ClassFile Versions", TranslatedComponents.CHANGE_CLASSFILE_VERSIONS); //all of the settings main menu components - public final JMenu rstaTheme = new TranslatedJMenu("Text Area Theme", Translation.TEXT_AREA_THEME); - public final JMenuItem rstaThemeSettings = new TranslatedJMenuItem("Text Area Theme", Translation.TEXT_AREA_THEME); + public final JMenu rstaTheme = new TranslatedJMenu("Text Area Theme", TranslatedComponents.TEXT_AREA_THEME); + public final JMenuItem rstaThemeSettings = new TranslatedJMenuItem("Text Area Theme", TranslatedComponents.TEXT_AREA_THEME); public SettingsDialogue rstaThemeSettingsDialogue; - public final JMenu lafTheme = new TranslatedJMenu("Window Theme", Translation.WINDOW_THEME); - public final JMenuItem lafThemeSettings = new TranslatedJMenuItem("Window Theme", Translation.WINDOW_THEME); + public final JMenu lafTheme = new TranslatedJMenu("Window Theme", TranslatedComponents.WINDOW_THEME); + public final JMenuItem lafThemeSettings = new TranslatedJMenuItem("Window Theme", TranslatedComponents.WINDOW_THEME); public SettingsDialogue lafThemeSettingsDialogue; - public final JMenu language = new TranslatedJMenu("Language", Translation.LANGUAGE); - public final JMenuItem languageSettings = new TranslatedJMenuItem("Language", Translation.LANGUAGE); + public final JMenu language = new TranslatedJMenu("Language", TranslatedComponents.LANGUAGE); + public final JMenuItem languageSettings = new TranslatedJMenuItem("Language", TranslatedComponents.LANGUAGE); public SettingsDialogue languageSettingsDialogue; - public final JMenu fontSize = new TranslatedJMenu("Font Size", Translation.FONT_SIZE); + public final JMenu fontSize = new TranslatedJMenu("Font Size", TranslatedComponents.FONT_SIZE); public final JSpinner fontSpinner = new JSpinner(); public final Map rstaThemes = new HashMap<>(); public final Map lafThemes = new HashMap<>(); public final Map languages = new HashMap<>(); //BCV settings - public final JCheckBoxMenuItem refreshOnChange = new TranslatedJCheckBoxMenuItem("Refresh On View Change", Translation.REFRESH_ON_VIEW_CHANGE); - private final JCheckBoxMenuItem deleteForeignOutdatedLibs = new TranslatedJCheckBoxMenuItem("Delete Foreign/Outdated Libs", Translation.DELETE_UNKNOWN_LIBS); - public final JMenu settingsMainMenu = new TranslatedJMenu("Settings", Translation.SETTINGS); - public final JMenu visualSettings = new TranslatedJMenu("Visual Settings", Translation.VISUAL_SETTINGS); - public final JCheckBoxMenuItem updateCheck = new TranslatedJCheckBoxMenuItem("Update Check", Translation.UPDATE_CHECK); - public final JMenuItem setPython2 = new TranslatedJMenuItem("Set Python 2.7 Executable", Translation.SET_PYTHON_27_EXECUTABLE); - public final JMenuItem setPython3 = new TranslatedJMenuItem("Set Python 3.X Executable", Translation.SET_PYTHON_30_EXECUTABLE); - public final JMenuItem setJRERT = new TranslatedJMenuItem("Set JRE RT Library", Translation.SET_JRE_RT_LIBRARY); - public final JMenuItem setJavac = new TranslatedJMenuItem("Set Javac Executable", Translation.SET_JAVAC_EXECUTABLE); - public final JMenuItem setOptionalLibrary = new TranslatedJMenuItem("Set Optional Library Folder", Translation.SET_OPTIONAL_LIBRARY_FOLDER); - public final JCheckBoxMenuItem compileOnSave = new TranslatedJCheckBoxMenuItem("Compile On Save", Translation.COMPILE_ON_SAVE); - public final JCheckBoxMenuItem showFileInTabTitle = new TranslatedJCheckBoxMenuItem("Show File In Tab Title", Translation.SHOW_TAB_FILE_IN_TAB_TITLE); - public final JCheckBoxMenuItem simplifyNameInTabTitle = new TranslatedJCheckBoxMenuItem("Simplify Name In Tab Title", Translation.SIMPLIFY_NAME_IN_TAB_TITLE); - public final JCheckBoxMenuItem forcePureAsciiAsText = new TranslatedJCheckBoxMenuItem("Force Pure Ascii As Text", Translation.FORCE_PURE_ASCII_AS_TEXT); - public final JCheckBoxMenuItem autoCompileOnRefresh = new TranslatedJCheckBoxMenuItem("Compile On Refresh", Translation.COMPILE_ON_REFRESH); - public final JCheckBoxMenuItem decodeAPKResources = new TranslatedJCheckBoxMenuItem("Decode APK Resources", Translation.DECODE_APK_RESOURCES); - public final JCheckBoxMenuItem synchronizedViewing = new TranslatedJCheckBoxMenuItem("Synchronized Viewing", Translation.SYNCHRONIZED_VIEWING); - public final JCheckBoxMenuItem showClassMethods = new TranslatedJCheckBoxMenuItem("Show Class Methods", Translation.SHOW_CLASS_METHODS); + public final JCheckBoxMenuItem refreshOnChange = new TranslatedJCheckBoxMenuItem("Refresh On View Change", TranslatedComponents.REFRESH_ON_VIEW_CHANGE); + private final JCheckBoxMenuItem deleteForeignOutdatedLibs = new TranslatedJCheckBoxMenuItem("Delete Foreign/Outdated Libs", TranslatedComponents.DELETE_UNKNOWN_LIBS); + public final JMenu settingsMainMenu = new TranslatedJMenu("Settings", TranslatedComponents.SETTINGS); + public final JMenu visualSettings = new TranslatedJMenu("Visual Settings", TranslatedComponents.VISUAL_SETTINGS); + public final JCheckBoxMenuItem updateCheck = new TranslatedJCheckBoxMenuItem("Update Check", TranslatedComponents.UPDATE_CHECK); + public final JMenuItem setPython2 = new TranslatedJMenuItem("Set Python 2.7 Executable", TranslatedComponents.SET_PYTHON_27_EXECUTABLE); + public final JMenuItem setPython3 = new TranslatedJMenuItem("Set Python 3.X Executable", TranslatedComponents.SET_PYTHON_30_EXECUTABLE); + public final JMenuItem setJRERT = new TranslatedJMenuItem("Set JRE RT Library", TranslatedComponents.SET_JRE_RT_LIBRARY); + public final JMenuItem setJavac = new TranslatedJMenuItem("Set Javac Executable", TranslatedComponents.SET_JAVAC_EXECUTABLE); + public final JMenuItem setOptionalLibrary = new TranslatedJMenuItem("Set Optional Library Folder", TranslatedComponents.SET_OPTIONAL_LIBRARY_FOLDER); + public final JCheckBoxMenuItem compileOnSave = new TranslatedJCheckBoxMenuItem("Compile On Save", TranslatedComponents.COMPILE_ON_SAVE); + public final JCheckBoxMenuItem showFileInTabTitle = new TranslatedJCheckBoxMenuItem("Show File In Tab Title", TranslatedComponents.SHOW_TAB_FILE_IN_TAB_TITLE); + public final JCheckBoxMenuItem simplifyNameInTabTitle = new TranslatedJCheckBoxMenuItem("Simplify Name In Tab Title", TranslatedComponents.SIMPLIFY_NAME_IN_TAB_TITLE); + public final JCheckBoxMenuItem forcePureAsciiAsText = new TranslatedJCheckBoxMenuItem("Force Pure Ascii As Text", TranslatedComponents.FORCE_PURE_ASCII_AS_TEXT); + public final JCheckBoxMenuItem autoCompileOnRefresh = new TranslatedJCheckBoxMenuItem("Compile On Refresh", TranslatedComponents.COMPILE_ON_REFRESH); + public final JCheckBoxMenuItem decodeAPKResources = new TranslatedJCheckBoxMenuItem("Decode APK Resources", TranslatedComponents.DECODE_APK_RESOURCES); + public final JCheckBoxMenuItem synchronizedViewing = new TranslatedJCheckBoxMenuItem("Synchronized Viewing", TranslatedComponents.SYNCHRONIZED_VIEWING); + public final JCheckBoxMenuItem showClassMethods = new TranslatedJCheckBoxMenuItem("Show Class Methods", TranslatedComponents.SHOW_CLASS_METHODS); //apk conversion settings - public final JMenu apkConversionSecondaryMenu = new TranslatedJMenu("APK Conversion/Decoding", Translation.APK_CONVERSION_DECODING); - public final JMenuItem apkConversionSettings = new TranslatedJMenuItem("APK Conversion/Decoding", Translation.APK_CONVERSION_DECODING); + public final JMenu apkConversionSecondaryMenu = new TranslatedJMenu("APK Conversion/Decoding", TranslatedComponents.APK_CONVERSION_DECODING); + public final JMenuItem apkConversionSettings = new TranslatedJMenuItem("APK Conversion/Decoding", TranslatedComponents.APK_CONVERSION_DECODING); public SettingsDialogue apkConversionSettingsDialogue; public final ButtonGroup apkConversionGroup = new ButtonGroup(); public final JRadioButtonMenuItem apkConversionDex = new JRadioButtonMenuItem("Dex2Jar"); public final JRadioButtonMenuItem apkConversionEnjarify = new JRadioButtonMenuItem("Enjarify"); //CFIDE settings - public final JMenu bytecodeDecompilerSettingsSecondaryMenu = new TranslatedJMenu("Bytecode Decompiler", Translation.BYTECODE_DECOMPILER); - public final JMenuItem bytecodeDecompilerSettings = new TranslatedJMenuItem("Bytecode Decompiler", Translation.BYTECODE_DECOMPILER); + public final JMenu bytecodeDecompilerSettingsSecondaryMenu = new TranslatedJMenu("Bytecode Decompiler", TranslatedComponents.BYTECODE_DECOMPILER); + public final JMenuItem bytecodeDecompilerSettings = new TranslatedJMenuItem("Bytecode Decompiler", TranslatedComponents.BYTECODE_DECOMPILER); public SettingsDialogue bytecodeDecompilerSettingsDialogue; - public final JCheckBoxMenuItem appendBracketsToLabels = new TranslatedJCheckBoxMenuItem("Append Brackets To Labels", Translation.APPEND_BRACKETS_TO_LABEL); - public JCheckBoxMenuItem debugHelpers = new TranslatedJCheckBoxMenuItem("Debug Helpers", Translation.DEBUG_HELPERS); + public final JCheckBoxMenuItem appendBracketsToLabels = new TranslatedJCheckBoxMenuItem("Append Brackets To Labels", TranslatedComponents.APPEND_BRACKETS_TO_LABEL); + public JCheckBoxMenuItem debugHelpers = new TranslatedJCheckBoxMenuItem("Debug Helpers", TranslatedComponents.DEBUG_HELPERS); //FernFlower settings - public final JMenu fernFlowerSettingsSecondaryMenu = new TranslatedJMenu("FernFlower Settings", Translation.FERNFLOWER_SETTINGS); - public final JMenuItem fernFlowerSettings = new TranslatedJMenuItem("FernFlower Settings", Translation.FERNFLOWER_SETTINGS); + public final JMenu fernFlowerSettingsSecondaryMenu = new TranslatedJMenu("FernFlower Settings", TranslatedComponents.FERNFLOWER_SETTINGS); + public final JMenuItem fernFlowerSettings = new TranslatedJMenuItem("FernFlower Settings", TranslatedComponents.FERNFLOWER_SETTINGS); public SettingsDialogue fernFlowerSettingsDialogue; - public TranslatedJCheckBoxMenuItem rbr = new TranslatedJCheckBoxMenuItem("Hide bridge methods", Translation.HIDE_BRIDGE_METHODS); - public TranslatedJCheckBoxMenuItem rsy = new TranslatedJCheckBoxMenuItem("Hide synthetic class members", Translation.HIDE_SYNTHETIC_CLASS_MEMBERS); - public TranslatedJCheckBoxMenuItem din = new TranslatedJCheckBoxMenuItem("Decompile inner classes", Translation.DECOMPILE_INNER_CLASSES); - public TranslatedJCheckBoxMenuItem dc4 = new TranslatedJCheckBoxMenuItem("Collapse 1.4 class references", Translation.COLLAPSE_14_CLASS_REFERENCES); - public TranslatedJCheckBoxMenuItem das = new TranslatedJCheckBoxMenuItem("Decompile assertions", Translation.DECOMPILE_ASSERTIONS); - public TranslatedJCheckBoxMenuItem hes = new TranslatedJCheckBoxMenuItem("Hide empty super invocation", Translation.HIDE_EMPTY_SUPER_INVOCATION); - public TranslatedJCheckBoxMenuItem hdc = new TranslatedJCheckBoxMenuItem("Hide empty default constructor", Translation.HIDE_EMPTY_DEFAULT_CONSTRUCTOR); - public TranslatedJCheckBoxMenuItem dgs = new TranslatedJCheckBoxMenuItem("Decompile generic signatures", Translation.DECOMPILE_GENERIC_SIGNATURES); - public TranslatedJCheckBoxMenuItem ner = new TranslatedJCheckBoxMenuItem("Assume return not throwing exceptions", Translation.ASSUME_RETURN_NOT_THROWING_EXCEPTIONS); - public TranslatedJCheckBoxMenuItem den = new TranslatedJCheckBoxMenuItem("Decompile enumerations", Translation.DECOMPILE_ENUMERATIONS); - public TranslatedJCheckBoxMenuItem rgn = new TranslatedJCheckBoxMenuItem("Remove getClass() invocation", Translation.REMOVE_GETCLASS_INVOCATION); - public TranslatedJCheckBoxMenuItem bto = new TranslatedJCheckBoxMenuItem("Interpret int 1 as boolean true", Translation.INTERPRET_INT_1_AS_BOOLEAN_TRUE); - public TranslatedJCheckBoxMenuItem nns = new TranslatedJCheckBoxMenuItem("Allow for not set synthetic attribute", Translation.ALLOW_FOR_NOT_SET_SYNTHETIC_ATTRIBUTE); - public TranslatedJCheckBoxMenuItem uto = new TranslatedJCheckBoxMenuItem("Consider nameless types as java.lang.Object", Translation.CONSIDER_NAMELESS_TYPES_AS_JAVALANGOBJECT); - public TranslatedJCheckBoxMenuItem udv = new TranslatedJCheckBoxMenuItem("Reconstruct variable names from debug info", Translation.RECONSTRUCT_VARIABLE_NAMES_FROM_DEBUG_INFO); - public TranslatedJCheckBoxMenuItem rer = new TranslatedJCheckBoxMenuItem("Remove empty exception ranges", Translation.REMOVE_EMPTY_EXCEPTION_RANGES); - public TranslatedJCheckBoxMenuItem fdi = new TranslatedJCheckBoxMenuItem("Deinline finally structures", Translation.DEINLINE_FINALLY_STRUCTURES); - public TranslatedJCheckBoxMenuItem asc = new TranslatedJCheckBoxMenuItem("Allow only ASCII characters in strings", Translation.ALLOW_ONLY_ASCII_CHARACTERS_IN_STRINGS); - public TranslatedJCheckBoxMenuItem ren = new TranslatedJCheckBoxMenuItem("Rename ambiguous classes and class elements", Translation.RENAME_AMBIGUOUS_CLASSES_AND_CLASS_ELEMENTS); + public TranslatedJCheckBoxMenuItem rbr = new TranslatedJCheckBoxMenuItem("Hide bridge methods", TranslatedComponents.HIDE_BRIDGE_METHODS); + public TranslatedJCheckBoxMenuItem rsy = new TranslatedJCheckBoxMenuItem("Hide synthetic class members", TranslatedComponents.HIDE_SYNTHETIC_CLASS_MEMBERS); + public TranslatedJCheckBoxMenuItem din = new TranslatedJCheckBoxMenuItem("Decompile inner classes", TranslatedComponents.DECOMPILE_INNER_CLASSES); + public TranslatedJCheckBoxMenuItem dc4 = new TranslatedJCheckBoxMenuItem("Collapse 1.4 class references", TranslatedComponents.COLLAPSE_14_CLASS_REFERENCES); + public TranslatedJCheckBoxMenuItem das = new TranslatedJCheckBoxMenuItem("Decompile assertions", TranslatedComponents.DECOMPILE_ASSERTIONS); + public TranslatedJCheckBoxMenuItem hes = new TranslatedJCheckBoxMenuItem("Hide empty super invocation", TranslatedComponents.HIDE_EMPTY_SUPER_INVOCATION); + public TranslatedJCheckBoxMenuItem hdc = new TranslatedJCheckBoxMenuItem("Hide empty default constructor", TranslatedComponents.HIDE_EMPTY_DEFAULT_CONSTRUCTOR); + public TranslatedJCheckBoxMenuItem dgs = new TranslatedJCheckBoxMenuItem("Decompile generic signatures", TranslatedComponents.DECOMPILE_GENERIC_SIGNATURES); + public TranslatedJCheckBoxMenuItem ner = new TranslatedJCheckBoxMenuItem("Assume return not throwing exceptions", TranslatedComponents.ASSUME_RETURN_NOT_THROWING_EXCEPTIONS); + public TranslatedJCheckBoxMenuItem den = new TranslatedJCheckBoxMenuItem("Decompile enumerations", TranslatedComponents.DECOMPILE_ENUMERATIONS); + public TranslatedJCheckBoxMenuItem rgn = new TranslatedJCheckBoxMenuItem("Remove getClass() invocation", TranslatedComponents.REMOVE_GETCLASS_INVOCATION); + public TranslatedJCheckBoxMenuItem bto = new TranslatedJCheckBoxMenuItem("Interpret int 1 as boolean true", TranslatedComponents.INTERPRET_INT_1_AS_BOOLEAN_TRUE); + public TranslatedJCheckBoxMenuItem nns = new TranslatedJCheckBoxMenuItem("Allow for not set synthetic attribute", TranslatedComponents.ALLOW_FOR_NOT_SET_SYNTHETIC_ATTRIBUTE); + public TranslatedJCheckBoxMenuItem uto = new TranslatedJCheckBoxMenuItem("Consider nameless types as java.lang.Object", TranslatedComponents.CONSIDER_NAMELESS_TYPES_AS_JAVALANGOBJECT); + public TranslatedJCheckBoxMenuItem udv = new TranslatedJCheckBoxMenuItem("Reconstruct variable names from debug info", TranslatedComponents.RECONSTRUCT_VARIABLE_NAMES_FROM_DEBUG_INFO); + public TranslatedJCheckBoxMenuItem rer = new TranslatedJCheckBoxMenuItem("Remove empty exception ranges", TranslatedComponents.REMOVE_EMPTY_EXCEPTION_RANGES); + public TranslatedJCheckBoxMenuItem fdi = new TranslatedJCheckBoxMenuItem("Deinline finally structures", TranslatedComponents.DEINLINE_FINALLY_STRUCTURES); + public TranslatedJCheckBoxMenuItem asc = new TranslatedJCheckBoxMenuItem("Allow only ASCII characters in strings", TranslatedComponents.ALLOW_ONLY_ASCII_CHARACTERS_IN_STRINGS); + public TranslatedJCheckBoxMenuItem ren = new TranslatedJCheckBoxMenuItem("Rename ambiguous classes and class elements", TranslatedComponents.RENAME_AMBIGUOUS_CLASSES_AND_CLASS_ELEMENTS); //Procyon - public final JMenu procyonSettingsSecondaryMenu = new TranslatedJMenu("Procyon Settings", Translation.PROCYON_SETTINGS); - public final JMenuItem procyonSettings = new TranslatedJMenuItem("Procyon Settings", Translation.PROCYON_SETTINGS); + public final JMenu procyonSettingsSecondaryMenu = new TranslatedJMenu("Procyon Settings", TranslatedComponents.PROCYON_SETTINGS); + public final JMenuItem procyonSettings = new TranslatedJMenuItem("Procyon Settings", TranslatedComponents.PROCYON_SETTINGS); public SettingsDialogue procyonSettingsDialogue; - public final JCheckBoxMenuItem alwaysGenerateExceptionVars = new TranslatedJCheckBoxMenuItem("Always Generate Exception Variable For Catch Blocks", Translation.ALWAYS_GENERATE_EXCEPTION_VARIABLE_FOR_CATCH_BLOCKS); - public final JCheckBoxMenuItem excludeNestedTypes = new TranslatedJCheckBoxMenuItem("Exclude Nested Types", Translation.EXCLUDE_NESTED_TYPES); - public final JCheckBoxMenuItem showDebugLineNumbers = new TranslatedJCheckBoxMenuItem("Show Debug Line Numbers", Translation.SHOW_DEBUG_LINE_NUMBERS); - public final JCheckBoxMenuItem includeLineNumbersInBytecode = new TranslatedJCheckBoxMenuItem("Include Line Numbers In Bytecode", Translation.INCLUDE_LINE_NUMBERS_IN_BYTECODE); - public final JCheckBoxMenuItem includeErrorDiagnostics = new TranslatedJCheckBoxMenuItem("Include Error Diagnostics", Translation.INCLUDE_ERROR_DIAGNOSTICS); - public final JCheckBoxMenuItem showSyntheticMembers = new TranslatedJCheckBoxMenuItem("Show Synthetic Members", Translation.SHOW_SYNTHETIC_MEMBERS); - public final JCheckBoxMenuItem simplifyMemberReferences = new TranslatedJCheckBoxMenuItem("Simplify Member References", Translation.SIMPLIFY_MEMBER_REFERENCES); - public final JCheckBoxMenuItem mergeVariables = new TranslatedJCheckBoxMenuItem("Merge Variables", Translation.MERGE_VARIABLES); - public final JCheckBoxMenuItem forceExplicitTypeArguments = new TranslatedJCheckBoxMenuItem("Force Explicit Type Arguments", Translation.FORCE_EXPLICIT_TYPE_ARGUMENTS); - public final JCheckBoxMenuItem forceExplicitImports = new TranslatedJCheckBoxMenuItem("Force Explicit Imports", Translation.FORCE_EXPLICIT_IMPORTS); - public final JCheckBoxMenuItem flattenSwitchBlocks = new TranslatedJCheckBoxMenuItem("Flatten Switch Blocks", Translation.FLATTEN_SWITCH_BLOCKS); - public final JCheckBoxMenuItem retainPointlessSwitches = new TranslatedJCheckBoxMenuItem("Retain Pointless Switches", Translation.RETAIN_POINTLESS_SWITCHES); - public final JCheckBoxMenuItem retainRedunantCasts = new TranslatedJCheckBoxMenuItem("Retain Redundant Casts", Translation.RETAIN_REDUNDANT_CASTS); - public final JCheckBoxMenuItem unicodeOutputEnabled = new TranslatedJCheckBoxMenuItem("Unicode Output Enabled", Translation.UNICODE_OUTPUT_ENABLED); + public final JCheckBoxMenuItem alwaysGenerateExceptionVars = new TranslatedJCheckBoxMenuItem("Always Generate Exception Variable For Catch Blocks", TranslatedComponents.ALWAYS_GENERATE_EXCEPTION_VARIABLE_FOR_CATCH_BLOCKS); + public final JCheckBoxMenuItem excludeNestedTypes = new TranslatedJCheckBoxMenuItem("Exclude Nested Types", TranslatedComponents.EXCLUDE_NESTED_TYPES); + public final JCheckBoxMenuItem showDebugLineNumbers = new TranslatedJCheckBoxMenuItem("Show Debug Line Numbers", TranslatedComponents.SHOW_DEBUG_LINE_NUMBERS); + public final JCheckBoxMenuItem includeLineNumbersInBytecode = new TranslatedJCheckBoxMenuItem("Include Line Numbers In Bytecode", TranslatedComponents.INCLUDE_LINE_NUMBERS_IN_BYTECODE); + public final JCheckBoxMenuItem includeErrorDiagnostics = new TranslatedJCheckBoxMenuItem("Include Error Diagnostics", TranslatedComponents.INCLUDE_ERROR_DIAGNOSTICS); + public final JCheckBoxMenuItem showSyntheticMembers = new TranslatedJCheckBoxMenuItem("Show Synthetic Members", TranslatedComponents.SHOW_SYNTHETIC_MEMBERS); + public final JCheckBoxMenuItem simplifyMemberReferences = new TranslatedJCheckBoxMenuItem("Simplify Member References", TranslatedComponents.SIMPLIFY_MEMBER_REFERENCES); + public final JCheckBoxMenuItem mergeVariables = new TranslatedJCheckBoxMenuItem("Merge Variables", TranslatedComponents.MERGE_VARIABLES); + public final JCheckBoxMenuItem forceExplicitTypeArguments = new TranslatedJCheckBoxMenuItem("Force Explicit Type Arguments", TranslatedComponents.FORCE_EXPLICIT_TYPE_ARGUMENTS); + public final JCheckBoxMenuItem forceExplicitImports = new TranslatedJCheckBoxMenuItem("Force Explicit Imports", TranslatedComponents.FORCE_EXPLICIT_IMPORTS); + public final JCheckBoxMenuItem flattenSwitchBlocks = new TranslatedJCheckBoxMenuItem("Flatten Switch Blocks", TranslatedComponents.FLATTEN_SWITCH_BLOCKS); + public final JCheckBoxMenuItem retainPointlessSwitches = new TranslatedJCheckBoxMenuItem("Retain Pointless Switches", TranslatedComponents.RETAIN_POINTLESS_SWITCHES); + public final JCheckBoxMenuItem retainRedunantCasts = new TranslatedJCheckBoxMenuItem("Retain Redundant Casts", TranslatedComponents.RETAIN_REDUNDANT_CASTS); + public final JCheckBoxMenuItem unicodeOutputEnabled = new TranslatedJCheckBoxMenuItem("Unicode Output Enabled", TranslatedComponents.UNICODE_OUTPUT_ENABLED); //CFR - public final JMenu cfrSettingsSecondaryMenu = new TranslatedJMenu("CFR Settings", Translation.CFR_SETTINGS); - public final JMenuItem cfrSettings = new TranslatedJMenuItem("CFR Settings", Translation.CFR_SETTINGS); + public final JMenu cfrSettingsSecondaryMenu = new TranslatedJMenu("CFR Settings", TranslatedComponents.CFR_SETTINGS); + public final JMenuItem cfrSettings = new TranslatedJMenuItem("CFR Settings", TranslatedComponents.CFR_SETTINGS); public SettingsDialogue cfrSettingsDialogue; - public final JCheckBoxMenuItem decodeEnumSwitch = new TranslatedJCheckBoxMenuItem("Decode Enum Switch", Translation.DECODE_ENUM_SWITCH); - public final JCheckBoxMenuItem sugarEnums = new TranslatedJCheckBoxMenuItem("SugarEnums", Translation.SUGARENUMS); - public final JCheckBoxMenuItem decodeStringSwitch = new TranslatedJCheckBoxMenuItem("Decode String Switch", Translation.DECODE_STRING_SWITCH); - public final JCheckBoxMenuItem arrayiter = new TranslatedJCheckBoxMenuItem("Arrayiter", Translation.ARRAYITER); - public final JCheckBoxMenuItem collectioniter = new TranslatedJCheckBoxMenuItem("Collectioniter", Translation.COLLECTIONITER); - public final JCheckBoxMenuItem innerClasses = new TranslatedJCheckBoxMenuItem("Inner Classes", Translation.INNER_CLASSES); - public final JCheckBoxMenuItem removeBoilerPlate = new TranslatedJCheckBoxMenuItem("Remove Boiler Plate", Translation.REMOVE_BOILER_PLATE); - public final JCheckBoxMenuItem removeInnerClassSynthetics = new TranslatedJCheckBoxMenuItem("Remove Inner Class Synthetics", Translation.REMOVE_INNER_CLASS_SYNTHETICS); - public final JCheckBoxMenuItem decodeLambdas = new TranslatedJCheckBoxMenuItem("Decode Lambdas", Translation.DECODE_LAMBDAS); - public final JCheckBoxMenuItem hideBridgeMethods = new TranslatedJCheckBoxMenuItem("Hide Bridge Methods", Translation.HIDE_BRIDGE_METHODS); - public final JCheckBoxMenuItem liftConstructorInit = new TranslatedJCheckBoxMenuItem("Lift Constructor Init", Translation.LIFT__CONSTRUCTOR_INIT); - public final JCheckBoxMenuItem removeDeadMethods = new TranslatedJCheckBoxMenuItem("Remove Dead Methods", Translation.REMOVE_DEAD_METHODS); - public final JCheckBoxMenuItem removeBadGenerics = new TranslatedJCheckBoxMenuItem("Remove Bad Generics", Translation.REMOVE_BAD_GENERICS); - public final JCheckBoxMenuItem sugarAsserts = new TranslatedJCheckBoxMenuItem("Sugar Asserts", Translation.SUGAR_ASSERTS); - public final JCheckBoxMenuItem sugarBoxing = new TranslatedJCheckBoxMenuItem("Sugar Boxing", Translation.SUGAR_BOXING); - public final JCheckBoxMenuItem showVersion = new TranslatedJCheckBoxMenuItem("Show Version", Translation.SHOW_VERSION); - public final JCheckBoxMenuItem decodeFinally = new TranslatedJCheckBoxMenuItem("Decode Finally", Translation.DECODE_FINALLY); - public final JCheckBoxMenuItem tidyMonitors = new TranslatedJCheckBoxMenuItem("Tidy Monitors", Translation.TIDY_MONITORS); - public final JCheckBoxMenuItem lenient = new TranslatedJCheckBoxMenuItem("Lenient", Translation.LENIENT); - public final JCheckBoxMenuItem dumpClassPath = new TranslatedJCheckBoxMenuItem("Dump Classpath", Translation.DUMP_CLASSPATH); - public final JCheckBoxMenuItem comments = new TranslatedJCheckBoxMenuItem("Comments", Translation.COMMENTS); - public final JCheckBoxMenuItem forceTopSort = new TranslatedJCheckBoxMenuItem("Force Top Sort", Translation.FORCE_TOP_SORT); - public final JCheckBoxMenuItem forceTopSortAggress = new TranslatedJCheckBoxMenuItem("Force Top Sort Aggress", Translation.FORCE_TOP_SORT_AGGRESS); - public final JCheckBoxMenuItem forceExceptionPrune = new TranslatedJCheckBoxMenuItem("Force Exception Prune", Translation.FORCE_EXCEPTION_PRUNE); - public final JCheckBoxMenuItem stringBuffer = new TranslatedJCheckBoxMenuItem("String Buffer", Translation.STRING_BUFFER); - public final JCheckBoxMenuItem stringBuilder = new TranslatedJCheckBoxMenuItem("String Builder", Translation.STRING_BUILDER); - public final JCheckBoxMenuItem silent = new TranslatedJCheckBoxMenuItem("Silent", Translation.SILENT); - public final JCheckBoxMenuItem recover = new TranslatedJCheckBoxMenuItem("Recover", Translation.RECOVER); - public final JCheckBoxMenuItem eclipse = new TranslatedJCheckBoxMenuItem("Eclipse", Translation.ECLIPSE); - public final JCheckBoxMenuItem override = new TranslatedJCheckBoxMenuItem("Override", Translation.OVERRIDE); - public final JCheckBoxMenuItem showInferrable = new TranslatedJCheckBoxMenuItem("Show Inferrable", Translation.SHOW_INFERRABLE); - public final JCheckBoxMenuItem aexagg = new TranslatedJCheckBoxMenuItem("Aexagg", Translation.AEXAGG); - public final JCheckBoxMenuItem forceCondPropagate = new TranslatedJCheckBoxMenuItem("Force Cond Propagate", Translation.FORCE_COND_PROPAGATE); - public final JCheckBoxMenuItem hideUTF = new TranslatedJCheckBoxMenuItem("Hide UTF", Translation.HIDE_UTF); - public final JCheckBoxMenuItem hideLongStrings = new TranslatedJCheckBoxMenuItem("Hide Long Strings", Translation.HIDE_LONG_STRINGS); - public final JCheckBoxMenuItem commentMonitor = new TranslatedJCheckBoxMenuItem("Comment Monitors", Translation.COMMENT_MONITORS); - public final JCheckBoxMenuItem allowCorrecting = new TranslatedJCheckBoxMenuItem("Allow Correcting", Translation.ALLOW_CORRECTING); - public final JCheckBoxMenuItem labelledBlocks = new TranslatedJCheckBoxMenuItem("Labelled Blocks", Translation.LABELLED_BLOCKS); - public final JCheckBoxMenuItem j14ClassOBJ = new TranslatedJCheckBoxMenuItem("J14ClassOBJ", Translation.J14CLASSOBJ); - public final JCheckBoxMenuItem hideLangImports = new TranslatedJCheckBoxMenuItem("Hide Lang Imports", Translation.HIDE_LANG_IMPORTS); - public final JCheckBoxMenuItem recoveryTypeClash = new TranslatedJCheckBoxMenuItem("Recover Type Clash", Translation.RECOVER_TYPE_CLASH); - public final JCheckBoxMenuItem recoveryTypehInts = new TranslatedJCheckBoxMenuItem("Recover Type Hints", Translation.RECOVER_TYPE__HINTS); - public final JCheckBoxMenuItem forceTurningIFs = new TranslatedJCheckBoxMenuItem("Force Returning IFs", Translation.FORCE_RETURNING_IFS); - public final JCheckBoxMenuItem forLoopAGGCapture = new TranslatedJCheckBoxMenuItem("For Loop AGG Capture", Translation.FOR_LOOP_AGG_CAPTURE); + public final JCheckBoxMenuItem decodeEnumSwitch = new TranslatedJCheckBoxMenuItem("Decode Enum Switch", TranslatedComponents.DECODE_ENUM_SWITCH); + public final JCheckBoxMenuItem sugarEnums = new TranslatedJCheckBoxMenuItem("SugarEnums", TranslatedComponents.SUGARENUMS); + public final JCheckBoxMenuItem decodeStringSwitch = new TranslatedJCheckBoxMenuItem("Decode String Switch", TranslatedComponents.DECODE_STRING_SWITCH); + public final JCheckBoxMenuItem arrayiter = new TranslatedJCheckBoxMenuItem("Arrayiter", TranslatedComponents.ARRAYITER); + public final JCheckBoxMenuItem collectioniter = new TranslatedJCheckBoxMenuItem("Collectioniter", TranslatedComponents.COLLECTIONITER); + public final JCheckBoxMenuItem innerClasses = new TranslatedJCheckBoxMenuItem("Inner Classes", TranslatedComponents.INNER_CLASSES); + public final JCheckBoxMenuItem removeBoilerPlate = new TranslatedJCheckBoxMenuItem("Remove Boiler Plate", TranslatedComponents.REMOVE_BOILER_PLATE); + public final JCheckBoxMenuItem removeInnerClassSynthetics = new TranslatedJCheckBoxMenuItem("Remove Inner Class Synthetics", TranslatedComponents.REMOVE_INNER_CLASS_SYNTHETICS); + public final JCheckBoxMenuItem decodeLambdas = new TranslatedJCheckBoxMenuItem("Decode Lambdas", TranslatedComponents.DECODE_LAMBDAS); + public final JCheckBoxMenuItem hideBridgeMethods = new TranslatedJCheckBoxMenuItem("Hide Bridge Methods", TranslatedComponents.HIDE_BRIDGE_METHODS); + public final JCheckBoxMenuItem liftConstructorInit = new TranslatedJCheckBoxMenuItem("Lift Constructor Init", TranslatedComponents.LIFT__CONSTRUCTOR_INIT); + public final JCheckBoxMenuItem removeDeadMethods = new TranslatedJCheckBoxMenuItem("Remove Dead Methods", TranslatedComponents.REMOVE_DEAD_METHODS); + public final JCheckBoxMenuItem removeBadGenerics = new TranslatedJCheckBoxMenuItem("Remove Bad Generics", TranslatedComponents.REMOVE_BAD_GENERICS); + public final JCheckBoxMenuItem sugarAsserts = new TranslatedJCheckBoxMenuItem("Sugar Asserts", TranslatedComponents.SUGAR_ASSERTS); + public final JCheckBoxMenuItem sugarBoxing = new TranslatedJCheckBoxMenuItem("Sugar Boxing", TranslatedComponents.SUGAR_BOXING); + public final JCheckBoxMenuItem showVersion = new TranslatedJCheckBoxMenuItem("Show Version", TranslatedComponents.SHOW_VERSION); + public final JCheckBoxMenuItem decodeFinally = new TranslatedJCheckBoxMenuItem("Decode Finally", TranslatedComponents.DECODE_FINALLY); + public final JCheckBoxMenuItem tidyMonitors = new TranslatedJCheckBoxMenuItem("Tidy Monitors", TranslatedComponents.TIDY_MONITORS); + public final JCheckBoxMenuItem lenient = new TranslatedJCheckBoxMenuItem("Lenient", TranslatedComponents.LENIENT); + public final JCheckBoxMenuItem dumpClassPath = new TranslatedJCheckBoxMenuItem("Dump Classpath", TranslatedComponents.DUMP_CLASSPATH); + public final JCheckBoxMenuItem comments = new TranslatedJCheckBoxMenuItem("Comments", TranslatedComponents.COMMENTS); + public final JCheckBoxMenuItem forceTopSort = new TranslatedJCheckBoxMenuItem("Force Top Sort", TranslatedComponents.FORCE_TOP_SORT); + public final JCheckBoxMenuItem forceTopSortAggress = new TranslatedJCheckBoxMenuItem("Force Top Sort Aggress", TranslatedComponents.FORCE_TOP_SORT_AGGRESS); + public final JCheckBoxMenuItem forceExceptionPrune = new TranslatedJCheckBoxMenuItem("Force Exception Prune", TranslatedComponents.FORCE_EXCEPTION_PRUNE); + public final JCheckBoxMenuItem stringBuffer = new TranslatedJCheckBoxMenuItem("String Buffer", TranslatedComponents.STRING_BUFFER); + public final JCheckBoxMenuItem stringBuilder = new TranslatedJCheckBoxMenuItem("String Builder", TranslatedComponents.STRING_BUILDER); + public final JCheckBoxMenuItem silent = new TranslatedJCheckBoxMenuItem("Silent", TranslatedComponents.SILENT); + public final JCheckBoxMenuItem recover = new TranslatedJCheckBoxMenuItem("Recover", TranslatedComponents.RECOVER); + public final JCheckBoxMenuItem eclipse = new TranslatedJCheckBoxMenuItem("Eclipse", TranslatedComponents.ECLIPSE); + public final JCheckBoxMenuItem override = new TranslatedJCheckBoxMenuItem("Override", TranslatedComponents.OVERRIDE); + public final JCheckBoxMenuItem showInferrable = new TranslatedJCheckBoxMenuItem("Show Inferrable", TranslatedComponents.SHOW_INFERRABLE); + public final JCheckBoxMenuItem aexagg = new TranslatedJCheckBoxMenuItem("Aexagg", TranslatedComponents.AEXAGG); + public final JCheckBoxMenuItem forceCondPropagate = new TranslatedJCheckBoxMenuItem("Force Cond Propagate", TranslatedComponents.FORCE_COND_PROPAGATE); + public final JCheckBoxMenuItem hideUTF = new TranslatedJCheckBoxMenuItem("Hide UTF", TranslatedComponents.HIDE_UTF); + public final JCheckBoxMenuItem hideLongStrings = new TranslatedJCheckBoxMenuItem("Hide Long Strings", TranslatedComponents.HIDE_LONG_STRINGS); + public final JCheckBoxMenuItem commentMonitor = new TranslatedJCheckBoxMenuItem("Comment Monitors", TranslatedComponents.COMMENT_MONITORS); + public final JCheckBoxMenuItem allowCorrecting = new TranslatedJCheckBoxMenuItem("Allow Correcting", TranslatedComponents.ALLOW_CORRECTING); + public final JCheckBoxMenuItem labelledBlocks = new TranslatedJCheckBoxMenuItem("Labelled Blocks", TranslatedComponents.LABELLED_BLOCKS); + public final JCheckBoxMenuItem j14ClassOBJ = new TranslatedJCheckBoxMenuItem("J14ClassOBJ", TranslatedComponents.J14CLASSOBJ); + public final JCheckBoxMenuItem hideLangImports = new TranslatedJCheckBoxMenuItem("Hide Lang Imports", TranslatedComponents.HIDE_LANG_IMPORTS); + public final JCheckBoxMenuItem recoveryTypeClash = new TranslatedJCheckBoxMenuItem("Recover Type Clash", TranslatedComponents.RECOVER_TYPE_CLASH); + public final JCheckBoxMenuItem recoveryTypehInts = new TranslatedJCheckBoxMenuItem("Recover Type Hints", TranslatedComponents.RECOVER_TYPE__HINTS); + public final JCheckBoxMenuItem forceTurningIFs = new TranslatedJCheckBoxMenuItem("Force Returning IFs", TranslatedComponents.FORCE_RETURNING_IFS); + public final JCheckBoxMenuItem forLoopAGGCapture = new TranslatedJCheckBoxMenuItem("For Loop AGG Capture", TranslatedComponents.FOR_LOOP_AGG_CAPTURE); //obfuscation public final JMenu obfuscate = new JMenu("Obfuscate"); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/DecompilerViewComponent.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/DecompilerViewComponent.java index e093d358..d18cd1b6 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/DecompilerViewComponent.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/DecompilerViewComponent.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.gui.components; import the.bytecode.club.bytecodeviewer.decompilers.Decompiler; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJCheckBoxMenuItem; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJRadioButtonMenuItem; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.WorkspaceRefreshEvent; @@ -48,9 +48,9 @@ public class DecompilerViewComponent this.menu = new JMenu(name); this.type = type; this.decompilers = decompilers; - this.java = new TranslatedJRadioButtonMenuItem("Java", Translation.JAVA); - this.bytecode = new TranslatedJRadioButtonMenuItem("Bytecode", Translation.BYTECODE); - this.editable = new TranslatedJCheckBoxMenuItem( "Editable", Translation.EDITABLE); + this.java = new TranslatedJRadioButtonMenuItem("Java", TranslatedComponents.JAVA); + this.bytecode = new TranslatedJRadioButtonMenuItem("Bytecode", TranslatedComponents.BYTECODE); + this.editable = new TranslatedJCheckBoxMenuItem( "Editable", TranslatedComponents.EDITABLE); createMenu(); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableJTextArea.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableJTextArea.java index 60ffa51b..e731fc55 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableJTextArea.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableJTextArea.java @@ -5,7 +5,7 @@ import the.bytecode.club.bytecodeviewer.GlobalHotKeys; import the.bytecode.club.bytecodeviewer.resources.IconResources; import the.bytecode.club.bytecodeviewer.gui.components.listeners.PressKeyListener; import the.bytecode.club.bytecodeviewer.gui.components.listeners.ReleaseKeyListener; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJCheckBox; import the.bytecode.club.bytecodeviewer.util.JTextAreaUtils; @@ -44,7 +44,7 @@ public class SearchableJTextArea extends JTextArea private final JScrollPane scrollPane = new JScrollPane(); private final JPanel searchPanel = new JPanel(new BorderLayout()); private final JTextField searchInput = new JTextField(); - private final JCheckBox caseSensitiveSearch = new TranslatedJCheckBox("Exact", Translation.EXACT); + private final JCheckBox caseSensitiveSearch = new TranslatedJCheckBox("Exact", TranslatedComponents.EXACT); public SearchableJTextArea() { diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableRSyntaxTextArea.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableRSyntaxTextArea.java index 33063924..7a73182d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableRSyntaxTextArea.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/SearchableRSyntaxTextArea.java @@ -9,7 +9,7 @@ import the.bytecode.club.bytecodeviewer.resources.IconResources; import the.bytecode.club.bytecodeviewer.gui.components.listeners.PressKeyListener; import the.bytecode.club.bytecodeviewer.gui.components.listeners.ReleaseKeyListener; import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJCheckBox; import the.bytecode.club.bytecodeviewer.util.JTextAreaUtils; @@ -49,7 +49,7 @@ public class SearchableRSyntaxTextArea extends RSyntaxTextArea private final RTextScrollPane scrollPane = new RTextScrollPane(this); private final JPanel searchPanel = new JPanel(new BorderLayout()); private final JTextField searchInput = new JTextField(); - private final JCheckBox caseSensitiveSearch = new TranslatedJCheckBox("Exact", Translation.EXACT); + private final JCheckBox caseSensitiveSearch = new TranslatedJCheckBox("Exact", TranslatedComponents.EXACT); private final JLabel titleHeader = new JLabel(""); private final Color darkScrollBackground = new Color(0x3c3f41); private final Color darkScrollForeground = new Color(0x575859); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java index 401fccc2..99aaa9fc 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java @@ -23,11 +23,10 @@ import me.konloch.kontainer.io.DiskWriter; import org.apache.commons.io.FilenameUtils; import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; -import the.bytecode.club.bytecodeviewer.Constants; import the.bytecode.club.bytecodeviewer.resources.IconResources; import the.bytecode.club.bytecodeviewer.resources.importing.Import; import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJCheckBox; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJTextField; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedVisibleComponent; @@ -68,12 +67,12 @@ import static the.bytecode.club.bytecodeviewer.Constants.tempDirectory; public class ResourceListPane extends TranslatedVisibleComponent implements FileDrop.Listener { public final JPopupMenu rightClickMenu = new JPopupMenu(); - public final JCheckBox exact = new TranslatedJCheckBox("Exact", Translation.EXACT); + public final JCheckBox exact = new TranslatedJCheckBox("Exact", TranslatedComponents.EXACT); public final JButton open = new JButton("+"); public final JButton close = new JButton("-"); public final ResourceTreeNode treeRoot = new ResourceTreeNode("Loaded Files:"); public final ResourceTree tree = new ResourceTree(treeRoot); - public final JTextField quickSearch = new TranslatedJTextField("Quick file search (no file extension)", Translation.QUICK_FILE_SEARCH_NO_FILE_EXTENSION); + public final JTextField quickSearch = new TranslatedJTextField("Quick file search (no file extension)", TranslatedComponents.QUICK_FILE_SEARCH_NO_FILE_EXTENSION); public final FileDrop fileDrop; public boolean cancel = false; @@ -119,7 +118,7 @@ public class ResourceListPane extends TranslatedVisibleComponent implements File public ResourceListPane() { - super("Files", Translation.FILES); + super("Files", TranslatedComponents.FILES); tree.setRootVisible(false); tree.setShowsRootHandles(true); quickSearch.setForeground(Color.gray); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcesearch/SearchBoxPane.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcesearch/SearchBoxPane.java index 2ff5a59d..076091d1 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcesearch/SearchBoxPane.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcesearch/SearchBoxPane.java @@ -20,7 +20,7 @@ import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ResourceViewer import the.bytecode.club.bytecodeviewer.searching.BackgroundSearchThread; import the.bytecode.club.bytecodeviewer.searching.SearchResultNotifier; import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.*; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; @@ -56,27 +56,27 @@ public class SearchBoxPane extends TranslatedVisibleComponent public static final SearchRadius[] SEARCH_RADII = SearchRadius.values(); public static final SearchType[] SEARCH_TYPES = SearchType.values(); - public final JCheckBox exact = new TranslatedJCheckBox("Exact", Translation.EXACT); - public final TranslatedDefaultMutableTreeNode treeRoot = new TranslatedDefaultMutableTreeNode("Results", Translation.RESULTS); + public final JCheckBox exact = new TranslatedJCheckBox("Exact", TranslatedComponents.EXACT); + public final TranslatedDefaultMutableTreeNode treeRoot = new TranslatedDefaultMutableTreeNode("Results", TranslatedComponents.RESULTS); public final JTree tree; public final JComboBox typeBox; public SearchType searchType = null; public final JComboBox searchRadiusBox; - public JButton search = new TranslatedJButton("Search", Translation.SEARCH); + public JButton search = new TranslatedJButton("Search", TranslatedComponents.SEARCH); public BackgroundSearchThread performSearchThread; @SuppressWarnings("unchecked") public SearchBoxPane() { - super("Search", Translation.SEARCH); + super("Search", TranslatedComponents.SEARCH); final JPanel optionPanel = new JPanel(new BorderLayout()); final JPanel searchRadiusOpt = new JPanel(new BorderLayout()); final JPanel searchOpts = new JPanel(new GridLayout(2, 1)); - searchRadiusOpt.add(new TranslatedJLabel("Search from ", Translation.SEARCH_FROM), BorderLayout.WEST); + searchRadiusOpt.add(new TranslatedJLabel("Search from ", TranslatedComponents.SEARCH_FROM), BorderLayout.WEST); DefaultComboBoxModel model = new DefaultComboBoxModel(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DecompilerSelectionPane.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DecompilerSelectionPane.java index b0be12d2..80d4ed21 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DecompilerSelectionPane.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/DecompilerSelectionPane.java @@ -4,7 +4,7 @@ import the.bytecode.club.bytecodeviewer.Configuration; import the.bytecode.club.bytecodeviewer.SettingsSerializer; import the.bytecode.club.bytecodeviewer.decompilers.Decompiler; import the.bytecode.club.bytecodeviewer.gui.components.DecompilerViewComponent; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJMenu; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJRadioButtonMenuItem; @@ -26,8 +26,8 @@ public class DecompilerSelectionPane private final int paneID; private final JMenu menu; private final ButtonGroup group = new ButtonGroup(); - private final JRadioButtonMenuItem none = new TranslatedJRadioButtonMenuItem("None", Translation.NONE); - private final JRadioButtonMenuItem hexcode = new TranslatedJRadioButtonMenuItem("Hexcode", Translation.HEXCODE); + private final JRadioButtonMenuItem none = new TranslatedJRadioButtonMenuItem("None", TranslatedComponents.NONE); + private final JRadioButtonMenuItem hexcode = new TranslatedJRadioButtonMenuItem("Hexcode", TranslatedComponents.HEXCODE); private final DecompilerViewComponent procyon = new DecompilerViewComponent("Procyon", JAVA, Decompiler.PROCYON_DECOMPILER); private final DecompilerViewComponent CFR = new DecompilerViewComponent("CFR", JAVA, Decompiler.CFR_DECOMPILER); private final DecompilerViewComponent JADX = new DecompilerViewComponent("JADX", JAVA, Decompiler.JADX_DECOMPILER); @@ -48,11 +48,11 @@ public class DecompilerSelectionPane { this.paneID = paneID; if(paneID == 1) - this.menu = new TranslatedJMenu("Pane " + paneID, Translation.PANE_1); + this.menu = new TranslatedJMenu("Pane " + paneID, TranslatedComponents.PANE_1); else if(paneID == 2) - this.menu = new TranslatedJMenu("Pane " + paneID, Translation.PANE_2); + this.menu = new TranslatedJMenu("Pane " + paneID, TranslatedComponents.PANE_2); else - this.menu = new TranslatedJMenu("Pane " + paneID, Translation.PANE_3); + this.menu = new TranslatedJMenu("Pane " + paneID, TranslatedComponents.PANE_3); buildMenu(); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/Workspace.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/Workspace.java index 3fa54b3f..880bd3fb 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/Workspace.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/Workspace.java @@ -10,7 +10,7 @@ import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ClassViewer; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.FileViewer; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ResourceViewer; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJButton; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedVisibleComponent; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; @@ -52,7 +52,7 @@ public class Workspace extends TranslatedVisibleComponent public Workspace() { - super("Workspace", Translation.WORK_SPACE); + super("Workspace", TranslatedComponents.WORK_SPACE); this.tabs = new JTabbedPane(); @@ -135,7 +135,7 @@ public class Workspace extends TranslatedVisibleComponent buttonPanel = new JPanel(new FlowLayout()); - refreshClass = new TranslatedJButton("Refresh", Translation.REFRESH); + refreshClass = new TranslatedJButton("Refresh", TranslatedComponents.REFRESH); refreshClass.addActionListener((event)-> { refreshClass.setEnabled(false); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/viewer/ClassViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/viewer/ClassViewer.java index fee9258e..578b0072 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/viewer/ClassViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourceviewer/viewer/ClassViewer.java @@ -20,14 +20,12 @@ import javax.swing.SwingUtilities; import javax.swing.text.BadLocationException; import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Configuration; import the.bytecode.club.bytecodeviewer.SettingsSerializer; import the.bytecode.club.bytecodeviewer.resources.Resource; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings; -import the.bytecode.club.bytecodeviewer.translation.Translation; import the.bytecode.club.bytecodeviewer.util.MethodParser; import static the.bytecode.club.bytecodeviewer.util.MethodParser.Method; diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/LAFTheme.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/LAFTheme.java index 11f07d2a..3d95e07e 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/LAFTheme.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/LAFTheme.java @@ -6,7 +6,7 @@ import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Configuration; import the.bytecode.club.bytecodeviewer.gui.components.SettingsDialogue; import the.bytecode.club.bytecodeviewer.gui.components.VisibleComponent; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; import java.awt.*; @@ -18,25 +18,25 @@ import java.awt.*; */ public enum LAFTheme { - SYSTEM("System Theme", RSTATheme.THEME_MATCH, Translation.SYSTEM_THEME), //System theme - DARK("Dark Theme", RSTATheme.THEME_MATCH, Translation.DARK_THEME), //DarkLaf - LIGHT("Light Theme", RSTATheme.THEME_MATCH, Translation.LIGHT_THEME), //Intellij theme - ONE_DARK("One Dark Theme", RSTATheme.THEME_MATCH, Translation.ONE_DARK_THEME), - SOLARIZED_DARK("Solarized Dark Theme", RSTATheme.THEME_MATCH, Translation.SOLARIZED_DARK_THEME), - SOLARIZED_LIGHT("Solarized Light Theme", RSTATheme.THEME_MATCH, Translation.SOLARIZED_LIGHT_THEME), - HIGH_CONTRAST_DARK("High Contrast Dark Theme", RSTATheme.THEME_MATCH, Translation.HIGH_CONTRAST_DARK_THEME), - HIGH_CONTRAST_LIGHT("High Contrast Light Theme", RSTATheme.THEME_MATCH, Translation.HIGH_CONTRAST_LIGHT_THEME), + SYSTEM("System Theme", RSTATheme.THEME_MATCH, TranslatedComponents.SYSTEM_THEME), //System theme + DARK("Dark Theme", RSTATheme.THEME_MATCH, TranslatedComponents.DARK_THEME), //DarkLaf + LIGHT("Light Theme", RSTATheme.THEME_MATCH, TranslatedComponents.LIGHT_THEME), //Intellij theme + ONE_DARK("One Dark Theme", RSTATheme.THEME_MATCH, TranslatedComponents.ONE_DARK_THEME), + SOLARIZED_DARK("Solarized Dark Theme", RSTATheme.THEME_MATCH, TranslatedComponents.SOLARIZED_DARK_THEME), + SOLARIZED_LIGHT("Solarized Light Theme", RSTATheme.THEME_MATCH, TranslatedComponents.SOLARIZED_LIGHT_THEME), + HIGH_CONTRAST_DARK("High Contrast Dark Theme", RSTATheme.THEME_MATCH, TranslatedComponents.HIGH_CONTRAST_DARK_THEME), + HIGH_CONTRAST_LIGHT("High Contrast Light Theme", RSTATheme.THEME_MATCH, TranslatedComponents.HIGH_CONTRAST_LIGHT_THEME), ; private final String readableName; private final RSTATheme rstaTheme; - private final Translation translation; + private final TranslatedComponents translatedComponents; - LAFTheme(String readableName, RSTATheme rstaTheme, Translation translation) + LAFTheme(String readableName, RSTATheme rstaTheme, TranslatedComponents translatedComponents) { this.readableName = readableName; this.rstaTheme = rstaTheme; - this.translation = translation; + this.translatedComponents = translatedComponents; } public String getReadableName() @@ -49,9 +49,9 @@ public enum LAFTheme return rstaTheme; } - public Translation getTranslation() + public TranslatedComponents getTranslation() { - return translation; + return translatedComponents; } public boolean isDark() diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/RSTATheme.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/RSTATheme.java index 9759be48..ad8b5816 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/RSTATheme.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/theme/RSTATheme.java @@ -5,7 +5,7 @@ import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; import org.fife.ui.rsyntaxtextarea.Theme; import the.bytecode.club.bytecodeviewer.Configuration; import the.bytecode.club.bytecodeviewer.Constants; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; /*************************************************************************** * Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite * @@ -33,38 +33,38 @@ import the.bytecode.club.bytecodeviewer.translation.Translation; public enum RSTATheme { //uses the darklaf RSyntaxTextArea extension - THEME_MATCH("Theme Match (Recommended)", null, Translation.THEME_MATCH), + THEME_MATCH("Theme Match (Recommended)", null, TranslatedComponents.THEME_MATCH), //uses the default theme from RSyntaxTextArea - DEFAULT("Default (Recommended Light)", "/org/fife/ui/rsyntaxtextarea/themes/default.xml", Translation.DEFAULT_RECOMMENDED_LIGHT), + DEFAULT("Default (Recommended Light)", "/org/fife/ui/rsyntaxtextarea/themes/default.xml", TranslatedComponents.DEFAULT_RECOMMENDED_LIGHT), //uses the default dark theme from RSyntaxTextArea - DARK("Dark (Recommended Dark)", "/org/fife/ui/rsyntaxtextarea/themes/dark.xml", Translation.DARK), + DARK("Dark (Recommended Dark)", "/org/fife/ui/rsyntaxtextarea/themes/dark.xml", TranslatedComponents.DARK), - DEFAULT_ALT( "Default-Alt", "/org/fife/ui/rsyntaxtextarea/themes/default-alt.xml", Translation.DEFAULT_ALT), - ECLIPSE("Eclipse", "/org/fife/ui/rsyntaxtextarea/themes/eclipse.xml", Translation.ECLIPSE), - IDEA("IntelliJ", "/org/fife/ui/rsyntaxtextarea/themes/idea.xml", Translation.INTELLIJ), - VS("Visual Studio", "/org/fife/ui/rsyntaxtextarea/themes/vs.xml", Translation.VISUAL_STUDIO), - DRUID( "Druid (Dark)", "/org/fife/ui/rsyntaxtextarea/themes/druid.xml", Translation.DRUID_DARK), - MONOKAI( "Monokai (Dark)", "/org/fife/ui/rsyntaxtextarea/themes/monokai.xml", Translation.MONOKAI_DARK), + DEFAULT_ALT( "Default-Alt", "/org/fife/ui/rsyntaxtextarea/themes/default-alt.xml", TranslatedComponents.DEFAULT_ALT), + ECLIPSE("Eclipse", "/org/fife/ui/rsyntaxtextarea/themes/eclipse.xml", TranslatedComponents.ECLIPSE), + IDEA("IntelliJ", "/org/fife/ui/rsyntaxtextarea/themes/idea.xml", TranslatedComponents.INTELLIJ), + VS("Visual Studio", "/org/fife/ui/rsyntaxtextarea/themes/vs.xml", TranslatedComponents.VISUAL_STUDIO), + DRUID( "Druid (Dark)", "/org/fife/ui/rsyntaxtextarea/themes/druid.xml", TranslatedComponents.DRUID_DARK), + MONOKAI( "Monokai (Dark)", "/org/fife/ui/rsyntaxtextarea/themes/monokai.xml", TranslatedComponents.MONOKAI_DARK), ; private final String readableName; private final String file; - private final Translation translation; + private final TranslatedComponents translatedComponents; - RSTATheme(String readableName, String file, Translation translation) + RSTATheme(String readableName, String file, TranslatedComponents translatedComponents) { this.readableName = readableName; this.file = file; - this.translation = translation; + this.translatedComponents = translatedComponents; } public String getReadableName() { return readableName; } - public Translation getTranslation() + public TranslatedComponents getTranslation() { - return translation; + return translatedComponents; } public RSyntaxTextArea apply(RSyntaxTextArea area) { diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java index afff4660..a204b3a7 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java @@ -8,7 +8,7 @@ import the.bytecode.club.bytecodeviewer.Configuration; import the.bytecode.club.bytecodeviewer.resources.IconResources; import the.bytecode.club.bytecodeviewer.gui.components.FileChooser; import the.bytecode.club.bytecodeviewer.gui.components.SearchableRSyntaxTextArea; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJMenu; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJMenuItem; import the.bytecode.club.bytecodeviewer.util.DialogueUtils; @@ -67,11 +67,11 @@ public class PluginWriter extends JFrame JButton run = new JButton("Run"); JMenuBar menuBar = new JMenuBar(); - JMenu menu = new TranslatedJMenu("File", Translation.FILE); - JMenuItem menuOpen = new TranslatedJMenuItem("Open...", Translation.OPEN); - JMenuItem menuRun = new TranslatedJMenuItem("Run", Translation.RUN); - menuSaveAs = new TranslatedJMenuItem("Save As...", Translation.SAVE_AS); - menuSave = new TranslatedJMenuItem("Save...", Translation.SAVE); + JMenu menu = new TranslatedJMenu("File", TranslatedComponents.FILE); + JMenuItem menuOpen = new TranslatedJMenuItem("Open...", TranslatedComponents.OPEN); + JMenuItem menuRun = new TranslatedJMenuItem("Run", TranslatedComponents.RUN); + menuSaveAs = new TranslatedJMenuItem("Save As...", TranslatedComponents.SAVE_AS); + menuSave = new TranslatedJMenuItem("Save...", TranslatedComponents.SAVE); menuSave.setVisible(false); menuBar.add(menu); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/LDCSearch.java b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/LDCSearch.java index 46429e11..66a02352 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/LDCSearch.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/LDCSearch.java @@ -14,7 +14,7 @@ import org.objectweb.asm.tree.MethodNode; import the.bytecode.club.bytecodeviewer.searching.EnterKeyEvent; import the.bytecode.club.bytecodeviewer.searching.SearchResultNotifier; import the.bytecode.club.bytecodeviewer.searching.SearchTypeDetails; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJLabel; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; @@ -61,7 +61,7 @@ public class LDCSearch implements SearchTypeDetails if (myPanel == null) { myPanel = new JPanel(new GridLayout(1, 2)); - myPanel.add(new TranslatedJLabel("Search String: ", Translation.SEARCH_STRING)); + myPanel.add(new TranslatedJLabel("Search String: ", TranslatedComponents.SEARCH_STRING)); myPanel.add(searchText); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/MethodCallSearch.java b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/MethodCallSearch.java index 20212a59..79aa7c56 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/MethodCallSearch.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/MethodCallSearch.java @@ -15,7 +15,7 @@ import org.objectweb.asm.tree.MethodNode; import the.bytecode.club.bytecodeviewer.searching.EnterKeyEvent; import the.bytecode.club.bytecodeviewer.searching.SearchResultNotifier; import the.bytecode.club.bytecodeviewer.searching.SearchTypeDetails; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJLabel; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; @@ -68,11 +68,11 @@ public class MethodCallSearch implements SearchTypeDetails if (myPanel == null) { myPanel = new JPanel(new GridLayout(3, 2)); - myPanel.add(new TranslatedJLabel("Owner: ", Translation.OWNER)); + myPanel.add(new TranslatedJLabel("Owner: ", TranslatedComponents.OWNER)); myPanel.add(mOwner); - myPanel.add(new TranslatedJLabel("Name: ", Translation.NAME)); + myPanel.add(new TranslatedJLabel("Name: ", TranslatedComponents.NAME)); myPanel.add(mName); - myPanel.add(new TranslatedJLabel("Desc: ", Translation.DESC)); + myPanel.add(new TranslatedJLabel("Desc: ", TranslatedComponents.DESC)); myPanel.add(mDesc); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/RegexSearch.java b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/RegexSearch.java index 4aedf46d..ed919dc7 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/RegexSearch.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/RegexSearch.java @@ -12,7 +12,7 @@ import the.bytecode.club.bytecodeviewer.searching.EnterKeyEvent; import the.bytecode.club.bytecodeviewer.searching.RegexInsnFinder; import the.bytecode.club.bytecodeviewer.searching.SearchResultNotifier; import the.bytecode.club.bytecodeviewer.searching.SearchTypeDetails; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJLabel; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; @@ -61,7 +61,7 @@ public class RegexSearch implements SearchTypeDetails if (myPanel == null) { myPanel = new JPanel(new GridLayout(1, 2)); - myPanel.add(new TranslatedJLabel("Search Regex: ", Translation.SEARCH_REGEX)); + myPanel.add(new TranslatedJLabel("Search Regex: ", TranslatedComponents.SEARCH_REGEX)); myPanel.add(searchText); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/Language.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/Language.java index 4a6e7016..e9e03567 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/Language.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/Language.java @@ -1,7 +1,6 @@ package the.bytecode.club.bytecodeviewer.translation; import com.google.gson.reflect.TypeToken; -import org.apache.commons.collections4.map.HashedMap; import org.apache.commons.collections4.map.LinkedMap; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.resources.IconResources; @@ -108,9 +107,9 @@ public enum Language HashMap translationMap = getTranslation(); - for(Translation translation : Translation.values()) + for(TranslatedComponents translatedComponents : TranslatedComponents.values()) { - TranslatedComponentReference text = translation.getTranslatedComponentReference(); + TranslatedComponentReference text = translatedComponents.getTranslatedComponentReference(); //skip translating if the language config is missing the translation key if(!translationMap.containsKey(text.key)) @@ -130,15 +129,15 @@ public enum Language //check if translation key has been assigned to a component, //on fail print an error alerting the devs - if(translation.getTranslatedComponentReference().runOnUpdate.isEmpty()) + if(translatedComponents.getTranslatedComponentReference().runOnUpdate.isEmpty()) //&& TranslatedStrings.nameSet.contains(translation.name())) { - System.err.println("Translation Reference " + translation.name() + " is missing component attachment, skipping..."); + System.err.println("Translation Reference " + translatedComponents.name() + " is missing component attachment, skipping..."); continue; } //trigger translation event - translation.getTranslatedComponentReference().translate(); + translatedComponents.getTranslatedComponentReference().translate(); } } @@ -171,7 +170,7 @@ public enum Language new TypeToken>(){}.getType()); HashSet existingKeys = new HashSet<>(); - for(Translation t : Translation.values()) + for(TranslatedComponents t : TranslatedComponents.values()) existingKeys.add(t.name()); for(String key : translationMap.keySet()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/Translation.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedComponents.java similarity index 94% rename from src/main/java/the/bytecode/club/bytecodeviewer/translation/Translation.java rename to src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedComponents.java index 93e888bc..e3f8174f 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/Translation.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedComponents.java @@ -19,12 +19,16 @@ package the.bytecode.club.bytecodeviewer.translation; ***************************************************************************/ /** - * All of the specific translations strings needed for BCV + * Translation keys for components (updates the component text on language change). + * + * You only need to add a translation key if it is going to be used by a component. + * If your translation is not tied to a component (Console, Dialogue) use TranslatedStrings * * @author Konloch * @since 6/28/2021 */ -public enum Translation + +public enum TranslatedComponents { FILE, ADD, @@ -226,7 +230,6 @@ public enum Translation ERROR, SUGGESTED_FIX_DECOMPILER_ERROR, SUGGESTED_FIX_COMPILER_ERROR, - SUGGESTED_FIX_NO_DECOMPILER_WARNING, PROCYON_DECOMPILER, CFR_DECOMPILER, FERNFLOWER_DECOMPILER, @@ -252,7 +255,7 @@ public enum Translation private final TranslatedComponentReference componentReference; - Translation() + TranslatedComponents() { this.componentReference = new TranslatedComponentReference(); this.componentReference.key = name(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java index e9b90fe2..68c9b8ca 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/TranslatedStrings.java @@ -22,7 +22,9 @@ import java.util.HashSet; ***************************************************************************/ /** - * Constant-like strings not associated with any specific JComponent + * Translation keys for constant strings (does not change the component text on language change). + * + * You need to add your translation key here if it is not tied to any specific component (Console, Dialogue) * * @author Konloch * @since 7/6/2021 @@ -30,9 +32,10 @@ import java.util.HashSet; public enum TranslatedStrings { - PRODUCTNAME("BytecodeViewer"), - PRODUCT_NAME("Bytecode Viewer"), - PRODUCT_H_NAME("Bytecode-Viewer"), + BCV("BytecodeViewer"), + BYTECODEVIEWER("BytecodeViewer"), + BYTECODE_VIEWER("Bytecode Viewer"), + BYTECODE_H_VIEWER("Bytecode-Viewer"), EDITABLE, JAVA, @@ -125,9 +128,10 @@ public enum TranslatedStrings text = TEXT_ERROR; } - text = text.replace("%PRODUCTNAME%", PRODUCTNAME.toString()) - .replace("%PRODUCT_NAME%", PRODUCT_NAME.toString()) - .replace("%PRODUCT-NAME%", PRODUCT_H_NAME.toString()); + text = text.replace("%PRODUCTNAME%", BYTECODEVIEWER.toString()) + .replace("%PRODUCT_NAME%", BYTECODE_VIEWER.toString()) + .replace("%PRODUCT-NAME%", BYTECODE_H_VIEWER.toString()) + .replace("%BCV%", BCV.toString()); this.text = text; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedDefaultMutableTreeNode.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedDefaultMutableTreeNode.java index 20c61a52..159204f1 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedDefaultMutableTreeNode.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedDefaultMutableTreeNode.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; @@ -14,13 +14,13 @@ public class TranslatedDefaultMutableTreeNode extends DefaultMutableTreeNode { private DefaultTreeModel tree; - public TranslatedDefaultMutableTreeNode(String text, Translation translation) + public TranslatedDefaultMutableTreeNode(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJButton.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJButton.java index bace2b44..b07923f2 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJButton.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJButton.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -11,13 +11,13 @@ import javax.swing.*; */ public class TranslatedJButton extends JButton { - public TranslatedJButton(String text, Translation translation) + public TranslatedJButton(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBox.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBox.java index 80cede84..1550787d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBox.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBox.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -29,13 +29,13 @@ import javax.swing.*; */ public class TranslatedJCheckBox extends JCheckBox { - public TranslatedJCheckBox(String text, Translation translation) + public TranslatedJCheckBox(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBoxMenuItem.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBoxMenuItem.java index 60309757..0be77507 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBoxMenuItem.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJCheckBoxMenuItem.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -29,13 +29,13 @@ import javax.swing.*; */ public class TranslatedJCheckBoxMenuItem extends JCheckBoxMenuItem { - public TranslatedJCheckBoxMenuItem(String text, Translation translation) + public TranslatedJCheckBoxMenuItem(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJLabel.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJLabel.java index cf4a64bd..03532f4c 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJLabel.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJLabel.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -11,13 +11,13 @@ import javax.swing.*; */ public class TranslatedJLabel extends JLabel { - public TranslatedJLabel(String text, Translation translation) + public TranslatedJLabel(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenu.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenu.java index 9544f468..e5f77be9 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenu.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenu.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -29,13 +29,13 @@ import javax.swing.*; */ public class TranslatedJMenu extends JMenu { - public TranslatedJMenu(String text, Translation translation) + public TranslatedJMenu(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenuItem.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenuItem.java index 71ec4239..4beda6f3 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenuItem.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJMenuItem.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -29,13 +29,13 @@ import javax.swing.*; */ public class TranslatedJMenuItem extends JMenuItem { - public TranslatedJMenuItem(String text, Translation translation) + public TranslatedJMenuItem(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJRadioButtonMenuItem.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJRadioButtonMenuItem.java index 976ce02d..72361a54 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJRadioButtonMenuItem.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJRadioButtonMenuItem.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -29,13 +29,13 @@ import javax.swing.*; */ public class TranslatedJRadioButtonMenuItem extends JRadioButtonMenuItem { - public TranslatedJRadioButtonMenuItem(String text, Translation translation) + public TranslatedJRadioButtonMenuItem(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJTextField.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJTextField.java index 93984d7a..286d9969 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJTextField.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedJTextField.java @@ -1,7 +1,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; import javax.swing.*; @@ -11,13 +11,13 @@ import javax.swing.*; */ public class TranslatedJTextField extends JTextField { - public TranslatedJTextField(String text, Translation translation) + public TranslatedJTextField(String text, TranslatedComponents translatedComponents) { super(text); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty()) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedVisibleComponent.java b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedVisibleComponent.java index c850d544..a1332361 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedVisibleComponent.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/translation/components/TranslatedVisibleComponent.java @@ -2,7 +2,7 @@ package the.bytecode.club.bytecodeviewer.translation.components; import the.bytecode.club.bytecodeviewer.gui.components.VisibleComponent; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference; -import the.bytecode.club.bytecodeviewer.translation.Translation; +import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; /** * @author Konloch @@ -10,13 +10,13 @@ import the.bytecode.club.bytecodeviewer.translation.Translation; */ public class TranslatedVisibleComponent extends VisibleComponent { - public TranslatedVisibleComponent(String title, Translation translation) + public TranslatedVisibleComponent(String title, TranslatedComponents translatedComponents) { super(title); - if(translation != null) + if(translatedComponents != null) { - TranslatedComponentReference componentReference = translation.getTranslatedComponentReference(); + TranslatedComponentReference componentReference = translatedComponents.getTranslatedComponentReference(); componentReference.runOnUpdate.add(()-> { if(componentReference.value != null && !componentReference.value.isEmpty())