Conversation
# Conflicts: # jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
|
@MrIkso If your work bases on hexcellent we should check the license of hexcellent if it is compatible. Unfortunately I wasn't able to find a license statement in that project. |
Hello. I found this information in the Terms of Use on their website https://www.kreativekorp.com/aboutkk/, but I've just written e-mail for check if I can use their code in this project and wait for an exact answer. P.S If the current implementation is incompatible, im found new hexview library with Apache-2.0 license on this project, |
jadx-gui/src/main/java/jadx/gui/ui/hexeditor/buffer/ArrayByteBuffer.java
Fixed
Show fixed
Hide fixed
jadx-gui/src/main/java/jadx/gui/ui/hexeditor/buffer/ArrayByteBuffer.java
Fixed
Show fixed
Hide fixed
# Conflicts: # jadx-gui/src/main/java/jadx/gui/ui/codearea/HexArea.java # jadx-gui/src/main/java/jadx/gui/ui/codearea/HexPreviewPanel.java
|
I not got an answer on hexcellent, so now I'm reworking the code using the bined library as it's even better. |
| } | ||
|
|
||
| public void performCopyAsCode() { | ||
| ((CodeAreaOperationCommandHandler) hexCodeArea.getCommandHandler()).copyAsCode(); |
There was a problem hiding this comment.
This cast here should be to "DefaultCodeAreaCommandHandler" instead.
This will also allow to remove "org.exbin.bined:bined-operation-swing" library dependency. (Operation library adds undo-redo support, which I assume is not needed for JADX)
Also if you would replace all uses of "section.SectCodeArea" class with "basic.CodeArea", you could drop dependency on "org.exbin.bined:bined-swing-section" as you don't use theme/layout capabilities of this extension.
There was a problem hiding this comment.
you don't use theme/layout capabilities
public SectionCodeAreaColorProfile getColorsProfile() {
boolean isDarkTheme = UiUtils.isDarkTheme(Objects.requireNonNull(defaultColors.getColor(CodeAreaBasicColors.TEXT_BACKGROUND)));
Color markAllHighlightColor = isDarkTheme ? Color.decode("#32593D") : Color.decode("#ffc800");
Color currentMatchColor = defaultColors.getColor(CodeAreaBasicColors.SELECTION_BACKGROUND);
defaultColors.setColor(CodeAreaMatchColorType.MATCH_BACKGROUND, markAllHighlightColor);
defaultColors.setColor(CodeAreaMatchColorType.CURRENT_MATCH_BACKGROUND, currentMatchColor);
return defaultColors;
}
im used replace exits search colors, BasicCodeAreaColorsProfile dont have it
jadx-gui/src/main/java/jadx/gui/ui/hexviewer/search/service/BinarySearchServiceImpl.java
Fixed
Show fixed
Hide fixed
jadx-gui/src/main/java/jadx/gui/ui/hexviewer/search/service/BinarySearchServiceImpl.java
Fixed
Show fixed
Hide fixed
|
@MrIkso looks good, but this PR is big, so review may take some time. During quick check, I encounter an issue in "find" panel: just start typing some hex number and exception window will appear after you type one character: java.lang.IllegalArgumentException: Hex string must have even length. Input length: 1
at jadx.gui.ui.hexviewer.HexSearchBar.hexStringToByteArray(HexSearchBar.java:268)
at jadx.gui.ui.hexviewer.HexSearchBar.makeSearchCondition(HexSearchBar.java:244)
at jadx.gui.ui.hexviewer.HexSearchBar.getSearchParameters(HexSearchBar.java:228)
at jadx.gui.ui.hexviewer.search.BinarySearch.invokeSearch(BinarySearch.java:190)
at jadx.gui.ui.hexviewer.search.BinarySearch$2.performFind(BinarySearch.java:108)
at jadx.gui.ui.hexviewer.HexSearchBar$1.keyReleased(HexSearchBar.java:75)
at java.desktop/java.awt.Component.processKeyEvent(Component.java:6587)We need to disable search if input is invalid. Also, maybe it will be nice to change tooltip for |
|
@skylot oh yes, im try fix and improve tooltip |
| findTypeCB.setToolTipText(NLS.str("search.find_type_hex")); | ||
| } | ||
|
|
||
| private boolean isValidHexSting(String hexSting) { |
|
|
||
| private boolean isValidHexSting(String hexSting) { | ||
| String cleanS = hexSting.replace(" ", ""); | ||
| private boolean isValidHexSting(String hexString) { |
There was a problem hiding this comment.
"Sting" typo still present in method name... It's probably fine, I'm not even reviewer so don't mind me...
There was a problem hiding this comment.
"Sting" typo still present in method name... It's probably fine, I'm not even reviewer so don't mind me...
thanks
|
@MrIkso thank you for your work 👍 |
This PRs added new HexViewer. (Fixed #2415)
New HexViewer has this features:
For this developments used bined project and adapted for jadx
Preview