Skip to content

Commit

Permalink
CHE-8575: Do not show .che folder in project explorer (#8758)
Browse files Browse the repository at this point in the history
Do not show .che folder in project explorer. When applying a code formatter for workspace .che folder appears in the project explorer as a project.
  • Loading branch information
vinokurig committed Feb 19, 2018
1 parent 6d498d9 commit 6e16445
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package org.eclipse.che.api.project.server.impl;

import static org.eclipse.che.api.fs.server.WsPathUtils.ROOT;
import static org.eclipse.che.api.project.shared.Constants.CHE_DIR;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -24,6 +25,7 @@
import org.eclipse.che.api.core.ServerException;
import org.eclipse.che.api.core.model.workspace.config.ProjectConfig;
import org.eclipse.che.api.fs.server.FsManager;
import org.eclipse.che.api.fs.server.WsPathUtils;
import org.eclipse.che.api.project.server.handlers.ProjectInitHandler;

@Singleton
Expand Down Expand Up @@ -60,10 +62,12 @@ private void initializeRegisteredProjects() throws ServerException {
}
}

private void initializeNotRegisteredProjects() throws ServerException {
for (String wsPath : fsManager.getDirWsPaths(ROOT)) {
projectConfigRegistry.putIfAbsent(wsPath, true, true);
}
private void initializeNotRegisteredProjects() {
fsManager
.getDirWsPaths(ROOT)
.stream()
.filter(wsPath -> !WsPathUtils.resolve(ROOT, CHE_DIR).equals(wsPath))
.forEach(wsPath -> projectConfigRegistry.putIfAbsent(wsPath, true, true));
}

private void firePostInitializationHandlers()
Expand Down

0 comments on commit 6e16445

Please sign in to comment.