use of jadx.gui.settings.JadxSettings in project jadx by skylot.
the class CodeArea method loadSettings.
public void loadSettings() {
JadxSettings settings = contentPanel.getTabbedPane().getMainWindow().getSettings();
setFont(settings.getFont());
}
use of jadx.gui.settings.JadxSettings in project jadx by skylot.
the class JadxGUI method main.
public static void main(String[] args) {
try {
LogCollector.register();
JadxSettings settings = JadxSettingsAdapter.load();
settings.setLogLevel(LogHelper.LogLevelEnum.INFO);
// overwrite loaded settings by command line arguments
if (!settings.overrideProvided(args)) {
return;
}
printSystemInfo();
LafManager.init(settings);
NLS.setLocale(settings.getLangLocale());
SwingUtilities.invokeLater(new MainWindow(settings)::init);
} catch (Exception e) {
LOG.error("Error: {}", e.getMessage(), e);
System.exit(1);
}
}
use of jadx.gui.settings.JadxSettings in project jadx by skylot.
the class HtmlPanel method loadSettings.
@Override
public void loadSettings() {
JadxSettings settings = getTabbedPane().getMainWindow().getSettings();
textArea.setFont(settings.getFont());
}
use of jadx.gui.settings.JadxSettings in project jadx by skylot.
the class AbstractCodeArea method loadCommonSettings.
public static void loadCommonSettings(MainWindow mainWindow, RSyntaxTextArea area) {
area.setAntiAliasingEnabled(true);
mainWindow.getEditorTheme().apply(area);
JadxSettings settings = mainWindow.getSettings();
area.setFont(settings.getFont());
}
use of jadx.gui.settings.JadxSettings in project jadx by skylot.
the class AbstractCodeArea method addWrapLineMenuAction.
private void addWrapLineMenuAction(JadxSettings settings) {
JPopupMenu popupMenu = getPopupMenu();
popupMenu.addSeparator();
JCheckBoxMenuItem wrapItem = new JCheckBoxMenuItem(NLS.str("popup.line_wrap"), getLineWrap());
wrapItem.setAction(new AbstractAction(NLS.str("popup.line_wrap")) {
@Override
public void actionPerformed(ActionEvent e) {
boolean wrap = !getLineWrap();
settings.setCodeAreaLineWrap(wrap);
contentPanel.getTabbedPane().getOpenTabs().values().forEach(v -> {
if (v instanceof AbstractCodeContentPanel) {
AbstractCodeArea codeArea = ((AbstractCodeContentPanel) v).getCodeArea();
setCodeAreaLineWrap(codeArea, wrap);
if (v instanceof ClassCodeContentPanel) {
codeArea = ((ClassCodeContentPanel) v).getSmaliCodeArea();
setCodeAreaLineWrap(codeArea, wrap);
}
}
});
settings.sync();
}
});
popupMenu.add(wrapItem);
popupMenu.addPopupMenuListener(new DefaultPopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
wrapItem.setState(getLineWrap());
}
});
}
Aggregations