Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SWT Resource not properly disposed on LSPSymbolInWorkspaceDialog #801

Merged
merged 1 commit into from Sep 13, 2023

Conversation

ghentschke
Copy link
Contributor

fixes #800

@mickaelistria mickaelistria merged commit 3acd0d2 into eclipse:master Sep 13, 2023
2 checks passed
@mickaelistria
Copy link
Contributor

Thanks!

@@ -56,10 +57,13 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
if (site == null) {
return null;
}
final var dialog = new LSPSymbolInWorkspaceDialog(site.getShell(), project);
var styleProvider = new BoldStylerProvider(site.getShell().getFont());
final var dialog = new LSPSymbolInWorkspaceDialog(site.getShell(), project, styleProvider);
if (dialog.open() != IDialogConstants.OK_ID) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about

int code = dialog.open();
styleProvider.dispose();
if (code != IDialogConstants.OK_ID) {
	return null;
}

then we do not need to repeat the dispose call in both branches

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See PR #803

@ghentschke ghentschke deleted the fix-property-disposed-bug branch September 13, 2023 13:25
ghentschke added a commit to ghentschke/lsp4e-bachmann-fixes that referenced this pull request Sep 13, 2023
rubenporras pushed a commit that referenced this pull request Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SWT Resource not properly disposed when LSPSymbolInWorkspaceDialog gets closed
3 participants