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

Restore the empty activity IDs #1045

Merged

Conversation

jonahgraham
Copy link
Member

In #974 I removed activities we were not using anymore, but it turns out if LaunchUtils.enableActivity is called on a removed id, strange things happen, such as other activities incorrectly being enabled. This may be a bug in platform, or just undefined behavior. But because extenders do have calls to LaunchUtils.enableActivity in their code, leave the empty activity ids behind.

Fixes #1044

In eclipse-cdt#974 I removed activities we were not using anymore, but it turns
out if LaunchUtils.enableActivity is called on a removed id, strange
things happen, such as other activities incorrectly being enabled.
This may be a bug in platform, or just undefined behavior. But because
extenders do have calls to LaunchUtils.enableActivity in their code,
leave the empty activity ids behind.

Fixes eclipse-cdt#1044
@jonahgraham
Copy link
Member Author

Concretely, this PR makes sure that the refresh button doesn't appear in the UI when it isn't enabled explicitly by the user.

@jonahgraham
Copy link
Member Author

I have figured out why this change matters. Eclipse Platform UI has an optimization where if the number of enabled activity IDs == number of properly defined activity IDs then all activities are considered enabled (link to code). This caused refresh button to be enabled because we enabled the dsfgdb id (link) but had removed the ID from the defined IDs, so we hit this optimization in platform and the refresh button (and a bunch of other things presumably) got enabled.

Copy link

Test Results

   635 files  ±0     635 suites  ±0   55m 22s ⏱️ +2s
11 417 tests ±0  11 206 ✅ ±0  143 💤 ±0  60 ❌ ±0  8 🔥 ±0 
11 455 runs  ±0  11 244 ✅ ±0  143 💤 ±0  60 ❌ ±0  8 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit 0f6e39c. ± Comparison against base commit 3439e0e.

@jonahgraham
Copy link
Member Author

Known fails from #816

@jonahgraham jonahgraham merged commit 1abb990 into eclipse-cdt:main Jan 17, 2025
4 of 5 checks passed
@jonahgraham jonahgraham deleted the fix-refresh-always-appearing branch January 17, 2025 17:09
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.

Refresh button appearing when it isn't enabled
1 participant