Skip to content
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

Merged
merged 2 commits into from
May 10, 2019

Conversation

jpstotz
Copy link
Collaborator

@jpstotz jpstotz commented May 9, 2019

Works only for non-inner classes

@@ -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;
Copy link
Owner

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

Copy link
Collaborator Author

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.

Copy link
Owner

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 :)

Copy link
Collaborator Author

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.

Copy link
Owner

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 :)

Copy link
Owner

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 :(

Copy link
Collaborator Author

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

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants