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

Use the new ISharedImages.get() to not require a running platform #1952

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Jan 19, 2025

Currently some actions require a running platform, but with the new
ISharedImages.get() method this is no longer required making the classes
less coupled.


I'm currently working on an automated way to fix certain warnings in the platform code. One of that kind is

Description	Resource	Path	Location	Type
Unnecessary @SuppressWarnings("restriction")	PatternFilter.java	/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util	line 33	Java Problem

but encountered a problem because currently apply this quickfix outside of a "real" IDE yields:

java.lang.IllegalStateException: Workbench has not been created yet.

because the quickfix try to fetch a shared image.

This now adds a guard around the call for a shared image to allow to proceed in this case with a (possibly not optimal) image instead of completely fail.

@laeubi laeubi force-pushed the check_if_platform_running branch from 4e77567 to 4e2cd4d Compare January 19, 2025 16:12
@laeubi laeubi force-pushed the check_if_platform_running branch from 4e2cd4d to 5a4d417 Compare January 20, 2025 08:52
@laeubi laeubi changed the title Check if platform is running in SuppressWarningsSubProcessor Use the new ISharedImages.get() to not require a running platform Jan 20, 2025
@laeubi
Copy link
Contributor Author

laeubi commented Jan 20, 2025

I triggered a new Ibuild so the changes can be seen here:

Currently some actions require a running platform, but with the new
ISharedImages.get() method this is no longer required making the classes
less coupled.
@laeubi laeubi force-pushed the check_if_platform_running branch from 5a4d417 to b62b694 Compare January 20, 2025 13:37
@laeubi
Copy link
Contributor Author

laeubi commented Jan 20, 2025

The two "new warnings" seem not related to my change @akurtakov can you review/merge?

@akurtakov
Copy link
Contributor

The 2 new deprecations seems to come from eclipse-jdt/eclipse.jdt.core#3572 so this is expected.

@akurtakov akurtakov merged commit df04e1d into eclipse-jdt:master Jan 20, 2025
7 of 10 checks passed
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.

2 participants