Skip to content

Commit

Permalink
Remove automatic process tracking class
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Apr 21, 2024
1 parent 131336a commit f7fb047
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public class BootJavaConfig implements InitializingBean {

private static final Logger log = LoggerFactory.getLogger(BootJavaConfig.class);

public static final boolean LIVE_INFORMATION_AUTOMATIC_TRACKING_ENABLED_DEFAULT = false;
public static final int LIVE_INFORMATION_AUTOMATIC_TRACKING_DELAY_DEFAULT = 5000;

public static final int LIVE_INFORMATION_FETCH_DATA_RETRY_MAX_NO_DEFAULT = 10;
public static final int LIVE_INFORMATION_FETCH_DATA_RETRY_DELAY_IN_SECONDS_DEFAULT = 3;

Expand All @@ -61,16 +58,6 @@ public class BootJavaConfig implements InitializingBean {
this.workspace = server.getWorkspaceService();
}

public boolean isLiveInformationAutomaticTrackingEnabled() {
Boolean enabled = settings.getBoolean("boot-java", "live-information", "automatic-tracking", "on");
return enabled != null ? enabled.booleanValue() : LIVE_INFORMATION_AUTOMATIC_TRACKING_ENABLED_DEFAULT;
}

public int getLiveInformationAutomaticTrackingDelay() {
Integer delay = settings.getInt("boot-java", "live-information", "automatic-tracking", "delay");
return delay != null ? delay.intValue() : LIVE_INFORMATION_AUTOMATIC_TRACKING_DELAY_DEFAULT;
}

public int getLiveInformationFetchDataMaxRetryCount() {
Integer delay = settings.getInt("boot-java", "live-information", "fetch-data", "max-retries");
return delay != null ? delay.intValue() : LIVE_INFORMATION_FETCH_DATA_RETRY_MAX_NO_DEFAULT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorService;
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataProvider;
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveHoverUpdater;
import org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessTracker;
import org.springframework.ide.vscode.boot.java.requestmapping.LiveAppURLSymbolProvider;
import org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingHoverProvider;
import org.springframework.ide.vscode.boot.java.requestmapping.WebfluxHandlerCodeLensProvider;
Expand Down Expand Up @@ -114,8 +113,6 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
private DocumentSymbolHandler docSymbolProvider;
private JdtSemanticTokensHandler semanticTokensHandler;

private SpringProcessTracker liveProcessTracker;

public BootJavaLanguageServerComponents(ApplicationContext appContext) {
this.server = appContext.getBean(SimpleLanguageServer.class);
this.serverParams = appContext.getBean(BootLanguageServerParams.class);
Expand Down Expand Up @@ -153,13 +150,6 @@ public BootJavaLanguageServerComponents(ApplicationContext appContext) {
// create and handle commands
new SpringProcessCommandHandler(server, liveDataService, liveDataLocalProcessConnector, appContext.getBeansOfType(SpringProcessConnectorRemote.class).values());

// track locally running processes and automatically connect to them if configured to do so
liveProcessTracker = new SpringProcessTracker(liveDataLocalProcessConnector, Duration.ofMillis(config.getLiveInformationAutomaticTrackingDelay()));

//
//
//

SpringSymbolIndex indexer = appContext.getBean(SpringSymbolIndex.class);

docSymbolProvider = params -> indexer.getSymbols(params.getTextDocument().getUri());
Expand Down Expand Up @@ -194,9 +184,6 @@ public BootJavaLanguageServerComponents(ApplicationContext appContext) {
log.info("update live process tracker settings - start");

// live information automatic process tracking
liveProcessTracker.setDelay(config.getLiveInformationAutomaticTrackingDelay());
liveProcessTracker.setTrackingEnabled(config.isLiveInformationAutomaticTrackingEnabled());

// live information data fetch params
liveDataService.setMaxRetryCount(config.getLiveInformationFetchDataMaxRetryCount());
liveDataService.setRetryDelayInSeconds(config.getLiveInformationFetchDataRetryDelayInSeconds());
Expand Down Expand Up @@ -244,12 +231,10 @@ public Optional<DocumentSymbolHandler> getDocumentSymbolProvider() {
}

private void initialized() {
this.liveProcessTracker.start();
this.liveChangeDetectionWatchdog.start();
}

private void shutdown() {
this.liveProcessTracker.stop();
this.liveChangeDetectionWatchdog.shutdown();
this.cuCache.dispose();
}
Expand Down

This file was deleted.

0 comments on commit f7fb047

Please sign in to comment.