Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vscode] support activation events #4199

Closed
dehru opened this issue Jan 31, 2019 · 14 comments
Closed

[vscode] support activation events #4199

dehru opened this issue Jan 31, 2019 · 14 comments
Labels
enhancement issues that are enhancements to current functionality - nice to haves epic epic issues consisting of multiple smaller issues plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility

Comments

@dehru
Copy link

dehru commented Jan 31, 2019

Hello, I've got a vscode extension running in theia version "next" ( "version": "0.4.0-next.e2f3ec66" ). But there's a slight difference in when the activation() lifecycle method gets called.

The vscode extension was built with "vscode": "1.1.28", and has this info in it's package.json

        "activationEvents": [
		"onCommand:extension.execute-command"
	],
	"main": "./out/extension.js",
	"contributes": {
		"commands": [{
			"command": "extension.execute-command",
			"title": "Hello Execute Command"
		}]
	},

And a very simple extension.ts that looks like this.

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
	console.log('activate called');
	vscode.commands.executeCommand('setContext', 'thisContext', true);
}

export function deactivate() {}

When running in vscode, the activate method is not called until the command is actually triggered through the vscode command palette.

When running inside theia, the activate method is called as soon as the browser is connected / opened. This makes debugging the activate method a little more challenging. And could lead to different behavior with vscode extensions.

@akosyakov akosyakov added enhancement issues that are enhancements to current functionality - nice to haves plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility labels Jan 31, 2019
@akosyakov
Copy link
Member

Activation events are not supported yet, VS Code extensions are activated eagerly for now.

@akosyakov akosyakov changed the title Vscode Extension Activate Called Immediately [vscode] support activation events Jan 31, 2019
@akosyakov
Copy link
Member

akosyakov commented Mar 11, 2019

Hit it again trying to debug LS process of vetur VS Code extension. It's really hard since debug configuration rely on lazy loading of extensions :(

@akosyakov akosyakov self-assigned this Mar 11, 2019
@akosyakov
Copy link
Member

For rust extension, it is necessary to fix it, otherwise it starts contributing UI elements regardless whether rust project opened or not.

@akosyakov
Copy link
Member

akosyakov commented Jul 1, 2019

@akosyakov
Copy link
Member

akosyakov commented Jul 4, 2019

@akosyakov
Copy link
Member

For onView event we need to integrate new view containers in the plugin system first, since it should be fired on expansion on the view. If we do it now we need to reimplement it later again.

@akosyakov akosyakov removed their assignment Jul 5, 2019
@akosyakov
Copy link
Member

I will stop working on it. onView and onWebview require substantial refactoring in the plugin system to integrate them properly with the shell. Regarding the rest of events i have not seen them in practice used a lot and will wait for some extension to come around.

@akosyakov
Copy link
Member

onView is covered in #5665

@akosyakov
Copy link
Member

akosyakov commented Nov 26, 2019

onWebviewPanel is covered in #6465

@tsmaeder tsmaeder added the epic epic issues consisting of multiple smaller issues label Apr 7, 2020
@akosyakov
Copy link
Member

onFileSystem is covered in #7908

@tsmaeder
Copy link
Contributor

Closing this omnibus issue, as we generally support activation events.

@alvsan09
Copy link
Contributor

@tsmaeder,
We are missing the support of multiple activation events as reflected under the following comment:
#4199 (comment)

How can we track those?
A newer issue, perhaps ?

@tsmaeder
Copy link
Contributor

The list is at least partially out of date ("onRenderer"). If we have missing activation events, they should be tracked by separate issues and linked to the VS Code API version where they appear. This old issue is not useful, IMO.

@alvsan09
Copy link
Contributor

alvsan09 commented May 31, 2023

The list is at least partially out of date ("onRenderer"). If we have missing activation events, they should be tracked by separate issues and linked to the VS Code API version where they appear. This old issue is not useful, IMO.

@tsmaeder , Unfortunately the activation events are independent of the vscode API, and would therefore need a parallel tracking,
I think we need parallel tacking of the following vscode interfaces.

  1. vscode API, (already tracked)
  2. vscode Proposed APIs (Discussion @ VS Code API support: proposed APIs #12450)
  3. vscode Activation Events
  4. vscode Contribution points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves epic epic issues consisting of multiple smaller issues plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

4 participants