-
Notifications
You must be signed in to change notification settings - Fork 8
feat: support project-specific additional parameters #243
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: support project-specific additional parameters #243
Conversation
@@ -13,8 +13,8 @@ | |||
import io.snyk.languageserver.LsRuntimeEnvironment; | |||
|
|||
public class Preferences { | |||
static Preferences CURRENT_PREFERENCES; | |||
static LsRuntimeEnvironment LS_RUNTIME_ENV = new LsRuntimeEnvironment(); | |||
public static Preferences CURRENT_PREFERENCES; |
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.
double check why we need this as public
return param; | ||
} | ||
|
||
// returns null if nothing found |
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.
delete comment
public void addFolderConfig(FolderConfig folderConfig) { | ||
instancePreferences.put(folderConfig.getFolderPath(), gson.toJson(folderConfig)); | ||
try { | ||
instancePreferences.flush(); |
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.
use persist here
} | ||
|
||
public void addFolderConfig(FolderConfig folderConfig) { | ||
instancePreferences.put(folderConfig.getFolderPath(), gson.toJson(folderConfig)); |
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.
skip serialization
|
||
public void addAll(List<FolderConfig> folderConfigs) { | ||
for (FolderConfig folderConfig : folderConfigs) { | ||
addFolderConfig(folderConfig); |
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.
nitpick this will call persist for every entry. maybe we can batch them
Description
Checklist
Screenshots / GIFs