-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor, improve performance and fix some issues in resource pr…
…ocessing fix(gui): instead gradle export was executed normal export fix(gui): content of some resource files was not shown perf: direct resource files saving without full length buffer in memory perf(gui): line numbers will be disabled on big files due to performance issue feat(gui): click on HeapUsageBar will run GC and update memory info feat(gui): add more file types for syntax highlights refactor: ResContainer class changed for support more types of data (added link to resource file)
- Loading branch information
Showing
18 changed files
with
342 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
package jadx.api; | ||
|
||
import jadx.core.codegen.CodeWriter; | ||
import jadx.core.utils.files.ZipSecurity; | ||
import jadx.core.xmlgen.ResContainer; | ||
|
||
public class ResourceFileContent extends ResourceFile { | ||
|
||
private final CodeWriter content; | ||
|
||
private ResourceFileContent(String name, ResourceType type, CodeWriter content) { | ||
public ResourceFileContent(String name, ResourceType type, CodeWriter content) { | ||
super(null, name, type); | ||
this.content = content; | ||
} | ||
|
||
@Override | ||
public ResContainer loadContent() { | ||
return ResContainer.singleFile(getName(), content); | ||
} | ||
|
||
public static ResourceFileContent createResourceFileContentInstance(String name, ResourceType type, CodeWriter content) { | ||
if (!ZipSecurity.isValidZipEntryName(name)) { | ||
return null; | ||
} | ||
return new ResourceFileContent(name, type, content); | ||
return ResContainer.textResource(getName(), content); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.