Cleaning up MainViewerGUI

This commit is contained in:
Konloch 2021-06-21 15:45:00 -07:00
parent 92e11150ee
commit dbf7522e1d

AI 샘플 코드 생성 중입니다

Loading...
16 changed files with 647 additions and 713 deletions

View File

@ -69,7 +69,7 @@ Open the Maven project (e.g. in IntelliJ, open the ``pom.xml`` as a project file
## Exporting as jar
Using Intellij create a new artifact jar and build it, if the META-INF is overrwitten replace it with the one in src/main/resources.
Using Intellij create a new artifact jar and build it, if the META-INF is overwritten replace it with the one in src/main/resources.
#### Are you a Java Reverse Engineer? Do you want to learn?
Join The Bytecode Club Today! - https://the.bytecode.club

View File

@ -24,10 +24,10 @@ import the.bytecode.club.bootloader.Boot;
import the.bytecode.club.bytecodeviewer.api.ClassNodeLoader;
import the.bytecode.club.bytecodeviewer.compilers.Compilers;
import the.bytecode.club.bytecodeviewer.gui.ClassViewer;
import the.bytecode.club.bytecodeviewer.gui.FileNavigationPane;
import the.bytecode.club.bytecodeviewer.gui.ResourceListPane;
import the.bytecode.club.bytecodeviewer.gui.MainViewerGUI;
import the.bytecode.club.bytecodeviewer.gui.RunOptions;
import the.bytecode.club.bytecodeviewer.gui.SearchingPane;
import the.bytecode.club.bytecodeviewer.gui.SearchBoxPane;
import the.bytecode.club.bytecodeviewer.gui.SystemErrConsole;
import the.bytecode.club.bytecodeviewer.gui.WorkPane;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer;
@ -230,7 +230,7 @@ public class BytecodeViewer
Configuration.pingback = true;
}
if (viewer.chckbxmntmNewCheckItem_12.isSelected())
if (viewer.updateCheck.isSelected())
versionChecker.start();
if (!cli)
@ -552,9 +552,9 @@ public class BytecodeViewer
files.clear();
LazyNameUtil.reset();
Objects.requireNonNull(MainViewerGUI.getComponent(FileNavigationPane.class)).resetWorkspace();
Objects.requireNonNull(MainViewerGUI.getComponent(ResourceListPane.class)).resetWorkspace();
Objects.requireNonNull(MainViewerGUI.getComponent(WorkPane.class)).resetWorkspace();
Objects.requireNonNull(MainViewerGUI.getComponent(SearchingPane.class)).resetWorkspace();
Objects.requireNonNull(MainViewerGUI.getComponent(SearchBoxPane.class)).resetWorkspace();
the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().clear();
}

View File

@ -73,55 +73,55 @@ public class Settings {
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.asc.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.decodeenumswitch.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.decodeEnumSwitch.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.sugarenums.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.sugarEnums.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.decodestringswitch.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.decodeStringSwitch.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.arrayiter.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.collectioniter.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.innerclasses.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.innerClasses.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.removeboilerplate.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.removeBoilerPlate.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.removeinnerclasssynthetics.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.removeInnerClassSynthetics.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.decodelambdas.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.decodeLambdas.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.hidebridgemethods.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.hideBridgeMethods.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.liftconstructorinit.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.liftConstructorInit.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.removedeadmethods.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.removeDeadMethods.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.removebadgenerics.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.removeBadGenerics.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.sugarasserts.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.sugarAsserts.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.sugarboxing.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.sugarBoxing.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.showversion.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.showVersion.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.decodefinally.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.decodeFinally.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.tidymonitors.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.tidyMonitors.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.lenient.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.dumpclasspath.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.dumpClassPath.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.comments.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forcetopsort.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceTopSort.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forcetopsortaggress.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceTopSortAggress.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.stringbuffer.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.stringBuffer.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.stringbuilder.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.stringBuilder.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.silent.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
@ -131,71 +131,71 @@ public class Settings {
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.override.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.showinferrable.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.showInferrable.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.aexagg.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forcecondpropagate.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceCondPropagate.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.hideutf.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.hideUTF.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.hidelongstrings.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.hideLongStrings.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.commentmonitor.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.commentMonitor.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.allowcorrecting.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.allowCorrecting.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.labelledblocks.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.labelledBlocks.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.j14classobj.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.j14ClassOBJ.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.hidelangimports.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.hideLangImports.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.recoverytypeclash.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.recoveryTypeClash.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.recoverytypehints.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.recoveryTypehInts.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forceturningifs.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceTurningIFs.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forloopaggcapture.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forLoopAGGCapture.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.forceexceptionprune.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceExceptionPrune.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmShowDebugLine.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.showDebugLineNumbers.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmSimplifyMemberReferences.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.simplifyMemberReferences.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.mnMergeVariables.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.mergeVariables.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_1.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.unicodeOutputEnabled.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_2.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.retainPointlessSwitches.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_3.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.includeLineNumbersInBytecode.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_4.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.includeErrorDiagnostics.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_5.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.retainRedunantCasts.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_6.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.alwaysGenerateExceptionVars.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_7.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.showSyntheticMembers.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_8.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceExplicitTypeArguments.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_9.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.forceExplicitImports.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_10.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.flattenSwitchBlocks.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_11.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.excludeNestedTypes.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmAppendBrackets.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.appendBracketsToLabels.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.debugHelpers.isSelected()), false);
DiskWriter.writeNewLine(settingsName,
"deprecated", false);
DiskWriter.writeNewLine(settingsName,
String.valueOf(BytecodeViewer.viewer.chckbxmntmNewCheckItem_12.isSelected()), false);
String.valueOf(BytecodeViewer.viewer.updateCheck.isSelected()), false);
DiskWriter.writeNewLine(settingsName, String.valueOf(BytecodeViewer.viewer.viewPane1.getSelectedViewer()), false);
DiskWriter.writeNewLine(settingsName, String.valueOf(BytecodeViewer.viewer.viewPane2.getSelectedViewer()), false);
@ -316,68 +316,68 @@ public class Settings {
BytecodeViewer.viewer.rer.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 16, false)));
BytecodeViewer.viewer.fdi.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 17, false)));
BytecodeViewer.viewer.asc.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 18, false)));
BytecodeViewer.viewer.decodeenumswitch.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 19, false)));
BytecodeViewer.viewer.sugarenums.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 20, false)));
BytecodeViewer.viewer.decodestringswitch.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 21, false)));
BytecodeViewer.viewer.decodeEnumSwitch.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 19, false)));
BytecodeViewer.viewer.sugarEnums.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 20, false)));
BytecodeViewer.viewer.decodeStringSwitch.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 21, false)));
BytecodeViewer.viewer.arrayiter.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 22, false)));
BytecodeViewer.viewer.collectioniter.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 23, false)));
BytecodeViewer.viewer.innerclasses.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 24, false)));
BytecodeViewer.viewer.removeboilerplate.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 25, false)));
BytecodeViewer.viewer.removeinnerclasssynthetics.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 26, false)));
BytecodeViewer.viewer.decodelambdas.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 27, false)));
BytecodeViewer.viewer.hidebridgemethods.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 28, false)));
BytecodeViewer.viewer.liftconstructorinit.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 29, false)));
BytecodeViewer.viewer.removedeadmethods.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 30, false)));
BytecodeViewer.viewer.removebadgenerics.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 31, false)));
BytecodeViewer.viewer.sugarasserts.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 32, false)));
BytecodeViewer.viewer.sugarboxing.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 33, false)));
BytecodeViewer.viewer.showversion.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 34, false)));
BytecodeViewer.viewer.decodefinally.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 35, false)));
BytecodeViewer.viewer.tidymonitors.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 36, false)));
BytecodeViewer.viewer.innerClasses.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 24, false)));
BytecodeViewer.viewer.removeBoilerPlate.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 25, false)));
BytecodeViewer.viewer.removeInnerClassSynthetics.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 26, false)));
BytecodeViewer.viewer.decodeLambdas.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 27, false)));
BytecodeViewer.viewer.hideBridgeMethods.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 28, false)));
BytecodeViewer.viewer.liftConstructorInit.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 29, false)));
BytecodeViewer.viewer.removeDeadMethods.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 30, false)));
BytecodeViewer.viewer.removeBadGenerics.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 31, false)));
BytecodeViewer.viewer.sugarAsserts.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 32, false)));
BytecodeViewer.viewer.sugarBoxing.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 33, false)));
BytecodeViewer.viewer.showVersion.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 34, false)));
BytecodeViewer.viewer.decodeFinally.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 35, false)));
BytecodeViewer.viewer.tidyMonitors.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 36, false)));
BytecodeViewer.viewer.lenient.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 37, false)));
BytecodeViewer.viewer.dumpclasspath.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 38, false)));
BytecodeViewer.viewer.dumpClassPath.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 38, false)));
BytecodeViewer.viewer.comments.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 39, false)));
BytecodeViewer.viewer.forcetopsort.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 40, false)));
BytecodeViewer.viewer.forcetopsortaggress.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 41, false)));
BytecodeViewer.viewer.stringbuffer.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 42, false)));
BytecodeViewer.viewer.stringbuilder.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 43, false)));
BytecodeViewer.viewer.forceTopSort.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 40, false)));
BytecodeViewer.viewer.forceTopSortAggress.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 41, false)));
BytecodeViewer.viewer.stringBuffer.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 42, false)));
BytecodeViewer.viewer.stringBuilder.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 43, false)));
BytecodeViewer.viewer.silent.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 44, false)));
BytecodeViewer.viewer.recover.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 45, false)));
BytecodeViewer.viewer.eclipse.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 46, false)));
BytecodeViewer.viewer.override.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 47, false)));
BytecodeViewer.viewer.showinferrable.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 48, false)));
BytecodeViewer.viewer.showInferrable.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 48, false)));
BytecodeViewer.viewer.aexagg.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 49, false)));
BytecodeViewer.viewer.forcecondpropagate.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 50, false)));
BytecodeViewer.viewer.hideutf.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 51, false)));
BytecodeViewer.viewer.hidelongstrings.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 52, false)));
BytecodeViewer.viewer.commentmonitor.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 53, false)));
BytecodeViewer.viewer.allowcorrecting.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 54, false)));
BytecodeViewer.viewer.labelledblocks.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 55, false)));
BytecodeViewer.viewer.j14classobj.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 56, false)));
BytecodeViewer.viewer.hidelangimports.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 57, false)));
BytecodeViewer.viewer.recoverytypeclash.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 58, false)));
BytecodeViewer.viewer.recoverytypehints.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 59, false)));
BytecodeViewer.viewer.forceturningifs.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 60, false)));
BytecodeViewer.viewer.forloopaggcapture.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 61, false)));
BytecodeViewer.viewer.forceexceptionprune.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 62, false)));
BytecodeViewer.viewer.chckbxmntmShowDebugLine.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 63, false)));
BytecodeViewer.viewer.chckbxmntmSimplifyMemberReferences.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 64, false)));
BytecodeViewer.viewer.mnMergeVariables.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 65, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_1.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 66, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_2.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 67, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_3.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 68, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_4.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 69, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_5.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 70, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_6.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 71, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_7.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 72, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_8.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 73, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_9.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 74, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_10.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 75, false)));
BytecodeViewer.viewer.chckbxmntmNewCheckItem_11.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 76, false)));
BytecodeViewer.viewer.chckbxmntmAppendBrackets.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 77, false)));
BytecodeViewer.viewer.forceCondPropagate.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 50, false)));
BytecodeViewer.viewer.hideUTF.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 51, false)));
BytecodeViewer.viewer.hideLongStrings.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 52, false)));
BytecodeViewer.viewer.commentMonitor.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 53, false)));
BytecodeViewer.viewer.allowCorrecting.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 54, false)));
BytecodeViewer.viewer.labelledBlocks.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 55, false)));
BytecodeViewer.viewer.j14ClassOBJ.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 56, false)));
BytecodeViewer.viewer.hideLangImports.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 57, false)));
BytecodeViewer.viewer.recoveryTypeClash.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 58, false)));
BytecodeViewer.viewer.recoveryTypehInts.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 59, false)));
BytecodeViewer.viewer.forceTurningIFs.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 60, false)));
BytecodeViewer.viewer.forLoopAGGCapture.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 61, false)));
BytecodeViewer.viewer.forceExceptionPrune.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 62, false)));
BytecodeViewer.viewer.showDebugLineNumbers.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 63, false)));
BytecodeViewer.viewer.simplifyMemberReferences.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 64, false)));
BytecodeViewer.viewer.mergeVariables.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 65, false)));
BytecodeViewer.viewer.unicodeOutputEnabled.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 66, false)));
BytecodeViewer.viewer.retainPointlessSwitches.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 67, false)));
BytecodeViewer.viewer.includeLineNumbersInBytecode.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 68, false)));
BytecodeViewer.viewer.includeErrorDiagnostics.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 69, false)));
BytecodeViewer.viewer.retainRedunantCasts.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 70, false)));
BytecodeViewer.viewer.alwaysGenerateExceptionVars.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 71, false)));
BytecodeViewer.viewer.showSyntheticMembers.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 72, false)));
BytecodeViewer.viewer.forceExplicitTypeArguments.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 73, false)));
BytecodeViewer.viewer.forceExplicitImports.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 74, false)));
BytecodeViewer.viewer.flattenSwitchBlocks.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 75, false)));
BytecodeViewer.viewer.excludeNestedTypes.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 76, false)));
BytecodeViewer.viewer.appendBracketsToLabels.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 77, false)));
BytecodeViewer.viewer.debugHelpers.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 78, false)));
//79 is deprecated
BytecodeViewer.viewer.chckbxmntmNewCheckItem_12.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 80, false)));
BytecodeViewer.viewer.updateCheck.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 80, false)));
BytecodeViewer.viewer.viewPane1.setSelectedViewer(getInt(81));
BytecodeViewer.viewer.viewPane2.setSelectedViewer(getInt(82));
BytecodeViewer.viewer.viewPane3.setSelectedViewer(getInt(83));

View File

@ -186,12 +186,12 @@ public class CFRDecompiler extends Decompiler {
"--outputdir",
outputPath,
"--decodeenumswitch",
String.valueOf(BytecodeViewer.viewer.decodeenumswitch
String.valueOf(BytecodeViewer.viewer.decodeEnumSwitch
.isSelected()),
"--sugarenums",
String.valueOf(BytecodeViewer.viewer.sugarenums.isSelected()),
String.valueOf(BytecodeViewer.viewer.sugarEnums.isSelected()),
"--decodestringswitch",
String.valueOf(BytecodeViewer.viewer.decodestringswitch
String.valueOf(BytecodeViewer.viewer.decodeStringSwitch
.isSelected()),
"--arrayiter",
String.valueOf(BytecodeViewer.viewer.arrayiter.isSelected()),
@ -199,52 +199,52 @@ public class CFRDecompiler extends Decompiler {
String.valueOf(BytecodeViewer.viewer.collectioniter
.isSelected()),
"--innerclasses",
String.valueOf(BytecodeViewer.viewer.innerclasses.isSelected()),
String.valueOf(BytecodeViewer.viewer.innerClasses.isSelected()),
"--removeboilerplate",
String.valueOf(BytecodeViewer.viewer.removeboilerplate
String.valueOf(BytecodeViewer.viewer.removeBoilerPlate
.isSelected()),
"--removeinnerclasssynthetics",
String.valueOf(BytecodeViewer.viewer.removeinnerclasssynthetics
String.valueOf(BytecodeViewer.viewer.removeInnerClassSynthetics
.isSelected()),
"--decodelambdas",
String.valueOf(BytecodeViewer.viewer.decodelambdas.isSelected()),
String.valueOf(BytecodeViewer.viewer.decodeLambdas.isSelected()),
"--hidebridgemethods",
String.valueOf(BytecodeViewer.viewer.hidebridgemethods
String.valueOf(BytecodeViewer.viewer.hideBridgeMethods
.isSelected()),
"--liftconstructorinit",
String.valueOf(BytecodeViewer.viewer.liftconstructorinit
String.valueOf(BytecodeViewer.viewer.liftConstructorInit
.isSelected()),
"--removedeadmethods",
String.valueOf(BytecodeViewer.viewer.removedeadmethods
String.valueOf(BytecodeViewer.viewer.removeDeadMethods
.isSelected()),
"--removebadgenerics",
String.valueOf(BytecodeViewer.viewer.removebadgenerics
String.valueOf(BytecodeViewer.viewer.removeBadGenerics
.isSelected()),
"--sugarasserts",
String.valueOf(BytecodeViewer.viewer.sugarasserts.isSelected()),
String.valueOf(BytecodeViewer.viewer.sugarAsserts.isSelected()),
"--sugarboxing",
String.valueOf(BytecodeViewer.viewer.sugarboxing.isSelected()),
String.valueOf(BytecodeViewer.viewer.sugarBoxing.isSelected()),
"--showversion",
String.valueOf(BytecodeViewer.viewer.showversion.isSelected()),
String.valueOf(BytecodeViewer.viewer.showVersion.isSelected()),
"--decodefinally",
String.valueOf(BytecodeViewer.viewer.decodefinally.isSelected()),
String.valueOf(BytecodeViewer.viewer.decodeFinally.isSelected()),
"--tidymonitors",
String.valueOf(BytecodeViewer.viewer.tidymonitors.isSelected()),
String.valueOf(BytecodeViewer.viewer.tidyMonitors.isSelected()),
"--lenient",
String.valueOf(BytecodeViewer.viewer.lenient.isSelected()),
"--dumpclasspath",
String.valueOf(BytecodeViewer.viewer.dumpclasspath.isSelected()),
String.valueOf(BytecodeViewer.viewer.dumpClassPath.isSelected()),
"--comments",
String.valueOf(BytecodeViewer.viewer.comments.isSelected()),
"--forcetopsort",
String.valueOf(BytecodeViewer.viewer.forcetopsort.isSelected()),
String.valueOf(BytecodeViewer.viewer.forceTopSort.isSelected()),
"--forcetopsortaggress",
String.valueOf(BytecodeViewer.viewer.forcetopsortaggress
String.valueOf(BytecodeViewer.viewer.forceTopSortAggress
.isSelected()),
"--stringbuffer",
String.valueOf(BytecodeViewer.viewer.stringbuffer.isSelected()),
String.valueOf(BytecodeViewer.viewer.stringBuffer.isSelected()),
"--stringbuilder",
String.valueOf(BytecodeViewer.viewer.stringbuilder.isSelected()),
String.valueOf(BytecodeViewer.viewer.stringBuilder.isSelected()),
"--silent",
String.valueOf(BytecodeViewer.viewer.silent.isSelected()),
"--recover",
@ -254,43 +254,43 @@ public class CFRDecompiler extends Decompiler {
"--override",
String.valueOf(BytecodeViewer.viewer.override.isSelected()),
"--showinferrable",
String.valueOf(BytecodeViewer.viewer.showinferrable
String.valueOf(BytecodeViewer.viewer.showInferrable
.isSelected()),
"--aexagg",
String.valueOf(BytecodeViewer.viewer.aexagg.isSelected()),
"--forcecondpropagate",
String.valueOf(BytecodeViewer.viewer.forcecondpropagate
String.valueOf(BytecodeViewer.viewer.forceCondPropagate
.isSelected()),
"--hideutf",
String.valueOf(BytecodeViewer.viewer.hideutf.isSelected()),
String.valueOf(BytecodeViewer.viewer.hideUTF.isSelected()),
"--hidelongstrings",
String.valueOf(BytecodeViewer.viewer.hidelongstrings
String.valueOf(BytecodeViewer.viewer.hideLongStrings
.isSelected()),
"--commentmonitors",
String.valueOf(BytecodeViewer.viewer.commentmonitor
String.valueOf(BytecodeViewer.viewer.commentMonitor
.isSelected()),
"--allowcorrecting",
String.valueOf(BytecodeViewer.viewer.allowcorrecting
String.valueOf(BytecodeViewer.viewer.allowCorrecting
.isSelected()),
"--labelledblocks",
String.valueOf(BytecodeViewer.viewer.labelledblocks
String.valueOf(BytecodeViewer.viewer.labelledBlocks
.isSelected()),
"--j14classobj",
String.valueOf(BytecodeViewer.viewer.j14classobj.isSelected()),
String.valueOf(BytecodeViewer.viewer.j14ClassOBJ.isSelected()),
"--hidelangimports",
String.valueOf(BytecodeViewer.viewer.hidelangimports
String.valueOf(BytecodeViewer.viewer.hideLangImports
.isSelected()),
"--recovertypeclash",
String.valueOf(BytecodeViewer.viewer.recoverytypeclash
String.valueOf(BytecodeViewer.viewer.recoveryTypeClash
.isSelected()),
"--recovertypehints",
String.valueOf(BytecodeViewer.viewer.recoverytypehints
String.valueOf(BytecodeViewer.viewer.recoveryTypehInts
.isSelected()),
"--forcereturningifs",
String.valueOf(BytecodeViewer.viewer.forceturningifs
String.valueOf(BytecodeViewer.viewer.forceTurningIFs
.isSelected()),
"--forloopaggcapture",
String.valueOf(BytecodeViewer.viewer.forloopaggcapture
String.valueOf(BytecodeViewer.viewer.forLoopAGGCapture
.isSelected()),};
}

View File

@ -65,20 +65,20 @@ public class ProcyonDecompiler extends Decompiler {
public DecompilerSettings getDecompilerSettings() {
DecompilerSettings settings = new DecompilerSettings();
settings.setAlwaysGenerateExceptionVariableForCatchBlocks(BytecodeViewer.viewer.chckbxmntmNewCheckItem_6.isSelected());
settings.setExcludeNestedTypes(BytecodeViewer.viewer.chckbxmntmNewCheckItem_11.isSelected());
settings.setShowDebugLineNumbers(BytecodeViewer.viewer.chckbxmntmShowDebugLine.isSelected());
settings.setIncludeLineNumbersInBytecode(BytecodeViewer.viewer.chckbxmntmNewCheckItem_3.isSelected());
settings.setIncludeErrorDiagnostics(BytecodeViewer.viewer.chckbxmntmNewCheckItem_4.isSelected());
settings.setShowSyntheticMembers(BytecodeViewer.viewer.chckbxmntmNewCheckItem_7.isSelected());
settings.setSimplifyMemberReferences(BytecodeViewer.viewer.chckbxmntmSimplifyMemberReferences.isSelected());
settings.setMergeVariables(BytecodeViewer.viewer.mnMergeVariables.isSelected());
settings.setForceExplicitTypeArguments(BytecodeViewer.viewer.chckbxmntmNewCheckItem_8.isSelected());
settings.setForceExplicitImports(BytecodeViewer.viewer.chckbxmntmNewCheckItem_9.isSelected());
settings.setFlattenSwitchBlocks(BytecodeViewer.viewer.chckbxmntmNewCheckItem_10.isSelected());
settings.setRetainPointlessSwitches(BytecodeViewer.viewer.chckbxmntmNewCheckItem_2.isSelected());
settings.setRetainRedundantCasts(BytecodeViewer.viewer.chckbxmntmNewCheckItem_5.isSelected());
settings.setUnicodeOutputEnabled(BytecodeViewer.viewer.chckbxmntmNewCheckItem_1.isSelected());
settings.setAlwaysGenerateExceptionVariableForCatchBlocks(BytecodeViewer.viewer.alwaysGenerateExceptionVars.isSelected());
settings.setExcludeNestedTypes(BytecodeViewer.viewer.excludeNestedTypes.isSelected());
settings.setShowDebugLineNumbers(BytecodeViewer.viewer.showDebugLineNumbers.isSelected());
settings.setIncludeLineNumbersInBytecode(BytecodeViewer.viewer.includeLineNumbersInBytecode.isSelected());
settings.setIncludeErrorDiagnostics(BytecodeViewer.viewer.includeErrorDiagnostics.isSelected());
settings.setShowSyntheticMembers(BytecodeViewer.viewer.showSyntheticMembers.isSelected());
settings.setSimplifyMemberReferences(BytecodeViewer.viewer.simplifyMemberReferences.isSelected());
settings.setMergeVariables(BytecodeViewer.viewer.mergeVariables.isSelected());
settings.setForceExplicitTypeArguments(BytecodeViewer.viewer.forceExplicitTypeArguments.isSelected());
settings.setForceExplicitImports(BytecodeViewer.viewer.forceExplicitImports.isSelected());
settings.setFlattenSwitchBlocks(BytecodeViewer.viewer.flattenSwitchBlocks.isSelected());
settings.setRetainPointlessSwitches(BytecodeViewer.viewer.retainPointlessSwitches.isSelected());
settings.setRetainRedundantCasts(BytecodeViewer.viewer.retainRedunantCasts.isSelected());
settings.setUnicodeOutputEnabled(BytecodeViewer.viewer.unicodeOutputEnabled.isSelected());
settings.setJavaFormattingOptions(JavaFormattingOptions.createDefault());
return settings;
}

View File

@ -123,13 +123,13 @@ public class InstructionPrinter {
line = printLineNumberNode();
} else if (ain instanceof LabelNode) {
if (firstLabel
&& BytecodeViewer.viewer.chckbxmntmAppendBrackets
&& BytecodeViewer.viewer.appendBracketsToLabels
.isSelected())
info.add("}");
line = printLabelnode((LabelNode) ain);
if (BytecodeViewer.viewer.chckbxmntmAppendBrackets.isSelected()) {
if (BytecodeViewer.viewer.appendBracketsToLabels.isSelected()) {
if (!firstLabel)
firstLabel = true;
line += " {";
@ -161,7 +161,7 @@ public class InstructionPrinter {
}
}
if (firstLabel
&& BytecodeViewer.viewer.chckbxmntmAppendBrackets.isSelected())
&& BytecodeViewer.viewer.appendBracketsToLabels.isSelected())
info.add("}");
return info;
}

View File

@ -71,7 +71,7 @@ import the.bytecode.club.bytecodeviewer.util.LazyNameUtil;
* @author afffsdd
*/
public class FileNavigationPane extends VisibleComponent implements
public class ResourceListPane extends VisibleComponent implements
FileDrop.Listener {
FileChangeNotifier fcn;
@ -80,7 +80,7 @@ public class FileNavigationPane extends VisibleComponent implements
JButton close = new JButton("-");
MyTreeNode treeRoot = new MyTreeNode("Loaded Files:");
MyTree tree = new MyTree(treeRoot);
public MyTree tree = new MyTree(treeRoot);
final String quickSearchText = "Quick file search (no file extension)";
final JTextField quickSearch = new JTextField(quickSearchText);
boolean cancel = false;
@ -198,7 +198,7 @@ public class FileNavigationPane extends VisibleComponent implements
pop.add(new AbstractAction("Remove") {
@Override
public void actionPerformed(ActionEvent e) {
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y);
TreePath selPath = ResourceListPane.this.tree.getPathForLocation(x, y);
DefaultMutableTreeNode selectNode =
(DefaultMutableTreeNode) Objects.requireNonNull(selPath).getLastPathComponent();
Enumeration<?> enumeration = treeRoot.children();
@ -224,7 +224,7 @@ public class FileNavigationPane extends VisibleComponent implements
pop.add(new AbstractAction("Expand", WindowsTreeUI.ExpandedIcon.createExpandedIcon()) {
@Override
public void actionPerformed(ActionEvent e) {
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y);
TreePath selPath = ResourceListPane.this.tree.getPathForLocation(x, y);
expandAll(tree, Objects.requireNonNull(selPath), true);
}
});
@ -232,7 +232,7 @@ public class FileNavigationPane extends VisibleComponent implements
pop.add(new AbstractAction("Collapse", WindowsTreeUI.CollapsedIcon.createCollapsedIcon()) {
@Override
public void actionPerformed(ActionEvent e) {
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y);
TreePath selPath = ResourceListPane.this.tree.getPathForLocation(x, y);
expandAll(tree, Objects.requireNonNull(selPath), false);
}
});
@ -245,7 +245,7 @@ public class FileNavigationPane extends VisibleComponent implements
LazyNameUtil.removeName(fileContainer.name);
}
public FileNavigationPane(final FileChangeNotifier fcn) {
public ResourceListPane(final FileChangeNotifier fcn) {
super("ClassNavigation");
this.fcn = fcn;
tree.setRootVisible(false);
@ -258,7 +258,7 @@ public class FileNavigationPane extends VisibleComponent implements
public void mouseReleased(MouseEvent e) {
if (e.isMetaDown()) {
MyTree tree = (MyTree) e.getSource();
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(e.getX(), e.getY());
TreePath selPath = ResourceListPane.this.tree.getPathForLocation(e.getX(), e.getY());
if (selPath == null) {
return;
}
@ -666,8 +666,8 @@ public class FileNavigationPane extends VisibleComponent implements
selected, expanded, leaf, row, hasFocus);
if (value instanceof MyTreeNode) {
the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode node =
(the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode) value;
ResourceListPane.MyTreeNode node =
(ResourceListPane.MyTreeNode) value;
String name = node.toString().toLowerCase();
if (name.endsWith(".jar") || name.endsWith(".war")) {

View File

@ -55,7 +55,7 @@ import the.bytecode.club.bytecodeviewer.util.FileContainer;
*/
@SuppressWarnings("rawtypes")
public class SearchingPane extends VisibleComponent {
public class SearchBoxPane extends VisibleComponent {
private static final long serialVersionUID = -1098524689236993932L;
public static final SearchRadius[] SEARCH_RADII = SearchRadius.values();
@ -81,7 +81,7 @@ public class SearchingPane extends VisibleComponent {
};
@SuppressWarnings("unchecked")
public SearchingPane(final FileChangeNotifier fcn) {
public SearchBoxPane(final FileChangeNotifier fcn) {
super("Search");
this.fcn = fcn;
@ -164,7 +164,7 @@ public class SearchingPane extends VisibleComponent {
final ClassNode fN = Objects.requireNonNull(container).getClassNode(className);
if (fN != null) {
Objects.requireNonNull(MainViewerGUI.getComponent(FileNavigationPane.class))
Objects.requireNonNull(MainViewerGUI.getComponent(ResourceListPane.class))
.openClassFileToWorkSpace(container, className + ".class", fN);
}
});
@ -196,17 +196,17 @@ public class SearchingPane extends VisibleComponent {
for (ClassNode c : container.classes)
searchType.details.search(container, c, srn, exact.isSelected());
Objects.requireNonNull(MainViewerGUI.getComponent(SearchingPane.class)).search.setEnabled(true);
Objects.requireNonNull(MainViewerGUI.getComponent(SearchingPane.class)).search.setText(
Objects.requireNonNull(MainViewerGUI.getComponent(SearchBoxPane.class)).search.setEnabled(true);
Objects.requireNonNull(MainViewerGUI.getComponent(SearchBoxPane.class)).search.setText(
"Search");
tree.expandPath(new TreePath(tree.getModel().getRoot()));
tree.updateUI();
}
};
Objects.requireNonNull(MainViewerGUI.getComponent(SearchingPane.class)).search
Objects.requireNonNull(MainViewerGUI.getComponent(SearchBoxPane.class)).search
.setEnabled(false);
Objects.requireNonNull(MainViewerGUI.getComponent(SearchingPane.class)).search
Objects.requireNonNull(MainViewerGUI.getComponent(SearchBoxPane.class)).search
.setText("Searching, please wait..");
t.start();
} else { // this should really never be called.

View File

@ -4,6 +4,7 @@ import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.obfuscators.JavaObfuscator;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MappingData;
@ -33,6 +34,18 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MappingData;
public class RenameClasses extends JavaObfuscator {
public static void open()
{
if (Configuration.runningObfuscation) {
BytecodeViewer.showMessage("You're currently running an obfuscation task, wait for this to finish"
+ ".");
return;
}
new RenameClasses().start();
BytecodeViewer.viewer.workPane.refreshClass.doClick();
BytecodeViewer.viewer.resourcePane.tree.updateUI();
}
@Override
public void obfuscate() {
int stringLength = 5;//getStringLength();

View File

@ -3,6 +3,7 @@ package the.bytecode.club.bytecodeviewer.obfuscators.rename;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.obfuscators.JavaObfuscator;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.FieldMappingData;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MappingData;
@ -33,6 +34,17 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MappingData;
public class RenameFields extends JavaObfuscator {
public static void open()
{
if (Configuration.runningObfuscation) {
BytecodeViewer.showMessage("You're currently running an obfuscation task, wait for this to finish.");
return;
}
new RenameFields().start();
BytecodeViewer.viewer.workPane.refreshClass.doClick();
BytecodeViewer.viewer.resourcePane.tree.updateUI();
}
@Override
public void obfuscate() {
int stringLength = getStringLength();

View File

@ -4,6 +4,7 @@ import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.obfuscators.JavaObfuscator;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MappingData;
import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MethodMappingData;
@ -34,6 +35,18 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.data.MethodMappingDa
public class RenameMethods extends JavaObfuscator {
public static void open()
{
if (Configuration.runningObfuscation) {
BytecodeViewer.showMessage("You're currently running an obfuscation task, wait for this to finish"
+ ".");
return;
}
new RenameMethods().start();
BytecodeViewer.viewer.workPane.refreshClass.doClick();
BytecodeViewer.viewer.resourcePane.tree.updateUI();
}
@Override
public void obfuscate() {
int stringLength = getStringLength();

View File

@ -14,7 +14,7 @@ public class EnterKeyEvent implements KeyListener {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
BytecodeViewer.viewer.s.search();
BytecodeViewer.viewer.searchBoxPane.search();
}
}

View File

@ -4,7 +4,7 @@ import org.apache.commons.io.FileUtils;
import org.objectweb.asm.tree.ClassNode;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.api.ExceptionUI;
import the.bytecode.club.bytecodeviewer.gui.FileNavigationPane;
import the.bytecode.club.bytecodeviewer.gui.ResourceListPane;
import the.bytecode.club.bytecodeviewer.gui.MainViewerGUI;
import java.io.File;
@ -212,7 +212,7 @@ public class OpenFile implements Runnable
if (update)
try {
Objects.requireNonNull(MainViewerGUI.getComponent(FileNavigationPane.class)).updateTree();
Objects.requireNonNull(MainViewerGUI.getComponent(ResourceListPane.class)).updateTree();
} catch (NullPointerException ignored) {
}
}

View File

@ -0,0 +1,20 @@
package the.bytecode.club.bytecodeviewer.util;
import the.bytecode.club.bytecodeviewer.Configuration;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
* @author Konloch
* @since 6/21/2021
*/
public class WindowClosingAdapter extends WindowAdapter
{
@Override
public void windowClosing(WindowEvent e)
{
Configuration.canExit = true;
System.exit(0);
}
}

View File

@ -0,0 +1,40 @@
package the.bytecode.club.bytecodeviewer.util;
import the.bytecode.club.bytecodeviewer.gui.MainViewerGUI;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
* @author Konloch
* @since 6/21/2021
*/
public class WindowStateChangeAdapter extends WindowAdapter
{
private final MainViewerGUI mainViewerGUI;
public WindowStateChangeAdapter(MainViewerGUI mainViewerGUI) {this.mainViewerGUI = mainViewerGUI;}
@Override
public void windowStateChanged(WindowEvent evt)
{
int oldState = evt.getOldState();
int newState = evt.getNewState();
/*if ((oldState & Frame.ICONIFIED) == 0 && (newState & Frame.ICONIFIED) != 0) {
System.out.println("Frame was iconized");
} else if ((oldState & Frame.ICONIFIED) != 0 && (newState & Frame.ICONIFIED) == 0) {
System.out.println("Frame was deiconized");
}*/
if ((oldState & Frame.MAXIMIZED_BOTH) == 0 && (newState & Frame.MAXIMIZED_BOTH) != 0)
{
mainViewerGUI.isMaximized = true;
}
else if ((oldState & Frame.MAXIMIZED_BOTH) != 0 && (newState & Frame.MAXIMIZED_BOTH) == 0)
{
mainViewerGUI.isMaximized = false;
}
}
}