Project creation/deletion tests for #2636#18
Closed
basilevs wants to merge 2 commits into
Closed
Conversation
8cef843 to
155ec44
Compare
There was a problem hiding this comment.
Code Review
This pull request enhances the CloseUnrelatedProjectsActionEnablementTest by adding several new test cases to verify the enablement logic of the 'Close Unrelated Projects' action under various scenarios, such as project deletion, creation, and reopening. It also introduces a fourth test project and sets a specific workbench preference during setup. Feedback was provided regarding the need to restore global preferences after tests to ensure isolation and to correct a misleading assertion message in one of the new tests.
…ed projects After PR eclipse-platform#3871, updateSelection() only checked whether the user selection contained an open project, so the action stayed enabled even when no unrelated projects were left to close. PR eclipse-platform#3871 was needed because the prior check was triggering buildConnectedComponents() on every selection change, which calls IProject#getReferencedProjects() across the workspace and can resolve classpath containers, blocking the IDE. Cache the workspace project graph and invalidate it from resourceChanged() when project open state or description changes. The expensive graph build now runs at most once per project-state change rather than once per selection event, while updateSelection() can again ask whether any open unrelated project actually exists. Selection-time work is reduced to a non-mutating scan of the cached graph. Add CloseUnrelatedProjectsActionEnablementTest covering the regression scenario reported on PR eclipse-platform#3871: A and B linked, C unrelated; after closing C, selecting B must disable the action.
de99193 to
13b5a44
Compare
ea97f53 to
6def0aa
Compare
Author
|
|
5c4e743 to
ead5c98
Compare
13b5a44 to
8f71ec5
Compare
Author
|
moved to eclipse-platform#3954 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project creation and deletion tests.
I've also observed an attempt to close deleted project, but could not reproduce in a JUnit test.