Skip to content

Commit

Permalink
Add Filesystem API to jars
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurm1 committed Jun 11, 2022
1 parent 2a241a8 commit eb2c7e5
Show file tree
Hide file tree
Showing 6 changed files with 344 additions and 92 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ module.exports = {
{ ignoreRestArgs: true },
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-unused-vars": [
"error",
{ varsIgnorePattern: "_" },
],
"@typescript-eslint/no-non-null-assertion": "error",
"guard-for-in": "error",
"no-var": "error",
Expand Down
48 changes: 29 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
{
"id": "java",
"extensions": [
".cfr"
".cfr",
".class"
]
},
{
Expand Down Expand Up @@ -407,6 +408,11 @@
"category": "Metals",
"title": "Run doctor"
},
{
"command": "metals.show-libraries-folder",
"category": "Metals",
"title": "Show libraries folder in file explorer"
},
{
"command": "metals.show-tasty",
"category": "Metals",
Expand Down Expand Up @@ -561,33 +567,37 @@
}
],
"commandPalette": [
{
"command": "metals.show-libraries-folder",
"when": "metals:enabled"
},
{
"command": "metals.show-tasty",
"when": "metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.tasty || metals:enabled && resourceExtname==.tasty-decoded"
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceExtname==.tasty-decoded"
},
{
"command": "metals.show-cfr",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class || metals:enabled && resourceExtname==.cfr"
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceExtname==.cfr"
},
{
"command": "metals.show-javap",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class || metals:enabled && resourceExtname==.javap"
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resourceExtname==.javap"
},
{
"command": "metals.show-javap-verbose",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class || metals:enabled && resourceExtname==.javap-verbose"
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resourceExtname==.javap-verbose"
},
{
"command": "metals.show-semanticdb-compact",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb || metals:enabled && resourceExtname==.semanticdb-compact"
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb-compact"
},
{
"command": "metals.show-semanticdb-detailed",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb || metals:enabled && resourceExtname==.semanticdb-detailed"
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb-detailed"
},
{
"command": "metals.show-semanticdb-proto",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb || metals:enabled && resourceExtname==.semanticdb-proto"
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb-proto"
},
{
"command": "metals.reveal-active-file",
Expand Down Expand Up @@ -647,11 +657,11 @@
},
{
"command": "metals.new-scala-file",
"when": "metals:enabled"
"when": "metals:enabled && resourceScheme != metalsfs"
},
{
"command": "metals.new-java-file",
"when": "metals:enabled"
"when": "metals:enabled && resourceScheme != metalsfs"
},
{
"command": "metals.new-scala-project",
Expand Down Expand Up @@ -685,12 +695,12 @@
"explorer/context": [
{
"command": "metals.new-scala-file",
"when": "metals:enabled",
"when": "metals:enabled && resourceScheme != metalsfs",
"group": "navigation@1"
},
{
"command": "metals.new-java-file",
"when": "metals:enabled",
"when": "metals:enabled && resourceScheme != metalsfs",
"group": "navigation@2"
},
{
Expand All @@ -702,37 +712,37 @@
"metals.analyze": [
{
"command": "metals.show-tasty",
"when": "metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.tasty || metals:enabled && resourceExtname==.tasty-decoded",
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceExtname==.tasty || metals:enabled && resourceExtname==.tasty-decoded",
"group": "metals-1@1"
},
{
"command": "metals.show-cfr",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class",
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceScheme != metalsfs && resourceExtname==.class",
"group": "metals-2@1"
},
{
"command": "metals.show-javap",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class",
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceExtname==.class",
"group": "metals-3@1"
},
{
"command": "metals.show-javap-verbose",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.class",
"when": "metals:enabled && resourceScheme != metalsfs && resourceExtname==.java || metals:enabled && resourceScheme != metalsfs && resourceExtname==.scala || metals:enabled && resourceExtname==.class",
"group": "metals-3@2"
},
{
"command": "metals.show-semanticdb-compact",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resource ~= ///.metals//readonly/// && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb",
"group": "metals-4@1"
},
{
"command": "metals.show-semanticdb-detailed",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resource ~= ///.metals//readonly/// && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb",
"group": "metals-4@2"
},
{
"command": "metals.show-semanticdb-proto",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceExtname==.semanticdb",
"when": "metals:enabled && resourceExtname==.java || metals:enabled && resourceExtname==.scala || metals:enabled && resourceScheme == metalsfs && resourceExtname==.class || metals:enabled && resource ~= ///.metals//readonly/// && resourceExtname==.class || metals:enabled && resourceExtname==.semanticdb",
"group": "metals-4@3"
}
],
Expand Down
Loading

0 comments on commit eb2c7e5

Please sign in to comment.