Skip to content

Improve Open/Close Project visibility in Project Explorer for mixed selections #3790

@vogella

Description

@vogella

Current behavior:
"Open Project" and "Close Project" disappear from the context menu if the selection contains any element not adaptable to
IResource or IWorkingSet. The enablement expression requires all selected elements to match.

Problem:
Selecting all items via Ctrl+A in a workspace with non-resource elements (e.g., working set headers) hides these actions entirely.
This blocks the common workflow of selecting everything and using "Close Project" to close all projects — especially since users
cannot easily tell which projects are expanded in large workspaces.

Proposed change:

  • Show the actions if any element in the selection adapts to the required types
  • Operate only on the matching project elements, ignoring non-applicable items

Affected code:

  • ResourceMgmtActionProvider enablement in bundles/org.eclipse.ui.navigator.resources/plugin.xml
  • ResourceMgmtActionProvider.selectionToProjects() already filters to projects — the action logic should work without changes

cc @merks WDYT? Now that we starting to make the IDE use better defaults, this is something I find contra-intuitive

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions