diff --git a/theia-extensions/theia-spring-boot/spring-boot/src/browser/boot-preferences.ts b/theia-extensions/theia-spring-boot/spring-boot/src/browser/boot-preferences.ts index b53cb2c0a..c473ddc6f 100644 --- a/theia-extensions/theia-spring-boot/spring-boot/src/browser/boot-preferences.ts +++ b/theia-extensions/theia-spring-boot/spring-boot/src/browser/boot-preferences.ts @@ -13,7 +13,6 @@ import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceCo // tslint:disable:max-line-length -export const HIGHLIGHTS_PREF_NAME = 'boot-java.boot-hints.on'; export const XML_SUPPORT_PREF_NAME = 'boot-java.support-spring-xml-config.on'; export const CODELENS_PREF_NAME = 'boot-java.highlight-codelens.on'; @@ -21,10 +20,15 @@ export const BootConfigSchema: PreferenceSchema = { 'type': 'object', 'title': 'Spring Boot Configuration', properties: { - 'boot-java.boot-hints.on': { + 'boot-java.live-information.automatic-tracking.on': { type: 'boolean', - description: 'Enable/Disable Spring running Boot application live hints decorators in Java source code.', - default: true + description: 'Live Information - Automatic Process Tracking Enabled', + default: false + }, + 'boot-java.live-information.automatic-tracking.delay': { + type: 'number', + description: 'Live Information - Automatic Process Tracking Delay in ms', + default: 5000 }, 'boot-java.scan-java-test-sources.on': { type: 'boolean', @@ -75,7 +79,8 @@ export const BootConfigSchema: PreferenceSchema = { }; export interface BootConfiguration { - 'boot-java.boot-hints.on': boolean; + 'boot-java.live-information.automatic-tracking.on': boolean; + 'boot-java.live-information.automatic-tracking.delay': number; 'boot-java.scan-java-test-sources.on': boolean; 'boot-java.support-spring-xml-config.on': boolean; 'boot-java.support-spring-xml-config.hyperlinks': boolean; diff --git a/theia-extensions/theia-spring-boot/spring-boot/src/browser/language-client-contribution.ts b/theia-extensions/theia-spring-boot/spring-boot/src/browser/language-client-contribution.ts index 0e9ecf35b..de188930f 100644 --- a/theia-extensions/theia-spring-boot/spring-boot/src/browser/language-client-contribution.ts +++ b/theia-extensions/theia-spring-boot/spring-boot/src/browser/language-client-contribution.ts @@ -20,7 +20,7 @@ import { import { DocumentSelector } from '@theia/languages/lib/browser'; import { JAVA_LANGUAGE_ID } from '@theia/java/lib/common'; import { HighlightService} from './highlight-service'; -import {BootConfiguration, BootPreferences, CODELENS_PREF_NAME, HIGHLIGHTS_PREF_NAME} from './boot-preferences'; +import {BootConfiguration, BootPreferences, CODELENS_PREF_NAME} from './boot-preferences'; import { StsLanguageClientContribution } from '@pivotal-tools/theia-languageclient/lib/browser/language-client-contribution'; import { ClasspathService } from './classpath-service'; import { HighlightCodeLensService } from './codelens-service'; @@ -69,8 +69,7 @@ export class SpringBootClientContribution extends StsLanguageClientContribution< this.javaDataService.attach(client); this.preferences.onPreferenceChanged(event => { - if (event.preferenceName === CODELENS_PREF_NAME - || event.preferenceName === HIGHLIGHTS_PREF_NAME) { + if (event.preferenceName === CODELENS_PREF_NAME) { this.toggleHighlightCodeLenses(); } }); @@ -78,7 +77,7 @@ export class SpringBootClientContribution extends StsLanguageClientContribution< } private toggleHighlightCodeLenses() { - if (this.preferences[CODELENS_PREF_NAME] && this.preferences[HIGHLIGHTS_PREF_NAME]) { + if (this.preferences[CODELENS_PREF_NAME]) { if (!this.codeLensProviderRegistration) { this.codeLensProviderRegistration = monaco.languages.registerCodeLensProvider(JAVA_LANGUAGE_ID, this.highlightCodeLensService); } diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json index def45edd6..b9bf4fc06 100644 --- a/vscode-extensions/vscode-spring-boot/package.json +++ b/vscode-extensions/vscode-spring-boot/package.json @@ -74,10 +74,15 @@ "type": "object", "title": "Boot-Java Configuration", "properties": { - "boot-java.boot-hints.on": { + "boot-java.live-information.automatic-tracking.on": { "type": "boolean", - "default": true, - "description": "Enable/Disable Spring running Boot application live hints decorators in Java source code" + "default": false, + "description": "Live Information - Automatic Process Tracking Enabled" + }, + "boot-java.live-information.automatic-tracking.delay": { + "type": "number", + "default": 5000, + "description": "Live Information - Automatic Process Tracking Delay in ms" }, "boot-java.scan-java-test-sources.on": { "type": "boolean",