Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
ccb9c460
Commit
ccb9c460
authored
Apr 12, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: fix imports and indents
parent
01dfae4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
46 deletions
+25
-46
TestVariablesUsageWithLoops.java
...ts/integration/variables/TestVariablesUsageWithLoops.java
+1
-0
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+24
-46
No files found.
jadx-core/src/test/java/jadx/tests/integration/variables/TestVariablesUsageWithLoops.java
View file @
ccb9c460
...
...
@@ -15,6 +15,7 @@ public class TestVariablesUsageWithLoops extends IntegrationTest {
public
static
class
TestEnhancedFor
{
@SuppressWarnings
(
"rawtypes"
)
public
void
test
()
{
List
list
;
synchronized
(
this
)
{
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
ccb9c460
package
jadx
.
gui
.
settings
;
import
java.awt.BorderLayout
;
import
java.awt.Container
;
import
java.awt.Dimension
;
import
java.awt.Font
;
import
java.awt.GridBagConstraints
;
import
java.awt.GridBagLayout
;
import
java.awt.Insets
;
import
javax.swing.*
;
import
java.awt.*
;
import
java.awt.event.ItemEvent
;
import
java.awt.event.MouseAdapter
;
import
java.awt.event.MouseEvent
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
javax.swing.BorderFactory
;
import
javax.swing.Box
;
import
javax.swing.BoxLayout
;
import
javax.swing.JButton
;
import
javax.swing.JCheckBox
;
import
javax.swing.JComboBox
;
import
javax.swing.JComponent
;
import
javax.swing.JDialog
;
import
javax.swing.JLabel
;
import
javax.swing.JOptionPane
;
import
javax.swing.JPanel
;
import
javax.swing.JScrollPane
;
import
javax.swing.JSpinner
;
import
javax.swing.ScrollPaneConstants
;
import
javax.swing.SpinnerNumberModel
;
import
javax.swing.SwingConstants
;
import
javax.swing.WindowConstants
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
say.swing.JFontChooser
;
import
jadx.gui.ui.MainWindow
;
import
jadx.gui.ui.codearea.EditorTheme
;
import
jadx.gui.utils.LangLocale
;
import
jadx.gui.utils.NLS
;
import
jadx.gui.utils.Utils
;
import
say.swing.JFontChooser
;
public
class
JadxSettingsWindow
extends
JDialog
{
private
static
final
long
serialVersionUID
=
-
1804570470377354148L
;
...
...
@@ -91,11 +68,11 @@ public class JadxSettingsWindow extends JDialog {
}
if
(!
settings
.
getLangLocale
().
equals
(
prevLang
))
{
JOptionPane
.
showMessageDialog
(
this
,
NLS
.
str
(
"msg.language_changed"
,
settings
.
getLangLocale
()),
NLS
.
str
(
"msg.language_changed_title"
,
settings
.
getLangLocale
()),
JOptionPane
.
INFORMATION_MESSAGE
);
this
,
NLS
.
str
(
"msg.language_changed"
,
settings
.
getLangLocale
()),
NLS
.
str
(
"msg.language_changed_title"
,
settings
.
getLangLocale
()),
JOptionPane
.
INFORMATION_MESSAGE
);
}
dispose
();
});
...
...
@@ -110,10 +87,11 @@ public class JadxSettingsWindow extends JDialog {
JButton
resetBtn
=
new
JButton
(
NLS
.
str
(
"preferences.reset"
));
resetBtn
.
addActionListener
(
event
->
{
int
res
=
JOptionPane
.
showConfirmDialog
(
JadxSettingsWindow
.
this
,
NLS
.
str
(
"preferences.reset_message"
),
NLS
.
str
(
"preferences.reset_title"
),
JOptionPane
.
YES_NO_OPTION
);
JadxSettingsWindow
.
this
,
NLS
.
str
(
"preferences.reset_message"
),
NLS
.
str
(
"preferences.reset_title"
),
JOptionPane
.
YES_NO_OPTION
);
if
(
res
==
JOptionPane
.
YES_OPTION
)
{
String
defaults
=
JadxSettingsAdapter
.
makeString
(
JadxSettings
.
makeDefault
());
JadxSettingsAdapter
.
fill
(
settings
,
defaults
);
...
...
@@ -144,13 +122,13 @@ public class JadxSettingsWindow extends JDialog {
}
private
static
void
enableComponents
(
Container
container
,
boolean
enable
)
{
for
(
Component
component
:
container
.
getComponents
())
{
if
(
component
instanceof
Container
)
{
enableComponents
((
Container
)
component
,
enable
);
}
component
.
setEnabled
(
enable
);
}
}
for
(
Component
component
:
container
.
getComponents
())
{
if
(
component
instanceof
Container
)
{
enableComponents
((
Container
)
component
,
enable
);
}
component
.
setEnabled
(
enable
);
}
}
private
SettingsGroup
makeDeobfuscationGroup
()
{
JCheckBox
deobfOn
=
new
JCheckBox
();
...
...
@@ -239,7 +217,7 @@ public class JadxSettingsWindow extends JDialog {
JCheckBox
autoSave
=
new
JCheckBox
();
autoSave
.
setSelected
(
settings
.
isAutoSaveProject
());
autoSave
.
addItemListener
(
e
->
settings
.
setAutoSaveProject
(
e
.
getStateChange
()
==
ItemEvent
.
SELECTED
));
settings
.
setAutoSaveProject
(
e
.
getStateChange
()
==
ItemEvent
.
SELECTED
));
SettingsGroup
group
=
new
SettingsGroup
(
NLS
.
str
(
"preferences.project"
));
group
.
addRow
(
NLS
.
str
(
"preferences.autoSave"
),
autoSave
);
...
...
@@ -316,7 +294,7 @@ public class JadxSettingsWindow extends JDialog {
});
SpinnerNumberModel
spinnerModel
=
new
SpinnerNumberModel
(
settings
.
getThreadsCount
(),
1
,
Runtime
.
getRuntime
().
availableProcessors
()
*
2
,
1
);
settings
.
getThreadsCount
(),
1
,
Runtime
.
getRuntime
().
availableProcessors
()
*
2
,
1
);
JSpinner
threadsCount
=
new
JSpinner
(
spinnerModel
);
threadsCount
.
addChangeListener
(
e
->
{
settings
.
setThreadsCount
((
Integer
)
threadsCount
.
getValue
());
...
...
@@ -328,7 +306,7 @@ public class JadxSettingsWindow extends JDialog {
String
oldExcludedPackages
=
settings
.
getExcludedPackages
();
String
result
=
JOptionPane
.
showInputDialog
(
this
,
NLS
.
str
(
"preferences.excludedPackages.editDialog"
),
settings
.
getExcludedPackages
());
settings
.
getExcludedPackages
());
if
(
result
!=
null
)
{
settings
.
setExcludedPackages
(
result
);
if
(!
oldExcludedPackages
.
equals
(
result
))
{
...
...
@@ -372,7 +350,7 @@ public class JadxSettingsWindow extends JDialog {
SettingsGroup
other
=
new
SettingsGroup
(
NLS
.
str
(
"preferences.decompile"
));
other
.
addRow
(
NLS
.
str
(
"preferences.threads"
),
threadsCount
);
other
.
addRow
(
NLS
.
str
(
"preferences.excludedPackages"
),
NLS
.
str
(
"preferences.excludedPackages.tooltip"
),
editExcludedPackages
);
editExcludedPackages
);
other
.
addRow
(
NLS
.
str
(
"preferences.start_jobs"
),
autoStartJobs
);
other
.
addRow
(
NLS
.
str
(
"preferences.showInconsistentCode"
),
showInconsistentCode
);
other
.
addRow
(
NLS
.
str
(
"preferences.escapeUnicode"
),
escapeUnicode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment