IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
47 stars 25 forks source link

Userbuild commands still showing in context menu even if userbuild is disabled #347

Closed oseam87 closed 1 year ago

oseam87 commented 1 year ago

Development environment used

Problem Description

These items shouldn't be visible in the right-click context menu when userbuild is disabled:

"Run IBM User Build" "Run IBM User Build with full upload" "Run setup for IBM User Build"

There is probably a bug in the when clause of the menus.

FALLAI-Denis commented 1 year ago

Hi,

Missing parentheses in package.json menus - editor/context?

{
  "command": "extension.userbuild",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm",
  "group": "zopeneditor@2"
},
{
  "command": "extension.setup",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm",
  "group": "zopeneditor@1"
},
{
  "command": "extension.full-userbuild",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm",
  "group": "zopeneditor@3"
}

Should be:

{
  "command": "extension.userbuild",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && (resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm)",
  "group": "zopeneditor@2"
},
{
  "command": "extension.setup",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && (resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm)",
  "group": "zopeneditor@1"
},
{
  "command": "extension.full-userbuild",
  "when": "!zopeneditor.isVSCodeWeb && config.zopeneditor.userbuild.enabled && (resourceLangId == cobol || resourceLangId == pl1 || resourceLangId == hlasm)",
  "group": "zopeneditor@3"
}

Same in commandPalette.

phaumer commented 1 year ago

Fixed in Z Open Editor 3.2.0.