-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gui): select a class via command-line to open in Jadx #658
Conversation
@@ -65,6 +67,10 @@ | |||
|
|||
private int settingsVersion = 0; | |||
|
|||
@JadxSettingsAdapter.GsonExclude | |||
@Parameter(names = { "-sc", "--select-class" }, description = "GUI: Open the selected class and show the decompiled code") | |||
private String cmdSelectClass = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add this field, it is already inherited from JadxCLIArgs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a misunderstanding. This option can not be inherited from JadxCLIArgs
because it does not exist in jadx-cli as it has no GUI to select a class.
I don't want to misuse one of the existing command-line arguments as this option is GUI only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, sorry, I thought you will use --single-class
option (easier way), but you add a new one just for jadx-gui. And now for me unclear what --single-class
will mean for jadx-gui :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not checked it but from my perspective there are other command-line options like --export-gradle
or --no-src
that should not have an effect in jadx-gui.
To make it clean there would be still the possibility to split JadxCLIArgs
into two classes, one base class for argument that affect settings settings (and as base class for JadxSettings
) and a second class that inherits base class and contains the cli-only arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right, these must be different classes.
I just too lazy and don't want to write more code and more classes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I have merged PR, but just notice that jadx-gui --help
don't show new option :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to fix this issue. See PR #660
Works only for non-inner classes