Skip to content

Commit

Permalink
Merge pull request #6219 from chrisrueger/6199-fix-npe
Browse files Browse the repository at this point in the history
Fix NPE by executing JavaSearchStartupParticipant.start() in Display.getCurrent()
  • Loading branch information
chrisrueger authored Aug 17, 2024
2 parents 6685956 + 90d7cbf commit 3c005d4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.eclipse.search.ui.ISearchResult;
import org.eclipse.search.ui.NewSearchUI;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
Expand All @@ -24,8 +25,11 @@ public class JavaSearchStartupParticipant implements IStartupParticipant, IQuery

@Override
public void start() {
NewSearchUI.addQueryListener(this);
createBndtoolsJavaWorkingSet();
Display.getCurrent()
.syncExec(() -> {
NewSearchUI.addQueryListener(this);
createBndtoolsJavaWorkingSet();
});
}

private void createBndtoolsJavaWorkingSet() {
Expand Down

0 comments on commit 3c005d4

Please sign in to comment.