Search in sources :

Example 6 with ProjectTypeDef

use of org.eclipse.che.api.project.server.type.ProjectTypeDef in project che by eclipse.

the class ProjectServiceTest method testCreateProject.

@Test
public void testCreateProject() throws Exception {
    final String projectName = "new_project";
    final String projectType = "testCreateProject";
    phRegistry.register(createProjectHandlerFor(projectName, projectType));
    Map<String, List<String>> headers = new HashMap<>();
    headers.put("Content-Type", singletonList(APPLICATION_JSON));
    ProjectTypeDef pt = new ProjectTypeDef("testCreateProject", "my project type", true, false) {

        {
            addConstantDefinition("new_project_attribute", "attr description", "to be or not to be");
        }
    };
    ptRegistry.registerProjectType(pt);
    Map<String, List<String>> attributeValues = new LinkedHashMap<>();
    attributeValues.put("new_project_attribute", singletonList("to be or not to be"));
    final ProjectConfigDto newProjectConfig = DtoFactory.getInstance().createDto(ProjectConfigDto.class).withPath("/new_project").withName(projectName).withDescription("new project").withType(projectType).withAttributes(attributeValues).withSource(DtoFactory.getInstance().createDto(SourceStorageDto.class));
    projects.add(newProjectConfig);
    ContainerResponse response = launcher.service(POST, "http://localhost:8080/api/project", "http://localhost:8080/api", headers, DtoFactory.getInstance().toJson(newProjectConfig).getBytes(Charset.defaultCharset()), null);
    assertEquals(response.getStatus(), 200, "Error: " + response.getEntity());
    ProjectConfigDto result = (ProjectConfigDto) response.getEntity();
    assertNotNull(result);
    assertEquals(result.getName(), projectName);
    assertEquals(result.getPath(), "/new_project");
    assertEquals(result.getDescription(), newProjectConfig.getDescription());
    assertEquals(result.getType(), newProjectConfig.getType());
    assertEquals(result.getType(), projectType);
    Map<String, List<String>> attributes = result.getAttributes();
    assertNotNull(attributes);
    assertEquals(attributes.size(), 1);
    assertEquals(attributes.get("new_project_attribute"), singletonList("to be or not to be"));
    validateProjectLinks(result);
    RegisteredProject project = pm.getProject("new_project");
    assertNotNull(project);
    //ProjectConfig config = project.getConfig();
    assertEquals(project.getDescription(), newProjectConfig.getDescription());
    assertEquals(project.getProjectType().getId(), newProjectConfig.getType());
    String attributeVal = project.getAttributeEntries().get("new_project_attribute").getString();
    assertNotNull(attributeVal);
    assertEquals(attributeVal, "to be or not to be");
    assertNotNull(project.getBaseFolder().getChild("a"));
    assertNotNull(project.getBaseFolder().getChild("b"));
    assertNotNull(project.getBaseFolder().getChild("test.txt"));
}
Also used : SourceStorageDto(org.eclipse.che.api.workspace.shared.dto.SourceStorageDto) ContainerResponse(org.everrest.core.impl.ContainerResponse) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ProjectConfigDto(org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef) LinkedHashMap(java.util.LinkedHashMap) Test(org.testng.annotations.Test)

Example 7 with ProjectTypeDef

use of org.eclipse.che.api.project.server.type.ProjectTypeDef in project che by eclipse.

the class ProjectManager method estimateProject.

/**
     * Estimates if the folder can be treated as a project of particular type
     *
     * @param path to the folder
     * @param projectTypeId project type to estimate
     *
     * @return resolution object
     * @throws ServerException
     * @throws NotFoundException
     */
public ProjectTypeResolution estimateProject(String path, String projectTypeId) throws ServerException, NotFoundException {
    final ProjectTypeDef projectType = projectTypeRegistry.getProjectType(projectTypeId);
    if (projectType == null) {
        throw new NotFoundException("Project Type to estimate needed.");
    }
    final FolderEntry baseFolder = asFolder(path);
    if (baseFolder == null) {
        throw new NotFoundException("Folder not found: " + path);
    }
    return projectType.resolveSources(baseFolder);
}
Also used : NotFoundException(org.eclipse.che.api.core.NotFoundException) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef)

Example 8 with ProjectTypeDef

use of org.eclipse.che.api.project.server.type.ProjectTypeDef in project che by eclipse.

the class ProjectServiceTest method testEstimateProject.

@Test
public void testEstimateProject() throws Exception {
    VirtualFile root = pm.getProjectsRoot().getVirtualFile();
    //getVirtualFileSystemRegistry().getProvider("my_ws").getMountPoint(false).getRoot();
    root.createFolder("testEstimateProjectGood").createFolder("check");
    root.createFolder("testEstimateProjectBad");
    String errMessage = "File /check not found";
    final ValueProviderFactory vpf1 = projectFolder -> new ReadonlyValueProvider() {

        @Override
        public List<String> getValues(String attributeName) throws ValueStorageException {
            VirtualFileEntry file;
            try {
                file = projectFolder.getChild("check");
            } catch (ServerException e) {
                throw new ValueStorageException(e.getMessage());
            }
            if (file == null) {
                throw new ValueStorageException(errMessage);
            }
            return (List<String>) singletonList("checked");
        }
    };
    ProjectTypeDef pt = new ProjectTypeDef("testEstimateProjectPT", "my testEstimateProject type", true, false) {

        {
            addVariableDefinition("calculated_attribute", "attr description", true, vpf1);
            addVariableDefinition("my_property_1", "attr description", true);
            addVariableDefinition("my_property_2", "attr description", false);
        }
    };
    ptRegistry.registerProjectType(pt);
    ContainerResponse response = launcher.service(GET, format("http://localhost:8080/api/project/estimate/%s?type=%s", "testEstimateProjectGood", "testEstimateProjectPT"), "http://localhost:8080/api", null, null, null);
    assertEquals(response.getStatus(), 200, "Error: " + response.getEntity());
    //noinspection unchecked
    SourceEstimation result = (SourceEstimation) response.getEntity();
    assertTrue(result.isMatched());
    assertEquals(result.getAttributes().size(), 1);
    assertEquals(result.getAttributes().get("calculated_attribute").get(0), "checked");
    // if project not matched
    response = launcher.service(GET, format("http://localhost:8080/api/project/estimate/%s?type=%s", "testEstimateProjectBad", "testEstimateProjectPT"), "http://localhost:8080/api", null, null, null);
    assertEquals(response.getStatus(), 200, "Error: " + response.getEntity());
    //noinspection unchecked
    result = (SourceEstimation) response.getEntity();
    assertFalse(result.isMatched());
    assertEquals(result.getAttributes().size(), 0);
}
Also used : VirtualFile(org.eclipse.che.api.vfs.VirtualFile) DELETE(javax.ws.rs.HttpMethod.DELETE) Arrays(java.util.Arrays) Listeners(org.testng.annotations.Listeners) GET(javax.ws.rs.HttpMethod.GET) Path(org.eclipse.che.api.vfs.Path) Test(org.testng.annotations.Test) AfterMethod(org.testng.annotations.AfterMethod) Collections.singletonList(java.util.Collections.singletonList) HttpJsonRequest(org.eclipse.che.api.core.rest.HttpJsonRequest) FileWatcherManager(org.eclipse.che.api.vfs.watcher.FileWatcherManager) Future(java.util.concurrent.Future) CreateProjectHandler(org.eclipse.che.api.project.server.handlers.CreateProjectHandler) ResourceBinderImpl(org.everrest.core.impl.ResourceBinderImpl) Map(java.util.Map) HttpJsonRequestFactory(org.eclipse.che.api.core.rest.HttpJsonRequestFactory) RequestDispatcher(org.everrest.core.impl.RequestDispatcher) ProviderBinder(org.everrest.core.impl.ProviderBinder) APPLICATION_ZIP(org.eclipse.che.commons.lang.ws.rs.ExtMediaType.APPLICATION_ZIP) Attribute(org.eclipse.che.api.core.model.project.type.Attribute) HttpJsonResponse(org.eclipse.che.api.core.rest.HttpJsonResponse) Set(java.util.Set) EverrestProcessor(org.everrest.core.impl.EverrestProcessor) SourceStorageDto(org.eclipse.che.api.workspace.shared.dto.SourceStorageDto) Executors(java.util.concurrent.Executors) ResourceLauncher(org.everrest.core.tools.ResourceLauncher) IoUtil(org.eclipse.che.commons.lang.IoUtil) Matchers.any(org.mockito.Matchers.any) CountDownLatch(java.util.concurrent.CountDownLatch) ApiExceptionMapper(org.eclipse.che.api.core.rest.ApiExceptionMapper) UserDao(org.eclipse.che.api.user.server.spi.UserDao) EverrestConfiguration(org.everrest.core.impl.EverrestConfiguration) Assert.assertFalse(org.junit.Assert.assertFalse) ApplicationContext(org.everrest.core.ApplicationContext) ByteStreams(com.google.common.io.ByteStreams) SubjectImpl(org.eclipse.che.commons.subject.SubjectImpl) TEXT_PLAIN(javax.ws.rs.core.MediaType.TEXT_PLAIN) Mockito.mock(org.mockito.Mockito.mock) ZipOutputStream(java.util.zip.ZipOutputStream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Mock(org.mockito.Mock) ResourceBinder(org.everrest.core.ResourceBinder) ProjectImporterRegistry(org.eclipse.che.api.project.server.importer.ProjectImporterRegistry) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) AttributeValue(org.eclipse.che.api.project.server.type.AttributeValue) VirtualFile(org.eclipse.che.api.vfs.VirtualFile) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef) FSLuceneSearcherProvider(org.eclipse.che.api.vfs.search.impl.FSLuceneSearcherProvider) LinkedHashSet(java.util.LinkedHashSet) ProjectImporter(org.eclipse.che.api.project.server.importer.ProjectImporter) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) File(java.io.File) ValueHolder(org.eclipse.che.api.core.util.ValueHolder) ServerException(org.eclipse.che.api.core.ServerException) ValueStorageException(org.eclipse.che.api.project.server.type.ValueStorageException) SourceEstimation(org.eclipse.che.api.project.shared.dto.SourceEstimation) ByteArrayContainerResponseWriter(org.everrest.core.tools.ByteArrayContainerResponseWriter) Assert(org.junit.Assert) Assert.assertEqualsNoOrder(org.testng.Assert.assertEqualsNoOrder) ApplicationContext.anApplicationContext(org.everrest.core.ApplicationContext.anApplicationContext) LineConsumerFactory(org.eclipse.che.api.core.util.LineConsumerFactory) Scanner(java.util.Scanner) ProjectTypeRegistry(org.eclipse.che.api.project.server.type.ProjectTypeRegistry) FileWatcherNotificationHandler(org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationHandler) Application(javax.ws.rs.core.Application) ProjectHandlerRegistry(org.eclipse.che.api.project.server.handlers.ProjectHandlerRegistry) ByteArrayInputStream(java.io.ByteArrayInputStream) PathMatcher(java.nio.file.PathMatcher) LocalVirtualFileSystemProvider(org.eclipse.che.api.vfs.impl.file.LocalVirtualFileSystemProvider) URI(java.net.URI) APPLICATION_JSON(javax.ws.rs.core.MediaType.APPLICATION_JSON) ZipEntry(java.util.zip.ZipEntry) EventService(org.eclipse.che.api.core.notification.EventService) MockitoTestNGListener(org.mockito.testng.MockitoTestNGListener) BeforeMethod(org.testng.annotations.BeforeMethod) Assert.assertNotNull(org.testng.Assert.assertNotNull) SourceStorage(org.eclipse.che.api.core.model.project.SourceStorage) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) ItemReference(org.eclipse.che.api.project.shared.dto.ItemReference) List(java.util.List) POST(javax.ws.rs.HttpMethod.POST) PUT(javax.ws.rs.HttpMethod.PUT) ValueProviderFactory(org.eclipse.che.api.project.server.type.ValueProviderFactory) IntStream(java.util.stream.IntStream) ReadonlyValueProvider(org.eclipse.che.api.project.server.type.ReadonlyValueProvider) Link(org.eclipse.che.api.core.rest.shared.dto.Link) WorkspaceDto(org.eclipse.che.api.workspace.shared.dto.WorkspaceDto) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) ProjectTypeConstraintException(org.eclipse.che.api.project.server.type.ProjectTypeConstraintException) DependencySupplierImpl(org.everrest.core.tools.DependencySupplierImpl) FileTreeWatcher(org.eclipse.che.api.vfs.impl.file.FileTreeWatcher) HashSet(java.util.HashSet) Charset(java.nio.charset.Charset) ConflictException(org.eclipse.che.api.core.ConflictException) LinkedList(java.util.LinkedList) DefaultFileWatcherNotificationHandler(org.eclipse.che.api.vfs.impl.file.DefaultFileWatcherNotificationHandler) DtoFactory(org.eclipse.che.dto.server.DtoFactory) ExecutorService(java.util.concurrent.ExecutorService) ContainerResponse(org.everrest.core.impl.ContainerResponse) RequestHandlerImpl(org.everrest.core.impl.RequestHandlerImpl) ProjectConfigDto(org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto) WorkspaceConfigDto(org.eclipse.che.api.workspace.shared.dto.WorkspaceConfigDto) ExtMediaType(org.eclipse.che.commons.lang.ws.rs.ExtMediaType) SelfReturningAnswer(org.eclipse.che.commons.test.mockito.answer.SelfReturningAnswer) Mockito.when(org.mockito.Mockito.when) TreeElement(org.eclipse.che.api.project.shared.dto.TreeElement) NotFoundException(org.eclipse.che.api.core.NotFoundException) MoveOptions(org.eclipse.che.api.project.shared.dto.MoveOptions) ForbiddenException(org.eclipse.che.api.core.ForbiddenException) CopyOptions(org.eclipse.che.api.project.shared.dto.CopyOptions) Collections(java.util.Collections) InputStream(java.io.InputStream) ServerException(org.eclipse.che.api.core.ServerException) ContainerResponse(org.everrest.core.impl.ContainerResponse) ValueStorageException(org.eclipse.che.api.project.server.type.ValueStorageException) SourceEstimation(org.eclipse.che.api.project.shared.dto.SourceEstimation) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef) ReadonlyValueProvider(org.eclipse.che.api.project.server.type.ReadonlyValueProvider) ValueProviderFactory(org.eclipse.che.api.project.server.type.ValueProviderFactory) Test(org.testng.annotations.Test)

Example 9 with ProjectTypeDef

use of org.eclipse.che.api.project.server.type.ProjectTypeDef in project che by eclipse.

the class ProjectServiceTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    WorkspaceProjectsSyncer workspaceHolder = new WsAgentTestBase.TestWorkspaceHolder();
    File root = new File(FS_PATH);
    if (root.exists()) {
        IoUtil.deleteRecursive(root);
    }
    root.mkdir();
    File indexDir = new File(INDEX_PATH);
    if (indexDir.exists()) {
        IoUtil.deleteRecursive(indexDir);
    }
    indexDir.mkdir();
    Set<PathMatcher> filters = new HashSet<>();
    filters.add(path -> {
        for (java.nio.file.Path pathElement : path) {
            if (pathElement == null || EXCLUDE_SEARCH_PATH.equals(pathElement.toString())) {
                return true;
            }
        }
        return false;
    });
    FSLuceneSearcherProvider sProvider = new FSLuceneSearcherProvider(indexDir, filters);
    vfsProvider = new LocalVirtualFileSystemProvider(root, sProvider);
    final EventService eventService = new EventService();
    // PTs for test
    ProjectTypeDef chuck = new ProjectTypeDef("chuck_project_type", "chuck_project_type", true, false) {

        {
            addConstantDefinition("x", "attr description", new AttributeValue(Arrays.asList("a", "b")));
        }
    };
    Set<ProjectTypeDef> projectTypes = new HashSet<>();
    final LocalProjectType myProjectType = new LocalProjectType("my_project_type", "my project type");
    projectTypes.add(myProjectType);
    projectTypes.add(new LocalProjectType("module_type", "module type"));
    projectTypes.add(chuck);
    ptRegistry = new ProjectTypeRegistry(projectTypes);
    phRegistry = new ProjectHandlerRegistry(new HashSet<>());
    importerRegistry = new ProjectImporterRegistry(Collections.<ProjectImporter>emptySet());
    projectServiceLinksInjector = new ProjectServiceLinksInjector();
    projectRegistry = new ProjectRegistry(workspaceHolder, vfsProvider, ptRegistry, phRegistry, eventService);
    projectRegistry.initProjects();
    FileWatcherNotificationHandler fileWatcherNotificationHandler = new DefaultFileWatcherNotificationHandler(vfsProvider);
    FileTreeWatcher fileTreeWatcher = new FileTreeWatcher(root, new HashSet<>(), fileWatcherNotificationHandler);
    pm = new ProjectManager(vfsProvider, ptRegistry, projectRegistry, phRegistry, importerRegistry, fileWatcherNotificationHandler, fileTreeWatcher, workspaceHolder, fileWatcherManager);
    pm.initWatcher();
    HttpJsonRequest httpJsonRequest = mock(HttpJsonRequest.class, new SelfReturningAnswer());
    //List<ProjectConfigDto> modules = new ArrayList<>();
    projects = new ArrayList<>();
    addMockedProjectConfigDto(myProjectType, "my_project");
    when(httpJsonRequestFactory.fromLink(any())).thenReturn(httpJsonRequest);
    when(httpJsonRequest.request()).thenReturn(httpJsonResponse);
    when(httpJsonResponse.asDto(WorkspaceDto.class)).thenReturn(usersWorkspaceMock);
    when(usersWorkspaceMock.getConfig()).thenReturn(workspaceConfigMock);
    when(workspaceConfigMock.getProjects()).thenReturn(projects);
    //        verify(httpJsonRequestFactory).fromLink(eq(DtoFactory.newDto(Link.class)
    //                                                             .withHref(apiEndpoint + "/workspace/" + workspace + "/project")
    //                                                             .withMethod(PUT)));
    DependencySupplierImpl dependencies = new DependencySupplierImpl();
    dependencies.addInstance(ProjectTypeRegistry.class, ptRegistry);
    dependencies.addInstance(UserDao.class, userDao);
    dependencies.addInstance(ProjectManager.class, pm);
    dependencies.addInstance(ProjectImporterRegistry.class, importerRegistry);
    dependencies.addInstance(ProjectHandlerRegistry.class, phRegistry);
    dependencies.addInstance(EventService.class, eventService);
    dependencies.addInstance(ProjectServiceLinksInjector.class, projectServiceLinksInjector);
    ResourceBinder resources = new ResourceBinderImpl();
    ProviderBinder providers = ProviderBinder.getInstance();
    EverrestProcessor processor = new EverrestProcessor(new EverrestConfiguration(), dependencies, new RequestHandlerImpl(new RequestDispatcher(resources), providers), null);
    launcher = new ResourceLauncher(processor);
    processor.addApplication(new Application() {

        @Override
        public Set<Class<?>> getClasses() {
            return java.util.Collections.<Class<?>>singleton(ProjectService.class);
        }

        @Override
        public Set<Object> getSingletons() {
            return new HashSet<>(Arrays.asList(new ApiExceptionMapper()));
        }
    });
    ApplicationContext.setCurrent(anApplicationContext().withProviders(providers).build());
    env = org.eclipse.che.commons.env.EnvironmentContext.getCurrent();
}
Also used : ProjectTypeRegistry(org.eclipse.che.api.project.server.type.ProjectTypeRegistry) DependencySupplierImpl(org.everrest.core.tools.DependencySupplierImpl) AttributeValue(org.eclipse.che.api.project.server.type.AttributeValue) Set(java.util.Set) LinkedHashSet(java.util.LinkedHashSet) HashSet(java.util.HashSet) FileWatcherNotificationHandler(org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationHandler) DefaultFileWatcherNotificationHandler(org.eclipse.che.api.vfs.impl.file.DefaultFileWatcherNotificationHandler) ProjectImporterRegistry(org.eclipse.che.api.project.server.importer.ProjectImporterRegistry) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef) ResourceLauncher(org.everrest.core.tools.ResourceLauncher) EverrestConfiguration(org.everrest.core.impl.EverrestConfiguration) EverrestProcessor(org.everrest.core.impl.EverrestProcessor) LinkedHashSet(java.util.LinkedHashSet) HashSet(java.util.HashSet) ProjectHandlerRegistry(org.eclipse.che.api.project.server.handlers.ProjectHandlerRegistry) HttpJsonRequest(org.eclipse.che.api.core.rest.HttpJsonRequest) ApiExceptionMapper(org.eclipse.che.api.core.rest.ApiExceptionMapper) LocalVirtualFileSystemProvider(org.eclipse.che.api.vfs.impl.file.LocalVirtualFileSystemProvider) EventService(org.eclipse.che.api.core.notification.EventService) RequestDispatcher(org.everrest.core.impl.RequestDispatcher) ProjectImporter(org.eclipse.che.api.project.server.importer.ProjectImporter) ProviderBinder(org.everrest.core.impl.ProviderBinder) PathMatcher(java.nio.file.PathMatcher) DefaultFileWatcherNotificationHandler(org.eclipse.che.api.vfs.impl.file.DefaultFileWatcherNotificationHandler) SelfReturningAnswer(org.eclipse.che.commons.test.mockito.answer.SelfReturningAnswer) RequestHandlerImpl(org.everrest.core.impl.RequestHandlerImpl) ResourceBinderImpl(org.everrest.core.impl.ResourceBinderImpl) ResourceBinder(org.everrest.core.ResourceBinder) FileTreeWatcher(org.eclipse.che.api.vfs.impl.file.FileTreeWatcher) VirtualFile(org.eclipse.che.api.vfs.VirtualFile) File(java.io.File) Application(javax.ws.rs.core.Application) FSLuceneSearcherProvider(org.eclipse.che.api.vfs.search.impl.FSLuceneSearcherProvider) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 10 with ProjectTypeDef

use of org.eclipse.che.api.project.server.type.ProjectTypeDef in project che by eclipse.

the class ProjectTypesTest method testGetMixinsShouldReturnProjectTypeConstraintException.

//@Test(expectedExceptions = ProjectTypeConstraintException.class)
public void testGetMixinsShouldReturnProjectTypeConstraintException() throws Exception {
    String otherPrimaryId = generate("projectType-", 3);
    Set<ProjectTypeDef> pts = new HashSet<>();
    pts.add(new PrimaryType());
    pts.add(new PrimaryType(otherPrimaryId, generate("projectType-", 5)));
    pts.add(new PersistedMixin());
    ProjectTypeRegistry reg = new ProjectTypeRegistry(pts);
    List<RegisteredProject.Problem> problems = new ArrayList<>();
    new ProjectTypes(generate("projectPath-", 5), PrimaryType.PRIMARY_ID, Arrays.asList(PersistedMixin.PERSISTED_MIXIN_ID, otherPrimaryId), reg, problems);
    assertEquals(problems.size(), 1);
    assertEquals(problems.get(0).code, 12);
}
Also used : ProjectTypeRegistry(org.eclipse.che.api.project.server.type.ProjectTypeRegistry) ArrayList(java.util.ArrayList) ProjectTypeDef(org.eclipse.che.api.project.server.type.ProjectTypeDef) HashSet(java.util.HashSet)

Aggregations

ProjectTypeDef (org.eclipse.che.api.project.server.type.ProjectTypeDef)16 HashSet (java.util.HashSet)10 ProjectTypeRegistry (org.eclipse.che.api.project.server.type.ProjectTypeRegistry)9 ArrayList (java.util.ArrayList)8 Test (org.testng.annotations.Test)6 ProjectConfigDto (org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto)5 File (java.io.File)3 PathMatcher (java.nio.file.PathMatcher)3 Collections.singletonList (java.util.Collections.singletonList)3 HashMap (java.util.HashMap)3 LinkedHashMap (java.util.LinkedHashMap)3 LinkedHashSet (java.util.LinkedHashSet)3 LinkedList (java.util.LinkedList)3 List (java.util.List)3 Set (java.util.Set)3 Attribute (org.eclipse.che.api.core.model.project.type.Attribute)3 EventService (org.eclipse.che.api.core.notification.EventService)3 HttpJsonRequest (org.eclipse.che.api.core.rest.HttpJsonRequest)3 ProjectHandlerRegistry (org.eclipse.che.api.project.server.handlers.ProjectHandlerRegistry)3 SelfReturningAnswer (org.eclipse.che.commons.test.mockito.answer.SelfReturningAnswer)3