8000 format stackframe name with ClassName.MethodName(ParameterTypes) by testforstephen · Pull Request #73 · microsoft/java-debug · GitHub
[go: up one dir, main page]

Skip to content

format stackframe name with ClassName.MethodName(ParameterTypes)#73

Merged
testforstephen merged 4 commits intomasterfrom
jinbo_stackframe
Oct 13, 2017
Merged

format stackframe name with ClassName.MethodName(ParameterTypes)#73
testforstephen merged 4 commits intomasterfrom
jinbo_stackframe

Conversation

@testforstephen
Copy link
Contributor

Signed-off-by: Jinbo Wang jinbwan@microsoft.com

add for feature #43

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
@msftclas
Copy link

@testforstephen,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@testforstephen
Copy link
Contributor Author

image

}

private String formatMethodName(Method method, boolean showContextClass, boolean showParameter) {
String formattedName = method.name();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use StringBuilder in this method for lots of String concat

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use typeformatter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean showFullyQualifiedNames = true;
Map<String, Object> options = context.getVariableFormatter().getDefaultOptions();
if (evalArguments.format != null && evalArguments.format.hex) {
options.put(NumericFormatter.NUMERIC_FORMAT_OPTION, NumericFormatEnum.HEX);
}
if (showFullyQualifiedNames) {
options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION, showFullyQualifiedNames);
}context.getVariableFormatter().typeToString(currentValue == null ? null : currentValue.type(), options)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

andxu
andxu previously approved these changes Oct 12, 2017
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
@testforstephen testforstephen merged commit 646bfc7 into master Oct 13, 2017
@testforstephen testforstephen deleted the jinbo_stackframe branch October 13, 2017 07:11
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.

4 participants

0