diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 415e2ae4..40db89e2 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -17,21 +17,21 @@ jobs:
java: [ '8', '11', '17' ] # LTS versions
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Extract Maven project version
- run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+ run: echo "bcv_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: project
- name: 'Upload Artifact'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
if: ${{ matrix.java == '8' }}
with:
- name: Bytecode-Viewer-${{ steps.project.outputs.version }}-SNAPSHOT
- path: target/Bytecode-Viewer-${{ steps.project.outputs.version }}.jar
+ name: Bytecode-Viewer-${{ env.bcv_version }}-SNAPSHOT
+ path: target/Bytecode-Viewer-${{ env.bcv_version }}.jar
retention-days: 90
diff --git a/pom.xml b/pom.xml
index 1055c328..a90abcdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,38 +16,38 @@
23.0.0
4.9.3
2.6.1
- 9.3
+ 9.4
0.2.0
1.0bcv
0.152
1.9.12
1.5.0
1.15
- 3.1.7
+ 3.1.8
1.21
2.11.0
3.12.0
- 1.9
- 3.0.1-SNAPSHOT
+ 1.10.0
+ 3.0.2
0.4.1
- 5.2.1.Final
- v49
- 1.8.1
- 2.9.0
+ 6.0.0.Final
+ v56
+ 1.9.0
+ 2.9.1
31.1-jre
4.2
- 1.3.5
+ 1.4.4
1.6.6bcv
3.4.1.3
21.2.0
- 3.2
+ 3.3
0.2.0
0.6.0
- 3.2.0
+ 3.3.0
2.1.1
- 1.7.36
+ 2.0.3
2.5.2
- 1.30
+ 1.33
1.0.3
0.2.2
1.1.4c
@@ -384,7 +384,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.9.0
+ 3.10.1
${maven.compiler.target}
@@ -394,7 +394,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.3.1
+ 3.4.0
@@ -425,6 +425,26 @@
META-INF/MANIFEST.MF
+
+
+ com.github.ThexXTURBOXx.dex2jar:d2j-external
+ true
+
+ com/android/**
+ api_database/**
+ META-INF/services/**
+ LICENSE
+ r8-version.properties
+ org/objectweb/asm/MethodWriter.class
+
+
+
+
+ org.ow2.asm:asm
+
+ org/objectweb/asm/MethodWriter.class
+
+
userObjectToChildMap = null;
public ResourceTreeNode(final Object o)
{
@@ -41,6 +45,7 @@ public class ResourceTreeNode extends DefaultMutableTreeNode
public void insert(final MutableTreeNode newChild, final int childIndex)
{
super.insert(newChild, childIndex);
+ addToMap((ResourceTreeNode) newChild);
}
public void sort()
@@ -60,7 +65,83 @@ public class ResourceTreeNode extends DefaultMutableTreeNode
}
}
}
-
+
+ @Override
+ public void add(MutableTreeNode newChild) {
+ super.add(newChild);
+ addToMap((ResourceTreeNode) newChild);
+ }
+
+ private void addToMap(ResourceTreeNode newChild) {
+ if (userObjectToChildMap != null)
+ {
+ userObjectToChildMap.put(newChild.getUserObject(), newChild);
+ }
+ else if (getChildCount() == CHILD_MAP_BUILD_THRESHOLD)
+ {
+ buildMap();
+ }
+ }
+
+ private void buildMap() {
+ userObjectToChildMap = new HashMap<>();
+
+ for (int i = 0, childCount = getChildCount(); i < childCount; i++)
+ {
+ ResourceTreeNode item = (ResourceTreeNode) getChildAt(i);
+ userObjectToChildMap.put(item.getUserObject(), item);
+ }
+ }
+
+ @Override
+ public void remove(int childIndex) {
+ if (userObjectToChildMap != null)
+ {
+ TreeNode childAt = getChildAt(childIndex);
+ userObjectToChildMap.remove(((ResourceTreeNode) childAt).getUserObject());
+ }
+
+ super.remove(childIndex);
+ }
+
+ @Override
+ public void remove(MutableTreeNode aChild) {
+ if (userObjectToChildMap != null && aChild != null)
+ {
+ userObjectToChildMap.remove(((ResourceTreeNode) aChild).getUserObject());
+ }
+
+ super.remove(aChild);
+ }
+
+ @Override
+ public void removeAllChildren() {
+ if (userObjectToChildMap != null)
+ {
+ userObjectToChildMap.clear();
+ }
+
+ super.removeAllChildren();
+ }
+
+ public ResourceTreeNode getChildByUserObject(Object userObject) {
+ if (userObjectToChildMap != null)
+ {
+ return userObjectToChildMap.get(userObject);
+ }
+
+ for (int i = 0, childCount = getChildCount(); i < childCount; i++)
+ {
+ ResourceTreeNode child = (ResourceTreeNode) getChildAt(i);
+ if (child.getUserObject().equals(userObject))
+ {
+ return child;
+ }
+ }
+
+ return null;
+ }
+
protected Comparator nodeComparator = new Comparator()
{
@Override