diff --git a/package.json b/package.json index 9c75a74d..25498336 100644 --- a/package.json +++ b/package.json @@ -253,12 +253,14 @@ { "command": "java.project.explorer.showNonJavaResources", "title": "%contributes.commands.java.project.explorer.showNonJavaResources%", - "category": "Java" + "category": "Java", + "icon": "$(eye)" }, { "command": "java.project.explorer.hideNonJavaResources", "title": "%contributes.commands.java.project.explorer.hideNonJavaResources%", - "category": "Java" + "category": "Java", + "icon": "$(eye-closed)" }, { "command": "java.view.package.revealFileInOS", @@ -754,12 +756,12 @@ { "command": "java.project.explorer.showNonJavaResources", "when": "view == javaProjectExplorer && java:serverMode == Standard && !config.java.project.explorer.showNonJavaResources", - "group": "overflow_10@30" + "group": "navigation@40" }, { "command": "java.project.explorer.hideNonJavaResources", "when": "view == javaProjectExplorer && java:serverMode == Standard && config.java.project.explorer.showNonJavaResources", - "group": "overflow_10@30" + "group": "navigation@40" }, { "command": "java.project.rebuild.workspace", diff --git a/test/e2e-plans/java-dep-view-modes.yaml b/test/e2e-plans/java-dep-view-modes.yaml index 85ff1ee5..5bd1808c 100644 --- a/test/e2e-plans/java-dep-view-modes.yaml +++ b/test/e2e-plans/java-dep-view-modes.yaml @@ -182,11 +182,9 @@ steps: - id: "hide-non-java" action: 'clickViewTitleAction "Java Projects" "Hide Non-Java Resources"' - # Real UI path through view-title overflow menu. The menu item label - # toggles based on `config.java.project.explorer.showNonJavaResources` - # (Show vs Hide), and the current state at this point is "showing" - # so the menu surfaces "Hide Non-Java Resources". verifyTreeItem - # checks below are authoritative. + # Direct view-title toolbar action. Its label and icon toggle based on + # `config.java.project.explorer.showNonJavaResources`; the current state + # is "showing", so the toolbar surfaces "Hide Non-Java Resources". - id: "wait-hide" action: "wait 5 seconds" @@ -203,9 +201,8 @@ steps: # ── Test 5: show non-Java resources ── - id: "show-non-java" action: 'clickViewTitleAction "Java Projects" "Show Non-Java Resources"' - # Real UI path through view-title overflow menu. After hide-non-java - # the toggle now surfaces "Show Non-Java Resources". verifyTreeItem - # below is authoritative. + # After hide-non-java, the same toolbar position surfaces + # "Show Non-Java Resources". - id: "wait-show" action: "wait 5 seconds"