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

Open CHE_PROJECTS_ROOT by default #2

Merged
merged 2 commits into from
Nov 30, 2021
Merged

Open CHE_PROJECTS_ROOT by default #2

merged 2 commits into from
Nov 30, 2021

Conversation

azatsarynnyy
Copy link
Member

@azatsarynnyy azatsarynnyy commented Nov 30, 2021

Signed-off-by: Artem Zatsarynnyi azatsary@redhat.com

closes eclipse-che/che#20569

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
@@ -29,4 +29,4 @@ else
fi

# Launch che with a custom connection-token
./node out/vs/server/main.js --port 3100 --connection-token eclipse-che
./node out/vs/server/main.js --port 3100 --connection-token eclipse-che --folder ${CHE_PROJECTS_ROOT}
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK CHE_PROJECTS_ROOT is only available for che-server workspaces

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. It's PROJECTS_ROOT for the DevWorkspace engine. I forgot about that.
I'm updating the PR...
Thanks for noticing it!

Copy link
Contributor

@benoitf benoitf Nov 30, 2021

Choose a reason for hiding this comment

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

Also I think it should open the folders defined by the projects of the devfile.yaml
Here it might open the root folder which may not what we expect.
I'm fine to merge this one as it's still better than before but probably we need to do the same stuff than for che-theia where we create a .workspace file and open that .workspace file

Now it's quite easy as projects are cloned before we launch the IDE (in devWorkspace mode)

Copy link
Member Author

Choose a reason for hiding this comment

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

As I remember, Che-Code editor is supposed to work with DevWorkspace engine only. So, I've replaced CHE_PROJECTS_ROOT with PROJECTS_ROOT.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also I think it should open the folders defined by the projects of the devfile.yaml

We can add the custom folders support as one of further improvements.

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
@azatsarynnyy azatsarynnyy enabled auto-merge (squash) November 30, 2021 16:46
@azatsarynnyy azatsarynnyy merged commit 2c892f4 into main Nov 30, 2021
@azatsarynnyy azatsarynnyy deleted the default-folder branch November 30, 2021 16:53
benoitf added a commit that referenced this pull request Dec 2, 2021
folder to open is found at runtime
@benoitf
Copy link
Contributor

benoitf commented Dec 2, 2021

Further improvement eclipse-che/che#20870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /projects subfolders to VS Code explorer when opening the workspace
2 participants