Skip to content

Commit a458790

Browse files
authored
Merge pull request #231 from jGauravGupta/FISH-9778
FISH-9778 Fixes conflict property with different datatype in "extends vscode.TreeItem implements vscode.QuickPickItem"
2 parents 5d6230c + 7793941 commit a458790

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/main/fish/payara/micro/PayaraMicroInstance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class PayaraMicroInstance extends vscode.TreeItem implements vscode.Quick
5151

5252
private build: Build;
5353

54+
public iconPath?: Uri | vscode.ThemeIcon | { light: Uri; dark: Uri; };
55+
5456
constructor(private context: vscode.ExtensionContext, private name: string, private path: Uri) {
5557
super(name);
5658
this.label = name;
@@ -113,7 +115,7 @@ export class PayaraMicroInstance extends vscode.TreeItem implements vscode.Quick
113115

114116
public async setState(state: InstanceState): Promise<void> {
115117
this.state = state;
116-
this.iconPath = this.context.asAbsolutePath(path.join('resources', this.getIcon()));
118+
this.iconPath = vscode.Uri.file(this.context.asAbsolutePath(path.join('resources', this.getIcon())));
117119
this.contextValue = this.getState();
118120
this.tooltip = this.getPath().fsPath;
119121
vscode.commands.executeCommand('payara.micro.refresh', this);

src/main/fish/payara/server/PayaraServerInstance.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { IncomingMessage } from "http";
2828
import { ProjectOutputWindowProvider } from "../project/ProjectOutputWindowProvider";
2929
import { PayaraInstance } from "../common/PayaraInstance";
3030
import { DeployOption } from "../common/DeployOption";
31+
import { Uri } from "vscode";
3132

3233
export abstract class PayaraServerInstance extends vscode.TreeItem implements vscode.QuickPickItem, PayaraInstance {
3334

@@ -55,6 +56,8 @@ export abstract class PayaraServerInstance extends vscode.TreeItem implements vs
5556

5657
private versionLabel: string | undefined;
5758

59+
public iconPath?: Uri | vscode.ThemeIcon | { light: Uri; dark: Uri; };
60+
5861
constructor(private name: string, private domainName: string) {
5962
super(name);
6063
this.label = name;

src/main/fish/payara/server/PayaraServerTreeDataProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class PayaraServerTreeDataProvider implements vscode.TreeDataProvider<Tre
4646
public async getChildren(item?: TreeItem): Promise<TreeItem[]> {
4747
if (!item) {
4848
return this.instanceProvider.getServers().map((server: PayaraServerInstance) => {
49-
server.iconPath = this.context.asAbsolutePath(path.join('resources', server.getIcon()));
49+
server.iconPath = vscode.Uri.file(this.context.asAbsolutePath(path.join('resources', server.getIcon())));
5050
server.contextValue = server.getState() + (server instanceof PayaraLocalServerInstance ? "Local" : "Remote");
5151
server.collapsibleState = vscode.TreeItemCollapsibleState.Collapsed;
5252
server.label = server.getName();
@@ -55,15 +55,15 @@ export class PayaraServerTreeDataProvider implements vscode.TreeDataProvider<Tre
5555
});
5656
} else if (item instanceof PayaraServerInstance && item.isStarted()) {
5757
return item.getApplications().map((application: ApplicationInstance) => {
58-
application.iconPath = this.context.asAbsolutePath(path.join('resources', application.getIcon()));
58+
application.iconPath = vscode.Uri.file(this.context.asAbsolutePath(path.join('resources', application.getIcon())));
5959
application.collapsibleState = vscode.TreeItemCollapsibleState.Collapsed;
6060
application.label = application.name;
6161
application.contextValue = "payara-application";
6262
return application;
6363
});
6464
} else if (item instanceof ApplicationInstance) {
6565
return item.getRestEndpoints().map((endpoint: RestEndpoint) => {
66-
endpoint.iconPath = this.context.asAbsolutePath(path.join('resources', 'rest-endpoint.svg'));
66+
endpoint.iconPath = vscode.Uri.file(this.context.asAbsolutePath(path.join('resources', 'rest-endpoint.svg')));
6767
endpoint.label = endpoint.httpMethod + " " + endpoint.endpoint;
6868
endpoint.contextValue = "application-rest-endpoint";
6969
return endpoint;

0 commit comments

Comments
 (0)