add additional debug output to identify the issue behind GH #413
This commit is contained in:
@@ -174,16 +174,21 @@ public class SpringSymbolIndex implements InitializingBean {
|
||||
this.updateDocument(docURI, content, "didSave event");
|
||||
}
|
||||
});
|
||||
config.addListener(evt ->
|
||||
|
||||
config.addListener(evt -> {
|
||||
log.info("update settings of spring indexer - start");
|
||||
|
||||
server.getAsync().execute(() ->
|
||||
configureIndexer(SymbolIndexConfig.builder()
|
||||
.scanXml(config.isSpringXMLSupportEnabled())
|
||||
.xmlScanFolders(config.xmlBeansFoldersToScan())
|
||||
.scanTestJavaSources(config.isScanJavaTestSourcesEnabled())
|
||||
.build()
|
||||
)
|
||||
)
|
||||
);
|
||||
configureIndexer(SymbolIndexConfig.builder()
|
||||
.scanXml(config.isSpringXMLSupportEnabled())
|
||||
.xmlScanFolders(config.xmlBeansFoldersToScan())
|
||||
.scanTestJavaSources(config.isScanJavaTestSourcesEnabled())
|
||||
.build()
|
||||
));
|
||||
|
||||
log.info("update settings of spring indexer - done");
|
||||
});
|
||||
|
||||
server.doOnInitialized(this::serverInitialized);
|
||||
server.onShutdown(this::shutdown);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.lsp4j.CompletionItemKind;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.boot.app.BootJavaConfig;
|
||||
import org.springframework.ide.vscode.boot.app.BootLanguageServerParams;
|
||||
import org.springframework.ide.vscode.boot.app.SpringSymbolIndex;
|
||||
@@ -95,6 +97,8 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
|
||||
// Do not add more components here. You should instead just make your new
|
||||
// components into separate beans.
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BootJavaLanguageServerComponents.class);
|
||||
|
||||
public static final Set<LanguageId> LANGUAGES = ImmutableSet.of(LanguageId.JAVA, LanguageId.CLASS);
|
||||
|
||||
private final SimpleLanguageServer server;
|
||||
@@ -195,6 +199,8 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
|
||||
documents.onDocumentHighlight(highlightsEngine);
|
||||
|
||||
config.addListener(ignore -> {
|
||||
log.info("update live process tracker settings - start");
|
||||
|
||||
// live information automatic process tracking
|
||||
liveProcessTracker.setDelay(config.getLiveInformationAutomaticTrackingDelay());
|
||||
liveProcessTracker.setTrackingEnabled(config.isLiveInformationAutomaticTrackingEnabled());
|
||||
@@ -210,6 +216,8 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
|
||||
else {
|
||||
liveChangeDetectionWatchdog.disableHighlights();
|
||||
}
|
||||
|
||||
log.info("update live process tracker settings - done");
|
||||
});
|
||||
|
||||
server.doOnInitialized(this::initialized);
|
||||
|
||||
@@ -166,6 +166,8 @@ public class SpringProcessConnectorRemote {
|
||||
}
|
||||
|
||||
private synchronized void handleSettings(Settings settings) {
|
||||
logger.info("updating settings for remote processses to track - start");
|
||||
|
||||
RemoteBootAppData[] appData = settings.getAs(RemoteBootAppData[].class, "boot-java", "remote-apps");
|
||||
if (appData == null) {
|
||||
//Avoid NPE
|
||||
@@ -199,6 +201,8 @@ public class SpringProcessConnectorRemote {
|
||||
return processKey;
|
||||
});
|
||||
}
|
||||
|
||||
logger.info("updating settings for remote processses to track - done");
|
||||
}
|
||||
|
||||
public static String getProcessName(RemoteBootAppData appData) {
|
||||
|
||||
@@ -46,6 +46,7 @@ import reactor.core.publisher.Mono;
|
||||
|
||||
public class JdtLsProjectCache implements InitializableJavaProjectsService {
|
||||
|
||||
private static final Duration INITIALIZE_TIMEOUT = Duration.ofSeconds(10);
|
||||
private static final Object JDT_SCHEME = "jdt";
|
||||
|
||||
private final boolean IS_JANDEX_INDEX;
|
||||
@@ -256,7 +257,7 @@ public class JdtLsProjectCache implements InitializableJavaProjectsService {
|
||||
});
|
||||
}
|
||||
})
|
||||
.timeout(Duration.ofSeconds(5))
|
||||
.timeout(INITIALIZE_TIMEOUT)
|
||||
.doOnError(t -> {
|
||||
if (isNoJdtError(t)) {
|
||||
log.info("JDT Language Server not available. Fallback classpath provider will be used instead.");
|
||||
|
||||
Reference in New Issue
Block a user