Skip to content

activationEvents.workspaceContains for directories #8295

Closed

Description

I'm currently creating an extension for Meteor. I only want to activate it if the workspace contains a Meteor project. For that I would like to check for the presence of a .meteor directory.

Activity

  1. added
    feature-request
    on Jun 28, 2016
  2. added
    good first issue
    on Jun 29, 2016
  3. alexdima commented on Jun 29, 2016

    @alexdima
    Member

    In private handleWorkspaceContainsEagerExtensions(): TPromise<void> {

    around:

            return TPromise.join(
                Object.keys(desiredFilesMap).map(
                    (fileName) => pfs.fileExistsWithResult(paths.join(folderPath, fileName), fileName)
                )
            )
    

    https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/node/extensionHostMain.ts#L249 should accept folders not only files

  4. iambibhas commented on Jul 9, 2016

    @iambibhas

    This will be very helpful. Been stuck playing with activationEvents with no luck whatsoever. All the commands are activated even when the activationEvents dont match. E.g. I've put only "workspaceContains:.git/config" in there and the commands still got activated. Not sure how this works. If none of the criteria matches, then the commands shouldn't be activated, right?

  5. added a commit that references this issue on Aug 16, 2016
    02d7240
  6. locked and limited conversation to collaborators on Nov 18, 2017
  7. added 2 commits that reference this issue on Sep 6, 2026
    3dd7fa4
    1cd19c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apifeature-requestgood first issue

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions