Commit 98bd6d89 authored by Romain Bioteau's avatar Romain Bioteau
Browse files

wait for repository initialization before starting engine

parent 4dffe133
......@@ -64,7 +64,6 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
......@@ -414,6 +413,11 @@ public class BonitaStudioWorkbenchAdvisor extends WorkbenchAdvisor implements IS
protected void doInitWorkspace() {
new WorkspaceInitializationJob(repositoryAccessor).schedule();
try {
Job.getJobManager().join(WorkspaceInitializationJob.WORKSPACE_INIT_FAMILY, monitor);
} catch (final InterruptedException e) {
BonitaStudioLog.error(e);
}
}
private void checkCurrentRepository(final IProgressMonitor monitor) {
......@@ -689,11 +693,6 @@ public class BonitaStudioWorkbenchAdvisor extends WorkbenchAdvisor implements IS
@Override
public void postStartup() {
super.postStartup();
try {
Job.getJobManager().join(WorkspaceInitializationJob.WORKSPACE_INIT_FAMILY, monitor);
} catch (final OperationCanceledException | InterruptedException e) {
BonitaStudioLog.error(e);
}
if (PlatformUI.isWorkbenchRunning()) {
sendUserInfo();
openStartupDialog();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment