diff --git a/package-lock.json b/package-lock.json
index 9d4a5ca3..7b16dbb6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -108,9 +108,9 @@
"dev": true
},
"@types/vscode": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.41.0.tgz",
- "integrity": "sha512-7SfeY5u9jgiELwxyLB3z7l6l/GbN9CqpCQGkcRlB7tKRFBxzbz2PoBfGrLxI1vRfUCIq5+hg5vtDHExwq5j3+A==",
+ "version": "1.43.0",
+ "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.43.0.tgz",
+ "integrity": "sha512-kIaR9qzd80rJOxePKpCB/mdy00mz8Apt2QA5Y6rdrKFn13QNFNeP3Hzmsf37Bwh/3cS7QjtAeGSK7wSqAU0sYQ==",
"dev": true
},
"@webassemblyjs/ast": {
@@ -622,38 +622,6 @@
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
- },
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
}
},
"argparse": {
@@ -3993,13 +3961,13 @@
}
},
"globule": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
- "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz",
+ "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==",
"dev": true,
"requires": {
"glob": "~7.1.1",
- "lodash": "~4.17.10",
+ "lodash": "~4.17.12",
"minimatch": "~3.0.2"
}
},
@@ -4644,13 +4612,10 @@
"dev": true
},
"is-finite": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
- "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
+ "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
+ "dev": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
@@ -4808,9 +4773,9 @@
"dev": true
},
"js-base64": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
- "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz",
+ "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==",
"dev": true
},
"js-stringify": {
@@ -4907,9 +4872,9 @@
"dev": true
},
"kind-of": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true
},
"kuler": {
@@ -5808,9 +5773,9 @@
}
},
"node-sass": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz",
- "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==",
+ "version": "4.13.1",
+ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz",
+ "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==",
"dev": true,
"requires": {
"async-foreach": "^0.1.3",
@@ -5820,7 +5785,7 @@
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
"in-publish": "^2.0.0",
- "lodash": "^4.17.11",
+ "lodash": "^4.17.15",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"nan": "^2.13.2",
@@ -7578,38 +7543,6 @@
"dev": true,
"requires": {
"readable-stream": "^2.0.1"
- },
- "dependencies": {
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
}
},
"stream-browserify": {
@@ -8745,9 +8678,9 @@
},
"dependencies": {
"acorn": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
- "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
+ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
"dev": true
},
"ajv": {
diff --git a/package.json b/package.json
index f3581c96..af187c22 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
],
"aiKey": "90c182a8-8dab-45d4-bfb8-1353eb55aa7f",
"engines": {
- "vscode": "^1.41.0"
+ "vscode": "^1.43.0"
},
"categories": [
"Other"
@@ -144,19 +144,13 @@
{
"command": "java.test.explorer.run",
"title": "%contributes.commands.java.test.explorer.run.title%",
- "icon": {
- "light": "resources/media/light/run.svg",
- "dark": "resources/media/dark/run.svg"
- },
+ "icon": "$(debug-start)",
"category": "Java"
},
{
"command": "java.test.explorer.debug",
"title": "%contributes.commands.java.test.explorer.debug.title%",
- "icon": {
- "light": "resources/media/light/debug.svg",
- "dark": "resources/media/dark/debug.svg"
- },
+ "icon": "$(debug)",
"category": "Java"
},
{
@@ -171,10 +165,7 @@
{
"command": "java.test.explorer.debugAll",
"title": "%contributes.commands.java.test.explorer.debugAll.title%",
- "icon": {
- "light": "resources/media/light/debug.svg",
- "dark": "resources/media/dark/debug.svg"
- },
+ "icon": "$(debug)",
"category": "Java"
},
{
@@ -185,10 +176,7 @@
{
"command": "java.test.explorer.refresh",
"title": "%contributes.commands.java.test.explorer.refresh.title%",
- "icon": {
- "light": "resources/media/light/refresh.svg",
- "dark": "resources/media/dark/refresh.svg"
- },
+ "icon": "$(refresh)",
"category": "Java"
},
{
@@ -357,7 +345,7 @@
"@types/mocha": "^2.2.48",
"@types/node": "^6.14.7",
"@types/pug": "^2.0.4",
- "@types/vscode": "1.41.0",
+ "@types/vscode": "1.43.0",
"bootstrap": "^4.3.1",
"filemanager-webpack-plugin": "^2.0.5",
"gulp": "^4.0.2",
diff --git a/resources/media/dark/class.svg b/resources/media/dark/class.svg
deleted file mode 100644
index c8c5eea8..00000000
--- a/resources/media/dark/class.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
diff --git a/resources/media/dark/debug.svg b/resources/media/dark/debug.svg
deleted file mode 100644
index 3cdeaf22..00000000
--- a/resources/media/dark/debug.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/dark/method.svg b/resources/media/dark/method.svg
deleted file mode 100644
index 571577ef..00000000
--- a/resources/media/dark/method.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
diff --git a/resources/media/dark/package.svg b/resources/media/dark/package.svg
deleted file mode 100644
index 7062fe4c..00000000
--- a/resources/media/dark/package.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
diff --git a/resources/media/dark/pending.svg b/resources/media/dark/pending.svg
deleted file mode 100644
index a90a5fd3..00000000
--- a/resources/media/dark/pending.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/dark/refresh.svg b/resources/media/dark/refresh.svg
deleted file mode 100644
index 05f3907d..00000000
--- a/resources/media/dark/refresh.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/dark/run.svg b/resources/media/dark/run.svg
deleted file mode 100644
index 97ef80da..00000000
--- a/resources/media/dark/run.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/light/class.svg b/resources/media/light/class.svg
deleted file mode 100644
index c8c5eea8..00000000
--- a/resources/media/light/class.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
diff --git a/resources/media/light/debug.svg b/resources/media/light/debug.svg
deleted file mode 100644
index 5596bff5..00000000
--- a/resources/media/light/debug.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/light/method.svg b/resources/media/light/method.svg
deleted file mode 100644
index 571577ef..00000000
--- a/resources/media/light/method.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
diff --git a/resources/media/light/package.svg b/resources/media/light/package.svg
deleted file mode 100644
index 7062fe4c..00000000
--- a/resources/media/light/package.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
diff --git a/resources/media/light/pending.svg b/resources/media/light/pending.svg
deleted file mode 100644
index fdda494c..00000000
--- a/resources/media/light/pending.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/light/refresh.svg b/resources/media/light/refresh.svg
deleted file mode 100644
index 4088a9f8..00000000
--- a/resources/media/light/refresh.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/media/light/run.svg b/resources/media/light/run.svg
deleted file mode 100644
index 56428f36..00000000
--- a/resources/media/light/run.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/src/explorer/testExplorer.ts b/src/explorer/testExplorer.ts
index d87e884b..eb4c4473 100644
--- a/src/explorer/testExplorer.ts
+++ b/src/explorer/testExplorer.ts
@@ -2,7 +2,7 @@
// Licensed under the MIT license.
import * as path from 'path';
-import { Command, Disposable, Event, EventEmitter, ExtensionContext, Range, TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri, workspace, WorkspaceFolder } from 'vscode';
+import { Command, Disposable, Event, EventEmitter, ExtensionContext, Range, ThemeIcon, TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri, workspace, WorkspaceFolder } from 'vscode';
import { JavaTestRunnerCommands } from '../constants/commands';
import { ITestItem, TestKind, TestLevel } from '../protocols';
import { ITestResult, TestStatus } from '../runners/models';
@@ -52,9 +52,8 @@ export class TestExplorer implements TreeDataProvider, Disposable {
private getWorkspaceFolders(): ITestItem[] {
let results: ITestItem[] = [];
- const folders: WorkspaceFolder[] | undefined = workspace.workspaceFolders;
- if (folders) {
- results = folders.map((folder: WorkspaceFolder) => {
+ if (workspace.workspaceFolders) {
+ results = workspace.workspaceFolders.map((folder: WorkspaceFolder) => {
return {
id: folder.uri.fsPath,
displayName: folder.name,
@@ -81,7 +80,7 @@ export class TestExplorer implements TreeDataProvider, Disposable {
return TreeItemCollapsibleState.Collapsed;
}
- private resolveIconPath(element: ITestItem): undefined | { dark: string | Uri, light: string | Uri } {
+ private resolveIconPath(element: ITestItem): undefined | { dark: string | Uri, light: string | Uri } | ThemeIcon {
switch (element.level) {
case TestLevel.Method:
const result: ITestResult | undefined = testResultManager.getResultById(element.id);
@@ -103,29 +102,17 @@ export class TestExplorer implements TreeDataProvider, Disposable {
light: this._context.asAbsolutePath(path.join('resources', 'media', 'light', 'running.svg')),
};
case TestStatus.Pending:
- return {
- dark: this._context.asAbsolutePath(path.join('resources', 'media', 'dark', 'pending.svg')),
- light: this._context.asAbsolutePath(path.join('resources', 'media', 'light', 'pending.svg')),
- };
+ return new ThemeIcon('history');
default:
break;
}
}
- return {
- dark: this._context.asAbsolutePath(path.join('resources', 'media', 'dark', 'method.svg')),
- light: this._context.asAbsolutePath(path.join('resources', 'media', 'light', 'method.svg')),
- };
+ return new ThemeIcon('symbol-method');
case TestLevel.Class:
- return {
- dark: this._context.asAbsolutePath(path.join('resources', 'media', 'dark', 'class.svg')),
- light: this._context.asAbsolutePath(path.join('resources', 'media', 'light', 'class.svg')),
- };
+ return new ThemeIcon('symbol-class');
case TestLevel.Package:
- return {
- dark: this._context.asAbsolutePath(path.join('resources', 'media', 'dark', 'package.svg')),
- light: this._context.asAbsolutePath(path.join('resources', 'media', 'light', 'package.svg')),
- };
+ return new ThemeIcon('symbol-namespace');
default:
return undefined;
}