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
eed762df
Commit
eed762df
authored
Mar 23, 2019
by
Ahmed Ashour
Committed by
skylot
Mar 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): exclusion disablement should be exact package match (PR #500)
parent
d3dbdb24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
JadxWrapper.java
jadx-gui/src/main/java/jadx/gui/JadxWrapper.java
+7
-2
JPackage.java
jadx-gui/src/main/java/jadx/gui/treemodel/JPackage.java
+2
-1
No files found.
jadx-gui/src/main/java/jadx/gui/JadxWrapper.java
View file @
eed762df
...
...
@@ -88,7 +88,8 @@ public class JadxWrapper {
return
classList
.
stream
().
filter
(
cls
->
{
for
(
String
exclude
:
excludedPackages
)
{
if
(
cls
.
getFullName
().
startsWith
(
exclude
))
{
if
(
cls
.
getFullName
().
equals
(
exclude
)
||
cls
.
getFullName
().
startsWith
(
exclude
+
'.'
))
{
return
false
;
}
}
...
...
@@ -98,11 +99,15 @@ public class JadxWrapper {
public
List
<
String
>
getExcludedPackages
()
{
String
excludedPackages
=
settings
.
getExcludedPackages
().
trim
();
if
(
excludedPackages
.
isEmpty
())
{
return
Collections
.
emptyList
();
}
return
Arrays
.
asList
(
excludedPackages
.
split
(
"[ ]+"
));
}
public
void
addExcludedPackage
(
String
packageToExclude
)
{
settings
.
setExcludedPackages
(
settings
.
getExcludedPackages
()
+
' '
+
packageToExclude
);
String
newExclusion
=
settings
.
getExcludedPackages
()
+
' '
+
packageToExclude
;
settings
.
setExcludedPackages
(
newExclusion
.
trim
());
settings
.
sync
();
}
...
...
jadx-gui/src/main/java/jadx/gui/treemodel/JPackage.java
View file @
eed762df
...
...
@@ -46,7 +46,8 @@ public class JPackage extends JNode implements Comparable<JPackage> {
private
void
setEnabled
(
JadxWrapper
wrapper
)
{
List
<
String
>
excludedPackages
=
wrapper
.
getExcludedPackages
();
this
.
enabled
=
excludedPackages
.
isEmpty
()
||
excludedPackages
.
stream
().
filter
(
p
->
!
p
.
isEmpty
()).
noneMatch
(
p
->
name
.
startsWith
(
p
));
||
excludedPackages
.
stream
().
filter
(
p
->
!
p
.
isEmpty
())
.
noneMatch
(
p
->
name
.
equals
(
p
)
||
name
.
startsWith
(
p
+
'.'
));
}
public
final
void
update
()
{
...
...
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