Skip to content

Commit

Permalink
Unable to acquire the state change lock for the module 'buildship'
Browse files Browse the repository at this point in the history
Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
  • Loading branch information
snjeza authored and rgrunber committed Jul 17, 2023
1 parent 5bbc0d2 commit 6868b6b
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ public InitHandler(ProjectsManager manager, PreferenceManager preferenceManager,

@Override
public Map<?, ?> handleInitializationOptions(InitializeParams param) {
// https://github.com/redhat-developer/vscode-java/issues/3184
// start the m2e and buildship plugin before calling JavaCore.setOptions
// load maven plugin https://github.com/redhat-developer/vscode-java/issues/2088
startBundle(IMavenConstants.PLUGIN_ID);
long start = System.currentTimeMillis();
JobHelpers.waitForProjectRegistryRefreshJob();
JavaLanguageServerPlugin.logInfo("ProjectRegistryRefreshJob finished " + (System.currentTimeMillis() - start) + "ms");
// load gradle plugin https://github.com/redhat-developer/vscode-java/issues/2088
startBundle(CorePlugin.PLUGIN_ID);
Map<?, ?> initializationOptions = super.handleInitializationOptions(param);

try {
Expand Down Expand Up @@ -218,13 +227,6 @@ public void registerCapabilities(InitializeResult initializeResult) {

@Override
public void triggerInitialization(Collection<IPath> roots) {
// load maven plugin https://github.com/redhat-developer/vscode-java/issues/2088
startBundle(IMavenConstants.PLUGIN_ID);
long start = System.currentTimeMillis();
JobHelpers.waitForProjectRegistryRefreshJob();
JavaLanguageServerPlugin.logInfo("ProjectRegistryRefreshJob finished " + (System.currentTimeMillis() - start) + "ms");
// load gradle plugin https://github.com/redhat-developer/vscode-java/issues/2088
startBundle(CorePlugin.PLUGIN_ID);
// https://github.com/redhat-developer/vscode-java/issues/2763
// When starting, Java LS turn off autobuild. See JavaLanguageServerPlugin.start(BundleContext).
// In this case Eclipse schedules the AutoBuildJobOff job. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=573595#c11
Expand Down

0 comments on commit 6868b6b

Please sign in to comment.