2018-01-31 15:03:53 +00:00
|
|
|
package the.bytecode.club.bytecodeviewer;
|
|
|
|
|
|
|
|
import javax.swing.JFrame;
|
|
|
|
import me.konloch.kontainer.io.DiskReader;
|
|
|
|
import me.konloch.kontainer.io.DiskWriter;
|
2021-06-26 01:13:46 +00:00
|
|
|
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
|
|
|
|
import the.bytecode.club.bytecodeviewer.gui.theme.RSTATheme;
|
2018-01-31 15:03:53 +00:00
|
|
|
|
2021-06-21 09:45:31 +00:00
|
|
|
import static the.bytecode.club.bytecodeviewer.Constants.*;
|
|
|
|
|
2018-01-31 15:03:53 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
|
|
|
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to handle loading/saving the GUI (options).
|
|
|
|
*
|
2018-01-31 15:41:24 +00:00
|
|
|
* @author Konloch
|
2018-01-31 15:03:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class Settings {
|
|
|
|
|
2019-04-17 06:45:15 +00:00
|
|
|
public static void saveSettings() {
|
2018-01-31 15:41:24 +00:00
|
|
|
try {
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.replaceFile(settingsName,
|
|
|
|
"BCV: " + VERSION, false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.rbr.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.rsy.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.din.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.dc4.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.das.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hes.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hdc.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.dgs.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.ner.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.den.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.rgn.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.bto.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.nns.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.uto.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.udv.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.rer.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.fdi.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.asc.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.decodeEnumSwitch.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.sugarEnums.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.decodeStringSwitch.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.arrayiter.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.collectioniter.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.innerClasses.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.removeBoilerPlate.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.removeInnerClassSynthetics.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.decodeLambdas.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hideBridgeMethods.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.liftConstructorInit.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.removeDeadMethods.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.removeBadGenerics.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.sugarAsserts.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.sugarBoxing.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showVersion.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.decodeFinally.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.tidyMonitors.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.lenient.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.dumpClassPath.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.comments.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceTopSort.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceTopSortAggress.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.stringBuffer.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.stringBuilder.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.silent.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.recover.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.eclipse.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.override.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showInferrable.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.aexagg.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceCondPropagate.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hideUTF.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hideLongStrings.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.commentMonitor.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.allowCorrecting.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.labelledBlocks.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.j14ClassOBJ.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.hideLangImports.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.recoveryTypeClash.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.recoveryTypehInts.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceTurningIFs.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forLoopAGGCapture.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceExceptionPrune.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showDebugLineNumbers.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.simplifyMemberReferences.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.mergeVariables.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.unicodeOutputEnabled.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.retainPointlessSwitches.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.includeLineNumbersInBytecode.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.includeErrorDiagnostics.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.retainRedunantCasts.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.alwaysGenerateExceptionVars.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showSyntheticMembers.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceExplicitTypeArguments.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forceExplicitImports.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.flattenSwitchBlocks.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.excludeNestedTypes.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.appendBracketsToLabels.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.debugHelpers.isSelected()), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
"deprecated", false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 22:45:00 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.updateCheck.isSelected()), false);
|
2021-06-21 14:55:18 +00:00
|
|
|
|
|
|
|
DiskWriter.writeNewLine(settingsName, String.valueOf(BytecodeViewer.viewer.viewPane1.getSelectedViewer()), false);
|
|
|
|
DiskWriter.writeNewLine(settingsName, String.valueOf(BytecodeViewer.viewer.viewPane2.getSelectedViewer()), false);
|
|
|
|
DiskWriter.writeNewLine(settingsName, String.valueOf(BytecodeViewer.viewer.viewPane3.getSelectedViewer()), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.refreshOnChange.isSelected()), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
String.valueOf(BytecodeViewer.viewer.isMaximized), false);
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
"deprecated", false);
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
"deprecated", false);
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.lastDirectory, false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.python, false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.rt, false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getProcyon().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getCFR().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getFern().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getKrakatau().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getSmali().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getProcyon().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getCFR().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getFern().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getKrakatau().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getSmali().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getProcyon().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getCFR().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getFern().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getKrakatau().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getSmali().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.decodeAPKResources.isSelected()), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.library, false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
String.valueOf(Configuration.pingback), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getJD().getEditable().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane2.getJD().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 14:55:18 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane3.getJD().getJava().isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.fontSpinner.getValue()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
String.valueOf(Configuration.deleteForeignLibraries), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
|
2018-01-31 15:41:24 +00:00
|
|
|
if (BytecodeViewer.viewer.apkConversionGroup.isSelected(BytecodeViewer.viewer.apkConversionDex.getModel()))
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName, "0", false);
|
2018-01-31 15:41:24 +00:00
|
|
|
else if (BytecodeViewer.viewer.apkConversionGroup.isSelected(BytecodeViewer.viewer.apkConversionEnjarify.getModel()))
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName, "1", false);
|
2021-06-21 10:04:24 +00:00
|
|
|
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.python3, false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.javac, false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.java, false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.compileOnSave.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.autoCompileOnRefresh.isSelected()), false);
|
2021-06-21 10:04:24 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-06-21 11:13:11 +00:00
|
|
|
String.valueOf(Configuration.warnForEditing), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showFileInTabTitle.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.forcePureAsciiAsText.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.synchronizedViewing.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.showClassMethods.isSelected()), false);
|
2021-06-21 09:45:31 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
2021-04-12 20:19:12 +00:00
|
|
|
String.valueOf(BytecodeViewer.viewer.ren.isSelected()), false);
|
2021-06-21 14:55:18 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
String.valueOf(BytecodeViewer.viewer.viewPane1.getJADX().getEditable().isSelected()), false);
|
2021-06-26 01:13:46 +00:00
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
Configuration.lafTheme.name(), false);
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
Configuration.rstaTheme.name(), false);
|
|
|
|
DiskWriter.writeNewLine(settingsName,
|
|
|
|
String.valueOf(BytecodeViewer.viewer.simplifyNameInTabTitle.isSelected()), false);
|
2018-01-31 15:41:24 +00:00
|
|
|
} catch (Exception e) {
|
|
|
|
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
|
|
|
}
|
|
|
|
}
|
2021-06-26 01:13:46 +00:00
|
|
|
|
|
|
|
public static void preloadSettingsFile()
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
//precache the file
|
|
|
|
DiskReader.loadString(settingsName, 0, true);
|
|
|
|
|
|
|
|
//process the cached file
|
|
|
|
Configuration.lafTheme = LAFTheme.valueOf(asString(127));
|
|
|
|
Configuration.rstaTheme = RSTATheme.valueOf(asString(128));
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
//ignore because errors are expected, first start up and outdated settings.
|
|
|
|
//e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-17 06:45:15 +00:00
|
|
|
public static void loadSettings() { //utilizes the Disk Reader's caching system.
|
2018-01-31 15:41:24 +00:00
|
|
|
try {
|
2021-06-26 01:13:46 +00:00
|
|
|
//parse the cached file from memory
|
|
|
|
BytecodeViewer.viewer.rbr.setSelected(asBoolean(1));
|
|
|
|
BytecodeViewer.viewer.rsy.setSelected(asBoolean(2));
|
|
|
|
BytecodeViewer.viewer.din.setSelected(asBoolean(3));
|
|
|
|
BytecodeViewer.viewer.dc4.setSelected(asBoolean(4));
|
|
|
|
BytecodeViewer.viewer.das.setSelected(asBoolean(5));
|
|
|
|
BytecodeViewer.viewer.hes.setSelected(asBoolean(6));
|
|
|
|
BytecodeViewer.viewer.hdc.setSelected(asBoolean(7));
|
|
|
|
BytecodeViewer.viewer.dgs.setSelected(asBoolean(8));
|
|
|
|
BytecodeViewer.viewer.ner.setSelected(asBoolean(9));
|
|
|
|
BytecodeViewer.viewer.den.setSelected(asBoolean(10));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.rgn.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 11, false)));
|
|
|
|
BytecodeViewer.viewer.bto.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 12, false)));
|
|
|
|
BytecodeViewer.viewer.nns.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 13, false)));
|
|
|
|
BytecodeViewer.viewer.uto.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 14, false)));
|
|
|
|
BytecodeViewer.viewer.udv.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 15, false)));
|
|
|
|
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)));
|
2021-06-21 22:45:00 +00:00
|
|
|
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)));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.arrayiter.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 22, false)));
|
|
|
|
BytecodeViewer.viewer.collectioniter.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 23, false)));
|
2021-06-21 22:45:00 +00:00
|
|
|
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)));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.lenient.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 37, false)));
|
2021-06-21 22:45:00 +00:00
|
|
|
BytecodeViewer.viewer.dumpClassPath.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 38, false)));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.comments.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 39, false)));
|
2021-06-21 22:45:00 +00:00
|
|
|
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)));
|
2021-06-21 09:45:31 +00:00
|
|
|
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)));
|
2021-06-21 22:45:00 +00:00
|
|
|
BytecodeViewer.viewer.showInferrable.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 48, false)));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.aexagg.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 49, false)));
|
2021-06-21 22:45:00 +00:00
|
|
|
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)));
|
2021-06-21 09:45:31 +00:00
|
|
|
BytecodeViewer.viewer.debugHelpers.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 78, false)));
|
2018-01-31 15:41:24 +00:00
|
|
|
//79 is deprecated
|
2021-06-21 22:45:00 +00:00
|
|
|
BytecodeViewer.viewer.updateCheck.setSelected(Boolean.parseBoolean(DiskReader.loadString(settingsName, 80, false)));
|
2021-06-26 01:13:46 +00:00
|
|
|
BytecodeViewer.viewer.viewPane1.setSelectedViewer(asInt(81));
|
|
|
|
BytecodeViewer.viewer.viewPane2.setSelectedViewer(asInt(82));
|
|
|
|
BytecodeViewer.viewer.viewPane3.setSelectedViewer(asInt(83));
|
2018-01-31 15:03:53 +00:00
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
BytecodeViewer.viewer.refreshOnChange.setSelected(asBoolean(84));
|
2018-01-31 15:03:53 +00:00
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
boolean bool = Boolean.parseBoolean(asString(85));
|
2018-01-31 15:41:24 +00:00
|
|
|
if (bool) {
|
|
|
|
BytecodeViewer.viewer.setExtendedState(JFrame.MAXIMIZED_BOTH);
|
|
|
|
BytecodeViewer.viewer.isMaximized = true;
|
|
|
|
}
|
2019-04-14 03:45:40 +00:00
|
|
|
//86 is deprecated
|
|
|
|
//87 is deprecated
|
2021-06-26 01:13:46 +00:00
|
|
|
Configuration.lastDirectory = asString(88);
|
|
|
|
Configuration.python = asString(89);
|
|
|
|
Configuration.rt = asString(90);
|
|
|
|
BytecodeViewer.viewer.viewPane1.getProcyon().getEditable().setSelected(asBoolean(91));
|
|
|
|
BytecodeViewer.viewer.viewPane1.getCFR().getEditable().setSelected(asBoolean(92));
|
|
|
|
BytecodeViewer.viewer.viewPane1.getFern().getEditable().setSelected(asBoolean(93));
|
|
|
|
BytecodeViewer.viewer.viewPane1.getKrakatau().getEditable().setSelected(asBoolean(94));
|
|
|
|
BytecodeViewer.viewer.viewPane1.getSmali().getEditable().setSelected(asBoolean(95));
|
|
|
|
BytecodeViewer.viewer.viewPane2.getProcyon().getEditable().setSelected(asBoolean(96));
|
|
|
|
BytecodeViewer.viewer.viewPane2.getCFR().getEditable().setSelected(asBoolean(97));
|
|
|
|
BytecodeViewer.viewer.viewPane2.getFern().getEditable().setSelected(asBoolean(98));
|
2021-06-21 14:55:18 +00:00
|
|
|
BytecodeViewer.viewer.viewPane2.getKrakatau().getEditable().setSelected(asBoolean(99));
|
|
|
|
BytecodeViewer.viewer.viewPane2.getSmali().getEditable().setSelected(asBoolean(100));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getProcyon().getEditable().setSelected(asBoolean(101));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getCFR().getEditable().setSelected(asBoolean(102));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getFern().getEditable().setSelected(asBoolean(103));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getKrakatau().getEditable().setSelected(asBoolean(104));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getSmali().getEditable().setSelected(asBoolean(105));
|
|
|
|
BytecodeViewer.viewer.decodeAPKResources.setSelected(asBoolean(106));
|
2021-06-26 01:13:46 +00:00
|
|
|
Configuration.library = asString(107);
|
2021-06-21 14:55:18 +00:00
|
|
|
Configuration.pingback = asBoolean(108);
|
|
|
|
BytecodeViewer.viewer.viewPane1.getJD().getEditable().setSelected(asBoolean(109));
|
|
|
|
BytecodeViewer.viewer.viewPane2.getJD().getEditable().setSelected(asBoolean(110));
|
|
|
|
BytecodeViewer.viewer.viewPane3.getJD().getEditable().setSelected(asBoolean(111));
|
2021-06-26 01:13:46 +00:00
|
|
|
BytecodeViewer.viewer.fontSpinner.setValue(asInt(112));
|
2021-06-21 14:55:18 +00:00
|
|
|
Configuration.deleteForeignLibraries = asBoolean(113);
|
2021-06-21 10:04:24 +00:00
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
//APK Decompiler
|
|
|
|
switch(asInt(114))
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
BytecodeViewer.viewer.apkConversionGroup.setSelected(BytecodeViewer.viewer.apkConversionDex.getModel(), true);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
BytecodeViewer.viewer.apkConversionGroup.setSelected(BytecodeViewer.viewer.apkConversionEnjarify.getModel(), true);
|
|
|
|
break;
|
|
|
|
}
|
2021-06-21 11:13:11 +00:00
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
Configuration.python3 = asString(115);
|
|
|
|
Configuration.javac = asString(116);
|
|
|
|
Configuration.java = asString(117);
|
2021-06-21 14:55:18 +00:00
|
|
|
BytecodeViewer.viewer.compileOnSave.setSelected(asBoolean(118));
|
|
|
|
BytecodeViewer.viewer.autoCompileOnRefresh.setSelected(asBoolean(119));
|
2021-06-26 01:13:46 +00:00
|
|
|
Configuration.warnForEditing = asBoolean(120);
|
2021-06-21 14:55:18 +00:00
|
|
|
BytecodeViewer.viewer.showFileInTabTitle.setSelected(asBoolean(121));
|
2021-06-21 11:13:11 +00:00
|
|
|
Configuration.displayParentInTab = BytecodeViewer.viewer.showFileInTabTitle.isSelected();
|
2021-06-21 14:55:18 +00:00
|
|
|
BytecodeViewer.viewer.forcePureAsciiAsText.setSelected(asBoolean(122));
|
|
|
|
BytecodeViewer.viewer.synchronizedViewing.setSelected(asBoolean(123));
|
|
|
|
BytecodeViewer.viewer.showClassMethods.setSelected(asBoolean(124));
|
|
|
|
BytecodeViewer.viewer.ren.setSelected(asBoolean(125));
|
|
|
|
BytecodeViewer.viewer.viewPane1.getJADX().getEditable().setSelected(asBoolean(126));
|
2021-06-26 01:13:46 +00:00
|
|
|
//line 127 is used for theme on preload
|
|
|
|
//line 128 is used for theme on preload
|
|
|
|
BytecodeViewer.viewer.simplifyNameInTabTitle.setSelected(asBoolean(129));
|
|
|
|
Configuration.simplifiedTabNames = BytecodeViewer.viewer.simplifyNameInTabTitle.isSelected();
|
2018-01-31 15:41:24 +00:00
|
|
|
} catch (Exception e) {
|
|
|
|
//ignore because errors are expected, first start up and outdated settings.
|
|
|
|
//e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
2021-06-21 14:55:18 +00:00
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
public static String asString(int lineNumber) throws Exception
|
|
|
|
{
|
|
|
|
return DiskReader.loadString(settingsName, lineNumber, false);
|
|
|
|
}
|
|
|
|
|
2021-06-21 14:55:18 +00:00
|
|
|
public static boolean asBoolean(int lineNumber) throws Exception
|
|
|
|
{
|
|
|
|
return Boolean.parseBoolean(DiskReader.loadString(settingsName, lineNumber, false));
|
|
|
|
}
|
|
|
|
|
2021-06-26 01:13:46 +00:00
|
|
|
public static int asInt(int lineNumber) throws Exception
|
2021-06-21 14:55:18 +00:00
|
|
|
{
|
|
|
|
return Integer.parseInt(DiskReader.loadString(settingsName, lineNumber, false));
|
|
|
|
}
|
2018-01-31 15:03:53 +00:00
|
|
|
}
|