Skip to content

Commit

Permalink
execute start() in Display.getCurrent()
Browse files Browse the repository at this point in the history
This hopefully fixes the NPE in org.eclipse.jface.resource.JFaceResources.getResources(Display) which expects the current display
Signed-off-by: Christoph Rueger <[email protected]>
  • Loading branch information
chrisrueger committed Aug 17, 2024
1 parent 6685956 commit 90d7cbf
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 90d7cbf

Please sign in to comment.