Skip to content

Commit baf59d2

Browse files
committed
copy test link
1 parent 5571a15 commit baf59d2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/ec2/activation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Commands } from '../shared/vscode/commands2'
77
import { telemetry } from '../shared/telemetry/telemetry'
88
import { Ec2Node } from './explorer/ec2ParentNode'
99
import {
10+
linkToLaunchInstance,
1011
openRemoteConnection,
1112
openTerminal,
1213
rebootInstance,
@@ -45,6 +46,7 @@ export async function activate(ctx: ExtContext): Promise<void> {
4546

4647
Commands.register('aws.ec2.linkToLaunchInstance', async () => {
4748
console.log('you just ran the linkToLaunch command!')
49+
await linkToLaunchInstance()
4850
})
4951
)
5052
}

src/ec2/commands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
5-
5+
import * as vscode from 'vscode'
66
import { InstanceStateManager, getStateManagerForSelection } from './instanceStateManager'
77
import { Ec2InstanceNode } from './explorer/ec2InstanceNode'
88
import { Ec2Node } from './explorer/ec2ParentNode'
99
import { Ec2ConnectionManager } from './model'
1010
import { Ec2Prompter, instanceFilter } from './prompter'
1111
import { Ec2Selection } from './utils'
1212
import { Ec2Instance } from '../shared/clients/ec2Client'
13+
import { openUrl } from '../shared/utilities/vsCodeUtils'
1314

1415
export async function refreshExplorer(node?: Ec2Node) {
1516
await node?.refreshNode()
@@ -46,6 +47,11 @@ export async function rebootInstance(node?: Ec2Node) {
4647
await stateManager.rebootInstanceWithCancel()
4748
}
4849

50+
export async function linkToLaunchInstance() {
51+
const url = vscode.Uri.parse('https://google.com')
52+
await openUrl(url)
53+
}
54+
4955
async function getStateManager(node?: Ec2Node, prompterFilter?: instanceFilter): Promise<InstanceStateManager> {
5056
const selection = await getSelection(node, prompterFilter)
5157
const stateManager = getStateManagerForSelection(selection)

0 commit comments

Comments
 (0)