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
9797fe5b
Commit
9797fe5b
authored
Mar 20, 2019
by
Ahmed Ashour
Committed by
skylot
Mar 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): sort resources according to their type, then name (PR #479)
parent
6d052d39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
JResource.java
jadx-gui/src/main/java/jadx/gui/treemodel/JResource.java
+9
-0
No files found.
jadx-gui/src/main/java/jadx/gui/treemodel/JResource.java
View file @
9797fe5b
...
...
@@ -3,6 +3,7 @@ package jadx.gui.treemodel;
import
javax.swing.*
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -68,6 +69,14 @@ public class JResource extends JLoadableNode implements Comparable<JResource> {
}
}
else
{
removeAllChildren
();
Comparator
<
JResource
>
typeComparator
=
(
r1
,
r2
)
->
r1
.
type
.
ordinal
()
-
r2
.
type
.
ordinal
();
Comparator
<
JResource
>
nameComparator
=
Comparator
.
comparing
(
JResource:
:
getName
,
String
.
CASE_INSENSITIVE_ORDER
);
files
.
sort
(
typeComparator
.
thenComparing
(
nameComparator
));
for
(
JResource
res
:
files
)
{
res
.
update
();
add
(
res
);
...
...
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