Skip to content

Commit dd40a30

Browse files
authored
feat: Adopt resourceUri API to the Java Project explorer (#453)
1 parent 30fc493 commit dd40a30

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"explorer"
1313
],
1414
"engines": {
15-
"vscode": "^1.52.0"
15+
"vscode": "^1.53.0"
1616
},
1717
"repository": {
1818
"type": "git",
@@ -582,7 +582,7 @@
582582
"@types/minimatch": "^3.0.3",
583583
"@types/mocha": "^8.0.4",
584584
"@types/node": "^8.10.66",
585-
"@types/vscode": "1.52.0",
585+
"@types/vscode": "1.53.0",
586586
"copy-webpack-plugin": "^6.3.2",
587587
"glob": "^7.1.6",
588588
"gulp": "^4.0.2",

src/views/dataNode.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import * as _ from "lodash";
55
import { ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from "vscode";
6-
import { INodeData } from "../java/nodeData";
6+
import { INodeData, NodeKind } from "../java/nodeData";
77
import { Lock } from "../utils/Lock";
88
import { ExplorerNode } from "./explorerNode";
99

@@ -26,6 +26,18 @@ export abstract class DataNode extends ExplorerNode {
2626
item.iconPath = this.iconPath;
2727
item.command = this.command;
2828
item.contextValue = this.computeContextValue();
29+
if (this.uri) {
30+
switch (this._nodeData.kind) {
31+
case NodeKind.PackageRoot:
32+
case NodeKind.Package:
33+
case NodeKind.PrimaryType:
34+
case NodeKind.Folder:
35+
case NodeKind.File:
36+
item.resourceUri = Uri.parse(this.uri);
37+
break;
38+
}
39+
}
40+
2941
return item;
3042
}
3143

0 commit comments

Comments
 (0)