added config options for change detection mechanism and changed default to disabled
This commit is contained in:
@@ -34,8 +34,11 @@ public class BootLanguageServerPreferencesPage extends FieldEditorPreferencePage
|
||||
|
||||
@Override
|
||||
protected void createFieldEditors() {
|
||||
BooleanFieldEditor editor = new BooleanFieldEditor(Constants.PREF_BOOT_HINTS, "Live Boot Hint Decorators", getFieldEditorParent());
|
||||
addField(editor);
|
||||
BooleanFieldEditor liveHintsPrefEditor = new BooleanFieldEditor(Constants.PREF_BOOT_HINTS, "Live Boot Hint Decorators", getFieldEditorParent());
|
||||
addField(liveHintsPrefEditor);
|
||||
|
||||
BooleanFieldEditor liveChangeDetectionPrefEditor = new BooleanFieldEditor(Constants.PREF_CHANGE_DETECTION, "Live Boot Change Detection", getFieldEditorParent());
|
||||
addField(liveChangeDetectionPrefEditor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,5 +19,6 @@ public class Constants {
|
||||
public static final String LANGUAGE_SERVER_VERSION = "0.3.2-SNAPSHOT.jar";
|
||||
|
||||
public static final String PREF_BOOT_HINTS = "boot-java.boot-hints.on";
|
||||
public static final String PREF_CHANGE_DETECTION = "boot-java.change-detection.on";
|
||||
|
||||
}
|
||||
|
||||
@@ -124,8 +124,13 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
|
||||
Map<String, Object> settings = new HashMap<>();
|
||||
Map<String, Object> bootJavaObj = new HashMap<>();
|
||||
Map<String, Object> bootHint = new HashMap<>();
|
||||
Map<String, Object> bootChangeDetection = new HashMap<>();
|
||||
|
||||
bootHint.put("on", BootLanguageServerPlugin.getDefault().getPreferenceStore().getBoolean(Constants.PREF_BOOT_HINTS));
|
||||
bootChangeDetection.put("on", BootLanguageServerPlugin.getDefault().getPreferenceStore().getBoolean(Constants.PREF_CHANGE_DETECTION));
|
||||
|
||||
bootJavaObj.put("boot-hints", bootHint);
|
||||
bootJavaObj.put("change-detection", bootChangeDetection);
|
||||
settings.put("boot-java", bootJavaObj);
|
||||
this.languageServer.getWorkspaceService().didChangeConfiguration(new DidChangeConfigurationParams(settings));
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public class PrefsInitializer extends AbstractPreferenceInitializer {
|
||||
@Override
|
||||
public void initializeDefaultPreferences() {
|
||||
BootLanguageServerPlugin.getDefault().getPreferenceStore().setDefault(Constants.PREF_BOOT_HINTS, true);
|
||||
BootLanguageServerPlugin.getDefault().getPreferenceStore().setDefault(Constants.PREF_CHANGE_DETECTION, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user