File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { Commands } from '../shared/vscode/commands2'
7
7
import { telemetry } from '../shared/telemetry/telemetry'
8
8
import { Ec2Node } from './explorer/ec2ParentNode'
9
9
import {
10
+ linkToLaunchInstance ,
10
11
openRemoteConnection ,
11
12
openTerminal ,
12
13
rebootInstance ,
@@ -45,6 +46,7 @@ export async function activate(ctx: ExtContext): Promise<void> {
45
46
46
47
Commands . register ( 'aws.ec2.linkToLaunchInstance' , async ( ) => {
47
48
console . log ( 'you just ran the linkToLaunch command!' )
49
+ await linkToLaunchInstance ( )
48
50
} )
49
51
)
50
52
}
Original file line number Diff line number Diff line change 2
2
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*/
5
-
5
+ import * as vscode from 'vscode'
6
6
import { InstanceStateManager , getStateManagerForSelection } from './instanceStateManager'
7
7
import { Ec2InstanceNode } from './explorer/ec2InstanceNode'
8
8
import { Ec2Node } from './explorer/ec2ParentNode'
9
9
import { Ec2ConnectionManager } from './model'
10
10
import { Ec2Prompter , instanceFilter } from './prompter'
11
11
import { Ec2Selection } from './utils'
12
12
import { Ec2Instance } from '../shared/clients/ec2Client'
13
+ import { openUrl } from '../shared/utilities/vsCodeUtils'
13
14
14
15
export async function refreshExplorer ( node ?: Ec2Node ) {
15
16
await node ?. refreshNode ( )
@@ -46,6 +47,11 @@ export async function rebootInstance(node?: Ec2Node) {
46
47
await stateManager . rebootInstanceWithCancel ( )
47
48
}
48
49
50
+ export async function linkToLaunchInstance ( ) {
51
+ const url = vscode . Uri . parse ( 'https://google.com' )
52
+ await openUrl ( url )
53
+ }
54
+
49
55
async function getStateManager ( node ?: Ec2Node , prompterFilter ?: instanceFilter ) : Promise < InstanceStateManager > {
50
56
const selection = await getSelection ( node , prompterFilter )
51
57
const stateManager = getStateManagerForSelection ( selection )
You can’t perform that action at this time.
0 commit comments