Skip to content

Commit 1226891

Browse files
authored
Postpone wait for build job (#2527)
Signed-off-by: Snjezana Peco <[email protected]>
1 parent 963dffa commit 1226891

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ public void initialized(InitializedParams params) {
272272
@Override
273273
public IStatus run(IProgressMonitor monitor) {
274274
try {
275-
JobHelpers.waitForBuildJobs(60 * 60 * 1000); // 1 hour
276-
logInfo(">> build jobs finished");
277275
workspaceDiagnosticsHandler = new WorkspaceDiagnosticsHandler(JDTLanguageServer.this.client, pm, preferenceManager.getClientPreferences(), documentLifeCycleHandler);
278-
workspaceDiagnosticsHandler.publishDiagnostics(monitor);
279276
workspaceDiagnosticsHandler.addResourceChangeListener();
280277
classpathUpdateHandler = new ClasspathUpdateHandler(JDTLanguageServer.this.client);
281278
classpathUpdateHandler.addElementChangeListener();
@@ -295,6 +292,9 @@ public IStatus run(IProgressMonitor monitor) {
295292
pm.projectsImported(monitor);
296293

297294
IndexUtils.copyIndexesToSharedLocation();
295+
JobHelpers.waitForBuildJobs(60 * 60 * 1000); // 1 hour
296+
logInfo(">> build jobs finished");
297+
workspaceDiagnosticsHandler.publishDiagnostics(monitor);
298298
} catch (OperationCanceledException | CoreException e) {
299299
logException(e.getMessage(), e);
300300
return Status.CANCEL_STATUS;

0 commit comments

Comments
 (0)