core: allow to disable constant dereference (#106)

This commit is contained in:
Skylot
2016-03-13 12:43:24 +03:00
parent 7cba2c3f81
commit 5f302238ad
18 changed files with 366 additions and 139 deletions
@@ -168,6 +168,10 @@ public class JadxSettings extends JadxCLIArgs {
this.escapeUnicode = escapeUnicode;
}
public void setReplaceConsts(boolean replaceConsts) {
this.replaceConsts = replaceConsts;
}
public boolean isAutoStartJobs() {
return autoStartJobs;
}
@@ -257,11 +257,21 @@ public class JadxSettingsWindow extends JDialog {
}
});
JCheckBox replaceConsts = new JCheckBox();
replaceConsts.setSelected(settings.isReplaceConsts());
replaceConsts.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
settings.setReplaceConsts(e.getStateChange() == ItemEvent.SELECTED);
needReload();
}
});
SettingsGroup other = new SettingsGroup(NLS.str("preferences.decompile"));
other.addRow(NLS.str("preferences.threads"), threadsCount);
other.addRow(NLS.str("preferences.start_jobs"), autoStartJobs);
other.addRow(NLS.str("preferences.showInconsistentCode"), showInconsistentCode);
other.addRow(NLS.str("preferences.escapeUnicode"), escapeUnicode);
other.addRow(NLS.str("preferences.replaceConsts"), replaceConsts);
other.addRow(NLS.str("preferences.fallback"), fallback);
other.addRow(NLS.str("preferences.skipResourcesDecode"), resourceDecode);
return other;