Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Introduce new namespace for current environment in Plugins API #29

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

mmorhun
Copy link

@mmorhun mmorhun commented Jun 11, 2018

Introduces env namespace for current IDE environment in plugin API.
This PR adds ability to read:

  • query parameters of the IDE page (by key or whole map)
  • environment variables by name

Resolves eclipse-che/che#9845

if (existedValue) {
if (existedValue instanceof Array) {
existedValue.push(value);
queryParameters[key] = existedValue;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think queryParameters[key] was already updated after push, so You don't need update queryParameters by key again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks


import { interfaces } from "inversify";
import { EnvVariablesServer } from "@theia/core/lib/common/env-variables";
import { RPCProtocol } from '../../api/rpc-protocol';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use ' or " for all import

Copy link
Author

@mmorhun mmorhun Jun 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed it, probably autoimport. Thanks for spotting

@mmorhun mmorhun force-pushed the CHE-9845 branch 2 times, most recently from e817cf6 to 4d72489 Compare June 12, 2018 09:03
@benoitf
Copy link

benoitf commented Jun 12, 2018

hello, do you know why build is failing ?

@mmorhun
Copy link
Author

mmorhun commented Jun 12, 2018

It failed because of failed git-slow diff-slow diff with rename/move test
The error is:

1) git-slow diff-slow diff with rename/move:
     GitError: fatal: invalid reference: Java9
      at new GitError (/home/travis/build/theia-demo-plugins/wiptheia/node_modules/dugite-extra/src/core/git.ts:67:9)
      at Object.<anonymous> (/home/travis/build/theia-demo-plugins/wiptheia/node_modules/dugite-extra/src/core/git.ts:142:11)
      at step (/home/travis/build/theia-demo-plugins/wiptheia/node_modules/dugite-extra/lib/core/git.js:50:23)
      at Object.next (/home/travis/build/theia-demo-plugins/wiptheia/node_modules/dugite-extra/lib/core/git.js:31:53)
      at fulfilled (/home/travis/build/theia-demo-plugins/wiptheia/node_modules/dugite-extra/lib/core/git.js:22:58)
      at <anonymous>

But I haven't touched git functionality at all. So have no idea.

@benoitf
Copy link

benoitf commented Jun 13, 2018

FYI I've rebased branch to upstream master branch (as current build was failing)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@mmorhun mmorhun merged commit 7c152d9 into master Jun 13, 2018
@mmorhun mmorhun deleted the CHE-9845 branch June 13, 2018 11:54
benoitf pushed a commit that referenced this pull request Jun 18, 2018
…APi (#29)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
benoitf pushed a commit that referenced this pull request Jun 18, 2018
…APi (#29)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
benoitf pushed a commit that referenced this pull request Jun 19, 2018
…APi (#29)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
benoitf pushed a commit that referenced this pull request Jun 19, 2018
…APi (#29)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants