★ wanayoo — archive 1999 https://github.com/microsoft/java-debug/pull/94Nouvelle recherche | Portail wanayoo
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

add user settings #94

Merged
merged 17 commits into from Nov 9, 2017
Merged

add user settings #94

merged 17 commits into from Nov 9, 2017

Conversation

@andxu
Copy link
Collaborator

@andxu andxu commented Nov 6, 2017

No description provided.

@andxu andxu requested review from ansyral, testforstephen and yaohaizh Nov 6, 2017
@@ -32,6 +33,8 @@

public static String CONFIG_LOG_LEVEL = "vscode.java.configLogLevel";

public static String UPDATE_USER_SETTINGS = "vscode.java.updateUserSettings";

This comment has been minimized.

@akaroml

akaroml Nov 6, 2017
Member

We need to not confuse the user by providing the command vscode.java.updateUserSetting. It's actually debugger settings. So suggest making it "vscode.java.updateDebuggerSettings".

@@ -26,7 +26,7 @@

public class StringObjectFormatter extends ObjectFormatter implements IValueFormatter {
public static final String MAX_STRING_LENGTH_OPTION = "max_string_length";
private static final int DEFAULT_MAX_STRING_LENGTH = 100;
private static final int DEFAULT_MAX_STRING_LENGTH = 200;

This comment has been minimized.

@akaroml

akaroml Nov 6, 2017
Member

Can I understand why 100 -> 200?

This comment has been minimized.

@andxu

andxu Nov 7, 2017
Author Collaborator

the default length is the length most users saw, the 100 is too small for normal cases like connections string, path, I would advise to use 256.

if (showFullyQualifiedNames) {
options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION, showFullyQualifiedNames);
}
VariableUtils.applyFormatterOptions(options, evalArguments.format != null && evalArguments.format.hex,

This comment has been minimized.

@akaroml

akaroml Nov 6, 2017
Member

Do we need to apply the formatter options every time a evaluate request is processed? If the options stay inside VadiableUtils, then we can call it when a user actually changes the settings.

This comment has been minimized.

@andxu

andxu Nov 7, 2017
Author Collaborator

The condition for generating options is also influenced by argument, not only user settings.

if (showFullyQualifiedNames) {
options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION, showFullyQualifiedNames);
}
VariableUtils.applyFormatterOptions(options, varArgs.format != null && varArgs.format.hex, false);

This comment has been minimized.

@akaroml

akaroml Nov 6, 2017
Member

Same here, do we really need to apply settings during processing a request?

andxu added 8 commits Nov 7, 2017
Object valueObj = map.get(keyStr);
try {
switch (keyStr) {
case "show_hex":

This comment has been minimized.

@testforstephen

testforstephen Nov 8, 2017
Contributor

Not consistent with the key on vscode user settings.


public final class UserSettings {
private static final Logger logger = Logger.getLogger(Configuration.LOGGER_NAME);
public static int maxStringLength = 0;

This comment has been minimized.

@yaohaizh

yaohaizh Nov 8, 2017

Not sure if it is a good idea to expose the (static) fields directly.

@andxu andxu dismissed stale reviews from akaroml and ansyral via 681f7d0 Nov 9, 2017
@andxu andxu dismissed stale reviews from yaohaizh and testforstephen via 681f7d0 Nov 9, 2017
@akaroml
akaroml approved these changes Nov 9, 2017
@andxu andxu merged commit 330802a into master Nov 9, 2017
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
license/cla All CLA requirements met.
Details
@andxu andxu deleted the andy_user_settings2 branch Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.