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
bc629337
Commit
bc629337
authored
Oct 29, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): add "use imports" option to preferences
parent
58993b97
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
JadxSettings.java
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
+9
-1
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+8
-0
Messages_en_US.properties
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
+1
-0
No files found.
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
View file @
bc629337
...
...
@@ -26,7 +26,7 @@ public class JadxSettings extends JadxCLIArgs {
private
static
final
String
USER_HOME
=
System
.
getProperty
(
"user.home"
);
private
static
final
int
RECENT_FILES_COUNT
=
15
;
private
static
final
int
CURRENT_SETTINGS_VERSION
=
4
;
private
static
final
int
CURRENT_SETTINGS_VERSION
=
5
;
private
static
final
Font
DEFAULT_FONT
=
FONT_HACK
!=
null
?
FONT_HACK
:
new
RSyntaxTextArea
().
getFont
();
...
...
@@ -206,6 +206,10 @@ public class JadxSettings extends JadxCLIArgs {
this
.
replaceConsts
=
replaceConsts
;
}
public
void
setUseImports
(
boolean
useImports
)
{
this
.
useImports
=
useImports
;
}
public
boolean
isAutoStartJobs
()
{
return
autoStartJobs
;
}
...
...
@@ -274,6 +278,10 @@ public class JadxSettings extends JadxCLIArgs {
}
if
(
fromVersion
==
3
)
{
setLangLocale
(
NLS
.
defaultLocale
());
fromVersion
++;
}
if
(
fromVersion
==
4
)
{
setUseImports
(
true
);
}
settingsVersion
=
CURRENT_SETTINGS_VERSION
;
sync
();
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
bc629337
...
...
@@ -260,12 +260,20 @@ public class JadxSettingsWindow extends JDialog {
needReload
();
});
JCheckBox
useImports
=
new
JCheckBox
();
useImports
.
setSelected
(
settings
.
isUseImports
());
useImports
.
addItemListener
(
e
->
{
settings
.
setUseImports
(
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.useImports"
),
useImports
);
other
.
addRow
(
NLS
.
str
(
"preferences.fallback"
),
fallback
);
other
.
addRow
(
NLS
.
str
(
"preferences.skipResourcesDecode"
),
resourceDecode
);
return
other
;
...
...
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
View file @
bc629337
...
...
@@ -81,6 +81,7 @@ preferences.fallback=Fallback mode (simple dump)
preferences.showInconsistentCode
=
Show inconsistent code
preferences.escapeUnicode
=
Escape unicode
preferences.replaceConsts
=
Replace constants
preferences.useImports
=
Use import statements
preferences.skipResourcesDecode
=
Don't decode resources
preferences.threads
=
Processing threads count
preferences.cfg
=
Generate methods CFG graphs (in 'dot' format)
...
...
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