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

Force use shortnames #48

Open
Sputuks3 opened this issue Apr 29, 2015 · 6 comments
Open

Force use shortnames #48

Sputuks3 opened this issue Apr 29, 2015 · 6 comments

Comments

@Sputuks3
Copy link

Is there a switch I can use to force the use of shortnames instead of fully qualified names when referring to non-object references? For example, I want View v instead of android.view.View v

@Storyyeller
Copy link
Owner

Not currently. The easiest way to do that would be to go to ast.py where it says

        if name.rpartition('.')[0] == 'java.lang':
            name = name.rpartition('.')[2]

And remove the if statement (i.e. just put name = name.rpartition('.')[2]).

I'm not sure if it's useful enough to warrant adding as a commandline option.

@Sputuks3
Copy link
Author

Sputuks3 commented May 3, 2015

It would. Because there are times when this switch is needed. Ex. when obfuscation is used.

@Storyyeller
Copy link
Owner

Wouldn't obfuscation be the worst time for short names? Since in that case you'd typically have tons of different classes named a.

@Sputuks3
Copy link
Author

Sputuks3 commented May 4, 2015

That's my point. Turned on by default with the option of turning it off when confident obfuscation is not used, as determined by user. Commenting and un-commenting the if statement is a cause of subtle bugs especially when a recompilation does not occur to overwrite.

@Sputuks3 Sputuks3 closed this as completed May 4, 2015
@Sputuks3 Sputuks3 reopened this May 4, 2015
@Storyyeller
Copy link
Owner

It seems to me like having it off by default would be more useful.

@Konloch
Copy link

Konloch commented Jul 6, 2015

In my opinion it should be the fully qualified name by default, however it would be useful if there was a command line flag to toggle it.

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

No branches or pull requests

3 participants