diff --git a/agents/che-core-api-agent-shared/pom.xml b/agents/che-core-api-agent-shared/pom.xml index 9f4126a427..df76ff2d1d 100644 --- a/agents/che-core-api-agent-shared/pom.xml +++ b/agents/che-core-api-agent-shared/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-api-agent-shared diff --git a/agents/che-core-api-agent/pom.xml b/agents/che-core-api-agent/pom.xml index bc8c143cb5..108b9b2abe 100644 --- a/agents/che-core-api-agent/pom.xml +++ b/agents/che-core-api-agent/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-api-agent diff --git a/agents/exec/pom.xml b/agents/exec/pom.xml index 908ef36972..44416a23f8 100644 --- a/agents/exec/pom.xml +++ b/agents/exec/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT exec-agent Agent :: Exec diff --git a/agents/go-agents/pom.xml b/agents/go-agents/pom.xml index 77e0f0b3ff..e516d546ae 100644 --- a/agents/go-agents/pom.xml +++ b/agents/go-agents/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT go-agents Agent :: Golang agents diff --git a/agents/ls-csharp/pom.xml b/agents/ls-csharp/pom.xml index 3f7a962fb3..83656b3c42 100644 --- a/agents/ls-csharp/pom.xml +++ b/agents/ls-csharp/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ls-csharp-agent Language Server C# Agent diff --git a/agents/ls-json/pom.xml b/agents/ls-json/pom.xml index 13dfa51446..203ffec5f4 100644 --- a/agents/ls-json/pom.xml +++ b/agents/ls-json/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ls-json-agent Language Server Json Agent diff --git a/agents/ls-php/pom.xml b/agents/ls-php/pom.xml index af6ff4614a..f2d914b62f 100644 --- a/agents/ls-php/pom.xml +++ b/agents/ls-php/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ls-php-agent Language Server PHP Agent diff --git a/agents/ls-python/pom.xml b/agents/ls-python/pom.xml index f6ea8b0154..698ebb155b 100644 --- a/agents/ls-python/pom.xml +++ b/agents/ls-python/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ls-python-agent Language Server python Agent diff --git a/agents/ls-typescript/pom.xml b/agents/ls-typescript/pom.xml index 11e02da339..42cb51fc80 100644 --- a/agents/ls-typescript/pom.xml +++ b/agents/ls-typescript/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ls-typescript-agent Language Server typescript Agent diff --git a/agents/pom.xml b/agents/pom.xml index 66360b2e8d..be09c21103 100644 --- a/agents/pom.xml +++ b/agents/pom.xml @@ -16,11 +16,11 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-agents-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Agents Parent diff --git a/agents/ssh/pom.xml b/agents/ssh/pom.xml index 1a49c6a3ab..7ceb7084f6 100644 --- a/agents/ssh/pom.xml +++ b/agents/ssh/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ssh-agent SSH Agent diff --git a/agents/terminal/pom.xml b/agents/terminal/pom.xml index b177426063..c295fdfb12 100644 --- a/agents/terminal/pom.xml +++ b/agents/terminal/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT terminal-agent Agent :: Terminal diff --git a/agents/unison/pom.xml b/agents/unison/pom.xml index f883e914c7..de51fb4a2f 100644 --- a/agents/unison/pom.xml +++ b/agents/unison/pom.xml @@ -16,7 +16,7 @@ che-agents-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT unison-agent Unison Agent diff --git a/assembly/assembly-ide-war/pom.xml b/assembly/assembly-ide-war/pom.xml index dc58d8361e..6c73417156 100644 --- a/assembly/assembly-ide-war/pom.xml +++ b/assembly/assembly-ide-war/pom.xml @@ -16,7 +16,7 @@ che-assembly-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT assembly-ide-war war diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 3371198b5b..426e1d61d1 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -16,7 +16,7 @@ che-assembly-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-wsagent-server/pom.xml b/assembly/assembly-wsagent-server/pom.xml index 7d826369fa..a66ecd219f 100644 --- a/assembly/assembly-wsagent-server/pom.xml +++ b/assembly/assembly-wsagent-server/pom.xml @@ -16,7 +16,7 @@ che-assembly-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT assembly-wsagent-server pom diff --git a/assembly/assembly-wsagent-server/src/assembly/setenv.sh b/assembly/assembly-wsagent-server/src/assembly/setenv.sh index 8246d1f610..f0d10fb484 100644 --- a/assembly/assembly-wsagent-server/src/assembly/setenv.sh +++ b/assembly/assembly-wsagent-server/src/assembly/setenv.sh @@ -22,6 +22,8 @@ [ -z "${JPDA_ADDRESS}" ] && JPDA_ADDRESS="4403" +[ -z "${UMASK}" ] && UMASK="022" + #Tomcat options [ -z "${CATALINA_OPTS}" ] && CATALINA_OPTS="-Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.ssl=false \ diff --git a/assembly/assembly-wsagent-war/pom.xml b/assembly/assembly-wsagent-war/pom.xml index 0e147b069f..084d06798d 100644 --- a/assembly/assembly-wsagent-war/pom.xml +++ b/assembly/assembly-wsagent-war/pom.xml @@ -16,7 +16,7 @@ che-assembly-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT assembly-wsagent-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 6cdf6a7fef..c3284dc9be 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -16,7 +16,7 @@ che-assembly-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 25af070e98..38441ce9d8 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -119,7 +119,7 @@ public class WsMasterModule extends AbstractModule { bind(org.eclipse.che.security.oauth.OAuthAuthenticatorProvider.class) .to(org.eclipse.che.security.oauth.OAuthAuthenticatorProviderImpl.class); - bind(org.eclipse.che.api.auth.oauth.OAuthTokenProvider.class) + bind(org.eclipse.che.security.oauth.shared.OAuthTokenProvider.class) .to(org.eclipse.che.security.oauth.OAuthAuthenticatorTokenProvider.class); bind(org.eclipse.che.security.oauth.OAuthAuthenticationService.class); diff --git a/assembly/pom.xml b/assembly/pom.xml index 1f33b5e965..986838e92a 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -16,12 +16,12 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che che-assembly-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che IDE :: Parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 55e3866dbc..1490fc49a4 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 95c16426b6..4ee92a09d0 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 65997b8b5c..ad086f5d01 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index 69060b4985..eb7d2af790 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 4489ff51c1..50eb13ed35 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 37297c08a7..4c26ef12a1 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 399edc6e15..3d7eb3e05a 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-db Che Core :: DB diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 878374b3be..7487de5cb6 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-typescript-dto-maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 5adfb4d346..b18e2c44e5 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 04e4d59069..856f4c74a5 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 27e269dd7b..f914dd9705 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 0ee66a8df4..fee209c60b 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 1d55d6ba6a..b9699a81ae 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index d99252c781..2883f7ec0d 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index b34e1f4700..812cee3e1d 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-xml/pom.xml b/core/commons/che-core-commons-xml/pom.xml index e2477a2d05..921d104e29 100644 --- a/core/commons/che-core-commons-xml/pom.xml +++ b/core/commons/che-core-commons-xml/pom.xml @@ -16,7 +16,7 @@ che-core-commons-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-xml jar diff --git a/core/commons/pom.xml b/core/commons/pom.xml index cc95b2509e..6a74425cb4 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -16,7 +16,7 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 5e1948fcae..dc0ea6a7ae 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -16,12 +16,12 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che.core che-core-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Core Parent diff --git a/dashboard/pom.xml b/dashboard/pom.xml index 9eedbef99d..73d525c645 100644 --- a/dashboard/pom.xml +++ b/dashboard/pom.xml @@ -16,12 +16,12 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che.dashboard che-dashboard-war - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT war Che Dashboard :: Web App 2015 diff --git a/dashboard/src/app/projects/create-project/samples/create-project-samples.controller.ts b/dashboard/src/app/projects/create-project/samples/create-project-samples.controller.ts index 4db6fb94c2..d9becaddae 100644 --- a/dashboard/src/app/projects/create-project/samples/create-project-samples.controller.ts +++ b/dashboard/src/app/projects/create-project/samples/create-project-samples.controller.ts @@ -29,12 +29,16 @@ export class CreateProjectSamplesController { * Default constructor that is using resource * @ngInject for Dependency injection */ - constructor($scope, $filter: ng.IFilterService, cheAPI: CheAPI) { + constructor($scope: ng.IScope, $filter: ng.IFilterService, cheAPI: CheAPI) { this.$filter = $filter; this.templates = cheAPI.getProjectTemplate().getAllProjectTemplates(); if (!this.templates.length) { - cheAPI.getProjectTemplate().fetchTemplates(); + const templatesPromise = cheAPI.getProjectTemplate().fetchTemplates(); + templatesPromise.finally(() => { + this.templates = cheAPI.getProjectTemplate().getAllProjectTemplates(); + this.filterAndSortTemplates(); + }); } $scope.$watch(() => { diff --git a/dashboard/src/app/stacks/stack-details/stack-validation.service.ts b/dashboard/src/app/stacks/stack-details/stack-validation.service.ts index 9b441f3e5f..b95b7ecc00 100644 --- a/dashboard/src/app/stacks/stack-details/stack-validation.service.ts +++ b/dashboard/src/app/stacks/stack-details/stack-validation.service.ts @@ -9,6 +9,8 @@ * Codenvy, S.A. - initial API and implementation */ 'use strict'; +import {DockerfileParser} from '../../../components/api/environment/docker-file-parser'; + const COMPOSE = 'compose'; const DOCKERFILE = 'dockerfile'; @@ -21,6 +23,12 @@ const DOCKERIMAGE = 'dockerimage'; */ export class StackValidationService { + dockerfileParser: DockerfileParser; + + constructor() { + this.dockerfileParser = new DockerfileParser(); + } + /** * Return result of recipe validation. * @param stack {che.IStack} @@ -247,9 +255,13 @@ export class StackValidationService { if (!recipe.content) { isValid = false; errors.push('Unknown recipe content.'); - } else if (!/^FROM\s+\w+/m.test(recipe.content)) { - isValid = false; - errors.push('The dockerfile is invalid.'); + } else { + try { + this.dockerfileParser.parse(recipe.content); + } catch (e) { + isValid = false; + errors.push(e.message); + } } } if (!recipe.contentType) { diff --git a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts index 4832f2ade2..633ade9faa 100644 --- a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.controller.ts @@ -33,7 +33,7 @@ export class EditServerDialogController { usedReferences: string[]; port: number; - portMin: number = 1024; + portMin: number = 0; portMax: number = 65535; protocol: string; reference: string; diff --git a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.html b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.html index 43b724aceb..fe73f25f5b 100644 --- a/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.html +++ b/dashboard/src/app/workspaces/workspace-details/environments/list-servers/edit-server-dialog/edit-server-dialog.html @@ -35,7 +35,7 @@ che-place-holder="Port number" ng-model="editServerDialogController.port" type="number" - min="1024" + min="0" max="65535" custom-validator="editServerDialogController.isUniquePort($value)" aria-label="Server port number" diff --git a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/delete-dev-machine-dialog/delete-dev-machine-dialog.html b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/delete-dev-machine-dialog/delete-dev-machine-dialog.html index 100c79b3a3..417d89a760 100644 --- a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/delete-dev-machine-dialog/delete-dev-machine-dialog.html +++ b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/delete-dev-machine-dialog/delete-dev-machine-dialog.html @@ -1,4 +1,4 @@ - +
diff --git a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts index 9739df59eb..ea14ab9e09 100644 --- a/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/environments/machine-config/machine-config.controller.ts @@ -233,7 +233,6 @@ export class WorkspaceMachineConfigController { * @param {MouseEvent} $event * @returns {ng.IPromise} */ - // todo showDeleteDevMachineDialog($event: MouseEvent): ng.IPromise { return this.$mdDialog.show({ targetEvent: $event, diff --git a/dashboard/src/app/workspaces/workspace-details/list-commands/edit-command-dialog/edit-command-dialog.html b/dashboard/src/app/workspaces/workspace-details/list-commands/edit-command-dialog/edit-command-dialog.html index 851a064750..95b6de9d33 100644 --- a/dashboard/src/app/workspaces/workspace-details/list-commands/edit-command-dialog/edit-command-dialog.html +++ b/dashboard/src/app/workspaces/workspace-details/list-commands/edit-command-dialog/edit-command-dialog.html @@ -48,7 +48,7 @@
Command's preview URL should be less than 256 characters long.
- diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.controller.ts b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.controller.ts index 9e44119ce5..22eb3eeff0 100644 --- a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.controller.ts @@ -9,6 +9,7 @@ * Codenvy, S.A. - initial API and implementation */ 'use strict'; +import {DockerfileParser} from '../../../../../components/api/environment/docker-file-parser'; /** * @ngdoc controller @@ -20,6 +21,9 @@ export class WorkspaceRecipeAuthoringController { $timeout: ng.ITimeoutService; + dockerfileParser: DockerfileParser; + recipeValidationError: string; + editingTimeoutPromise: ng.IPromise; recipeFormat: string; @@ -43,6 +47,8 @@ export class WorkspaceRecipeAuthoringController { constructor($scope: ng.IScope, $timeout: ng.ITimeoutService) { this.$timeout = $timeout; + this.dockerfileParser = new DockerfileParser(); + this.editorOptions = { lineWrapping: true, lineNumbers: true, @@ -81,6 +87,7 @@ export class WorkspaceRecipeAuthoringController { this.editingTimeoutPromise = this.$timeout(() => { this.detectFormat(content); + this.validateRecipe(content); }, 100); } @@ -98,7 +105,16 @@ export class WorkspaceRecipeAuthoringController { } } - onRecipeChange() { + validateRecipe(content: string): void { + this.recipeValidationError = ''; + try { + this.dockerfileParser.parse(content); + } catch (e) { + this.recipeValidationError = e.message; + } + } + + onRecipeChange(): void { this.$timeout(() => { this.detectFormat(this.recipeScriptCopy); this.recipeChange({ diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.html b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.html index d7e8a0e76b..827b8ea70f 100644 --- a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.html +++ b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.html @@ -16,6 +16,10 @@
The recipe is required.
+
+ {{workspaceRecipeAuthoringController.recipeValidationError}} +
diff --git a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.styl b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.styl index 457915ca13..45db3620b1 100644 --- a/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.styl +++ b/dashboard/src/app/workspaces/workspace-details/select-stack/recipe-authoring/workspace-recipe-authoring.styl @@ -17,3 +17,11 @@ .che-label-container-row align-items center + + .errors-container + color $error-color + min-height 20px + margin-right 2px + + span + margin-right 2px diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts index a3e42f436e..00e51ad60c 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/workspace-details.controller.ts @@ -51,6 +51,7 @@ export class WorkspaceDetailsController { namespaceId: string = ''; namespaceLabel: string; namespaceLabels: Array; + namespaceInfo: String; onNamespaceChanged: Function; workspaceId: string = ''; workspaceName: string = ''; @@ -188,12 +189,14 @@ export class WorkspaceDetailsController { this.namespaceId = namespace ? namespace.id : (this.getNamespaces().length ? this.getNamespaces()[0].id : undefined); this.namespaceLabel = namespace ? namespace.label : (this.getNamespaces().length ? this.getNamespaces()[0].label : undefined); this.namespaceLabels = this.getNamespaces().length ? this.lodash.pluck(this.getNamespaces(), 'label') : []; + this.fetchNamespaceInfo(); this.onNamespaceChanged = (label: string) => { let namespace = this.getNamespaces().find((namespace: any) => { return namespace.label === label; }); this.namespaceId = namespace ? namespace.id : this.namespaceId; + this.fetchNamespaceInfo(); } }); } @@ -268,7 +271,7 @@ export class WorkspaceDetailsController { */ getWorkspaceStatus(): string { if (this.isCreationFlow) { - return 'CREATING'; + return 'New'; } let unknownStatus = 'unknown'; @@ -312,6 +315,17 @@ export class WorkspaceDetailsController { } } + fetchNamespaceInfo() { + if (!this.cheNamespaceRegistry.getAdditionalInfo()) { + this.namespaceInfo = null; + return; + } + + this.cheNamespaceRegistry.getAdditionalInfo()(this.namespaceId).then((info: string) => { + this.namespaceInfo = info; + }); + } + /** * Callback when Team button is clicked in Edit mode. * Redirects to billing details or team details. @@ -657,7 +671,7 @@ export class WorkspaceDetailsController { return tabs.some((tabIndex: number) => { return this.checkFormsNotValid(tabIndex); - }); + }) || this.isDisableWorkspaceCreation(); } /** @@ -687,5 +701,41 @@ export class WorkspaceDetailsController { } } + /** + * Returns namespaces empty message if set. + * + * @returns {string} + */ + getNamespaceEmptyMessage(): string { + return this.cheNamespaceRegistry.getEmptyMessage(); + } + + /** + * Returns namespaces caption. + * + * @returns {string} + */ + getNamespaceCaption(): string { + return this.cheNamespaceRegistry.getCaption(); + } + + /** + * Returns namespaces additional information. + * + * @returns {()=>Function} + */ + getNamespaceAdditionalInfo(): Function { + return this.cheNamespaceRegistry.getAdditionalInfo; + } + + /** + * Returns whether workspace creation should be disabled based on namespaces. + * + * @returns {boolean|string} + */ + isDisableWorkspaceCreation(): boolean { + let namespaces = this.cheNamespaceRegistry.getNamespaces(); + return (this.isCreationFlow && (!namespaces || namespaces.length === 0) && this.cheNamespaceRegistry.getEmptyMessage()); + } } diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-details.html b/dashboard/src/app/workspaces/workspace-details/workspace-details.html index af9990b177..bb35b404ab 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-details.html +++ b/dashboard/src/app/workspaces/workspace-details/workspace-details.html @@ -62,13 +62,23 @@ - - - + +
+ + + {{workspaceDetailsController.namespaceInfo}} + +
+
+ + {{workspaceDetailsController.getNamespaceEmptyMessage()}} +
+ { }, 'recipe': { 'type': 'dockerfile', - 'content': 'FROM codenvy/ubuntu_jdk8\nENV myName=\"John Doe\" myDog=Rex\\ The\\ Dog \\\n myCat=fluffy', + 'content': 'FROM codenvy/ubuntu_jdk8\nENV myName="John Doe" myDog=Rex\\ The\\ Dog \\\n myCat=fluffy', 'contentType': 'text/x-dockerfile' } }; diff --git a/dashboard/src/components/api/environment/docker-file-parser.spec.ts b/dashboard/src/components/api/environment/docker-file-parser.spec.ts index 11abb6aaf8..8da692660c 100644 --- a/dashboard/src/components/api/environment/docker-file-parser.spec.ts +++ b/dashboard/src/components/api/environment/docker-file-parser.spec.ts @@ -17,84 +17,315 @@ import {DockerfileParser} from './docker-file-parser'; * @author Oleksii Kurinnyi */ -describe('Simper dockerfile parser', () => { +describe('Simple dockerfile parser >', () => { let parser; beforeEach(() => { parser = new DockerfileParser(); }); - describe('method _parseArgument()', () => { - it('should parse ENV argument as single variable form #1', () => { - let instruction = 'ENV', - argument = 'name environment variable value'; + describe('parsing directives >', () => { - let result = parser._parseArgument(instruction, argument); + it(`should know 'escape' directive`, () => { + const dockerfile = `# escape=\\ +FROM codenvy/ubuntu_jdk8`; - let expectedResult = [{ - instruction: 'ENV', - argument: ['name', 'environment variable value'] - }]; - expect(result).toEqual(expectedResult); - }); + const result = parser.parse(dockerfile); - it('should parse ENV argument as single variable form #2', () => { - let instruction = 'ENV', - argument = 'SBT_OPTS \'-Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.wdf.sap.corp -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=nexus.wdf.sap.corp\''; - - let result = parser._parseArgument(instruction, argument); - - let expectedResult = [{ - instruction: 'ENV', - argument: ['SBT_OPTS', '\'-Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.wdf.sap.corp -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=nexus.wdf.sap.corp\''] - }]; - expect(result).toEqual(expectedResult); - }); - - it('should parse ENV argument as multiple variables form #1', () => { - let instruction = 'ENV', - argument = 'key=value'; - let result = parser._parseArgument(instruction, argument); - - let expectedResult = [{ - instruction: 'ENV', - argument: ['key', 'value'] - }]; - expect(result).toEqual(expectedResult); - }); - - it('should parse ENV argument as multiple variables form #2', () => { - let instruction = 'ENV', - argument = 'myName="John Doe" myDog=Rex\ The\ Dog myCat=fluffy'; - - let result = parser._parseArgument(instruction, argument); - - let expectedResult = [{ - instruction: 'ENV', - argument: ['myName', 'John Doe'] + const expectedResult = [{ + directive: '# escape=\\' }, { - instruction: 'ENV', - argument: ['myDog', 'Rex The Dog'] - }, { - instruction: 'ENV', - argument: ['myCat', 'fluffy'] + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' }]; + expect(result).toEqual(expectedResult); }); + it(`should treat unknown directive as a comment`, () => { + const dockerfile = `# directive=value +FROM codenvy/ubuntu_jdk8`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + comment: '# directive=value' + }, { + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }]; + + expect(result).toEqual(expectedResult); + }); + + it(`should throw an error if there are two identical directives`, () => { + const dockerfile = `# escape=\\ +# escape=\` +FROM codenvy/ubuntu_jdk8`; + const parse = () => { + parser.parse(dockerfile); + }; + + expect(parse).toThrowError(TypeError); + }); + + it(`should treat known directive as a comment after an empty line`, () => { + const dockerfile = ` +# escape=\\ +FROM codenvy/ubuntu_jdk8`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + emptyLine: true + }, { + comment: '# escape=\\' + }, { + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }]; + + expect(result).toEqual(expectedResult); + }); + + it(`should treat known directive as a comment after a comment`, () => { + const dockerfile = `# comment line +# escape=\\ +FROM codenvy/ubuntu_jdk8`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + comment: '# comment line' + }, { + comment: '# escape=\\' + }, { + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }]; + + expect(result).toEqual(expectedResult); + }); + + it(`should treat known directive as a comment after a builder instruction`, () => { + const dockerfile = `FROM codenvy/ubuntu_jdk8 +# escape=\\`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }, { + comment: '# escape=\\' + }]; + + expect(result).toEqual(expectedResult); + }); + + }); + + describe('method parseArgument()', () => { + + describe('ENV argument as single variable form >', () => { + + it('should parse environment variable #1', () => { + const instruction = 'ENV', + argument = 'name environment variable value'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['name', 'environment variable value'] + }]; + expect(result).toEqual(expectedResult); + }); + + it('should parse environment variable #2', () => { + const instruction = 'ENV', + argument = 'SBT_OPTS \'-Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.wdf.sap.corp -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=nexus.wdf.sap.corp\''; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['SBT_OPTS', '\'-Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.wdf.sap.corp -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=nexus.wdf.sap.corp\''] + }]; + expect(result).toEqual(expectedResult); + }); + + it(`should throw an error if incorrect ENV argument is written in single variable form`, () => { + const instruction = 'ENV', + argument = 'myNameJohnDoe'; // space between name and value is missed + + const parse = () => { + parser.parseArgument(instruction, argument); + }; + + expect(parse).toThrowError(TypeError); + }); + + }); + + describe('ENV argument as multiple variables form >', () => { + + it('should parse single environment variable with backslashes', () => { + const dockerfile = `# escape=\\ +FROM codenvy/ubuntu_jdk8 +ENV myDog=Rex\\ The\\ Dog`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + directive: '# escape=\\' + }, { + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }, { + instruction: 'ENV', + argument: ['myDog', 'Rex The Dog'] + }]; + + expect(result).toEqual(expectedResult); + }); + + it('should parse single environment variable with backtick', () => { + const dockerfile = `# escape=\` +FROM codenvy/ubuntu_jdk8 +ENV myDog=Rex\` The\` Dog`; + + const result = parser.parse(dockerfile); + + const expectedResult = [{ + directive: '# escape=\`' + }, { + instruction: 'FROM', + argument: 'codenvy/ubuntu_jdk8' + }, { + instruction: 'ENV', + argument: ['myDog', 'Rex The Dog'] + }]; + + expect(result).toEqual(expectedResult); + }); + + it('should parse ENV argument as multiple variables form #1', () => { + const instruction = 'ENV', + argument = 'key=value'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['key', 'value'] + }]; + expect(result).toEqual(expectedResult); + }); + + it('should parse ENV argument as multiple variables form #2', () => { + const instruction = 'ENV', + argument = 'myName="John Doe" myDog=Rex\\ The\\ Dog myCat=fluffy'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['myName', 'John Doe'] + }, { + instruction: 'ENV', + argument: ['myDog', 'Rex The Dog'] + }, { + instruction: 'ENV', + argument: ['myCat', 'fluffy'] + }]; + expect(result).toEqual(expectedResult); + }); + + it('should parse ENV argument as multiple variables form #3', () => { + const instruction = 'ENV', + argument = 'myName="John Doe" myDog=Rex\\ The\\ Dog \\\n myCat=fluffy'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['myName', 'John Doe'] + }, { + instruction: 'ENV', + argument: ['myDog', 'Rex The Dog'] + }, { + instruction: 'ENV', + argument: ['myCat', 'fluffy'] + }]; + expect(result).toEqual(expectedResult); + }); + + it(`should parse ENV argument as multiple variables form #4`, () => { + const instruction = 'ENV', + argument = 'myName="John Doe" myDog=Rex\\ The\\ Dog\\ myCat=fluffy'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['myName', 'John Doe'] + }, { + instruction: 'ENV', + argument: ['myDog', 'Rex The Dog myCat=fluffy'] + }]; + expect(result).toEqual(expectedResult); + }); + + it(`should parse ENV argument as multiple variables form #5`, () => { + const instruction = 'ENV', + argument = 'myVar=\\\\\\ \\\\\\\\'; + + const result = parser.parseArgument(instruction, argument); + + const expectedResult = [{ + instruction: 'ENV', + argument: ['myVar', '\\ \\\\'] + }]; + expect(result).toEqual(expectedResult); + }); + + it(`should throw an error if incorrect ENV argument is written in multiple variables form`, () => { + const instruction = 'ENV', + argument = 'myName="John Doe" myDog=Rex\\ The\\ Dog myCat fluffy'; // the 'equal' symbol is missed + + const parse = () => { + parser.parseArgument(instruction, argument); + }; + + expect(parse).toThrowError(TypeError); + }); + + }); + }); it('should parse a dockerfile', () => { - let dockerfile = 'FROM codenvy/ubuntu_jdk8ENV' - + '\n#ENV myCat fluffy' - + '\nENV myDog Rex The Dog' - + '\nENV myName="John Doe"'; + const dockerfile = `# escape=\\ - let result = parser.parse(dockerfile); +FROM codenvy/ubuntu_jdk8 +#ENV myCat fluffy +ENV myDog Rex The Dog +ENV myName="John Doe" +ENV myText long \\ +multiline \\ +value +ENV myVal=\\\\\\ \\\\\\\\`; - let expectedResult = [{ + const result = parser.parse(dockerfile); + + const expectedResult = [{ + directive: '# escape=\\' + }, { + emptyLine: true + }, { instruction: 'FROM', - argument: 'codenvy/ubuntu_jdk8ENV' + argument: 'codenvy/ubuntu_jdk8' }, { comment: '#ENV myCat fluffy' }, { @@ -103,14 +334,24 @@ describe('Simper dockerfile parser', () => { }, { instruction: 'ENV', argument: ['myName', 'John Doe'] + }, { + instruction: 'ENV', + argument: ['myText', 'long \nmultiline \nvalue'] + }, { + instruction: 'ENV', + argument: ['myVal', '\\ \\\\'] }]; expect(result).toEqual(expectedResult); }); it('should stringify an object into a dockerfile', () => { - let instructions = [{ + const instructions = [{ + directive: '# escape=\\' + }, { + emptyLine: true + }, { instruction: 'FROM', - argument: 'codenvy/ubuntu_jdk8ENV' + argument: 'codenvy/ubuntu_jdk8' }, { comment: '#ENV myCat fluffy' }, { @@ -119,14 +360,26 @@ describe('Simper dockerfile parser', () => { }, { instruction: 'ENV', argument: ['myName', 'John Doe'] + }, { + instruction: 'ENV', + argument: ['myText', 'long \nmultiline \nvalue'] + }, { + instruction: 'ENV', + argument: ['myVal', '\\ \\\\'] }]; - let result = parser.dump(instructions); + const result = parser.dump(instructions); - let expectedResult = 'FROM codenvy/ubuntu_jdk8ENV' - + '\n#ENV myCat fluffy' - + '\nENV myDog Rex The Dog' - + '\nENV myName John Doe'; + const expectedResult = `# escape=\\ + +FROM codenvy/ubuntu_jdk8 +#ENV myCat fluffy +ENV myDog Rex The Dog +ENV myName John Doe +ENV myText long \\ +multiline \\ +value +ENV myVal \\\\\ \\\\\\\\`; expect(result.trim()).toEqual(expectedResult); }); diff --git a/dashboard/src/components/api/environment/docker-file-parser.ts b/dashboard/src/components/api/environment/docker-file-parser.ts index fd1ed354c0..2efd4880d7 100644 --- a/dashboard/src/components/api/environment/docker-file-parser.ts +++ b/dashboard/src/components/api/environment/docker-file-parser.ts @@ -19,36 +19,105 @@ interface IRecipeLine { instruction?: string; argument?: string | string[]; comment?: string; + directive?: string; + emptyLine?: boolean; } export class DockerfileParser { + /** + * RegExp to match the very first instruction to be 'FROM'. + */ fromRE: RegExp; - backslashLineBreakRE: RegExp; - lineBreakRE: RegExp; - commentLineRE: RegExp; + /** + * RegExp to match an empty line. + */ + emptyLineRE: RegExp; + /** + * RegExp to match a comment line. + */ + commentRE: RegExp; + /** + * RegExp to match a single dockerfile instruction. + */ instructionRE: RegExp; - envVariablesRE: RegExp; - quotesTestRE: RegExp; - quoteAtStartReplaceRE: RegExp; - quoteAtEndReplaceRE: RegExp; - backslashSpaceRE: RegExp; + /** + * RegExp to match leading and trailing quotes. + */ + quotesRE: RegExp; + /** + * RegExp to match a dockerfile parsing directive. + */ + directiveRE: RegExp; + /** + * RegExp to match an environment variable in form name="quoted value". + */ + envVariableQuotedValueRE: RegExp; + /** + * RegExp to match any line break. + */ + linebreaksRE: RegExp; + /** + * RegExp to match any escaped whitespace or line break. + */ + escapedWhitespacesAndLinebreaksRE: RegExp; + /** + * RegExp to match any escaped escape symbol. + */ + escapedEscapeSymbolsRE: RegExp; + /** + * RegExp to match escaped line break at start of the line. + */ + escapedLineBreakAtStartRE: RegExp; + /** + * RegExp to match environment variable name. + */ + variableNameRE: RegExp; + /** + * RegExp to match first unescaped whitespace or line break. + */ + unEscapedWhitespaceRE: RegExp; + + /** + * Allowed values for parsing directives. + */ + directiveValues: { + escape: string[], + [name: string]: string[] + }; + /** + * Parsing directives with default values. + */ + directives: { + escape?: string, + [name: string]: string + }; + /** + * Current escape to be used as part of a RegExp + */ + escape: string; + /** + * RegExp to match any escape symbol. + */ + escapeRE: RegExp; constructor() { - this.fromRE = /^FROM\s+\w+/m; - this.backslashLineBreakRE = /\\\r?\n(\s+)?/; - this.lineBreakRE = /\r?\n/; - this.commentLineRE = /^#/; - this.instructionRE = /(\w+)\s+?(.+)/; - this.envVariablesRE = /(?:^|(?:\s+))([^\s=]+?)=([^=]+?)(?:(?=\s+\w+=)|$)/g; - // | | | | - // | | | \- start of next variable name or end of line - // | | \- variable value - // | \- variable name - // \- start of line or spaces before variable name - this.quotesTestRE = /^(["']).+(\1)$/; - this.quoteAtStartReplaceRE = /^["']/g; - this.quoteAtEndReplaceRE = /["']$/g; - this.backslashSpaceRE = /\\\s/g; + this.fromRE = /^FROM$/i; + this.emptyLineRE = /^\s*\r?\n/; + this.commentRE = /^\s*#/; + this.quotesRE = /^["']|['"]$/g; + this.envVariableQuotedValueRE = /^([^\s=]+?)=['"]([^'"]+?)['"]\s*/; + this.linebreaksRE = /(\r?\n)/g; + this.variableNameRE = /^([a-z_][a-z0-9_]*)=/i; + + this.directiveValues = { + escape: ['\\', '`'] + }; + this.directives = {}; + const knownDirectives = 'escape'; + this.directiveRE = new RegExp('^\\s*#\\s*(' + knownDirectives + ')\\s*=\\s*([^\\s]+)', 'i'); + + // set default parsing directive + this.updateDirectives('escape', this.directiveValues.escape[0]); } /** @@ -58,105 +127,100 @@ export class DockerfileParser { * @returns {IRecipeLine[]} */ parse(content: string): IRecipeLine[] { - if (!this.fromRE.test(content)) { - throw new TypeError('Dockerfile should start with \'FROM\' instruction. Cannot parse this recipe.'); - } + let recipeContent = content; - // join multiline instructions - content = this._joinMultilineInstructions(content); + const instructions: IRecipeLine[] = []; + const uniqueDirectives: string[] = []; + let counter = 1000; + let lookingForDirectives = true; + let firstInstruction = true; - // split dockerfile into separate instruction lines - let instructionLines: string[] = content.split(this.lineBreakRE); + // set default parsing directive + this.updateDirectives('escape', this.directiveValues.escape[0]); - // split instruction line into instruction and argument - let instructions: IRecipeLine[] = []; - instructionLines.forEach((line: string) => { - line = line.trim(); + while (recipeContent.length && counter) { + counter--; - // check for comment line - if (this.commentLineRE.test(line)) { - instructions.push({comment: line}); - return; + // process parsing directive + if (lookingForDirectives) { + if (!this.emptyLineRE.test(recipeContent) && this.directiveRE.test(recipeContent)) { + const parts = this.splitBySymbolAtIndex(recipeContent, this.getSplitIndex(recipeContent, '\n')), + directiveStr = parts[0]; + recipeContent = parts[1]; + + let [ , name, value] = this.directiveRE.exec(directiveStr); + + if (this.directiveValues[name].indexOf(value) === -1) { + // directive value is not allowed + // hence this line should be treated as comment + instructions.push({comment: directiveStr}); + lookingForDirectives = false; + continue; + } + + name = name.toLowerCase(); + if (uniqueDirectives.indexOf(name) !== -1) { + throw new TypeError(`Directive "${name}" is invalid due to appearing twice.`); + } + uniqueDirectives.push(name); + + this.updateDirectives(name, value); + instructions.push({ + directive: directiveStr + }); + continue; + } + lookingForDirectives = false; } - let m = line.match(this.instructionRE); - if (m) { - let instruction = m[1], - argument = m[2]; + // process empty line + if (this.emptyLineRE.test(recipeContent)) { + const parts = this.splitBySymbolAtIndex(recipeContent, this.getSplitIndex(recipeContent, '\n')); + recipeContent = parts[1]; + + instructions.push({emptyLine: true}); + + continue; + } + + // process comment + if (this.commentRE.test(recipeContent)) { + const parts = this.splitBySymbolAtIndex(recipeContent, this.getSplitIndex(recipeContent, '\n')), + commentStr = parts[0]; + recipeContent = parts[1]; + + instructions.push({comment: commentStr}); + + continue; + } + + // process instruction + if (this.instructionRE.test(recipeContent)) { + const [fullMatch, instruction, argument] = this.instructionRE.exec(recipeContent); + + if (firstInstruction && !this.fromRE.test(instruction)) { + throw new TypeError('Dockerfile should start with \'FROM\' instruction.'); + } + firstInstruction = false; // parse argument - let results: IRecipeLine[] = this._parseArgument(instruction, argument); - + let results: IRecipeLine[] = this.parseArgument(instruction, argument); results.forEach((result: IRecipeLine) => { instructions.push(result); }); + + const parts = this.splitBySymbolAtIndex(recipeContent, fullMatch.length); + recipeContent = parts[1]; + + continue; } - }); - return instructions; - } - - /** - * Remove line breaks from lines which end with backslash - * - * @param content {string} - * @returns {string} - * @private - */ - _joinMultilineInstructions(content: string): string { - return content.replace(this.backslashLineBreakRE, ''); - } - - /** - * Parses an argument string depending on instruction - * - * @param instruction {string} - * @param argumentStr {string} - * @returns {IRecipeLine[]} - * @private - */ - _parseArgument(instruction: string, argumentStr: string): IRecipeLine[] { - let results: IRecipeLine[] = []; - - switch (instruction) { - case 'ENV': - let firstSpaceIndex = argumentStr.indexOf(' '), - firstEqualIndex = argumentStr.indexOf('='); - if (firstEqualIndex > -1 && (firstSpaceIndex === -1 || firstEqualIndex < firstSpaceIndex)) { - // this argument string contains one or more environment variables - let match; - while (match = this.envVariablesRE.exec(argumentStr)) { - let name: string = match[1], - value: string = match[2]; - if (this.quotesTestRE.test(value)) { - value = value.replace(this.quoteAtStartReplaceRE, ''); - value = value.replace(this.quoteAtEndReplaceRE, ''); - } - if (this.backslashSpaceRE.test(value)) { - value = value.replace(this.backslashSpaceRE, ' '); - } - - results.push({ - instruction: instruction, - argument: [name, value] - }); - } - } else { - // this argument string contains only one environment variable - results.push({ - instruction: instruction, - argument: [argumentStr.slice(0, firstSpaceIndex), argumentStr.slice(firstSpaceIndex + 1)] - }); - } - break; - default: - results.push({ - instruction: instruction, - argument: argumentStr - }); + // got weird line + const [line, ] = this.splitBySymbolAtIndex(recipeContent, this.getSplitIndex(recipeContent, '\n')); + throw new TypeError(`Cannot parse recipe from line: ${line}`); } - return results; + return instructions; } /** @@ -169,29 +233,239 @@ export class DockerfileParser { let content = ''; instructions.forEach((line: IRecipeLine) => { - if (line.comment) { + if (line.emptyLine) { + content += '\n'; + } else if (line.directive) { + content += line.directive + '\n'; + } else if (line.comment) { content += line.comment + '\n'; } else { - content += line.instruction + ' ' + this._stringifyArgument(line) + '\n'; + content += line.instruction + ' ' + this.stringifyArgument(line) + '\n'; } }); return content; } + /** + * Returns index of given symbol in the string. + * + * @param {string} content a string + * @param {string} delimiter a substring, position of which has to be found. + * @return {number} + */ + private getSplitIndex(content: string, delimiter: string): number { + return content.indexOf(delimiter) === -1 ? content.length : content.indexOf(delimiter); + } + + /** + * Builds a RegExp to match any escape symbol. + * Builds a RegExp to match a dockerfile instruction. + * Builds a RegExp to match any escaped whitespace or line break. + * Builds a RegExp to match any escaped whitespace or line break. + * Builds a RegExp to match escaped line break at line start. + * Builds a RegExp to match first unescaped whitespace or line break. + */ + private buildParsingDirectiveSpecificRegExps(): void { + this.escapeRE = new RegExp('(' + this.escape + ')', 'g'); + + const instructions = 'FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL'; + this.instructionRE = new RegExp('^\\s*(' + instructions + ')\\s+((?:.|' + this.escape + '\\r?\\n)+(?!\\r?\\n).)', 'i'); + + this.escapedWhitespacesAndLinebreaksRE = new RegExp('([^' + this.escape + ']?(?:' + this.escape + '{2})*)' + this.escape + '(\\s|\\r?\\n|' + this.escape + ')', 'g'); + + this.escapedEscapeSymbolsRE = new RegExp('' + this.escape + '(' + this.escape + ')', 'g'); + + this.escapedLineBreakAtStartRE = new RegExp('^' + this.escape + '\\r?\\n'); + + this.unEscapedWhitespaceRE = new RegExp('[^' + this.escape + '](?:' + this.escape + '{2})*(\\s|\\r?\\n)'); + } + + /** + * Updates parsing directives object and rebuilds appropriate RegExp. + * + * @param {string} directive a directive's name + * @param {string} value a directive's value + */ + private updateDirectives(directive: string, value: string): void { + this.escape = value === '\\' ? '\\\\' : value; + this.directives[directive] = value; + + switch (directive) { + case 'escape': + this.buildParsingDirectiveSpecificRegExps(); + break; + } + } + + /** + * Splits a string by symbol at an index. + * + * @param {string} what a string to be split. + * @param {number} where an index to split the string. + * @return {[string,string]} + */ + private splitBySymbolAtIndex(what: string, where: number): string[] { + if (where < 0 || where >= what.length) { + where = what.length; + return [what, '']; + } + + return [what.slice(0, where), what.slice(where + 1)]; + } + + /** + * Parses an argument string depending on instruction + * + * @param instruction {string} + * @param argumentStr {string} + * @returns {IRecipeLine[]} + */ + private parseArgument(instruction: string, argumentStr: string): IRecipeLine[] { + const results: IRecipeLine[] = []; + + switch (instruction) { + case 'ENV': + const variables: string[][] = this.parseENVInstruction(argumentStr); + variables.forEach((variable: string[]) => { + results.push({ + instruction: instruction, + argument: variable + }); + }); + break; + default: + results.push({ + instruction: instruction, + argument: argumentStr + }); + } + + return results; + } + + private parseENVInstruction(content: string): string[][] { + const results: string[][] = []; + + const firstSpaceIndex = content.indexOf(' '), + firstEqualIndex = content.indexOf('='); + + if (firstEqualIndex === -1 && firstSpaceIndex === -1) { + throw new TypeError(`Cannot parse environment variable name and value from string "${content}"`); + } + + if (firstSpaceIndex > -1 && (firstEqualIndex === -1 || firstSpaceIndex < firstEqualIndex)) { + + // this argument string contains only one environment variable + let [name, value] = [content.slice(0, firstSpaceIndex), content.slice(firstSpaceIndex + 1)]; + + value = this.unEscapeString(value); + + results.push([name, value]); + + } else { + + // this argument string contains one or more environment variables + let count = 100; + while (content.length && count) { + count--; + + // remove a linebreak at the start of string + content = content.replace(this.escapedLineBreakAtStartRE, ''); + + // remove a whitespace at the start of string + content = content.replace(/^\s+/, ''); + + // check if string begins with variable name + if (!this.variableNameRE.test(content)) { + throw new TypeError(`Cannot parse environment variable name and value from string "${content}"`); + } + + if (this.envVariableQuotedValueRE.test(content)) { + + /* variable with quoted value */ + + let [fullMatch, name, value] = this.envVariableQuotedValueRE.exec(content); + + value = value.replace(this.quotesRE, ''); + + results.push([name, value]); + + const parts = this.splitBySymbolAtIndex(content, fullMatch.length - 1); + // cut processed variable from the string + content = parts[1]; + } else { + + /* variable with escaped value */ + + // look for the point where the variable ends + const unEscapedWhitespaceMatch = this.unEscapedWhitespaceRE.exec(content); + + let variableLength: number; + if (!unEscapedWhitespaceMatch) { + // the rest of string is a single variable + variableLength = content.length; + } else { + variableLength = unEscapedWhitespaceMatch.index + unEscapedWhitespaceMatch.length - 1; + } + + const parts = this.splitBySymbolAtIndex(content, variableLength); + const variableStr = parts[0]; + // cut processed variable from the string + content = parts[1]; + + const equalIndex = variableStr.indexOf('='); + + const varParts = this.splitBySymbolAtIndex(variableStr, equalIndex); + let name = varParts[0], + value = varParts[1]; + + value = this.unEscapeString(value); + + results.push([name, value]); + } + } + } + + return results; + } + /** * Dumps argument object depending on instruction. * - * @param line {IRecipeLine} + * @param {IRecipeLine} line * @returns {string} - * @private */ - _stringifyArgument(line: IRecipeLine): string { + private stringifyArgument(line: IRecipeLine): string { switch (line.instruction) { case 'ENV': - return (line.argument as string[]).join(' '); + const [name, value] = line.argument as string[]; + return name + ' ' + this.escapeString(value); default: return line.argument as string; } } + + private escapeString(content: string): string { + // this replace should be the very first + content = content.replace(this.escapeRE, this.directives.escape + '$1'); + + content = content.replace(this.linebreaksRE, this.directives.escape + '$1'); + + return content; + } + + /** + * Unescapes whitespaces and escape symbols. + * + * @param {string} content a string to process. + */ + private unEscapeString(content: string): string { + content = content.replace(this.escapedWhitespacesAndLinebreaksRE, '$1$2'); + + // this replace should be the very last + content = content.replace(this.escapedEscapeSymbolsRE, '$1'); + + return content; + } } diff --git a/dashboard/src/components/api/namespace/che-namespace-registry.factory.ts b/dashboard/src/components/api/namespace/che-namespace-registry.factory.ts index 44aeb0e331..6c7f92c7bb 100644 --- a/dashboard/src/components/api/namespace/che-namespace-registry.factory.ts +++ b/dashboard/src/components/api/namespace/che-namespace-registry.factory.ts @@ -9,7 +9,6 @@ * Codenvy, S.A. - initial API and implementation */ 'use strict'; - export interface INamespace { id: string; label: string; @@ -25,6 +24,9 @@ export class CheNamespaceRegistry { private $q: ng.IQService; private fetchPromise: ng.IPromise; private namespaces : INamespace[]; + private emptyMessage: string; + private caption: string; + private getAdditionalInfoFunction: Function; /** * Default constructor that is using resource @@ -33,6 +35,8 @@ export class CheNamespaceRegistry { constructor($q: ng.IQService) { this.$q = $q; this.namespaces = []; + + this.caption = 'Namespace'; } /** @@ -76,4 +80,58 @@ export class CheNamespaceRegistry { getNamespaces() : INamespace[] { return this.namespaces; } + + /** + * Set empty message (message is displayed, when no namespaces). + * + * @param message empty message + */ + setEmptyMessage(message: string): void { + this.emptyMessage = message; + } + + /** + * Returns empty message to display, when no namespaces. + * + * @returns {string} + */ + getEmptyMessage(): string { + return this.emptyMessage ? this.emptyMessage : null; + } + + /** + * Set display caption of the namespaces. + * + * @param caption namespaces caption + */ + setCaption(caption: string): void { + this.caption = caption; + } + + /** + * Returns the caption of the namespaces. + * + * @returns {string} namepsaces caption + */ + getCaption(): string { + return this.caption; + } + + /** + * Sets the function for retrieving available RAM for the namespaces. + * + * @param getAdditionalInfo additional information function + */ + setGetAdditionalInfo(getAdditionalInfo: Function): void { + this.getAdditionalInfoFunction = getAdditionalInfo; + } + + /** + * Returns function, that returns promise. + * + * @returns {Function} + */ + getAdditionalInfo(): Function { + return this.getAdditionalInfoFunction; + } } diff --git a/dockerfiles/base/scripts/base/commands/cmd_archetype.sh b/dockerfiles/base/scripts/base/commands/cmd_archetype.sh index 1f721011bd..6a4fbb7d17 100644 --- a/dockerfiles/base/scripts/base/commands/cmd_archetype.sh +++ b/dockerfiles/base/scripts/base/commands/cmd_archetype.sh @@ -68,12 +68,10 @@ pre_cmd_archetype() { fi ARCHETYPE_ACTION="all" - ARCHETYPE_ID="che-plugin-ide-menu-archetype" -# ARCHETYPE_VERSION=$(get_image_version) + ARCHETYPE_ID="plugin-menu-archetype" ############################## -# REPLACE THIS WITH $(get_image_version) AFTER CI SYSTEMS GENERATING - ARCHETYPE_VERSION=5.6.0-SNAPSHOT + ARCHETYPE_VERSION=$(get_image_version) ASSEMBLY_VERSION=$ARCHETYPE_VERSION ASSEMBLY_GROUP="com.sample" ASSEMBLY_ID="assembly" diff --git a/dockerfiles/cli/version/5.10.0/images b/dockerfiles/cli/version/5.10.0/images new file mode 100644 index 0000000000..ca76c60396 --- /dev/null +++ b/dockerfiles/cli/version/5.10.0/images @@ -0,0 +1,3 @@ +IMAGE_INIT=eclipse/che-init:5.10.0 +IMAGE_CHE=eclipse/che-server:5.10.0 +IMAGE_COMPOSE=docker/compose:1.8.1 diff --git a/dockerfiles/cli/version/5.10.0/images-stacks b/dockerfiles/cli/version/5.10.0/images-stacks new file mode 100644 index 0000000000..4630f02af6 --- /dev/null +++ b/dockerfiles/cli/version/5.10.0/images-stacks @@ -0,0 +1,24 @@ +eclipse/alpine_jdk8 +eclipse/aspnet +eclipse/centos_jdk8 +eclipse/cpp_gcc +eclipse/debian_jdk8 +eclipse/debian_jdk8_node +eclipse/debian_jre +eclipse/dotnet_core +eclipse/hadoop-dev +eclipse/meteor +eclipse/node +eclipse/php +eclipse/platformio +eclipse/ruby_rails +eclipse/selenium +eclipse/ubuntu_android +eclipse/ubuntu_go +eclipse/ubuntu_gradle +eclipse/ubuntu_jdk8 +eclipse/ubuntu_jre +eclipse/ubuntu_python +eclipse/ubuntu_wildfly8 +registry.centos.org/che-stacks/vertx + diff --git a/dockerfiles/cli/version/5.8.1/images b/dockerfiles/cli/version/5.8.1/images new file mode 100644 index 0000000000..cbd658a33d --- /dev/null +++ b/dockerfiles/cli/version/5.8.1/images @@ -0,0 +1,3 @@ +IMAGE_INIT=eclipse/che-init:5.8.1 +IMAGE_CHE=eclipse/che-server:5.8.1 +IMAGE_COMPOSE=docker/compose:1.8.1 diff --git a/dockerfiles/cli/version/5.8.1/images-stacks b/dockerfiles/cli/version/5.8.1/images-stacks new file mode 100644 index 0000000000..4630f02af6 --- /dev/null +++ b/dockerfiles/cli/version/5.8.1/images-stacks @@ -0,0 +1,24 @@ +eclipse/alpine_jdk8 +eclipse/aspnet +eclipse/centos_jdk8 +eclipse/cpp_gcc +eclipse/debian_jdk8 +eclipse/debian_jdk8_node +eclipse/debian_jre +eclipse/dotnet_core +eclipse/hadoop-dev +eclipse/meteor +eclipse/node +eclipse/php +eclipse/platformio +eclipse/ruby_rails +eclipse/selenium +eclipse/ubuntu_android +eclipse/ubuntu_go +eclipse/ubuntu_gradle +eclipse/ubuntu_jdk8 +eclipse/ubuntu_jre +eclipse/ubuntu_python +eclipse/ubuntu_wildfly8 +registry.centos.org/che-stacks/vertx + diff --git a/dockerfiles/cli/version/latest.ver b/dockerfiles/cli/version/latest.ver index edb1d397cf..cf51361190 100644 --- a/dockerfiles/cli/version/latest.ver +++ b/dockerfiles/cli/version/latest.ver @@ -1 +1 @@ -5.8.0 \ No newline at end of file +5.9.0 \ No newline at end of file diff --git a/dockerfiles/lib/dto-pom.xml b/dockerfiles/lib/dto-pom.xml index b1bf710718..ff28636084 100644 --- a/dockerfiles/lib/dto-pom.xml +++ b/dockerfiles/lib/dto-pom.xml @@ -17,13 +17,13 @@ maven-depmgt-pom org.eclipse.che.depmgt - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT dto-typescript pom Che TypeScript DTO - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml b/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml index f7219f30dc..3feaaca89f 100644 --- a/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml +++ b/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-dyna-provider-generator-maven-plugin maven-plugin diff --git a/ide/che-core-ide-api/pom.xml b/ide/che-core-ide-api/pom.xml index b2c958e2e8..041e2cb20a 100644 --- a/ide/che-core-ide-api/pom.xml +++ b/ide/che-core-ide-api/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-ide-api @@ -53,7 +53,7 @@ org.eclipse.che.core - che-core-api-auth + che-core-api-auth-shared org.eclipse.che.core diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java index 9edd4e1c17..0f803b1596 100644 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java +++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java @@ -21,6 +21,7 @@ import java.util.Objects; import static java.util.Collections.unmodifiableList; import static org.eclipse.che.api.workspace.shared.Constants.COMMAND_GOAL_ATTRIBUTE_NAME; +import static org.eclipse.che.api.workspace.shared.Constants.COMMAND_PREVIEW_URL_ATTRIBUTE_NAME; /** Data object for {@link Command}. */ public class CommandImpl implements Command { @@ -123,6 +124,18 @@ public class CommandImpl implements Command { getAttributes().put(COMMAND_GOAL_ATTRIBUTE_NAME, goalId); } + + /** Returns command's preview URL or {@code null} if none. */ + @Nullable + public String getPreviewURL() { + return getAttributes().get(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME); + } + + /** Sets command's preview URL. */ + public void setPreviewURL(String previewURL) { + getAttributes().put(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME, previewURL); + } + /** Returns command's applicable context. */ public ApplicableContext getApplicableContext() { return context; diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/dto/StorableBreakpointDto.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/dto/StorableBreakpointDto.java index 2f1b58b33b..2c7ad104ad 100644 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/dto/StorableBreakpointDto.java +++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/dto/StorableBreakpointDto.java @@ -22,10 +22,6 @@ import org.eclipse.che.ide.api.debug.Breakpoint; @DTO public interface StorableBreakpointDto { - void setActive(boolean active); - - boolean isActive(); - void setLineNumber(int lineNumber); int getLineNumber(); diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/EditorFileStatusNotificationOperation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/EditorFileStatusNotificationOperation.java index a8dd5c9693..c2668ffaae 100644 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/EditorFileStatusNotificationOperation.java +++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/EditorFileStatusNotificationOperation.java @@ -16,6 +16,8 @@ import com.google.web.bindery.event.shared.EventBus; import org.eclipse.che.api.project.shared.dto.event.FileStateUpdateDto; import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType; import org.eclipse.che.ide.api.app.AppContext; +import org.eclipse.che.ide.api.editor.EditorAgent; +import org.eclipse.che.ide.api.editor.EditorPartPresenter; import org.eclipse.che.ide.api.event.FileContentUpdateEvent; import org.eclipse.che.ide.api.notification.NotificationManager; import org.eclipse.che.ide.api.resources.ExternalResourceDelta; @@ -25,7 +27,9 @@ import org.eclipse.che.ide.resource.Path; import org.eclipse.che.ide.util.loging.Log; import javax.inject.Inject; +import javax.inject.Provider; import javax.inject.Singleton; +import java.util.List; import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; @@ -44,14 +48,19 @@ public class EditorFileStatusNotificationOperation implements JsonRpcRequestBiOp private final EventBus eventBus; private final DeletedFilesController deletedFilesController; + private final Provider editorAgentProvider; private final AppContext appContext; private NotificationManager notificationManager; @Inject - public EditorFileStatusNotificationOperation(EventBus eventBus, DeletedFilesController deletedFilesController, AppContext appContext) { + public EditorFileStatusNotificationOperation(EventBus eventBus, + DeletedFilesController deletedFilesController, + Provider editorAgentProvider, + AppContext appContext) { this.eventBus = eventBus; this.deletedFilesController = deletedFilesController; + this.editorAgentProvider = editorAgentProvider; this.appContext = appContext; } @@ -88,10 +97,21 @@ public class EditorFileStatusNotificationOperation implements JsonRpcRequestBiOp appContext.getWorkspaceRoot().synchronize(new ExternalResourceDelta(path, path, REMOVED)); if (notificationManager != null && !deletedFilesController.remove(stringPath)) { notificationManager.notify("External operation", "File '" + name + "' is removed", SUCCESS, EMERGE_MODE); + closeOpenedEditor(path); } break; } } } + + private void closeOpenedEditor(Path path) { + final EditorAgent editorAgent = editorAgentProvider.get(); + final List openedEditors = editorAgent.getOpenedEditors(); + for (EditorPartPresenter openEditor : openedEditors) { + if (openEditor.getEditorInput().getFile().getLocation().equals(path)) { + editorAgent.closeEditor(openEditor); + } + } + } } diff --git a/ide/che-core-ide-app/pom.xml b/ide/che-core-ide-app/pom.xml index ae8a1280e4..60d52290bf 100644 --- a/ide/che-core-ide-app/pom.xml +++ b/ide/che-core-ide-app/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-ide-app jar diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrl.java new file mode 100644 index 0000000000..d2a2c558bf --- /dev/null +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrl.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2012-2017 Codenvy, S.A. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Codenvy, S.A. - initial API and implementation + *******************************************************************************/ +package org.eclipse.che.ide.command.toolbar.previews; + +import org.eclipse.che.api.core.model.machine.MachineRuntimeInfo; +import org.eclipse.che.api.core.model.machine.Server; +import org.eclipse.che.ide.api.app.AppContext; +import org.eclipse.che.ide.api.machine.DevMachine; + +import java.util.Map.Entry; +import java.util.Objects; + +/** Represents an item for displaying in the 'Previews' list. */ +class PreviewUrl { + + private final AppContext appContext; + + private final String url; + private final String displayName; + + PreviewUrl(String url, AppContext appContext) { + this.url = url; + this.appContext = appContext; + this.displayName = getDisplayNameForPreviewUrl(url); + } + + /** Returns actual preview URL. */ + String getUrl() { + return url; + } + + /** + * Returns preview URL in user-friendly form. + * E.g. {@code dev-machine:8080} instead of {@code http://172.19.21.35:32801}. + */ + String getDisplayName() { + return displayName; + } + + private String getDisplayNameForPreviewUrl(String previewUrl) { + final DevMachine devMachine = appContext.getDevMachine(); + final MachineRuntimeInfo devMachineRuntime = devMachine.getRuntime(); + + if (devMachineRuntime == null) { + return previewUrl; + } + + for (Entry entry : devMachineRuntime.getServers().entrySet()) { + Server server = entry.getValue(); + String serverUrl = server.getUrl(); + + if (serverUrl == null) { + continue; + } + + if (previewUrl.startsWith(serverUrl)) { + String port = entry.getKey(); + + // server's port may be in form of '8080/tcp' so need to cut protocol name + final int slashIndex = port.lastIndexOf('/'); + if (slashIndex > -1) { + port = port.substring(0, slashIndex); + } + + return previewUrl.replace(serverUrl, devMachine.getDisplayName() + ':' + port); + } + } + + return previewUrl; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PreviewUrl that = (PreviewUrl)o; + return Objects.equals(url, that.url) && + Objects.equals(displayName, that.displayName); + } + + @Override + public int hashCode() { + return Objects.hash(url, displayName); + } +} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItem.java deleted file mode 100644 index 19288e9c02..0000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItem.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012-2017 Codenvy, S.A. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Codenvy, S.A. - initial API and implementation - *******************************************************************************/ -package org.eclipse.che.ide.command.toolbar.previews; - -import java.util.Objects; - -/** Represents an item for displaying in the 'Previews' list. */ -class PreviewUrlItem { - - private final String url; - private final String displayName; - - PreviewUrlItem(String url, String displayName) { - this.url = url; - this.displayName = displayName; - } - - public String getUrl() { - return url; - } - - public String getDisplayName() { - return displayName; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - PreviewUrlItem that = (PreviewUrlItem)o; - return Objects.equals(url, that.url) && - Objects.equals(displayName, that.displayName); - } - - @Override - public int hashCode() { - return Objects.hash(url, displayName); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java index a19e497895..510095a739 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java @@ -24,17 +24,17 @@ import static com.google.gwt.dom.client.Style.Unit.PX; /** * Renders widgets for the 'Previews' list. Always returns the same - * instance of the header widget which is shared among all {@link PreviewUrlItem}s. + * instance of the header widget which is shared among all {@link PreviewUrl}s. */ class PreviewUrlItemRenderer implements DropdownListItemRenderer { static final HeaderWidget HEADER_WIDGET = new HeaderWidget(); - private final BaseListItem item; + private final BaseListItem item; private Widget listWidget; - PreviewUrlItemRenderer(BaseListItem item) { + PreviewUrlItemRenderer(BaseListItem item) { this.item = item; } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java index 3a0901696c..3b3e8bc10a 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java @@ -17,18 +17,13 @@ import com.google.inject.Provider; import com.google.inject.Singleton; import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.api.core.model.machine.Machine; -import org.eclipse.che.api.core.model.machine.MachineRuntimeInfo; -import org.eclipse.che.api.core.model.machine.Server; import org.eclipse.che.api.core.model.workspace.WorkspaceRuntime; -import org.eclipse.che.api.machine.shared.dto.execagent.GetProcessResponseDto; -import org.eclipse.che.api.promises.client.Function; +import org.eclipse.che.api.machine.shared.dto.execagent.GetProcessesResponseDto; import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.api.promises.client.PromiseProvider; import org.eclipse.che.ide.api.app.AppContext; import org.eclipse.che.ide.api.command.CommandImpl; import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.machine.DevMachine; import org.eclipse.che.ide.api.machine.ExecAgentCommandManager; import org.eclipse.che.ide.api.machine.events.ProcessFinishedEvent; import org.eclipse.che.ide.api.machine.events.ProcessStartedEvent; @@ -38,11 +33,9 @@ import org.eclipse.che.ide.api.macro.MacroProcessor; import org.eclipse.che.ide.api.mvp.Presenter; import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import java.util.Map.Entry; -import java.util.Optional; +import java.util.List; import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.api.workspace.shared.Constants.COMMAND_PREVIEW_URL_ATTRIBUTE_NAME; /** Drives the UI for displaying preview URLs of the running processes. */ @Singleton @@ -91,76 +84,37 @@ public class PreviewsPresenter implements Presenter, PreviewsView.ActionDelegate eventBus.addHandler(ProcessFinishedEvent.TYPE, event -> updateView()); } - /** Updates view with preview URLs of all running processes. */ + /** Updates view with the preview URLs of running processes. */ private void updateView() { view.removeAllURLs(); final WorkspaceRuntime runtime = appContext.getActiveRuntime(); if (runtime != null) { - runtime.getMachines().forEach(machine -> execAgentClient.getProcesses(machine.getId(), false).then(processes -> { - processes.forEach(process -> getPreviewUrl(process.getPid(), machine).then(view::addUrl).catchError(ignore -> {})); - })); + runtime.getMachines().forEach(machine -> { + Promise> machineProcesses = execAgentClient.getProcesses(machine.getId(), false); + machineProcesses.then(processes -> { + processes.forEach(process -> getPreviewUrl(process).then(view::addUrl).catchError(ignore -> { + })); + }); + }); } } /** - * Returns promise that resolves preview URL of the command which has launched - * the process with the given {@code pid} on the specified {@code machine}. + * Returns promise that resolves preview URL for the given process. * Returns promise that rejects with an error if preview URL isn't available. */ - private Promise getPreviewUrl(int pid, Machine machine) { - return execAgentClient.getProcess(machine.getId(), pid) - // get command's preview URL - .then((Function)process -> { - final Optional commandOptional = commandManager.getCommand(process.getName()); + private Promise getPreviewUrl(GetProcessesResponseDto process) { + final String previewUrl = commandManager.getCommand(process.getName()) + .map(CommandImpl::getPreviewURL) + .orElse(null); - return commandOptional.map(command -> command.getAttributes().get(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME)) - .orElse(null); - }) - // expand macros used in preview URL - .thenPromise(previewUrl -> { - if (!isNullOrEmpty(previewUrl)) { - return macroProcessorProvider.get().expandMacros(previewUrl); - } - return promiseProvider.reject(new Exception(messages.previewsNotAvailableError())); - }) - // compose preview URL's display name - .then((Function)previewUrl -> new PreviewUrlItem(previewUrl, - getPreviewUrlDisplayName(previewUrl) - .orElse(previewUrl))); - } - - private Optional getPreviewUrlDisplayName(String previewUrl) { - final DevMachine devMachine = appContext.getDevMachine(); - final MachineRuntimeInfo devMachineRuntime = devMachine.getRuntime(); - - if (devMachineRuntime == null) { - return Optional.empty(); + if (!isNullOrEmpty(previewUrl)) { + return macroProcessorProvider.get().expandMacros(previewUrl); } - for (Entry entry : devMachineRuntime.getServers().entrySet()) { - Server server = entry.getValue(); - String serverUrl = server.getUrl(); - - if (serverUrl == null) { - continue; - } - - if (previewUrl.startsWith(serverUrl)) { - String displayName = previewUrl.replace(serverUrl, devMachine.getDisplayName() + ':' + entry.getKey()); - - // cut protocol from display name - final int protocolIndex = displayName.lastIndexOf('/'); - if (protocolIndex > -1) { - displayName = displayName.substring(0, protocolIndex); - } - - return Optional.of(displayName); - } - } - - return Optional.empty(); + return promiseProvider.reject(new Exception(messages.previewsNotAvailableError())); } @Override @@ -169,7 +123,7 @@ public class PreviewsPresenter implements Presenter, PreviewsView.ActionDelegate } @Override - public void onUrlChosen(PreviewUrlItem previewUrlItem) { - Window.open(previewUrlItem.getUrl(), "_blank", null); + public void onUrlChosen(String previewUrl) { + Window.open(previewUrl, "_blank", null); } } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java index e50c6816cd..5fa829f757 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java @@ -16,10 +16,10 @@ import org.eclipse.che.ide.api.mvp.View; public interface PreviewsView extends View { /** Add preview URL to the view. */ - void addUrl(PreviewUrlItem previewUrlItem); + void addUrl(String previewUrl); /** Remove preview URL from the view. */ - void removeUrl(PreviewUrlItem previewUrlItem); + void removeUrl(String previewUrl); /** Remove all preview URLs from the view. */ void removeAllURLs(); @@ -27,6 +27,6 @@ public interface PreviewsView extends View { interface ActionDelegate { /** Called when preview URL has been chosen. */ - void onUrlChosen(PreviewUrlItem previewUrlItem); + void onUrlChosen(String previewUrl); } } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java index d5339f0d08..912e556f40 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java @@ -16,6 +16,7 @@ import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; import com.google.inject.Singleton; +import org.eclipse.che.ide.api.app.AppContext; import org.eclipse.che.ide.command.toolbar.ToolbarMessages; import org.eclipse.che.ide.ui.Tooltip; import org.eclipse.che.ide.ui.dropdown.BaseListItem; @@ -34,18 +35,21 @@ import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTO public class PreviewsViewImpl implements PreviewsView { /** Mapping of URL to list item. */ - private final Map> listItems; + private final Map> listItems; private final DropdownList dropdownList; private final NoPreviewsItem noPreviewsItem; private final NoPreviewsItemRenderer noPreviewsItemRenderer; private final ToolbarMessages messages; + private final AppContext appContext; private ActionDelegate delegate; @Inject - public PreviewsViewImpl(ToolbarMessages messages) { + public PreviewsViewImpl(ToolbarMessages messages, AppContext appContext) { this.messages = messages; + this.appContext = appContext; + listItems = new HashMap<>(); dropdownList = new DropdownList(HEADER_WIDGET, false); @@ -84,23 +88,24 @@ public class PreviewsViewImpl implements PreviewsView { } @Override - public void addUrl(PreviewUrlItem previewUrlItem) { - if (listItems.containsKey(previewUrlItem)) { - return; // no sense to add the equals URLs even if they belong to different commands + public void addUrl(String previewUrl) { + if (listItems.containsKey(previewUrl)) { + return; } - BaseListItem listItem = new BaseListItem<>(previewUrlItem); - PreviewUrlItemRenderer renderer = new PreviewUrlItemRenderer(listItem); + final PreviewUrl displayablePreviewUrl = new PreviewUrl(previewUrl, appContext); + final BaseListItem listItem = new BaseListItem<>(displayablePreviewUrl); + final PreviewUrlItemRenderer renderer = new PreviewUrlItemRenderer(listItem); - listItems.put(previewUrlItem, listItem); + listItems.put(previewUrl, listItem); dropdownList.addItem(listItem, renderer); checkNoPreviewsItem(); } @Override - public void removeUrl(PreviewUrlItem previewUrlItem) { - final BaseListItem listItem = listItems.remove(previewUrlItem); + public void removeUrl(String previewUrl) { + final BaseListItem listItem = listItems.remove(previewUrl); if (listItem != null) { dropdownList.removeItem(listItem); diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java index 7790349e4a..500ababa68 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java @@ -10,9 +10,7 @@ *******************************************************************************/ package org.eclipse.che.ide.context; -import com.google.common.collect.Sets; import com.google.gwt.core.client.Callback; -import com.google.gwt.user.client.Random; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; @@ -50,22 +48,18 @@ import org.eclipse.che.ide.resources.ResourceManagerInitializer; import org.eclipse.che.ide.resources.impl.ResourceDeltaImpl; import org.eclipse.che.ide.resources.impl.ResourceManager; import org.eclipse.che.ide.statepersistance.AppStateManager; -import org.eclipse.che.ide.util.Arrays; import java.util.ArrayList; import java.util.List; -import java.util.Set; import static com.google.common.base.Preconditions.checkState; +import static com.google.common.collect.Lists.newArrayList; import static com.google.gwt.user.client.Random.nextInt; -import static java.util.Arrays.binarySearch; -import static java.util.Arrays.copyOf; -import static java.util.Arrays.sort; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; +import static java.util.Collections.addAll; import static org.eclipse.che.ide.api.resources.ResourceDelta.ADDED; import static org.eclipse.che.ide.api.resources.ResourceDelta.MOVED_FROM; +import static org.eclipse.che.ide.api.resources.ResourceDelta.MOVED_TO; import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED; -import static org.eclipse.che.ide.api.resources.ResourceDelta.SYNCHRONIZED; import static org.eclipse.che.ide.api.resources.ResourceDelta.UPDATED; /** @@ -85,25 +79,29 @@ public class AppContextImpl implements AppContext, ResourceManagerInitializer { private static final String APP_ID = String.valueOf(nextInt(Integer.MAX_VALUE)); - private static final Project[] NO_PROJECTS = {}; + private final QueryParameters queryParameters; + private final List projectsInImport; + private final EventBus eventBus; + private final ResourceManager.ResourceManagerFactory resourceManagerFactory; + private final Provider editorAgentProvider; + private final Provider appStateManager; - private final QueryParameters queryParameters; - private final List projectsInImport; + private final List rootProjects = newArrayList(); + private final List selectedResources = newArrayList(); - private Workspace usersWorkspace; + private Workspace userWorkspace; private CurrentUser currentUser; private FactoryDto factory; private Path projectsRoot; private ActiveRuntime runtime; + private ResourceManager resourceManager; + /** * List of actions with parameters which comes from startup URL. * Can be processed after IDE initialization as usual after starting ws-agent. */ private List startAppActions; - private Resource currentResource; - private Resource[] currentResources; - @Inject public AppContextImpl(EventBus eventBus, QueryParameters queryParameters, @@ -124,31 +122,39 @@ public class AppContextImpl implements AppContext, eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this); } + private static native String masterFromIDEConfig() /*-{ + if ($wnd.IDE && $wnd.IDE.config) { + return $wnd.IDE.config.restContext; + } else { + return null; + } + }-*/; + @Override public Workspace getWorkspace() { - return usersWorkspace; + return userWorkspace; } @Override public void setWorkspace(Workspace workspace) { if (workspace != null) { - usersWorkspace = workspace; + userWorkspace = workspace; if (workspace.getRuntime() != null) { runtime = new ActiveRuntime(workspace.getRuntime()); } } else { - usersWorkspace = null; + userWorkspace = null; runtime = null; } } @Override public String getWorkspaceId() { - if (usersWorkspace == null) { + if (userWorkspace == null) { throw new IllegalArgumentException(getClass() + " Workspace can not be null."); } - return usersWorkspace.getId(); + return userWorkspace.getId(); } @Override @@ -200,7 +206,6 @@ public class AppContextImpl implements AppContext, return runtime.getDevMachine(); } - @Override public void initResourceManager(final Callback callback) { if (runtime.getDevMachine() == null) { @@ -208,17 +213,18 @@ public class AppContextImpl implements AppContext, callback.onFailure(new NullPointerException("Dev machine is not initialized")); } - if (projects != null) { - for (Project project : projects) { + if (!rootProjects.isEmpty()) { + for (Project project : rootProjects) { eventBus.fireEvent(new ResourceChangedEvent(new ResourceDeltaImpl(project, REMOVED))); } - projects = null; + rootProjects.clear(); } resourceManager = resourceManagerFactory.newResourceManager(runtime.getDevMachine()); resourceManager.getWorkspaceProjects().then(projects -> { - AppContextImpl.this.projects = projects; - java.util.Arrays.sort(AppContextImpl.this.projects, ResourcePathComparator.getInstance()); + rootProjects.clear(); + addAll(rootProjects, projects); + rootProjects.sort(ResourcePathComparator.getInstance()); callback.onSuccess(resourceManager); eventBus.fireEvent(new WorkspaceReadyEvent(projects)); }).catchError(error -> { @@ -228,7 +234,7 @@ public class AppContextImpl implements AppContext, @Override public String getWorkspaceName() { - return usersWorkspace.getConfig().getName(); + return userWorkspace.getConfig().getName(); } /** {@inheritDoc} */ @@ -237,82 +243,60 @@ public class AppContextImpl implements AppContext, final ResourceDelta delta = event.getDelta(); final Resource resource = delta.getResource(); - /* Note: There is important to keep projects array in sorted state, because it is mutable and removing projects from it - need array to be sorted. Search specific projects realized with binary search. */ - - if (!(resource.getResourceType() == PROJECT && resource.getLocation().segmentCount() == 1)) { - return; - } - - if (projects == null) { - return; //Normal situation, workspace config updated and project has not been loaded fully. Just skip this situation. - } - if (delta.getKind() == ADDED) { - Project[] newProjects = copyOf(projects, projects.length + 1); - newProjects[projects.length] = (Project)resource; - projects = newProjects; - sort(projects, ResourcePathComparator.getInstance()); - } else if (delta.getKind() == REMOVED) { - int size = projects.length; - int index = java.util.Arrays.binarySearch(projects, resource, ResourcePathComparator.getInstance()); - int numMoved = projects.length - index - 1; - if (numMoved > 0) { - System.arraycopy(projects, index + 1, projects, index, numMoved); - } - projects = copyOf(projects, --size); + if ((delta.getFlags() & (MOVED_FROM | MOVED_TO)) != 0) { - if (currentResource != null && currentResource.equals(delta.getResource())) { - currentResource = null; - } - - if (currentResources != null) { - for (Resource currentResource : currentResources) { - if (currentResource.equals(delta.getResource())) { - currentResources = Arrays.remove(currentResources, currentResource); + for (Project rootProject : rootProjects) { + if (rootProject.getLocation().equals(delta.getFromPath()) && resource.isProject()) { + rootProjects.set(rootProjects.indexOf(rootProject), resource.asProject()); + break; } } + + for (Resource selectedResource : selectedResources) { + if (selectedResource.getLocation().equals(delta.getFromPath())) { + selectedResources.set(selectedResources.indexOf(selectedResource), resource); + break; + } + } + } else if (resource.getLocation().segmentCount() == 1 && resource.isProject()) { + boolean exists = rootProjects.stream().anyMatch(it -> it.getLocation().equals(resource.getLocation())); + + if (!exists) { + rootProjects.add(resource.asProject()); + rootProjects.sort(ResourcePathComparator.getInstance()); + } + } + } else if (delta.getKind() == REMOVED) { + + for (Project rootProject : rootProjects) { + if (rootProject.getLocation().equals(resource.getLocation()) && resource.isProject()) { + rootProjects.remove(rootProjects.indexOf(rootProject)); + break; + } + } + + for (Resource selectedResource : selectedResources) { + if (selectedResource.getLocation().equals(resource.getLocation())) { + selectedResources.remove(selectedResources.indexOf(selectedResource)); + break; + } } } else if (delta.getKind() == UPDATED) { - int index = -1; - // Project may be moved to another location, so we need to remove previous one and store new project in cache. - - if (delta.getFlags() == MOVED_FROM) { - for (int i = 0; i < projects.length; i++) { - if (projects[i].getLocation().equals(delta.getFromPath())) { - index = i; - break; - } - } - } else { - index = binarySearch(projects, resource); - } - - if (index != -1) { - projects[index] = (Project)resource; - } - - sort(projects, ResourcePathComparator.getInstance()); - } else if (delta.getKind() == SYNCHRONIZED && resource.isProject() && resource.getLocation().segmentCount() == 1) { - for (int i = 0; i < projects.length; i++) { - if (projects[i].getLocation().equals(resource.getLocation())) { - projects[i] = (Project)resource; + for (Project rootProject : rootProjects) { + if (rootProject.getLocation().equals(resource.getLocation()) && resource.isProject()) { + rootProjects.set(rootProjects.indexOf(rootProject), resource.asProject()); + break; } } - if (currentResources != null) { - for (int i = 0; i < currentResources.length; i++) { - if (currentResources[i].getLocation().equals(resource.getLocation())) { - currentResources[i] = resource; - break; - } + for (Resource selectedResource : selectedResources) { + if (selectedResource.getLocation().equals(resource.getLocation())) { + selectedResources.set(selectedResources.indexOf(selectedResource), resource); + break; } } - - if (currentResource != null && currentResource.getLocation().equals(resource.getLocation())) { - currentResource = resource; - } } } @@ -332,54 +316,22 @@ public class AppContextImpl implements AppContext, return; } - currentResource = null; - currentResources = null; + selectedResources.clear(); - if (selection == null || selection.getHeadElement() == null) { - return; - } - - final Object headObject = selection.getHeadElement(); - final List allObjects = selection.getAllElements(); - - if (headObject instanceof HasDataObject) { - Object data = ((HasDataObject)headObject).getData(); - - if (data instanceof Resource) { - currentResource = (Resource)data; - } - } else if (headObject instanceof Resource) { - currentResource = (Resource)headObject; - } - - Set resources = Sets.newHashSet(); - - for (Object object : allObjects) { - if (object instanceof HasDataObject) { - Object data = ((HasDataObject)object).getData(); - - if (data instanceof Resource) { - resources.add((Resource)data); + if (selection != null) { + for (Object o : selection.getAllElements()) { + if (o instanceof HasDataObject && ((HasDataObject)o).getData() instanceof Resource) { + selectedResources.add((Resource)((HasDataObject)o).getData()); + } else if (o instanceof Resource) { + selectedResources.add((Resource)o); } - } else if (object instanceof Resource) { - resources.add((Resource)object); } } - - currentResources = resources.toArray(new Resource[resources.size()]); } - private final EventBus eventBus; - private final ResourceManager.ResourceManagerFactory resourceManagerFactory; - private final Provider editorAgentProvider; - private final Provider appStateManager; - - private ResourceManager resourceManager; - private Project[] projects; - @Override public Project[] getProjects() { - return projects == null ? new Project[0] : projects; + return rootProjects.toArray(new Project[rootProjects.size()]); } @Override @@ -391,22 +343,21 @@ public class AppContextImpl implements AppContext, @Override public Resource getResource() { - return currentResource; + return selectedResources.isEmpty() ? null : selectedResources.get(0); } @Override public Resource[] getResources() { - return currentResources; + return selectedResources.toArray(new Resource[selectedResources.size()]); } @Override public Project getRootProject() { - if (projects == null) { + if (rootProjects.isEmpty()) { return null; } - if (currentResource == null || currentResources == null) { - + if (selectedResources.isEmpty()) { EditorAgent editorAgent = editorAgentProvider.get(); if (editorAgent == null) { return null; @@ -421,37 +372,36 @@ public class AppContextImpl implements AppContext, if (file instanceof SyntheticNode) { final Path projectPath = ((SyntheticNode)file).getProject(); - for (Project project : projects) { + for (Project project : rootProjects) { if (project.getLocation().equals(projectPath)) { return project; } } } - } - if (currentResource == null) { return null; - } + } else { + Project root = null; - Project root = null; - - for (Project project : projects) { - if (project.getLocation().isPrefixOf(currentResource.getLocation())) { - root = project; + for (Project project : rootProjects) { + if (project.getLocation().isPrefixOf(selectedResources.get(0).getLocation())) { + root = project; + break; + } } - } - if (root == null) { - return null; - } - - for (int i = 1; i < currentResources.length; i++) { - if (!root.getLocation().isPrefixOf(currentResources[i].getLocation())) { + if (root == null) { return null; } - } - return root; + for (int i = 1; i < selectedResources.size(); i++) { + if (!root.getLocation().isPrefixOf(selectedResources.get(i).getLocation())) { + return null; + } + } + + return root; + } } @Override @@ -467,20 +417,18 @@ public class AppContextImpl implements AppContext, @Override public void onWorkspaceStopped(WorkspaceStoppedEvent event) { appStateManager.get().persistWorkspaceState(getWorkspaceId()).then(ignored -> { - for (Project project : projects) { + for (Project project : rootProjects) { eventBus.fireEvent(new ResourceChangedEvent(new ResourceDeltaImpl(project, REMOVED))); } - projects = NO_PROJECTS; + rootProjects.clear(); resourceManager = null; }); - //goto close all editors - final EditorAgent editorAgent = editorAgentProvider.get(); - final List openedEditors = editorAgent.getOpenedEditors(); - for (EditorPartPresenter editor : openedEditors) { - editorAgent.closeEditor(editor); - } + clearRuntime(); + } + + private void clearRuntime() { runtime = null; } @@ -491,7 +439,7 @@ public class AppContextImpl implements AppContext, @Override public String getMasterEndpoint() { String fromUrl = queryParameters.getByName("master"); - if(fromUrl == null || fromUrl.isEmpty()) + if (fromUrl == null || fromUrl.isEmpty()) return masterFromIDEConfig(); else return fromUrl; @@ -500,7 +448,7 @@ public class AppContextImpl implements AppContext, @Override public String getDevAgentEndpoint() { String fromUrl = queryParameters.getByName("agent"); - if(fromUrl == null || fromUrl.isEmpty()) + if (fromUrl == null || fromUrl.isEmpty()) return runtime.getDevMachine().getWsAgentBaseUrl(); else return fromUrl; @@ -515,13 +463,4 @@ public class AppContextImpl implements AppContext, public ActiveRuntime getActiveRuntime() { return runtime; } - - - private static native String masterFromIDEConfig() /*-{ - if ($wnd.IDE && $wnd.IDE.config) { - return $wnd.IDE.config.restContext; - } else { - return null; - } - }-*/; } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java index 84ca1b2807..5c5c012ab2 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java @@ -279,8 +279,6 @@ public class BreakpointManagerImpl implements BreakpointManager, if (breakpointRenderer != null) { breakpointRenderer.setLineActive(lineNumber, true); } - - preserveBreakpoints(); } @Override @@ -311,8 +309,6 @@ public class BreakpointManagerImpl implements BreakpointManager, currentBreakpoint = null; } - - preserveBreakpoints(); } @Nullable @@ -502,10 +498,6 @@ public class BreakpointManagerImpl implements BreakpointManager, List allDtoBreakpoints = new LinkedList(); List allBreakpoints = getBreakpointList(); - if (currentBreakpoint != null) { - allBreakpoints.add(currentBreakpoint); - } - for (Breakpoint breakpoint : allBreakpoints) { StorableBreakpointDto dto = dtoFactory.createDto(StorableBreakpointDto.class); dto.setType(breakpoint.getType()); @@ -525,9 +517,6 @@ public class BreakpointManagerImpl implements BreakpointManager, dto.setFileProjectConfig(projectDto); //TODO need to think to change argument type from dto to model interface } } - - dto.setActive(breakpoint.isActive()); - allDtoBreakpoints.add(dto); } @@ -558,17 +547,12 @@ public class BreakpointManagerImpl implements BreakpointManager, return appContext.getWorkspaceRoot().getFile(dto.getPath()).then(new Function, Void>() { @Override public Void apply(Optional file) throws FunctionException { - if (!file.isPresent()) { - return null; - } - if (dto.getType() == Type.CURRENT) { - doSetCurrentBreakpoint(file.get(), dto.getLineNumber()); - } else { + if (file.isPresent() && dto.getType() == Type.BREAKPOINT) { addBreakpoint(new Breakpoint(dto.getType(), dto.getLineNumber(), dto.getPath(), file.get(), - dto.isActive())); + false)); } return null; @@ -672,12 +656,10 @@ public class BreakpointManagerImpl implements BreakpointManager, } @Override - public void onBreakpointDeleted(Breakpoint breakpoint) { - } + public void onBreakpointDeleted(Breakpoint breakpoint) { } @Override - public void onAllBreakpointsDeleted() { - } + public void onAllBreakpointsDeleted() { } @Override public void onPreStepInto() { diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java index 893843e7cd..7af06218d9 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java @@ -64,6 +64,7 @@ import org.eclipse.che.ide.api.preferences.PreferencesManager; import org.eclipse.che.ide.api.resources.Resource; import org.eclipse.che.ide.api.resources.VirtualFile; import org.eclipse.che.ide.api.selection.Selection; +import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; import org.eclipse.che.ide.editor.synchronization.EditorContentSynchronizer; import org.eclipse.che.ide.part.editor.multipart.EditorMultiPartStackPresenter; import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; @@ -92,7 +93,8 @@ public class EditorAgentImpl implements EditorAgent, ActivePartChangedHandler, SelectionChangedHandler, WindowActionHandler, - StateComponent { + StateComponent, + WorkspaceStoppedEvent.Handler { private final EventBus eventBus; private final WorkspaceAgent workspaceAgent; @@ -138,6 +140,7 @@ public class EditorAgentImpl implements EditorAgent, eventBus.addHandler(ActivePartChangedEvent.TYPE, this); eventBus.addHandler(SelectionChangedEvent.TYPE, this); eventBus.addHandler(WindowActionEvent.TYPE, this); + eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this); } @Override @@ -622,6 +625,13 @@ public class EditorAgentImpl implements EditorAgent, } } + @Override + public void onWorkspaceStopped(WorkspaceStoppedEvent event) { + for (EditorPartPresenter editor : getOpenedEditors()) { + closeEditor(editor); + } + } + private static class RestoreStateEditorCallBack extends OpenEditorCallbackImpl { private final int cursorOffset; private final int topLine; diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java index 95a1f673d3..09199037c3 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java @@ -18,10 +18,12 @@ import org.eclipse.che.ide.api.action.ActionManager; import org.eclipse.che.ide.api.action.DefaultActionGroup; import org.eclipse.che.ide.api.action.IdeActions; import org.eclipse.che.ide.api.event.FileEvent; -import org.eclipse.che.ide.api.event.FileEvent.FileEventHandler; import org.eclipse.che.ide.api.resources.File; +import org.eclipse.che.ide.api.resources.Resource; +import org.eclipse.che.ide.api.resources.ResourceChangedEvent; import org.eclipse.che.ide.api.resources.VirtualFile; import org.eclipse.che.ide.util.Pair; +import org.eclipse.che.ide.util.loging.Log; import java.util.Iterator; import java.util.LinkedList; @@ -30,6 +32,7 @@ import java.util.List; import static com.google.common.collect.Lists.newLinkedList; import static org.eclipse.che.ide.api.constraints.Constraints.FIRST; import static org.eclipse.che.ide.api.event.FileEvent.FileOperation.OPEN; +import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED; /** * Default implementation of Recent File List. @@ -37,7 +40,7 @@ import static org.eclipse.che.ide.api.event.FileEvent.FileOperation.OPEN; * @author Vlad Zhukovskiy */ @Singleton -public class RecentFileStore implements RecentFileList, FileEventHandler { +public class RecentFileStore implements RecentFileList { public static final int MAX_FILES_IN_STACK = 25; public static final int MAX_PATH_LENGTH_TO_DISPLAY = 50; @@ -60,7 +63,32 @@ public class RecentFileStore implements RecentFileList, FileEventHandler { this.actionManager = actionManager; this.recentFileActionFactory = recentFileActionFactory; - eventBus.addHandler(FileEvent.TYPE, this); + eventBus.addHandler(FileEvent.TYPE, event -> { + if (event.getOperationType() == OPEN) { + VirtualFile file = event.getFile(); + if (file instanceof File) { + add((File)file); + } + } + }); + + eventBus.addHandler(ResourceChangedEvent.getType(), event -> { + if (event.getDelta().getKind() != REMOVED) { + return; + } + + final Resource resource = event.getDelta().getResource(); + + if (!resource.isFile()) { + return; + } + + if (recentStorage.contains(resource.asFile())) { + if (!remove(resource.asFile())) { + Log.warn(getClass(), "File has not been removed from recent list"); + } + } + }); } private void ensureGroupExist() { @@ -69,17 +97,6 @@ public class RecentFileStore implements RecentFileList, FileEventHandler { } } - /** {@inheritDoc} */ - @Override - public void onFileOperation(FileEvent event) { - if (event.getOperationType() == OPEN) { - VirtualFile file = event.getFile(); - if (file instanceof File) { - add((File)file); - } - } - } - /** {@inheritDoc} */ @Override public boolean isEmpty() { diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java index 5bd5c1e1ad..cd5f82503d 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java @@ -86,7 +86,6 @@ public class ProjectExplorerStateComponent implements StateComponent { @Override public void loadState(@NotNull JsonObject state) { - if (state.hasKey(SHOW_HIDDEN_FILES)) { projectExplorer.showHiddenFiles(state.getBoolean(SHOW_HIDDEN_FILES)); } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java index b7fdd20780..6726d37926 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java @@ -544,7 +544,9 @@ public final class ResourceManager { checkArgument(!source.getLocation().isRoot(), "Workspace root is not allowed to be copied"); return findResource(destination, true).thenPromise(resource -> { - checkState(!resource.isPresent() || force, "Cannot create '" + destination.toString() + "'. Resource already exists."); + if (resource.isPresent() && !force){ + return promises.reject(new IllegalStateException("Cannot create '" + destination.toString() + "'. Resource already exists.")); + } return ps.copy(source.getLocation(), destination.parent(), destination.lastSegment(), force) .thenPromise(ignored -> findResource(destination, false) diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspacePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspacePresenter.java index 9067d24c2d..b3f61c67b6 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspacePresenter.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspacePresenter.java @@ -174,4 +174,5 @@ public class WorkspacePresenter implements Presenter, WorkspaceView.ActionDelega } } } + } diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java index f78a7d4fa4..34a5ff28a1 100644 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java +++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java @@ -321,13 +321,17 @@ public abstract class AbstractPerspective implements Presenter, Perspective, private JsonObject getPartStackState(PartStack partStack, WorkBenchPartController partController) { JsonObject state = Json.createObject(); state.put("SIZE", partController.getSize()); + state.put("STATE", partStack.getPartStackState().name()); + if (partStack.getParts().isEmpty()) { state.put("HIDDEN", true); } else { if (partStack.getActivePart() != null) { state.put("ACTIVE_PART", partStack.getActivePart().getClass().getName()); } + state.put("HIDDEN", partController.isHidden()); + JsonArray parts = Json.createArray(); state.put("PARTS", parts); int i = 0; @@ -343,18 +347,22 @@ public abstract class AbstractPerspective implements Presenter, Perspective, @Override public void loadState(@NotNull JsonObject state) { if (state.hasKey("PART_STACKS")) { - JsonObject part_stacks = state.getObject("PART_STACKS"); - for (String partStackType : part_stacks.keys()) { - JsonObject partStack = part_stacks.getObject(partStackType); + JsonObject partStacksState = state.getObject("PART_STACKS"); + + // Don't restore part dimensions if perspective is maximized. + boolean perspectiveMaximized = isPerspectiveMaximized(partStacksState); + + for (String partStackType : partStacksState.keys()) { + JsonObject partStackState = partStacksState.getObject(partStackType); switch (PartStackType.valueOf(partStackType)) { case INFORMATION: - restorePartController(partStacks.get(INFORMATION), belowPartController, partStack); + loadPartStackState(partStacks.get(INFORMATION), belowPartController, partStackState, perspectiveMaximized); break; case NAVIGATION: - restorePartController(partStacks.get(NAVIGATION), leftPartController, partStack); + loadPartStackState(partStacks.get(NAVIGATION), leftPartController, partStackState, perspectiveMaximized); break; case TOOLING: - restorePartController(partStacks.get(TOOLING), rightPartController, partStack); + loadPartStackState(partStacks.get(TOOLING), rightPartController, partStackState, perspectiveMaximized); break; } } @@ -370,9 +378,38 @@ public abstract class AbstractPerspective implements Presenter, Perspective, } } - private void restorePartController(PartStack partStack, WorkBenchPartController controller, JsonObject partStackJSON) { - if (partStackJSON.hasKey("PARTS")) { - JsonArray parts = partStackJSON.get("PARTS"); + /** + * Determines whether perspective is maximized. + * + * @param partStacksState part stack state + * @return true is perspective has maximized part stack + */ + private boolean isPerspectiveMaximized(JsonObject partStacksState) { + for (String partStackType : partStacksState.keys()) { + JsonObject partStackState = partStacksState.getObject(partStackType); + if (partStackState.hasKey("STATE") && PartStack.State.MAXIMIZED.name().equals(partStackState.getString("STATE"))) { + return true; + } + } + + return false; + } + + /** + * Set part stack state. + * + * @param partStack + * @param controller + * @param partStackState + * @param skipRestoreDimensions + */ + private void loadPartStackState(PartStack partStack, + WorkBenchPartController controller, + JsonObject partStackState, + boolean skipRestoreDimensions) { + if (partStackState.hasKey("PARTS")) { + JsonArray parts = partStackState.get("PARTS"); + for (int i = 0; i < parts.length(); i++) { JsonObject value = parts.get(i); if (value.hasKey("CLASS")) { @@ -389,8 +426,8 @@ public abstract class AbstractPerspective implements Presenter, Perspective, } // restore part stack's active part - if (partStackJSON.hasKey("ACTIVE_PART")) { - String activePart = partStackJSON.getString("ACTIVE_PART"); + if (partStackState.hasKey("ACTIVE_PART")) { + String activePart = partStackState.getString("ACTIVE_PART"); Provider provider = dynaProvider.getProvider(activePart); if (provider != null) { partStack.setActivePart(provider.get()); @@ -403,13 +440,17 @@ public abstract class AbstractPerspective implements Presenter, Perspective, return; } - if (partStackJSON.hasKey("HIDDEN") && partStackJSON.getBoolean("HIDDEN")) { + if (skipRestoreDimensions) { + return; + } + + if (partStackState.hasKey("HIDDEN") && partStackState.getBoolean("HIDDEN")) { partStack.minimize(); return; } - if (partStackJSON.hasKey("SIZE")) { - double size = partStackJSON.getNumber("SIZE"); + if (partStackState.hasKey("SIZE")) { + double size = partStackState.getNumber("SIZE"); // Size of the part must not be less 100 pixels. if (size <= MIN_PART_SIZE) { diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemTest.java deleted file mode 100644 index b861861010..0000000000 --- a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012-2017 Codenvy, S.A. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Codenvy, S.A. - initial API and implementation - *******************************************************************************/ -package org.eclipse.che.ide.command.toolbar.previews; - -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -/** Tests for {@link PreviewUrlItem}. */ -public class PreviewUrlItemTest { - - private static final String URL = "http://preview.com"; - private static final String DISPLAY_NAME = "dev-machine:8080"; - - private PreviewUrlItem previewUrlItem; - - @Before - public void setUp() { - previewUrlItem = new PreviewUrlItem(URL, DISPLAY_NAME); - } - - @Test - public void testGetUrl() throws Exception { - assertEquals(URL, previewUrlItem.getUrl()); - } - - @Test - public void testGetDisplayName() throws Exception { - assertEquals(DISPLAY_NAME, previewUrlItem.getDisplayName()); - } -} diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlTest.java new file mode 100644 index 0000000000..e9a8360cc9 --- /dev/null +++ b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlTest.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2012-2017 Codenvy, S.A. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Codenvy, S.A. - initial API and implementation + *******************************************************************************/ +package org.eclipse.che.ide.command.toolbar.previews; + +import org.eclipse.che.api.machine.shared.dto.MachineRuntimeInfoDto; +import org.eclipse.che.api.machine.shared.dto.ServerDto; +import org.eclipse.che.ide.api.app.AppContext; +import org.eclipse.che.ide.api.machine.DevMachine; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.runners.MockitoJUnitRunner; + +import java.util.HashMap; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** Tests for {@link PreviewUrl}. */ +@RunWith(MockitoJUnitRunner.class) +public class PreviewUrlTest { + + private static final String PREVIEW_URL = "http://preview.com/param"; + private static final String MACHINE_NAME = "dev-machine"; + private static final String SERVER_PORT = "8080"; + + @Mock + private AppContext appContext; + + private PreviewUrl previewUrl; + + @Before + public void setUp() { + ServerDto server = mock(ServerDto.class); + when(server.getUrl()).thenReturn("http://preview.com"); + + Map servers = new HashMap<>(); + servers.put(SERVER_PORT + "/tcp", server); + + MachineRuntimeInfoDto machineRuntimeInfo = mock(MachineRuntimeInfoDto.class); + when(machineRuntimeInfo.getServers()).thenReturn(servers); + + DevMachine devMachine = mock(DevMachine.class); + when(devMachine.getDisplayName()).thenReturn(MACHINE_NAME); + when(devMachine.getRuntime()).thenReturn(machineRuntimeInfo); + + when(appContext.getDevMachine()).thenReturn(devMachine); + + previewUrl = new PreviewUrl(PREVIEW_URL, appContext); + } + + @Test + public void testGetUrl() throws Exception { + assertEquals(PREVIEW_URL, previewUrl.getUrl()); + } + + @Test + public void testGetDisplayName() throws Exception { + assertEquals(MACHINE_NAME + ':' + SERVER_PORT + "/param", previewUrl.getDisplayName()); + } +} diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/statepersistance/AppStateManagerTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/statepersistance/AppStateManagerTest.java index 1dab42e94c..8bf57f7cc2 100644 --- a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/statepersistance/AppStateManagerTest.java +++ b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/statepersistance/AppStateManagerTest.java @@ -153,4 +153,5 @@ public class AppStateManagerTest { assertThat(jsonObject.hasKey("key1")).isTrue(); assertThat(jsonObject.getString("key1")).isEqualTo("value1"); } + } diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspectivePersistenceTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspectivePersistenceTest.java index fee9661ada..50fe00fc89 100644 --- a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspectivePersistenceTest.java +++ b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspectivePersistenceTest.java @@ -26,6 +26,7 @@ import org.eclipse.che.ide.api.constraints.Constraints; import org.eclipse.che.ide.api.editor.AbstractEditorPresenter; import org.eclipse.che.ide.api.event.ActivePartChangedEvent; import org.eclipse.che.ide.api.parts.PartPresenter; +import org.eclipse.che.ide.api.parts.PartStack; import org.eclipse.che.ide.api.parts.PartStackView; import org.eclipse.che.ide.part.PartStackPresenter; import org.eclipse.che.ide.workspace.PartStackPresenterFactory; @@ -39,6 +40,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Matchers; import org.mockito.Mock; +import static org.mockito.Mockito.never; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -110,6 +112,8 @@ public class AbstractPerspectivePersistenceTest { when(view.getInformationPanel()).thenReturn(simpleLayoutPanel); when(view.getToolPanel()).thenReturn(simplePanel); + when(partStackPresenter.getPartStackState()).thenReturn(PartStack.State.NORMAL); + when(controllerFactory.createController(Matchers.anyObject(), Matchers.anyObject())).thenReturn(workBenchController); @@ -224,4 +228,40 @@ public class AbstractPerspectivePersistenceTest { verify(partStackPresenter).addPart(partPresenter); } + @Test + public void shouldRestoreMaximizedPartStack() throws Exception { + JsonObject state = Json.createObject(); + + JsonObject parts = Json.createObject(); + state.put("PART_STACKS", parts); + + JsonObject partStack = Json.createObject(); + parts.put("INFORMATION", partStack); + + partStack.put("STATE", PartStack.State.MAXIMIZED.name()); + + JsonArray partsArray = Json.createArray(); + partStack.put("PARTS", partsArray); + + JsonObject part = Json.createObject(); + partsArray.set(0, part); + part.put("CLASS", "foo.Bar"); + + partStack.put("SIZE", 142); + + // partStackPresenter.getParts() must return non empty list + final List partPresenters = new ArrayList<>(); + partPresenters.add(partPresenter); + when(partStackPresenter.getParts()).thenAnswer(new Answer>() { + @Override + public List answer(InvocationOnMock invocationOnMock) throws Throwable { + return partPresenters; + } + }); + + perspective.loadState(state); + + verify(workBenchController, never()).setSize(142d); + } + } diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/state/WorkspacePresenterPersistenceTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/state/WorkspacePresenterPersistenceTest.java index d4c1e05bb6..5aad8e0332 100644 --- a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/state/WorkspacePresenterPersistenceTest.java +++ b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/state/WorkspacePresenterPersistenceTest.java @@ -106,4 +106,5 @@ public class WorkspacePresenterPersistenceTest { verify(perspective1).loadState(perspective1State); } + } diff --git a/ide/che-core-ide-generators/pom.xml b/ide/che-core-ide-generators/pom.xml index 5c349c60af..b3a7109c3a 100644 --- a/ide/che-core-ide-generators/pom.xml +++ b/ide/che-core-ide-generators/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-ide-generators diff --git a/ide/che-core-ide-stacks/pom.xml b/ide/che-core-ide-stacks/pom.xml index 3092289eaf..c90d9b5047 100644 --- a/ide/che-core-ide-stacks/pom.xml +++ b/ide/che-core-ide-stacks/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-ide-stacks diff --git a/ide/che-core-ide-templates/pom.xml b/ide/che-core-ide-templates/pom.xml index 143452f1d0..932387c666 100644 --- a/ide/che-core-ide-templates/pom.xml +++ b/ide/che-core-ide-templates/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-ide-templates diff --git a/ide/che-core-ide-ui/pom.xml b/ide/che-core-ide-ui/pom.xml index 7ee0051e79..2d0504535d 100644 --- a/ide/che-core-ide-ui/pom.xml +++ b/ide/che-core-ide-ui/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core che-core-ide-ui diff --git a/ide/che-core-orion-editor/pom.xml b/ide/che-core-orion-editor/pom.xml index 8fae10956e..75e7f8fc9f 100644 --- a/ide/che-core-orion-editor/pom.xml +++ b/ide/che-core-orion-editor/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-orion-editor jar diff --git a/ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/orion-codenvy-theme.css b/ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/orion-codenvy-theme.css index 4ad941c6d7..9e38f22933 100644 --- a/ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/orion-codenvy-theme.css +++ b/ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/orion-codenvy-theme.css @@ -198,7 +198,7 @@ } .textViewTooltipOnHover { - overflow: visible; + overflow: auto; } .orionCodenvy .textViewFind { diff --git a/ide/che-ide-core/pom.xml b/ide/che-ide-core/pom.xml index 2e4a6b7c5e..218efb6609 100644 --- a/ide/che-ide-core/pom.xml +++ b/ide/che-ide-core/pom.xml @@ -16,7 +16,7 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../../pom.xml org.eclipse.che.core diff --git a/ide/commons-gwt/pom.xml b/ide/commons-gwt/pom.xml index ef531dcb53..31c0bfacde 100644 --- a/ide/commons-gwt/pom.xml +++ b/ide/commons-gwt/pom.xml @@ -16,7 +16,7 @@ che-core-ide-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-commons-gwt Che Core :: Commons :: GWT diff --git a/ide/pom.xml b/ide/pom.xml index 56d55ac748..7f80d1299e 100644 --- a/ide/pom.xml +++ b/ide/pom.xml @@ -16,7 +16,7 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/docker/pom.xml b/infrastructures/docker/pom.xml index 6179b96cab..b267595ed4 100644 --- a/infrastructures/docker/pom.xml +++ b/infrastructures/docker/pom.xml @@ -16,7 +16,7 @@ che-infrastructures-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml infrastructure-docker diff --git a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ServiceStarter.java b/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ServiceStarter.java index 78a924abc6..01bfcea4a1 100644 --- a/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ServiceStarter.java +++ b/infrastructures/docker/src/main/java/org/eclipse/che/workspace/infrastructure/docker/ServiceStarter.java @@ -12,6 +12,7 @@ package org.eclipse.che.workspace.infrastructure.docker; import com.google.common.base.MoreObjects; import com.google.common.base.Strings; +import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.eclipse.che.api.core.NotFoundException; @@ -33,7 +34,9 @@ import org.eclipse.che.plugin.docker.client.UserSpecificDockerRegistryCredential import org.eclipse.che.plugin.docker.client.exception.ContainerNotFoundException; import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; import org.eclipse.che.plugin.docker.client.json.ContainerConfig; +import org.eclipse.che.plugin.docker.client.json.ContainerInfo; import org.eclipse.che.plugin.docker.client.json.HostConfig; +import org.eclipse.che.plugin.docker.client.json.ImageConfig; import org.eclipse.che.plugin.docker.client.json.PortBinding; import org.eclipse.che.plugin.docker.client.json.Volume; import org.eclipse.che.plugin.docker.client.json.container.NetworkingConfig; @@ -76,6 +79,7 @@ import java.util.regex.Pattern; import static java.lang.String.format; import static java.lang.Thread.sleep; import static java.util.Collections.emptyMap; +import static java.util.Collections.singletonList; import static java.util.Collections.singletonMap; import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toSet; @@ -95,6 +99,28 @@ public class ServiceStarter { public static final Pattern SNAPSHOT_LOCATION_PATTERN = Pattern.compile("(.+/)?" + MACHINE_SNAPSHOT_PREFIX + ".+"); + static final String CONTAINER_EXITED_ERROR = "We detected that a machine exited unexpectedly. " + + "This may be caused by a container in interactive mode " + + "or a container that requires additional arguments to start. " + + "Please check the container recipe."; + + // CMDs and entrypoints that lead to exiting of container right after start + private Set> badCMDs = ImmutableSet.of(singletonList("/bin/bash"), + singletonList("/bin/sh"), + singletonList("bash"), + singletonList("sh"), + Arrays.asList("/bin/sh", "-c", "/bin/sh"), + Arrays.asList("/bin/sh", "-c", "/bin/bash"), + Arrays.asList("/bin/sh", "-c", "bash"), + Arrays.asList("/bin/sh", "-c", "sh")); + private Set> badEntrypoints = + ImmutableSet.>builder().addAll(badCMDs) + .add(Arrays.asList("/bin/sh", "-c")) + .add(Arrays.asList("/bin/bash", "-c")) + .add(Arrays.asList("sh", "-c")) + .add(Arrays.asList("bash", "-c")) + .build(); + private final DockerConnector docker; private final UserSpecificDockerRegistryCredentialsProvider dockerCredentials; private final ExecutorService executor; @@ -273,6 +299,8 @@ public class ServiceStarter { docker.startContainer(StartContainerParams.create(container)); + checkContainerIsRunning(container); + readContainerLogsInSeparateThread(container, workspaceId, service.getId(), @@ -478,6 +506,8 @@ public class ServiceStarter { addStaticDockerConfiguration(config); + setNonExitingContainerCommandIfNeeded(config); + return docker.createContainer(CreateContainerParams.create(config) .withContainerName(service.getContainerName())) .getId(); @@ -523,6 +553,36 @@ public class ServiceStarter { composeService.getNetworks().addAll(additionalNetworks); } + // We can detect certain situation when container exited right after start. + // We can detect + // - when no command/entrypoint is set + // - when most common shell interpreters are used and require additional arguments + // - when most common shell interpreters are used and they require interactive mode which we don't support + // When we identify such situation we change CMD/entrypoint in such a way that it runs "tail -f /dev/null". + // This command does nothing and lasts until workspace is stopped. + // Images such as "ubuntu" or "openjdk" fits this situation. + protected void setNonExitingContainerCommandIfNeeded(ContainerConfig containerConfig) throws IOException { + ImageConfig imageConfig = docker.inspectImage(containerConfig.getImage()).getConfig(); + List cmd = imageConfig.getCmd() == null ? + null : Arrays.asList(imageConfig.getCmd()); + List entrypoint = imageConfig.getEntrypoint() == null ? + null : Arrays.asList(imageConfig.getEntrypoint()); + + if ((entrypoint == null || badEntrypoints.contains(entrypoint)) && (cmd == null || badCMDs.contains(cmd))) { + containerConfig.setCmd("tail", "-f", "/dev/null"); + containerConfig.setEntrypoint((String[])null); + } + } + + // Inspect container right after start to check if it is running, + // otherwise throw error that command should not exit right after container start + protected void checkContainerIsRunning(String container) throws IOException, ServerException { + ContainerInfo containerInfo = docker.inspectContainer(container); + if ("exited".equals(containerInfo.getState().getStatus())) { + throw new ServerException(CONTAINER_EXITED_ERROR); + } + } + private void readContainerLogsInSeparateThread(String container, String workspaceId, String machineId, diff --git a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/MachineProviderImplTest.java b/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/MachineProviderImplTest.java index edf0583c21..275d29ca23 100644 --- a/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/MachineProviderImplTest.java +++ b/infrastructures/docker/src/test/java/org/eclipse/che/workspace/infrastructure/docker/old/MachineProviderImplTest.java @@ -10,21 +10,96 @@ *******************************************************************************/ package org.eclipse.che.workspace.infrastructure.docker.old; +import org.eclipse.che.api.core.ServerException; +import org.eclipse.che.api.core.jsonrpc.RequestTransmitter; +import org.eclipse.che.api.core.model.machine.Machine; +import org.eclipse.che.api.core.model.machine.MachineConfig; +import org.eclipse.che.api.core.model.machine.ServerConf; +import org.eclipse.che.api.core.util.JsonRpcEndpointToMachineNameHolder; +import org.eclipse.che.api.core.util.LineConsumer; +import org.eclipse.che.api.environment.server.model.CheServiceImpl; +import org.eclipse.che.api.machine.server.model.impl.ServerConfImpl; +import org.eclipse.che.api.machine.server.recipe.RecipeImpl; +import org.eclipse.che.api.machine.server.util.RecipeRetriever; +import org.eclipse.che.commons.env.EnvironmentContext; +import org.eclipse.che.commons.lang.os.WindowsPathEscaper; +import org.eclipse.che.commons.subject.SubjectImpl; +import org.eclipse.che.plugin.docker.client.DockerConnector; +import org.eclipse.che.plugin.docker.client.DockerConnectorConfiguration; +import org.eclipse.che.plugin.docker.client.DockerConnectorProvider; +import org.eclipse.che.plugin.docker.client.ProgressMonitor; +import org.eclipse.che.plugin.docker.client.UserSpecificDockerRegistryCredentialsProvider; +import org.eclipse.che.plugin.docker.client.json.ContainerConfig; +import org.eclipse.che.plugin.docker.client.json.ContainerCreated; +import org.eclipse.che.plugin.docker.client.json.ContainerInfo; +import org.eclipse.che.plugin.docker.client.json.ContainerState; +import org.eclipse.che.plugin.docker.client.json.ImageConfig; +import org.eclipse.che.plugin.docker.client.json.ImageInfo; +import org.eclipse.che.plugin.docker.client.json.Volume; +import org.eclipse.che.plugin.docker.client.params.CreateContainerParams; +import org.eclipse.che.plugin.docker.client.params.InspectContainerParams; +import org.eclipse.che.plugin.docker.client.params.PullParams; +import org.eclipse.che.plugin.docker.client.params.RemoveContainerParams; +import org.eclipse.che.plugin.docker.client.params.RemoveImageParams; +import org.eclipse.che.plugin.docker.client.params.StartContainerParams; +import org.eclipse.che.plugin.docker.client.params.TagParams; +import org.eclipse.che.plugin.docker.machine.node.DockerNode; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.DataProvider; import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.Arrays.asList; +import static java.util.Collections.emptySet; +import static java.util.Collections.singleton; +import static java.util.Collections.singletonMap; +import static java.util.stream.Collectors.toMap; +import static org.eclipse.che.plugin.docker.machine.DockerInstanceProvider.DOCKER_FILE_TYPE; +import static org.eclipse.che.plugin.docker.machine.DockerInstanceProvider.MACHINE_SNAPSHOT_PREFIX; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertEqualsNoOrder; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; @Listeners(MockitoTestNGListener.class) public class MachineProviderImplTest { - /* - private static final String CONTAINER_ID = "containerId"; - private static final String WORKSPACE_ID = "wsId"; - private static final String MACHINE_NAME = "machineName"; - private static final String USER_TOKEN = "userToken"; - private static final String USER_NAME = "user"; - private static final boolean SNAPSHOT_USE_REGISTRY = true; - private static final int MEMORY_SWAP_MULTIPLIER = 0; - private static final String ENV_NAME = "env"; - private static final String NETWORK_NAME = "networkName"; + private static final String CONTAINER_ID = "containerId"; + private static final String WORKSPACE_ID = "wsId"; + private static final String MACHINE_NAME = "machineName"; + private static final String USER_TOKEN = "userToken"; + private static final String USER_NAME = "user"; + private static final boolean SNAPSHOT_USE_REGISTRY = true; + private static final int MEMORY_SWAP_MULTIPLIER = 0; + private static final String ENV_NAME = "env"; + private static final String NETWORK_NAME = "networkName"; + private static final String[] DEFAULT_CMD = new String[] {"some", "command"}; + private static final String[] DEFAULT_ENTRYPOINT = new String[] {"entry", "point"}; @Mock private DockerConnector dockerConnector; @@ -42,7 +117,7 @@ public class MachineProviderImplTest { private RequestTransmitter transmitter; @Mock - private JsonRpcEndpointIdsHolder endpointIdsHolder; + private JsonRpcEndpointToMachineNameHolder jsonRpcEndpointToMachineNameHolder; @Mock private DockerNode dockerNode; @@ -56,6 +131,12 @@ public class MachineProviderImplTest { @Mock private ContainerState containerState; + @Mock + private ImageInfo imageInfo; + + @Mock + private ImageConfig imageConfig; + @Mock private RecipeRetriever recipeRetriever; @@ -94,8 +175,12 @@ public class MachineProviderImplTest { when(dockerConnector.createContainer(any(CreateContainerParams.class))) .thenReturn(new ContainerCreated(CONTAINER_ID, new String[0])); when(dockerConnector.inspectContainer(any(InspectContainerParams.class))).thenReturn(containerInfo); + when(dockerConnector.inspectContainer(anyString())).thenReturn(containerInfo); when(containerInfo.getState()).thenReturn(containerState); - when(containerState.isRunning()).thenReturn(false); + when(containerState.getStatus()).thenReturn("running"); + when(dockerConnector.inspectImage(anyString())).thenReturn(imageInfo); + when(imageInfo.getConfig()).thenReturn(imageConfig); + when(imageConfig.getCmd()).thenReturn(new String[] {"tail", "-f", "/dev/null"}); } @AfterMethod @@ -204,7 +289,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(RemoveImageParams.class); verify(dockerConnector).removeImage(argumentCaptor.capture()); RemoveImageParams imageParams = argumentCaptor.getValue(); - Assert.assertEquals(imageParams.getImage(), registry + "/" + repo + ":" + tag); + assertEquals(imageParams.getImage(), registry + "/" + repo + ":" + tag); assertFalse(imageParams.isForce()); } @@ -237,7 +322,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(StartContainerParams.class); verify(dockerConnector).startContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainer(), CONTAINER_ID); + assertEquals(argumentCaptor.getValue().getContainer(), CONTAINER_ID); } @Test @@ -284,7 +369,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getCpusetCpus(), "0-3"); + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getCpusetCpus(), "0-3"); } @Test @@ -341,7 +426,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getCgroupParent(), "some_parent"); + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getCgroupParent(), "some_parent"); } @Test @@ -353,7 +438,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getPidsLimit(), 512); + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getPidsLimit(), 512); } @@ -393,7 +478,7 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(StartContainerParams.class); verify(dockerConnector).startContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainer(), CONTAINER_ID); + assertEquals(argumentCaptor.getValue().getContainer(), CONTAINER_ID); } @Test @@ -421,7 +506,7 @@ public class MachineProviderImplTest { verify(dockerConnector).createContainer(argumentCaptor.capture()); verify(dockerConnector).startContainer(any(StartContainerParams.class)); // docker accepts memory size in bytes - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemory(), + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemory(), memorySizeMB * 1024 * 1024); } @@ -437,7 +522,7 @@ public class MachineProviderImplTest { verify(dockerConnector).createContainer(argumentCaptor.capture()); verify(dockerConnector).startContainer(any(StartContainerParams.class)); // docker accepts memory size in bytes - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemory(), + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemory(), memorySizeMB * 1024 * 1024); } @@ -454,7 +539,7 @@ public class MachineProviderImplTest { // then ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); - Assert.assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemorySwap(), expectedSwapSize); + assertEquals(argumentCaptor.getValue().getContainerConfig().getHostConfig().getMemorySwap(), expectedSwapSize); } @DataProvider(name = "swapTestProvider") @@ -1011,6 +1096,32 @@ public class MachineProviderImplTest { ". Found " + Arrays.toString(argumentCaptor.getValue().getContainerConfig().getEnv())); } + @Test + public void shouldAddMachineNameEnvVariableOnDevInstanceCreationFromRecipe() throws Exception { + String wsId = "myWs"; + createInstanceFromRecipe(true, wsId); + ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); + verify(dockerConnector).createContainer(argumentCaptor.capture()); + assertTrue(asList(argumentCaptor.getValue().getContainerConfig().getEnv()) + .contains(DockerInstanceRuntimeInfo.CHE_MACHINE_NAME + "=" + MACHINE_NAME), + "Machine Name variable is missing. Required " + DockerInstanceRuntimeInfo.CHE_MACHINE_NAME + "=" + + MACHINE_NAME + + ". Found " + Arrays.toString(argumentCaptor.getValue().getContainerConfig().getEnv())); + } + + @Test + public void shouldAddMachineNameEnvVariableOnNonDevInstanceCreationFromRecipe() throws Exception { + String wsId = "myWs"; + createInstanceFromRecipe(false, wsId); + ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); + verify(dockerConnector).createContainer(argumentCaptor.capture()); + assertTrue(asList(argumentCaptor.getValue().getContainerConfig().getEnv()) + .contains(DockerInstanceRuntimeInfo.CHE_MACHINE_NAME + "=" + MACHINE_NAME), + "Machine Name variable is missing. Required " + DockerInstanceRuntimeInfo.CHE_MACHINE_NAME + "=" + + MACHINE_NAME + + ". Found " + Arrays.toString(argumentCaptor.getValue().getContainerConfig().getEnv())); + } + @Test public void shouldAddWorkspaceIdEnvVariableOnDevInstanceCreationFromSnapshot() throws Exception { String wsId = "myWs"; @@ -1025,14 +1136,14 @@ public class MachineProviderImplTest { } @Test - public void shouldNotAddWorkspaceIdEnvVariableOnNonDevInstanceCreationFromRecipe() throws Exception { + public void shouldAddWorkspaceIdEnvVariableOnNonDevInstanceCreationFromRecipe() throws Exception { String wsId = "myWs"; createInstanceFromRecipe(false, wsId); ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); - assertFalse(asList(argumentCaptor.getValue().getContainerConfig().getEnv()) + assertTrue(asList(argumentCaptor.getValue().getContainerConfig().getEnv()) .contains(DockerInstanceRuntimeInfo.CHE_WORKSPACE_ID + "=" + wsId), - "Non dev machine should not contains " + DockerInstanceRuntimeInfo.CHE_WORKSPACE_ID); + "Non dev machine should contains " + DockerInstanceRuntimeInfo.CHE_WORKSPACE_ID); } @Test @@ -1257,22 +1368,156 @@ public class MachineProviderImplTest { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); ContainerConfig containerConfig = argumentCaptor.getValue().getContainerConfig(); - Assert.assertEquals(containerConfig.getHostConfig().getLinks(), links); - Assert.assertEquals(containerConfig.getNetworkingConfig().getEndpointsConfig().get(NETWORK_NAME).getLinks(), links); + assertEquals(containerConfig.getHostConfig().getLinks(), links); + assertEquals(containerConfig.getNetworkingConfig().getEndpointsConfig().get(NETWORK_NAME).getLinks(), links); } @Test public void shouldBeAbleToCreateContainerWithCpuQuota() throws Exception { + // given provider = spy(new MachineProviderBuilder().setCpuQuota(200) .build()); + // when createInstanceFromRecipe(); + // then ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); verify(dockerConnector).createContainer(argumentCaptor.capture()); assertEquals(((long)argumentCaptor.getValue().getContainerConfig().getHostConfig().getCpuQuota()), 200); } + @Test(dataProvider = "terminatingContainerEntrypointCmd") + public void shouldChangeEntrypointCmdToTailfDevNullIfTheyAreIdentifiedAsTerminating(String[] entrypoint, + String[] cmd) + throws Exception { + // given + when(imageConfig.getCmd()).thenReturn(cmd); + when(imageConfig.getEntrypoint()).thenReturn(entrypoint); + + // when + createInstanceFromRecipe(); + + // then + ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); + verify(dockerConnector).createContainer(argumentCaptor.capture()); + assertNull(argumentCaptor.getValue().getContainerConfig().getEntrypoint()); + assertEquals(argumentCaptor.getValue().getContainerConfig().getCmd(), new String[] {"tail", "-f", "/dev/null"}); + } + + @DataProvider(name = "terminatingContainerEntrypointCmd") + public static Object[][] terminatingContainerEntrypointCmd() { + return new Object[][] { + // entrypoint and cmd are unset + {null, null}, + // entrypoint is unset + {null, new String[] {"/bin/bash"}}, + {null, new String[] {"/bin/sh"}}, + {null, new String[] {"bash"}}, + {null, new String[] {"sh"}}, + {null, new String[] {"/bin/sh", "-c", "/bin/bash"}}, + {null, new String[] {"/bin/sh", "-c", "/bin/sh"}}, + {null, new String[] {"/bin/sh", "-c", "bash"}}, + {null, new String[] {"/bin/sh", "-c", "sh"}}, + // cmd is unset + {new String[] {"/bin/sh", "-c"}, null}, + {new String[] {"/bin/bash", "-c"}, null}, + {new String[] {"bash", "-c"}, null}, + {new String[] {"sh", "-c"}, null}, + {new String[] {"/bin/bash"}, null}, + {new String[] {"/bin/sh"}, null}, + {new String[] {"bash"}, null}, + {new String[] {"sh"}, null}, + {new String[] {"/bin/sh", "-c", "/bin/bash"}, null}, + {new String[] {"/bin/sh", "-c", "/bin/sh"}, null}, + {new String[] {"/bin/sh", "-c", "bash"}, null}, + {new String[] {"/bin/sh", "-c", "sh"}, null}, + // entrypoint and cmd are set + {new String[] {"/bin/sh", "-c"}, new String[] {"bash"}}, + {new String[] {"/bin/bash", "-c"}, new String[] {"sh"}}, + {new String[] {"bash", "-c"}, new String[] {"/bin/bash"}}, + {new String[] {"sh", "-c"}, new String[] {"/bin/sh"}}, + {new String[] {"/bin/bash"}, new String[] {"/bin/bash"}}, + {new String[] {"/bin/sh"}, new String[] {"/bin/bash"}}, + {new String[] {"bash"}, new String[] {"/bin/bash"}}, + {new String[] {"sh"}, new String[] {"/bin/bash"}}, + {new String[] {"/bin/sh", "-c", "/bin/bash"}, new String[] {"/bin/bash"}}, + {new String[] {"/bin/sh", "-c", "/bin/sh"}, new String[] {"/bin/bash"}}, + {new String[] {"/bin/sh", "-c", "bash"}, new String[] {"/bin/bash"}}, + {new String[] {"/bin/sh", "-c", "sh"}, new String[] {"/bin/bash"}}, + }; + } + + @Test(dataProvider = "nonTerminatingContainerEntrypointCmd") + public void shouldNotChangeEntrypointCmdIfTheyAreNotIdentified(String[] entrypoint, + String[] cmd) throws Exception { + // given + when(imageConfig.getCmd()).thenReturn(cmd); + when(imageConfig.getEntrypoint()).thenReturn(entrypoint); + + // when + createInstanceFromRecipe(); + + // then + ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateContainerParams.class); + verify(dockerConnector).createContainer(argumentCaptor.capture()); + assertEqualsNoOrder(argumentCaptor.getValue().getContainerConfig().getEntrypoint(), DEFAULT_ENTRYPOINT); + assertEqualsNoOrder(argumentCaptor.getValue().getContainerConfig().getCmd(), DEFAULT_CMD); + } + + @DataProvider(name = "nonTerminatingContainerEntrypointCmd") + public static Object[][] nonTerminatingContainerEntrypointCmd() { + return new Object[][] { + {new String[] {"/bin/sh", "-c"}, new String[] {"tail", "-f", "/dev/null"}}, + {new String[] {"/bin/sh", "-c"}, new String[] {"tailf", "/dev/null"}}, + {new String[] {"/bin/sh", "-c"}, new String[] {"./entrypoint.sh", "something"}}, + {new String[] {"/bin/sh", "-c"}, new String[] {"./entrypoint.sh"}}, + {new String[] {"/bin/sh", "-c"}, new String[] {"ping google.com"}}, + {new String[] {"sh", "-c"}, new String[] {"./entrypoint.sh"}}, + {new String[] {"bash", "-c"}, new String[] {"./entrypoint.sh"}}, + {new String[] {"/bin/bash", "-c"}, new String[] {"./entrypoint.sh"}}, + // terminating cmd but we don't recognize it since it is not used luckily and we should limit + // list of handled variants + {new String[] {"/bin/sh", "-c"}, new String[] {"echo", "something"}}, + {new String[] {"/bin/sh", "-c"}, new String[] {"ls"}}, + }; + } + + @Test(dataProvider = "acceptableStartedContainerStatus") + public void shouldNotThrowExceptionIfContainerStatusIsAcceptable(String status) throws Exception { + // given + when(containerState.getStatus()).thenReturn(status); + + // when + createInstanceFromRecipe(); + + // then + verify(dockerConnector).inspectContainer(CONTAINER_ID); + verify(containerState).getStatus(); + } + + @DataProvider(name = "acceptableStartedContainerStatus") + public static Object[][] acceptableStartedContainerStatus() { + return new Object[][] { + // in case status is not returned for some reason, e.g. docker doesn't provide it + {null}, + // expected status + {"running"}, + // unknown status, pass for compatibility + {"some thing"} + }; + } + + @Test(expectedExceptions = ServerException.class, + expectedExceptionsMessageRegExp = MachineProviderImpl.CONTAINER_EXITED_ERROR) + public void shouldThrowExceptionIfContainerExitedRightAfterStart() throws Exception { + // given + when(containerState.getStatus()).thenReturn("exited"); + + // when + createInstanceFromRecipe(); + } + private CheServiceImpl createInstanceFromRecipe() throws Exception { CheServiceImpl service = createService(); createInstanceFromRecipe(service); @@ -1369,10 +1614,10 @@ public class MachineProviderImplTest { CheServiceImpl service = new CheServiceImpl(); service.setId("testId"); service.setImage("image"); - service.setCommand(asList("some", "command")); + service.setCommand(asList(DEFAULT_CMD)); service.setContainerName("cont_name"); service.setDependsOn(asList("dep1", "dep2")); - service.setEntrypoint(asList("entry", "point")); + service.setEntrypoint(asList(DEFAULT_ENTRYPOINT)); service.setExpose(asList("1010", "1111")); service.setEnvironment(singletonMap("some", "var")); service.setLabels(singletonMap("some", "label")); @@ -1513,7 +1758,7 @@ public class MachineProviderImplTest { dockerMachineFactory, dockerInstanceStopDetector, transmitter, - endpointIdsHolder, + jsonRpcEndpointToMachineNameHolder, devMachineServers, allMachineServers, devMachineVolumes, @@ -1536,5 +1781,4 @@ public class MachineProviderImplTest { dnsResolvers); } } - */ } diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 0a22adce53..b221541ef8 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -16,11 +16,11 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-infrastructures-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Infrastructures Parent diff --git a/plugins/plugin-composer/che-plugin-composer-ide/pom.xml b/plugins/plugin-composer/che-plugin-composer-ide/pom.xml index b66253cc22..6b0c954e83 100644 --- a/plugins/plugin-composer/che-plugin-composer-ide/pom.xml +++ b/plugins/plugin-composer/che-plugin-composer-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-composer-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-composer-ide jar diff --git a/plugins/plugin-composer/che-plugin-composer-server/pom.xml b/plugins/plugin-composer/che-plugin-composer-server/pom.xml index 317daeb7d3..25bed93a1d 100644 --- a/plugins/plugin-composer/che-plugin-composer-server/pom.xml +++ b/plugins/plugin-composer/che-plugin-composer-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-composer-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-composer-server Che Plugin :: Composer :: Server diff --git a/plugins/plugin-composer/che-plugin-composer-shared/pom.xml b/plugins/plugin-composer/che-plugin-composer-shared/pom.xml index a327009dbb..5d468350f4 100644 --- a/plugins/plugin-composer/che-plugin-composer-shared/pom.xml +++ b/plugins/plugin-composer/che-plugin-composer-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-composer-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-composer-shared Che Plugin :: Composer :: Shared diff --git a/plugins/plugin-composer/pom.xml b/plugins/plugin-composer/pom.xml index cbcdfd0c83..05df4fae45 100644 --- a/plugins/plugin-composer/pom.xml +++ b/plugins/plugin-composer/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-composer-parent diff --git a/plugins/plugin-cpp/che-plugin-cpp-lang-ide/pom.xml b/plugins/plugin-cpp/che-plugin-cpp-lang-ide/pom.xml index 4b748262b7..dc8c0e417a 100644 --- a/plugins/plugin-cpp/che-plugin-cpp-lang-ide/pom.xml +++ b/plugins/plugin-cpp/che-plugin-cpp-lang-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-cpp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-cpp-lang-ide jar diff --git a/plugins/plugin-cpp/che-plugin-cpp-lang-server/pom.xml b/plugins/plugin-cpp/che-plugin-cpp-lang-server/pom.xml index 5a91421934..2fc65cb888 100644 --- a/plugins/plugin-cpp/che-plugin-cpp-lang-server/pom.xml +++ b/plugins/plugin-cpp/che-plugin-cpp-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-cpp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-cpp-lang-server Che Plugin :: C/C++ :: Extension Server diff --git a/plugins/plugin-cpp/che-plugin-cpp-lang-shared/pom.xml b/plugins/plugin-cpp/che-plugin-cpp-lang-shared/pom.xml index 4122684629..d4217edd66 100644 --- a/plugins/plugin-cpp/che-plugin-cpp-lang-shared/pom.xml +++ b/plugins/plugin-cpp/che-plugin-cpp-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-cpp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-cpp-lang-shared Che Plugin :: C/C++ :: Shared diff --git a/plugins/plugin-cpp/pom.xml b/plugins/plugin-cpp/pom.xml index 7f24371d87..01501a9d04 100644 --- a/plugins/plugin-cpp/pom.xml +++ b/plugins/plugin-cpp/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-cpp-parent diff --git a/plugins/plugin-csharp/che-plugin-csharp-lang-ide/pom.xml b/plugins/plugin-csharp/che-plugin-csharp-lang-ide/pom.xml index 7c216207eb..852fbca588 100644 --- a/plugins/plugin-csharp/che-plugin-csharp-lang-ide/pom.xml +++ b/plugins/plugin-csharp/che-plugin-csharp-lang-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-csharp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-csharp-lang-ide jar diff --git a/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml b/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml index 71f519b871..770250ee85 100644 --- a/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml +++ b/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-csharp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-csharp-lang-server Che Plugin :: C# :: Extension Server diff --git a/plugins/plugin-csharp/che-plugin-csharp-lang-shared/pom.xml b/plugins/plugin-csharp/che-plugin-csharp-lang-shared/pom.xml index e0e345a7da..e753b356fd 100644 --- a/plugins/plugin-csharp/che-plugin-csharp-lang-shared/pom.xml +++ b/plugins/plugin-csharp/che-plugin-csharp-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-csharp-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-csharp-lang-shared Che Plugin :: C# :: Shared diff --git a/plugins/plugin-csharp/pom.xml b/plugins/plugin-csharp/pom.xml index ed772fe40e..477576f2aa 100644 --- a/plugins/plugin-csharp/pom.xml +++ b/plugins/plugin-csharp/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-csharp-parent diff --git a/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml b/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml index b32c6f55be..87f9ba49a3 100644 --- a/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml +++ b/plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml @@ -16,7 +16,7 @@ che-plugin-dashboard-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-ext-dashboard-client jar diff --git a/plugins/plugin-dashboard/pom.xml b/plugins/plugin-dashboard/pom.xml index c07fffd9cf..22ec763f1b 100644 --- a/plugins/plugin-dashboard/pom.xml +++ b/plugins/plugin-dashboard/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-dashboard-parent diff --git a/plugins/plugin-debugger/che-plugin-debugger-ide/pom.xml b/plugins/plugin-debugger/che-plugin-debugger-ide/pom.xml index 57917cf1f0..45b7e56240 100644 --- a/plugins/plugin-debugger/che-plugin-debugger-ide/pom.xml +++ b/plugins/plugin-debugger/che-plugin-debugger-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-debugger-ide jar diff --git a/plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/AbstractDebugger.java b/plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/AbstractDebugger.java index 5908475ac9..fe56419736 100644 --- a/plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/AbstractDebugger.java +++ b/plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/AbstractDebugger.java @@ -45,7 +45,6 @@ import org.eclipse.che.api.promises.client.Operation; import org.eclipse.che.api.promises.client.OperationException; import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.js.JsPromise; import org.eclipse.che.api.promises.client.js.JsPromiseError; import org.eclipse.che.api.promises.client.js.Promises; import org.eclipse.che.commons.annotation.Nullable; @@ -159,17 +158,22 @@ public abstract class AbstractDebugger implements Debugger, DebuggerObservable { String info = debuggerInfo.getName() + " " + debuggerInfo.getVersion(); String address = debuggerInfo.getHost() + ":" + debuggerInfo.getPort(); DebuggerDescriptor debuggerDescriptor = new DebuggerDescriptor(info, address); - JsPromise promise1 = Promises.resolve(null); for (DebuggerObserver observer : observers) { - observer.onDebuggerAttached(debuggerDescriptor, promise1); + observer.onDebuggerAttached(debuggerDescriptor, Promises.resolve(null)); + } + + for (BreakpointDto breakpoint : debugSessionDto.getBreakpoints()) { + onBreakpointActivated(breakpoint.getLocation()); + } + + if (currentLocation != null) { + openCurrentFile(); } startCheckingEvents(); }).catchError(error -> { - if (!isConnected()) { - invalidateDebugSession(); - } + disconnect(); }); } diff --git a/plugins/plugin-debugger/pom.xml b/plugins/plugin-debugger/pom.xml index 7e7e5bf258..d6846e7c18 100644 --- a/plugins/plugin-debugger/pom.xml +++ b/plugins/plugin-debugger/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-debugger-parent diff --git a/plugins/plugin-docker/che-plugin-docker-client/pom.xml b/plugins/plugin-docker/che-plugin-docker-client/pom.xml index 3a9436d7a7..2dd2ea1163 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/pom.xml +++ b/plugins/plugin-docker/che-plugin-docker-client/pom.xml @@ -16,7 +16,7 @@ che-plugin-docker-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-docker-client jar diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java index 5a1d3533a1..4e5ba8e8ed 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java +++ b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java @@ -19,9 +19,9 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import org.eclipse.che.api.core.util.FileCleaner; -import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.lang.TarUtils; +import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; import org.eclipse.che.commons.lang.ws.rs.ExtMediaType; import org.eclipse.che.plugin.docker.client.connection.CloseConnectionInputStream; import org.eclipse.che.plugin.docker.client.connection.DockerConnection; @@ -269,6 +269,8 @@ public class DockerConnector { * Gets detailed information about docker image. * * @return detailed information about {@code image} + * @throws ImageNotFoundException + * when docker api return 404 status * @throws IOException * when a problem occurs with docker api calls */ @@ -277,7 +279,11 @@ public class DockerConnector { .method("GET") .path(apiVersionPathPrefix + "/images/" + params.getImage() + "/json")) { final DockerResponse response = connection.request(); - if (OK.getStatusCode() != response.getStatus()) { + final int status = response.getStatus(); + if (status == NOT_FOUND.getStatusCode()) { + throw new ImageNotFoundException(readAndCloseQuietly(response.getInputStream())); + } + if (OK.getStatusCode() != status) { throw getDockerException(response); } return parseResponseStreamAndClose(response.getInputStream(), ImageInfo.class); @@ -404,6 +410,8 @@ public class DockerConnector { * Gets detailed information about docker container. * * @return detailed information about {@code container} + * @throws ContainerNotFoundException + * when container not found by docker (docker api returns 404) * @throws IOException * when a problem occurs with docker api calls */ @@ -414,7 +422,11 @@ public class DockerConnector { "/json")) { addQueryParamIfNotNull(connection, "size", params.isReturnContainerSize()); final DockerResponse response = connection.request(); - if (OK.getStatusCode() != response.getStatus()) { + final int status = response.getStatus(); + if (status == NOT_FOUND.getStatusCode()) { + throw new ContainerNotFoundException(readAndCloseQuietly(response.getInputStream())); + } + if (OK.getStatusCode() != status) { throw getDockerException(response); } return parseResponseStreamAndClose(response.getInputStream(), ContainerInfo.class); diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java index 5c98edf9c9..1374cc5360 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java +++ b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerConfig.java @@ -309,11 +309,11 @@ public class ContainerConfig { return entrypoint; } - public void setEntrypoint(String[] entrypoint) { + public void setEntrypoint(String... entrypoint) { this.entrypoint = entrypoint; } - public ContainerConfig withEntrypoint(String[] entrypoint) { + public ContainerConfig withEntrypoint(String... entrypoint) { this.entrypoint = entrypoint; return this; } diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java index 4dc9515712..8f8401e007 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java +++ b/plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/json/ContainerState.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.che.plugin.docker.client.json; +import java.util.Objects; + /** @author andrew00x */ public class ContainerState { private boolean running; @@ -23,6 +25,7 @@ public class ContainerState { private boolean dead; private boolean oOMKilled; private String error; + private String status; public boolean isRunning() { return running; @@ -104,6 +107,39 @@ public class ContainerState { this.error = error; } + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ContainerState)) return false; + ContainerState that = (ContainerState)o; + return isRunning() == that.isRunning() && + getPid() == that.getPid() && + getExitCode() == that.getExitCode() && + isPaused() == that.isPaused() && + isRestarting() == that.isRestarting() && + isDead() == that.isDead() && + oOMKilled == that.oOMKilled && + Objects.equals(getStartedAt(), that.getStartedAt()) && + Objects.equals(getFinishedAt(), that.getFinishedAt()) && + Objects.equals(getError(), that.getError()) && + Objects.equals(getStatus(), that.getStatus()); + } + + @Override + public int hashCode() { + return Objects + .hash(isRunning(), getPid(), getExitCode(), getStartedAt(), getFinishedAt(), isPaused(), isRestarting(), + isDead(), oOMKilled, getError(), getStatus()); + } + @Override public String toString() { return "ContainerState{" + diff --git a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java b/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java index dc26fb186e..230a98a161 100644 --- a/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java +++ b/plugins/plugin-docker/che-plugin-docker-client/src/test/java/org/eclipse/che/plugin/docker/client/DockerConnectorTest.java @@ -29,6 +29,7 @@ import org.eclipse.che.plugin.docker.client.dto.AuthConfigs; import org.eclipse.che.plugin.docker.client.exception.ContainerNotFoundException; import org.eclipse.che.plugin.docker.client.exception.DockerException; import org.eclipse.che.plugin.docker.client.exception.ExecNotFoundException; +import org.eclipse.che.plugin.docker.client.exception.ImageNotFoundException; import org.eclipse.che.plugin.docker.client.exception.NetworkNotFoundException; import org.eclipse.che.plugin.docker.client.json.ContainerCommitted; import org.eclipse.che.plugin.docker.client.json.ContainerConfig; @@ -441,6 +442,17 @@ public class DockerConnectorTest { verify(dockerResponse).getStatus(); } + @Test(expectedExceptions = ImageNotFoundException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE) + public void shouldThrowImageNotFoundExceptionOnGettingImageInfoIfResponseCodeIs404() throws IOException { + InspectImageParams inspectImageParams = InspectImageParams.create(IMAGE); + + when(dockerResponse.getStatus()).thenReturn(RESPONSE_NOT_FOUND_CODE); + + dockerConnector.inspectImage(inspectImageParams); + + verify(dockerResponse).getStatus(); + } + @Test public void shouldBeAbleToStopContainer() throws IOException { StopContainerParams stopContainerParams = StopContainerParams.create(CONTAINER); @@ -627,6 +639,17 @@ public class DockerConnectorTest { verify(dockerResponse).getStatus(); } + @Test(expectedExceptions = ContainerNotFoundException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE) + public void shouldThrowContainerNotFoundExceptionOnInspectingContainerIfResponseCodeIs404() throws IOException { + InspectContainerParams inspectContainerParams = InspectContainerParams.create(CONTAINER); + + when(dockerResponse.getStatus()).thenReturn(RESPONSE_NOT_FOUND_CODE); + + dockerConnector.inspectContainer(inspectContainerParams); + + verify(dockerResponse).getStatus(); + } + @Test public void shouldBeAbleToAttachContainer() throws IOException { AttachContainerParams attachContainerParams = AttachContainerParams.create(CONTAINER); diff --git a/plugins/plugin-docker/che-plugin-openshift-client/pom.xml b/plugins/plugin-docker/che-plugin-openshift-client/pom.xml index 1f3a852c9c..07c56ca643 100644 --- a/plugins/plugin-docker/che-plugin-openshift-client/pom.xml +++ b/plugins/plugin-docker/che-plugin-openshift-client/pom.xml @@ -16,7 +16,7 @@ che-plugin-docker-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-openshift-client jar diff --git a/plugins/plugin-docker/pom.xml b/plugins/plugin-docker/pom.xml index e2a97f19bb..3d8c11ca83 100644 --- a/plugins/plugin-docker/pom.xml +++ b/plugins/plugin-docker/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-docker-parent diff --git a/plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml b/plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml index 9a64da6509..08596b2f99 100644 --- a/plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml +++ b/plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-gdb-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-gdb-ide jar diff --git a/plugins/plugin-gdb/che-plugin-gdb-server/pom.xml b/plugins/plugin-gdb/che-plugin-gdb-server/pom.xml index ed718d16c5..b9ceac03c8 100644 --- a/plugins/plugin-gdb/che-plugin-gdb-server/pom.xml +++ b/plugins/plugin-gdb/che-plugin-gdb-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-gdb-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-gdb-server jar diff --git a/plugins/plugin-gdb/pom.xml b/plugins/plugin-gdb/pom.xml index 408471d71d..3e7a6a3042 100644 --- a/plugins/plugin-gdb/pom.xml +++ b/plugins/plugin-gdb/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-gdb-parent pom diff --git a/plugins/plugin-git/che-plugin-git-ext-git/pom.xml b/plugins/plugin-git/che-plugin-git-ext-git/pom.xml index d90ea8398b..962cd1c6b1 100644 --- a/plugins/plugin-git/che-plugin-git-ext-git/pom.xml +++ b/plugins/plugin-git/che-plugin-git-ext-git/pom.xml @@ -16,7 +16,7 @@ che-plugin-git-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-git-ext-git jar diff --git a/plugins/plugin-git/pom.xml b/plugins/plugin-git/pom.xml index b5d5697c5b..c20b2d00e4 100644 --- a/plugins/plugin-git/pom.xml +++ b/plugins/plugin-git/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-git-parent diff --git a/plugins/plugin-github/che-plugin-github-factory-resolver/pom.xml b/plugins/plugin-github/che-plugin-github-factory-resolver/pom.xml index 6345f95c28..9b410b57a7 100644 --- a/plugins/plugin-github/che-plugin-github-factory-resolver/pom.xml +++ b/plugins/plugin-github/che-plugin-github-factory-resolver/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-factory-resolver jar diff --git a/plugins/plugin-github/che-plugin-github-ide/pom.xml b/plugins/plugin-github/che-plugin-github-ide/pom.xml index d0bf6e1aa5..de956406ff 100644 --- a/plugins/plugin-github/che-plugin-github-ide/pom.xml +++ b/plugins/plugin-github/che-plugin-github-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-ide jar diff --git a/plugins/plugin-github/che-plugin-github-oauth2/pom.xml b/plugins/plugin-github/che-plugin-github-oauth2/pom.xml index 3e1dd06e62..4c62cf043e 100644 --- a/plugins/plugin-github/che-plugin-github-oauth2/pom.xml +++ b/plugins/plugin-github/che-plugin-github-oauth2/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-oauth2 jar @@ -50,6 +50,10 @@ org.eclipse.che.core che-core-api-auth + + org.eclipse.che.core + che-core-api-auth-shared + org.eclipse.che.core che-core-commons-annotations diff --git a/plugins/plugin-github/che-plugin-github-provider-github/pom.xml b/plugins/plugin-github/che-plugin-github-provider-github/pom.xml index 1779a2b507..8adfe6704c 100644 --- a/plugins/plugin-github/che-plugin-github-provider-github/pom.xml +++ b/plugins/plugin-github/che-plugin-github-provider-github/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-provider-github Che Plugin :: Github :: Credential provider @@ -39,7 +39,7 @@ org.eclipse.che.core - che-core-api-auth + che-core-api-auth-shared org.eclipse.che.core diff --git a/plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GitHubOAuthCredentialProvider.java b/plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GitHubOAuthCredentialProvider.java index 565fa9e086..fbc5dd49b5 100644 --- a/plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GitHubOAuthCredentialProvider.java +++ b/plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GitHubOAuthCredentialProvider.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.che.ide.ext.git.server.github; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.git.exception.GitException; import org.eclipse.che.api.git.shared.ProviderInfo; diff --git a/plugins/plugin-github/che-plugin-github-pullrequest/pom.xml b/plugins/plugin-github/che-plugin-github-pullrequest/pom.xml index 0b2398cb14..6a6fb0c17d 100644 --- a/plugins/plugin-github/che-plugin-github-pullrequest/pom.xml +++ b/plugins/plugin-github/che-plugin-github-pullrequest/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-pullrequest Che Plugin :: Github :: Pull request diff --git a/plugins/plugin-github/che-plugin-github-server/pom.xml b/plugins/plugin-github/che-plugin-github-server/pom.xml index 14a7fb1c81..4d2cb85610 100644 --- a/plugins/plugin-github/che-plugin-github-server/pom.xml +++ b/plugins/plugin-github/che-plugin-github-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-server jar @@ -47,7 +47,7 @@ org.eclipse.che.core - che-core-api-auth + che-core-api-auth-shared org.eclipse.che.core diff --git a/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubFactory.java b/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubFactory.java index 0b5a1372d3..b3480f2e76 100644 --- a/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubFactory.java +++ b/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubFactory.java @@ -12,7 +12,7 @@ package org.eclipse.che.plugin.github.server; import com.google.inject.Inject; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; diff --git a/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubKeyUploader.java b/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubKeyUploader.java index d07e2f45ea..be09745e94 100644 --- a/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubKeyUploader.java +++ b/plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubKeyUploader.java @@ -13,7 +13,7 @@ package org.eclipse.che.plugin.github.server; import com.google.inject.Inject; import com.google.inject.Singleton; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.commons.env.EnvironmentContext; diff --git a/plugins/plugin-github/che-plugin-github-shared/pom.xml b/plugins/plugin-github/che-plugin-github-shared/pom.xml index 03b4ac30a2..49e72f7fa0 100644 --- a/plugins/plugin-github/che-plugin-github-shared/pom.xml +++ b/plugins/plugin-github/che-plugin-github-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-github-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-github-shared Che Plugin :: Github :: Shared diff --git a/plugins/plugin-github/pom.xml b/plugins/plugin-github/pom.xml index fc9c67f9cf..f11a93aad8 100644 --- a/plugins/plugin-github/pom.xml +++ b/plugins/plugin-github/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-github-parent diff --git a/plugins/plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml b/plugins/plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml index b8cc360326..4f73b1b6ec 100644 --- a/plugins/plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml +++ b/plugins/plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml @@ -16,7 +16,7 @@ che-plugin-gwt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-gwt-ext-gwt jar diff --git a/plugins/plugin-gwt/pom.xml b/plugins/plugin-gwt/pom.xml index dd07e7686c..29d1df5c83 100644 --- a/plugins/plugin-gwt/pom.xml +++ b/plugins/plugin-gwt/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-gwt-parent diff --git a/plugins/plugin-help/che-plugin-help-ext-client/pom.xml b/plugins/plugin-help/che-plugin-help-ext-client/pom.xml index bf1688e9ca..56c11f2566 100644 --- a/plugins/plugin-help/che-plugin-help-ext-client/pom.xml +++ b/plugins/plugin-help/che-plugin-help-ext-client/pom.xml @@ -16,7 +16,7 @@ che-plugin-help-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-help-ext-client jar diff --git a/plugins/plugin-help/pom.xml b/plugins/plugin-help/pom.xml index 8f9663663c..dbc5c41a05 100644 --- a/plugins/plugin-help/pom.xml +++ b/plugins/plugin-help/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-help-parent diff --git a/plugins/plugin-java-debugger/che-plugin-java-debugger-ide/pom.xml b/plugins/plugin-java-debugger/che-plugin-java-debugger-ide/pom.xml index ba4f846325..eec710bc13 100644 --- a/plugins/plugin-java-debugger/che-plugin-java-debugger-ide/pom.xml +++ b/plugins/plugin-java-debugger/che-plugin-java-debugger-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-debugger-ide jar diff --git a/plugins/plugin-java-debugger/che-plugin-java-debugger-server/pom.xml b/plugins/plugin-java-debugger/che-plugin-java-debugger-server/pom.xml index 294b78cdc4..2067eb3fec 100644 --- a/plugins/plugin-java-debugger/che-plugin-java-debugger-server/pom.xml +++ b/plugins/plugin-java-debugger/che-plugin-java-debugger-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-debugger-server jar diff --git a/plugins/plugin-java-debugger/pom.xml b/plugins/plugin-java-debugger/pom.xml index 8af07524ee..bd120bf563 100644 --- a/plugins/plugin-java-debugger/pom.xml +++ b/plugins/plugin-java-debugger/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-debugger-parent pom diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml index 10e87b54ed..743c8f2f74 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.core.filebuffers jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml index 19703931c6..640bb1450d 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.core.filesystem jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml index c494f3d231..28d7c22ad4 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.core.resources jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml index 5d18b7bc45..dc5132f0be 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.jdt.ui jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface-text/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface-text/pom.xml index 0ffc5bce4d..1bc18f0c1f 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface-text/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface-text/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.jface.text jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface/pom.xml index b6f390406e..7185750dba 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jface/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.jface jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/pom.xml index 9739beb75f..8cf2428883 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.ltk.core.refactoring jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-search/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-search/pom.xml index fd8a918698..097da782e2 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-search/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-search/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.search jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ui-ide/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ui-ide/pom.xml index fb10d833d3..e9a315c139 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ui-ide/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ui-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-ext-jdt-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.ui.ide jar diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/pom.xml index 95f07aa423..982bbfb7f3 100644 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-jdt/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-ext-jdt-parent pom diff --git a/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml b/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml index 62dda5d4f5..5f7992f7fd 100644 --- a/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-ext-lang-client jar diff --git a/plugins/plugin-java/che-plugin-java-ext-lang-server/pom.xml b/plugins/plugin-java/che-plugin-java-ext-lang-server/pom.xml index 356eb41368..1ecbe26ad9 100644 --- a/plugins/plugin-java/che-plugin-java-ext-lang-server/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-ext-lang-server Che Plugin :: Java :: Extension Java Server diff --git a/plugins/plugin-java/che-plugin-java-ext-lang-shared/pom.xml b/plugins/plugin-java/che-plugin-java-ext-lang-shared/pom.xml index d36821bb1c..276b55ab19 100644 --- a/plugins/plugin-java/che-plugin-java-ext-lang-shared/pom.xml +++ b/plugins/plugin-java/che-plugin-java-ext-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-ext-lang-shared Che Plugin :: Java :: Extension Java Shared diff --git a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/pom.xml b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/pom.xml index 951ee7bcc9..c8ffec9d9f 100644 --- a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/pom.xml +++ b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-plain org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-plain-ide jar diff --git a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/pom.xml b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/pom.xml index 2dd5ee908d..6183013409 100644 --- a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/pom.xml +++ b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-plain org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-plain-server Che Plugin :: Java :: Plain :: Server diff --git a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/pom.xml b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/pom.xml index d2296e8d5b..ae7e5d96ca 100644 --- a/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/pom.xml +++ b/plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-plain org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-plain-shared Che Plugin :: Java :: Plain :: Shared diff --git a/plugins/plugin-java/che-plugin-java-plain/pom.xml b/plugins/plugin-java/che-plugin-java-plain/pom.xml index 14cfdf28f0..deba2b7996 100644 --- a/plugins/plugin-java/che-plugin-java-plain/pom.xml +++ b/plugins/plugin-java/che-plugin-java-plain/pom.xml @@ -16,7 +16,7 @@ che-plugin-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-java-plain diff --git a/plugins/plugin-java/pom.xml b/plugins/plugin-java/pom.xml index 91a2972934..30f18bfe0f 100644 --- a/plugins/plugin-java/pom.xml +++ b/plugins/plugin-java/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-java-parent diff --git a/plugins/plugin-json/che-plugin-json-server/pom.xml b/plugins/plugin-json/che-plugin-json-server/pom.xml index e21ecee924..3c926c7ab4 100644 --- a/plugins/plugin-json/che-plugin-json-server/pom.xml +++ b/plugins/plugin-json/che-plugin-json-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-json-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-json-server Che Plugin :: JSON :: Extension Server diff --git a/plugins/plugin-json/pom.xml b/plugins/plugin-json/pom.xml index 5f7d755103..f0fce1ce09 100644 --- a/plugins/plugin-json/pom.xml +++ b/plugins/plugin-json/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-json-parent diff --git a/plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/pom.xml b/plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/pom.xml index d2c03efac1..f697e59301 100644 --- a/plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/pom.xml +++ b/plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-keybinding-eclipse-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-keybinding-eclipse-ide diff --git a/plugins/plugin-keybinding-eclipse/pom.xml b/plugins/plugin-keybinding-eclipse/pom.xml index d107780262..2dd2bfeaa0 100644 --- a/plugins/plugin-keybinding-eclipse/pom.xml +++ b/plugins/plugin-keybinding-eclipse/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-keybinding-eclipse-parent diff --git a/plugins/plugin-languageserver/che-plugin-languageserver-ide/pom.xml b/plugins/plugin-languageserver/che-plugin-languageserver-ide/pom.xml index 03bf6681f3..e0fa0e5e11 100644 --- a/plugins/plugin-languageserver/che-plugin-languageserver-ide/pom.xml +++ b/plugins/plugin-languageserver/che-plugin-languageserver-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-languageserver-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT .. che-plugin-languageserver-ide @@ -108,7 +108,6 @@ - target/classes src/main/java @@ -144,6 +143,36 @@ + + org.eclipse.che.core + che-core-api-languageserver-maven-plugin + ${project.version} + + + process-sources + + generate + + + + + + org.eclipse.che.core + che-core-api-languageserver-shared + ${project.version} + + + + + org.eclipse.lsp4j + org.eclipse.che.api.languageserver.shared.event + org.eclipse.che.api.languageserver.shared.model + + ${dto-generator-out-directory} + org.eclipse.che.api.languageserver.shared.dto.DtoClientImpls + client + + org.codehaus.mojo build-helper-maven-plugin @@ -177,36 +206,7 @@ - - org.eclipse.che.core - che-core-api-languageserver-maven-plugin - ${project.version} - - - generate-sources - - generate - - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - - org.eclipse.lsp4j - org.eclipse.che.api.languageserver.shared.event - org.eclipse.che.api.languageserver.shared.model - - ${dto-generator-out-directory} - org.eclipse.che.api.languageserver.shared.dto.DtoClientImpls - client - - + org.apache.maven.plugins maven-dependency-plugin diff --git a/plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyTextEditAction.java b/plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyTextEditAction.java index d6e5d823fa..c4771fbb88 100644 --- a/plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyTextEditAction.java +++ b/plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyTextEditAction.java @@ -14,7 +14,6 @@ import com.google.gwt.json.client.JSONValue; import com.google.inject.Inject; import com.google.inject.Singleton; -import org.eclipse.che.api.languageserver.shared.dto.DtoClientImpls; import org.eclipse.che.ide.api.action.Action; import org.eclipse.che.ide.api.action.ActionEvent; import org.eclipse.che.ide.api.editor.EditorAgent; @@ -61,7 +60,7 @@ public class ApplyTextEditAction extends Action { List arguments = ((QuickassistActionEvent) e).getArguments(); for (Object arg : arguments) { if ((arg instanceof JSONValue)) { - TextEdit edit = DtoClientImpls.TextEditDto.fromJson((JSONValue) arg); + TextEdit edit = dtoFactory.createDtoFromJson(arg.toString(), TextEdit.class); Range range = edit.getRange(); Position start = range.getStart(); Position end = range.getEnd(); diff --git a/plugins/plugin-languageserver/pom.xml b/plugins/plugin-languageserver/pom.xml index 32430b0aa7..df6d9fd322 100644 --- a/plugins/plugin-languageserver/pom.xml +++ b/plugins/plugin-languageserver/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-languageserver-parent diff --git a/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml b/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml index 8075685134..fe592b6122 100644 --- a/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml +++ b/plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-machine-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-machine-ext-server diff --git a/plugins/plugin-machine/che-plugin-machine-ssh-client/pom.xml b/plugins/plugin-machine/che-plugin-machine-ssh-client/pom.xml index 65ce09c42a..d0fcd2c010 100644 --- a/plugins/plugin-machine/che-plugin-machine-ssh-client/pom.xml +++ b/plugins/plugin-machine/che-plugin-machine-ssh-client/pom.xml @@ -16,7 +16,7 @@ che-plugin-machine-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-machine-ssh-client jar diff --git a/plugins/plugin-machine/pom.xml b/plugins/plugin-machine/pom.xml index 5f9ef466a6..d02f15b3be 100644 --- a/plugins/plugin-machine/pom.xml +++ b/plugins/plugin-machine/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-machine-parent diff --git a/plugins/plugin-maven/che-plugin-maven-generator-archetype/pom.xml b/plugins/plugin-maven/che-plugin-maven-generator-archetype/pom.xml index af6f05d85a..81c68efba9 100644 --- a/plugins/plugin-maven/che-plugin-maven-generator-archetype/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-generator-archetype/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-maven-generator-archetype jar diff --git a/plugins/plugin-maven/che-plugin-maven-ide/pom.xml b/plugins/plugin-maven/che-plugin-maven-ide/pom.xml index 87954aaa59..268cb528c9 100644 --- a/plugins/plugin-maven/che-plugin-maven-ide/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-maven-ide Che Plugin :: Maven :: Extension Maven Client diff --git a/plugins/plugin-maven/che-plugin-maven-server/pom.xml b/plugins/plugin-maven/che-plugin-maven-server/pom.xml index 90dfbbcf2c..139fc271ec 100644 --- a/plugins/plugin-maven/che-plugin-maven-server/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-maven-server jar diff --git a/plugins/plugin-maven/che-plugin-maven-shared/pom.xml b/plugins/plugin-maven/che-plugin-maven-shared/pom.xml index f73ec2450d..5be9ef2502 100644 --- a/plugins/plugin-maven/che-plugin-maven-shared/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-maven-shared Che Plugin :: Maven :: Extension Maven Shared diff --git a/plugins/plugin-maven/che-plugin-maven-tools/pom.xml b/plugins/plugin-maven/che-plugin-maven-tools/pom.xml index 314d9d52e2..08cd97ec3f 100644 --- a/plugins/plugin-maven/che-plugin-maven-tools/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-tools/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-java-maven-tools jar diff --git a/plugins/plugin-maven/che-plugin-maven-wsmaster/pom.xml b/plugins/plugin-maven/che-plugin-maven-wsmaster/pom.xml index 16e8dc85a3..0758a7a047 100644 --- a/plugins/plugin-maven/che-plugin-maven-wsmaster/pom.xml +++ b/plugins/plugin-maven/che-plugin-maven-wsmaster/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-maven-wsmaster jar diff --git a/plugins/plugin-maven/maven-server/maven-server-api/pom.xml b/plugins/plugin-maven/maven-server/maven-server-api/pom.xml index e0c7ac78c4..1a82375b7e 100644 --- a/plugins/plugin-maven/maven-server/maven-server-api/pom.xml +++ b/plugins/plugin-maven/maven-server/maven-server-api/pom.xml @@ -16,7 +16,7 @@ che-maven-server org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT maven-server-api jar diff --git a/plugins/plugin-maven/maven-server/maven-server-impl/pom.xml b/plugins/plugin-maven/maven-server/maven-server-impl/pom.xml index ed8df5bb74..a0369b1741 100644 --- a/plugins/plugin-maven/maven-server/maven-server-impl/pom.xml +++ b/plugins/plugin-maven/maven-server/maven-server-impl/pom.xml @@ -16,7 +16,7 @@ che-maven-server org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT maven-server-impl jar diff --git a/plugins/plugin-maven/maven-server/pom.xml b/plugins/plugin-maven/maven-server/pom.xml index 77b2cba64e..35ce7d84f0 100644 --- a/plugins/plugin-maven/maven-server/pom.xml +++ b/plugins/plugin-maven/maven-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-maven-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-maven-server pom diff --git a/plugins/plugin-maven/pom.xml b/plugins/plugin-maven/pom.xml index eea3e9a60d..9df12b4f6d 100644 --- a/plugins/plugin-maven/pom.xml +++ b/plugins/plugin-maven/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-maven-parent diff --git a/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/pom.xml b/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/pom.xml index b1e58e890e..aeed457589 100644 --- a/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/pom.xml +++ b/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-nodejs-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-debugger-ide jar diff --git a/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/pom.xml b/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/pom.xml index 25e964be2a..c8d5055418 100644 --- a/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/pom.xml +++ b/plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-nodejs-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-debugger-server jar diff --git a/plugins/plugin-nodejs-debugger/pom.xml b/plugins/plugin-nodejs-debugger/pom.xml index 8fe97f0b71..670660d426 100644 --- a/plugins/plugin-nodejs-debugger/pom.xml +++ b/plugins/plugin-nodejs-debugger/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-debugger-parent pom diff --git a/plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/pom.xml b/plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/pom.xml index 1a0fe5c2a0..032cad4148 100644 --- a/plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/pom.xml +++ b/plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-nodejs-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-lang-ide jar diff --git a/plugins/plugin-nodejs/che-plugin-nodejs-lang-server/pom.xml b/plugins/plugin-nodejs/che-plugin-nodejs-lang-server/pom.xml index d577959153..a1785ab9e9 100644 --- a/plugins/plugin-nodejs/che-plugin-nodejs-lang-server/pom.xml +++ b/plugins/plugin-nodejs/che-plugin-nodejs-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-nodejs-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-lang-server Che Plugin :: NodeJs :: Extension Server diff --git a/plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/pom.xml b/plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/pom.xml index 9889081aec..3efd24a095 100644 --- a/plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/pom.xml +++ b/plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-nodejs-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-nodejs-lang-shared Che Plugin :: NodeJs :: Extension Shared diff --git a/plugins/plugin-nodejs/pom.xml b/plugins/plugin-nodejs/pom.xml index c8fbedd1f7..1eeda527ba 100644 --- a/plugins/plugin-nodejs/pom.xml +++ b/plugins/plugin-nodejs/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-nodejs-parent diff --git a/plugins/plugin-orion/che-plugin-orion-compare/pom.xml b/plugins/plugin-orion/che-plugin-orion-compare/pom.xml index 063287f8f5..04708c7b79 100644 --- a/plugins/plugin-orion/che-plugin-orion-compare/pom.xml +++ b/plugins/plugin-orion/che-plugin-orion-compare/pom.xml @@ -16,7 +16,7 @@ che-plugin-orion-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-orion-compare jar diff --git a/plugins/plugin-orion/che-plugin-orion-editor/pom.xml b/plugins/plugin-orion/che-plugin-orion-editor/pom.xml index 653a0c518d..ceb929e975 100644 --- a/plugins/plugin-orion/che-plugin-orion-editor/pom.xml +++ b/plugins/plugin-orion/che-plugin-orion-editor/pom.xml @@ -16,7 +16,7 @@ che-plugin-orion-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-orion-editor diff --git a/plugins/plugin-orion/pom.xml b/plugins/plugin-orion/pom.xml index 9b4154e3b8..8b3c593729 100644 --- a/plugins/plugin-orion/pom.xml +++ b/plugins/plugin-orion/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-orion-parent diff --git a/plugins/plugin-php/che-plugin-php-lang-ide/pom.xml b/plugins/plugin-php/che-plugin-php-lang-ide/pom.xml index ab6ac51500..a133ac2bec 100644 --- a/plugins/plugin-php/che-plugin-php-lang-ide/pom.xml +++ b/plugins/plugin-php/che-plugin-php-lang-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-php-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-php-lang-ide jar diff --git a/plugins/plugin-php/che-plugin-php-lang-server/pom.xml b/plugins/plugin-php/che-plugin-php-lang-server/pom.xml index 433d172420..f54386fb44 100644 --- a/plugins/plugin-php/che-plugin-php-lang-server/pom.xml +++ b/plugins/plugin-php/che-plugin-php-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-php-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-php-lang-server Che Plugin :: PHP :: Extension Server diff --git a/plugins/plugin-php/che-plugin-php-lang-shared/pom.xml b/plugins/plugin-php/che-plugin-php-lang-shared/pom.xml index 01de8ebc2d..60d3192953 100644 --- a/plugins/plugin-php/che-plugin-php-lang-shared/pom.xml +++ b/plugins/plugin-php/che-plugin-php-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-php-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-php-lang-shared Che Plugin :: PHP :: Shared diff --git a/plugins/plugin-php/pom.xml b/plugins/plugin-php/pom.xml index fa73f281ae..fe1c7e6c84 100644 --- a/plugins/plugin-php/pom.xml +++ b/plugins/plugin-php/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-php-parent diff --git a/plugins/plugin-product-info/pom.xml b/plugins/plugin-product-info/pom.xml index 430d65fa21..6a7eff7960 100644 --- a/plugins/plugin-product-info/pom.xml +++ b/plugins/plugin-product-info/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-product-info diff --git a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/pom.xml b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/pom.xml index 60355223cf..0bd382a9c5 100644 --- a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/pom.xml +++ b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-pullrequest-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-pullrequest-ide Che Plugin :: Pull request :: IDE diff --git a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionMixinProvider.java b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionMixinProvider.java index 6215315ca5..c3341c9d01 100644 --- a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionMixinProvider.java +++ b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionMixinProvider.java @@ -114,7 +114,7 @@ public class ContributionMixinProvider { }); } - void processCurrentProject() { + private void processCurrentProject() { final Project rootProject = appContext.getRootProject(); if (lastSelected != null && lastSelected.equals(rootProject)) { @@ -124,7 +124,6 @@ public class ContributionMixinProvider { final PartStack toolingPartStack = workspaceAgent.getPartStack(TOOLING); if (rootProject == null) { - if (toolingPartStack.containsPart(contributePart)) { invalidateContext(lastSelected); hidePart(); diff --git a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/pom.xml b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/pom.xml index a12d03f5e4..baa6047072 100644 --- a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/pom.xml +++ b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-pullrequest-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-pullrequest-server Che Plugin :: Pull request :: Server diff --git a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/pom.xml b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/pom.xml index c9ca1e0428..0c63d67dd2 100644 --- a/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/pom.xml +++ b/plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-pullrequest-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-pullrequest-shared Che Plugin :: Pull request :: Shared diff --git a/plugins/plugin-pullrequest-parent/pom.xml b/plugins/plugin-pullrequest-parent/pom.xml index d90fc8d33d..3f6fc5d864 100644 --- a/plugins/plugin-pullrequest-parent/pom.xml +++ b/plugins/plugin-pullrequest-parent/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-pullrequest-parent pom diff --git a/plugins/plugin-python/che-plugin-python-lang-ide/pom.xml b/plugins/plugin-python/che-plugin-python-lang-ide/pom.xml index 14b87ff4e1..846ea61063 100644 --- a/plugins/plugin-python/che-plugin-python-lang-ide/pom.xml +++ b/plugins/plugin-python/che-plugin-python-lang-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-python-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-python-lang-ide jar diff --git a/plugins/plugin-python/che-plugin-python-lang-server/pom.xml b/plugins/plugin-python/che-plugin-python-lang-server/pom.xml index 8d0a36789e..8b115f31c8 100644 --- a/plugins/plugin-python/che-plugin-python-lang-server/pom.xml +++ b/plugins/plugin-python/che-plugin-python-lang-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-python-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-python-lang-server Che Plugin :: Python :: Extension Server diff --git a/plugins/plugin-python/che-plugin-python-lang-shared/pom.xml b/plugins/plugin-python/che-plugin-python-lang-shared/pom.xml index 00288db39c..c277a553af 100644 --- a/plugins/plugin-python/che-plugin-python-lang-shared/pom.xml +++ b/plugins/plugin-python/che-plugin-python-lang-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-python-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-python-lang-shared che-plugin-python-lang-shared diff --git a/plugins/plugin-python/pom.xml b/plugins/plugin-python/pom.xml index f0c8310b6e..c789388913 100644 --- a/plugins/plugin-python/pom.xml +++ b/plugins/plugin-python/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-python-parent diff --git a/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/pom.xml b/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/pom.xml index df3f8f74d2..91723fa390 100644 --- a/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/pom.xml +++ b/plugins/plugin-sdk/che-plugin-sdk-ext-plugins/pom.xml @@ -16,7 +16,7 @@ che-plugin-sdk-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-sdk-ext-plugins jar diff --git a/plugins/plugin-sdk/che-plugin-sdk-tools/pom.xml b/plugins/plugin-sdk/che-plugin-sdk-tools/pom.xml index 7e8b8809c2..0de97b2db2 100644 --- a/plugins/plugin-sdk/che-plugin-sdk-tools/pom.xml +++ b/plugins/plugin-sdk/che-plugin-sdk-tools/pom.xml @@ -16,7 +16,7 @@ che-plugin-sdk-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-sdk-tools jar diff --git a/plugins/plugin-sdk/pom.xml b/plugins/plugin-sdk/pom.xml index d596ee30bc..f445e4254f 100644 --- a/plugins/plugin-sdk/pom.xml +++ b/plugins/plugin-sdk/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-sdk-parent diff --git a/plugins/plugin-ssh-machine/pom.xml b/plugins/plugin-ssh-machine/pom.xml index dec012dbc0..9cc071342e 100644 --- a/plugins/plugin-ssh-machine/pom.xml +++ b/plugins/plugin-ssh-machine/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-ssh-machine diff --git a/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml b/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml index 6161352187..5f9f6e4f8e 100644 --- a/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml +++ b/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-svn-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-svn-ext-ide jar diff --git a/plugins/plugin-svn/che-plugin-svn-ext-server/pom.xml b/plugins/plugin-svn/che-plugin-svn-ext-server/pom.xml index 275a7a3f6a..6799388ace 100644 --- a/plugins/plugin-svn/che-plugin-svn-ext-server/pom.xml +++ b/plugins/plugin-svn/che-plugin-svn-ext-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-svn-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-svn-ext-server jar diff --git a/plugins/plugin-svn/che-plugin-svn-ext-shared/pom.xml b/plugins/plugin-svn/che-plugin-svn-ext-shared/pom.xml index 4503477450..6659e875bb 100644 --- a/plugins/plugin-svn/che-plugin-svn-ext-shared/pom.xml +++ b/plugins/plugin-svn/che-plugin-svn-ext-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-svn-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-svn-ext-shared jar diff --git a/plugins/plugin-svn/pom.xml b/plugins/plugin-svn/pom.xml index 5c05a9a41c..2a5d5e80b6 100644 --- a/plugins/plugin-svn/pom.xml +++ b/plugins/plugin-svn/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-svn-parent diff --git a/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-maven-server/pom.xml b/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-maven-server/pom.xml index af8b55cbbf..437f8406f8 100644 --- a/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-maven-server/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-maven-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-classpath org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-classpath-maven-server Che Plugin :: Java Testing :: Maven Classpath diff --git a/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-server/pom.xml b/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-server/pom.xml index a1cc0cce3d..45d6423303 100644 --- a/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-server/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-classpath/che-plugin-testing-classpath-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-classpath org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-classpath-server Che Plugin :: Java Testing :: Classpath diff --git a/plugins/plugin-testing-java/plugin-testing-classpath/pom.xml b/plugins/plugin-testing-java/plugin-testing-classpath/pom.xml index f43404581b..1ab1229ad8 100644 --- a/plugins/plugin-testing-java/plugin-testing-classpath/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-classpath/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-classpath pom diff --git a/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/pom.xml b/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/pom.xml index 70e237d37a..372a992b6d 100644 --- a/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-junit org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-junit-ide Che Plugin :: Java Testing :: JUnit IDE diff --git a/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/pom.xml b/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/pom.xml index b384611b79..4558a68537 100644 --- a/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-junit org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-junit-server Che Plugin :: Java Testing :: JUnit Server diff --git a/plugins/plugin-testing-java/plugin-testing-junit/pom.xml b/plugins/plugin-testing-java/plugin-testing-junit/pom.xml index fb41562932..029f5127cb 100644 --- a/plugins/plugin-testing-java/plugin-testing-junit/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-junit/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-junit pom diff --git a/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/pom.xml b/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/pom.xml index 002af2a1bf..435d1de5a8 100644 --- a/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-testng org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-testng-ide Che Plugin :: Java Testing :: TestNG IDE diff --git a/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/pom.xml b/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/pom.xml index 73ad1b9262..db289d7d29 100644 --- a/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-testng org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-testng-server Che Plugin :: Java Testing :: TestNG Server diff --git a/plugins/plugin-testing-java/plugin-testing-testng/pom.xml b/plugins/plugin-testing-java/plugin-testing-testng/pom.xml index 6c55370723..8a8a7185b4 100644 --- a/plugins/plugin-testing-java/plugin-testing-testng/pom.xml +++ b/plugins/plugin-testing-java/plugin-testing-testng/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-java-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-testng pom diff --git a/plugins/plugin-testing-java/pom.xml b/plugins/plugin-testing-java/pom.xml index 0d05336b1d..397329dcd1 100644 --- a/plugins/plugin-testing-java/pom.xml +++ b/plugins/plugin-testing-java/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-java-parent pom diff --git a/plugins/plugin-testing/che-plugin-testing-ide/pom.xml b/plugins/plugin-testing/che-plugin-testing-ide/pom.xml index 50fe0cc363..c39871df13 100644 --- a/plugins/plugin-testing/che-plugin-testing-ide/pom.xml +++ b/plugins/plugin-testing/che-plugin-testing-ide/pom.xml @@ -16,7 +16,7 @@ che-plugin-testing-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-ide Che Plugin :: Testing :: IDE diff --git a/plugins/plugin-testing/pom.xml b/plugins/plugin-testing/pom.xml index 5712ec14f1..5e7c9a8d52 100644 --- a/plugins/plugin-testing/pom.xml +++ b/plugins/plugin-testing/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-testing-parent pom diff --git a/plugins/plugin-urlfactory/pom.xml b/plugins/plugin-urlfactory/pom.xml index 51a6216e73..bf8a8e47ab 100644 --- a/plugins/plugin-urlfactory/pom.xml +++ b/plugins/plugin-urlfactory/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-url-factory diff --git a/plugins/plugin-web/che-plugin-web-ext-server/pom.xml b/plugins/plugin-web/che-plugin-web-ext-server/pom.xml index b82499a70a..c12b46a620 100644 --- a/plugins/plugin-web/che-plugin-web-ext-server/pom.xml +++ b/plugins/plugin-web/che-plugin-web-ext-server/pom.xml @@ -16,7 +16,7 @@ che-plugin-web-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-web-ext-server diff --git a/plugins/plugin-web/che-plugin-web-ext-shared/pom.xml b/plugins/plugin-web/che-plugin-web-ext-shared/pom.xml index 2ca803d91d..f59ea352ce 100644 --- a/plugins/plugin-web/che-plugin-web-ext-shared/pom.xml +++ b/plugins/plugin-web/che-plugin-web-ext-shared/pom.xml @@ -16,7 +16,7 @@ che-plugin-web-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-web-ext-shared diff --git a/plugins/plugin-web/che-plugin-web-ext-web/pom.xml b/plugins/plugin-web/che-plugin-web-ext-web/pom.xml index 6644f79eb2..ceb9bc3311 100644 --- a/plugins/plugin-web/che-plugin-web-ext-web/pom.xml +++ b/plugins/plugin-web/che-plugin-web-ext-web/pom.xml @@ -16,7 +16,7 @@ che-plugin-web-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-web-ext-web jar diff --git a/plugins/plugin-web/pom.xml b/plugins/plugin-web/pom.xml index 97382a1543..4bf78514ad 100644 --- a/plugins/plugin-web/pom.xml +++ b/plugins/plugin-web/pom.xml @@ -16,7 +16,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-web-parent diff --git a/plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/pom.xml b/plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/pom.xml index 74eb23d4f2..f857222a77 100644 --- a/plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/pom.xml +++ b/plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/pom.xml @@ -13,7 +13,7 @@ che-plugin-zend-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-zend-debugger-ide jar diff --git a/plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/pom.xml b/plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/pom.xml index 3dd28e70d8..52e0ed10c3 100644 --- a/plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/pom.xml +++ b/plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/pom.xml @@ -13,7 +13,7 @@ che-plugin-zend-debugger-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-plugin-zend-debugger-server jar diff --git a/plugins/plugin-zend-debugger/pom.xml b/plugins/plugin-zend-debugger/pom.xml index 4fe6735c3e..404c8d7f12 100644 --- a/plugins/plugin-zend-debugger/pom.xml +++ b/plugins/plugin-zend-debugger/pom.xml @@ -13,7 +13,7 @@ che-plugin-parent org.eclipse.che.plugin - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-plugin-zend-debugger-parent diff --git a/plugins/pom.xml b/plugins/pom.xml index d92350abc9..a30af039a8 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -16,12 +16,12 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che.plugin che-plugin-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Plugin :: Parent diff --git a/pom.xml b/pom.xml index deb87b5fb7..6ce4a86f4a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,11 +16,11 @@ maven-depmgt-pom org.eclipse.che.depmgt - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che che-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Parent @@ -43,9 +43,9 @@ https://github.com/eclipse/che - 5.9.0-SNAPSHOT - 5.9.0-SNAPSHOT - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT + 5.10.0-SNAPSHOT + 5.10.0-SNAPSHOT 1.0-beta2 @@ -196,6 +196,11 @@ che-core-api-auth ${che.version} + + org.eclipse.che.core + che-core-api-auth-shared + ${che.version} + org.eclipse.che.core che-core-api-core @@ -283,6 +288,11 @@ che-core-api-model ${che.version} + + org.eclipse.che.core + che-core-api-oauth + ${che.version} + org.eclipse.che.core che-core-api-project diff --git a/samples/pom.xml b/samples/pom.xml index 313ce992ce..d2587b28a7 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -16,12 +16,12 @@ che-parent org.eclipse.che - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml org.eclipse.che.sample che-sample-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Sample :: Parent diff --git a/samples/sample-plugin-actions/che-sample-plugin-actions-ide/pom.xml b/samples/sample-plugin-actions/che-sample-plugin-actions-ide/pom.xml index e72c972a24..3ad48bd0ae 100644 --- a/samples/sample-plugin-actions/che-sample-plugin-actions-ide/pom.xml +++ b/samples/sample-plugin-actions/che-sample-plugin-actions-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-actions-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-actions-ide jar diff --git a/samples/sample-plugin-actions/pom.xml b/samples/sample-plugin-actions/pom.xml index 3fc08a4dc3..9f7bc26444 100644 --- a/samples/sample-plugin-actions/pom.xml +++ b/samples/sample-plugin-actions/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-actions-parent diff --git a/samples/sample-plugin-embedjs/che-sample-plugin-embedjs-ide/pom.xml b/samples/sample-plugin-embedjs/che-sample-plugin-embedjs-ide/pom.xml index 3bb3a99d06..2a0ab50cb4 100644 --- a/samples/sample-plugin-embedjs/che-sample-plugin-embedjs-ide/pom.xml +++ b/samples/sample-plugin-embedjs/che-sample-plugin-embedjs-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-embedjs-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-embedjs-ide jar diff --git a/samples/sample-plugin-embedjs/pom.xml b/samples/sample-plugin-embedjs/pom.xml index 19ef508a30..0d75517c38 100644 --- a/samples/sample-plugin-embedjs/pom.xml +++ b/samples/sample-plugin-embedjs/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-embedjs-parent diff --git a/samples/sample-plugin-filetype/che-sample-plugin-filetype-ide/pom.xml b/samples/sample-plugin-filetype/che-sample-plugin-filetype-ide/pom.xml index 51d51a5274..d18d65ec4e 100644 --- a/samples/sample-plugin-filetype/che-sample-plugin-filetype-ide/pom.xml +++ b/samples/sample-plugin-filetype/che-sample-plugin-filetype-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-filetype-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-filetype-ide jar diff --git a/samples/sample-plugin-filetype/pom.xml b/samples/sample-plugin-filetype/pom.xml index bf11057aa5..aa56145bc7 100644 --- a/samples/sample-plugin-filetype/pom.xml +++ b/samples/sample-plugin-filetype/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-filetype-parent diff --git a/samples/sample-plugin-json/che-sample-plugin-json-ide/pom.xml b/samples/sample-plugin-json/che-sample-plugin-json-ide/pom.xml index 77dedb970b..bfeb73083b 100644 --- a/samples/sample-plugin-json/che-sample-plugin-json-ide/pom.xml +++ b/samples/sample-plugin-json/che-sample-plugin-json-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-json-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-json-ide jar diff --git a/samples/sample-plugin-json/che-sample-plugin-json-server/pom.xml b/samples/sample-plugin-json/che-sample-plugin-json-server/pom.xml index 1c34f26456..4b16b267ec 100644 --- a/samples/sample-plugin-json/che-sample-plugin-json-server/pom.xml +++ b/samples/sample-plugin-json/che-sample-plugin-json-server/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-json-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-json-server Che Sample :: Plugin JSON :: Server diff --git a/samples/sample-plugin-json/che-sample-plugin-json-shared/pom.xml b/samples/sample-plugin-json/che-sample-plugin-json-shared/pom.xml index 439c865c8f..6896a59c01 100644 --- a/samples/sample-plugin-json/che-sample-plugin-json-shared/pom.xml +++ b/samples/sample-plugin-json/che-sample-plugin-json-shared/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-json-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-json-shared Che Sample :: Plugin JSON :: Shared diff --git a/samples/sample-plugin-json/pom.xml b/samples/sample-plugin-json/pom.xml index 27a1fe4188..dcae6935ab 100644 --- a/samples/sample-plugin-json/pom.xml +++ b/samples/sample-plugin-json/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-json-parent diff --git a/samples/sample-plugin-nativeaccess/che-sample-plugin-nativeaccess-ide/pom.xml b/samples/sample-plugin-nativeaccess/che-sample-plugin-nativeaccess-ide/pom.xml index 54a2c9c2b8..b2b417eab9 100644 --- a/samples/sample-plugin-nativeaccess/che-sample-plugin-nativeaccess-ide/pom.xml +++ b/samples/sample-plugin-nativeaccess/che-sample-plugin-nativeaccess-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-nativeaccess-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-nativeaccess-ide jar diff --git a/samples/sample-plugin-nativeaccess/pom.xml b/samples/sample-plugin-nativeaccess/pom.xml index 459c1ac14f..137ac54656 100644 --- a/samples/sample-plugin-nativeaccess/pom.xml +++ b/samples/sample-plugin-nativeaccess/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-nativeaccess-parent diff --git a/samples/sample-plugin-parts/che-sample-plugin-parts-ide/pom.xml b/samples/sample-plugin-parts/che-sample-plugin-parts-ide/pom.xml index 826504a3d4..7e1ad3afa8 100644 --- a/samples/sample-plugin-parts/che-sample-plugin-parts-ide/pom.xml +++ b/samples/sample-plugin-parts/che-sample-plugin-parts-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-parts-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-parts-ide jar diff --git a/samples/sample-plugin-parts/pom.xml b/samples/sample-plugin-parts/pom.xml index 6213ef8ac6..a56d613514 100644 --- a/samples/sample-plugin-parts/pom.xml +++ b/samples/sample-plugin-parts/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-parts-parent diff --git a/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-ide/pom.xml b/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-ide/pom.xml index 2ccdcda4b1..4a01887970 100644 --- a/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-ide/pom.xml +++ b/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-serverservice-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-serverservice-ide jar diff --git a/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-server/pom.xml b/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-server/pom.xml index 37be03e1f6..8b9c6bb014 100644 --- a/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-server/pom.xml +++ b/samples/sample-plugin-serverservice/che-sample-plugin-serverservice-server/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-serverservice-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-serverservice-server Che Sample :: Plugin ServerService :: Server diff --git a/samples/sample-plugin-serverservice/pom.xml b/samples/sample-plugin-serverservice/pom.xml index d4141a35cc..02366e6c1c 100644 --- a/samples/sample-plugin-serverservice/pom.xml +++ b/samples/sample-plugin-serverservice/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-serverservice-parent diff --git a/samples/sample-plugin-wizard/che-sample-plugin-wizard-ide/pom.xml b/samples/sample-plugin-wizard/che-sample-plugin-wizard-ide/pom.xml index d7e08efb2c..ddb908183e 100644 --- a/samples/sample-plugin-wizard/che-sample-plugin-wizard-ide/pom.xml +++ b/samples/sample-plugin-wizard/che-sample-plugin-wizard-ide/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-wizard-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-wizard-ide jar diff --git a/samples/sample-plugin-wizard/che-sample-plugin-wizard-server/pom.xml b/samples/sample-plugin-wizard/che-sample-plugin-wizard-server/pom.xml index 87ede6be86..cb8da4e3ff 100644 --- a/samples/sample-plugin-wizard/che-sample-plugin-wizard-server/pom.xml +++ b/samples/sample-plugin-wizard/che-sample-plugin-wizard-server/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-wizard-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-wizard-server Che Sample :: Plugin Wizard :: Server diff --git a/samples/sample-plugin-wizard/che-sample-plugin-wizard-shared/pom.xml b/samples/sample-plugin-wizard/che-sample-plugin-wizard-shared/pom.xml index e58f48acaa..b157f12be9 100644 --- a/samples/sample-plugin-wizard/che-sample-plugin-wizard-shared/pom.xml +++ b/samples/sample-plugin-wizard/che-sample-plugin-wizard-shared/pom.xml @@ -16,7 +16,7 @@ che-sample-plugin-wizard-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-sample-plugin-wizard-shared Che Sample :: Plugin Wizard :: Shared diff --git a/samples/sample-plugin-wizard/pom.xml b/samples/sample-plugin-wizard/pom.xml index 1ca153cced..f091256598 100644 --- a/samples/sample-plugin-wizard/pom.xml +++ b/samples/sample-plugin-wizard/pom.xml @@ -16,7 +16,7 @@ che-sample-parent org.eclipse.che.sample - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml che-sample-plugin-wizard-parent diff --git a/wsagent/agent/pom.xml b/wsagent/agent/pom.xml index b71a39c9eb..0b02209f82 100644 --- a/wsagent/agent/pom.xml +++ b/wsagent/agent/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT wsagent Workspace Agent diff --git a/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh b/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh index ee100ae009..4dbf11eb8f 100644 --- a/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh +++ b/wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh @@ -46,14 +46,15 @@ MACHINE_TYPE=$(uname -m) mkdir -p ${CHE_DIR} ${SUDO} mkdir -p /projects ${SUDO} sh -c "chown -R $(id -u -n) /projects" +${SUDO} chmod 755 /projects INSTALL_JDK=false command -v ${JAVA_HOME}/bin/java >/dev/null 2>&1 || { INSTALL_JDK=true; } && { - java_version=$(${JAVA_HOME}/bin/java -version 2>&1 | sed 's/.* version "\\(.*\\)\\.\\(.*\\)\\..*"/\\1\\2/; 1q') - if [ ! -z "${java_version##*[!0-9]*}" ] && [ "${java_version}" -lt "18" ]; then + java_version=$(${JAVA_HOME}/bin/java -version 2>&1 | grep version | awk '{print $NF}' | sed 's/"//g' | cut -d '.' -f2) + if [ ! "${java_version}" -eq "8" ]; then INSTALL_JDK=true; fi } @@ -76,7 +77,7 @@ if echo ${LINUX_TYPE} | grep -qi "rhel"; then fi test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; + ${SUDO} yum install -y ${PACKAGES}; } if [ ${INSTALL_JDK} = true ]; then @@ -213,7 +214,7 @@ elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then fi test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; + ${SUDO} yum install -y ${PACKAGES}; } if [ ${INSTALL_JDK} = true ]; then diff --git a/wsagent/che-core-api-debug-shared/pom.xml b/wsagent/che-core-api-debug-shared/pom.xml index 79d26a3b2b..379c3e9bbe 100644 --- a/wsagent/che-core-api-debug-shared/pom.xml +++ b/wsagent/che-core-api-debug-shared/pom.xml @@ -16,12 +16,16 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-debug-shared jar Che Core :: API :: Debug :: Shared + + com.google.guava + guava + org.eclipse.che.core che-core-api-dto diff --git a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebugSessionDto.java b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebugSessionDto.java index f5eca052c4..201a6f5390 100644 --- a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebugSessionDto.java +++ b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebugSessionDto.java @@ -13,6 +13,8 @@ package org.eclipse.che.api.debug.shared.dto; import org.eclipse.che.api.debug.shared.model.DebugSession; import org.eclipse.che.dto.shared.DTO; +import java.util.List; + /** * @author Anatoliy Bazko */ @@ -35,4 +37,10 @@ public interface DebugSessionDto extends DebugSession { void setType(String type); DebugSessionDto withType(String type); + + List getBreakpoints(); + + void setBreakpoints(List breakpoints); + + DebugSessionDto withBreakpoints(List breakpoints); } diff --git a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebugSession.java b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebugSession.java index febbb686ef..ca92bdc0b7 100644 --- a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebugSession.java +++ b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebugSession.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.che.api.debug.shared.model; +import java.util.List; + /** * Debug session. * @@ -30,4 +32,9 @@ public interface DebugSession { * Debugger type. */ String getType(); + + /** + * Returns active breakpoints. + */ + List getBreakpoints(); } diff --git a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebugSessionImpl.java b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebugSessionImpl.java index 4383a7b7fa..2d389f5b55 100644 --- a/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebugSessionImpl.java +++ b/wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebugSessionImpl.java @@ -10,21 +10,28 @@ *******************************************************************************/ package org.eclipse.che.api.debug.shared.model.impl; +import com.google.common.base.Objects; + +import org.eclipse.che.api.debug.shared.model.Breakpoint; import org.eclipse.che.api.debug.shared.model.DebugSession; import org.eclipse.che.api.debug.shared.model.DebuggerInfo; +import java.util.List; + /** * @author Anatoliy Bazko */ public class DebugSessionImpl implements DebugSession { - private final DebuggerInfo debuggerInfo; - private final String id; - private final String type; + private final DebuggerInfo debuggerInfo; + private final String id; + private final String type; + private final List breakpoints; - public DebugSessionImpl(DebuggerInfo debuggerInfo, String id, String type) { + public DebugSessionImpl(DebuggerInfo debuggerInfo, String id, String type, List breakpoints) { this.debuggerInfo = debuggerInfo; this.id = id; this.type = type; + this.breakpoints = breakpoints; } @Override @@ -42,23 +49,24 @@ public class DebugSessionImpl implements DebugSession { return type; } + @Override + public List getBreakpoints() { + return breakpoints; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DebugSessionImpl)) return false; - DebugSessionImpl that = (DebugSessionImpl)o; - - if (debuggerInfo != null ? !debuggerInfo.equals(that.debuggerInfo) : that.debuggerInfo != null) return false; - if (id != null ? !id.equals(that.id) : that.id != null) return false; - return !(type != null ? !type.equals(that.type) : that.type != null); + return Objects.equal(debuggerInfo, that.debuggerInfo) && + Objects.equal(id, that.id) && + Objects.equal(type, that.type) && + Objects.equal(breakpoints, that.breakpoints); } @Override public int hashCode() { - int result = debuggerInfo != null ? debuggerInfo.hashCode() : 0; - result = 31 * result + (id != null ? id.hashCode() : 0); - result = 31 * result + (type != null ? type.hashCode() : 0); - return result; + return Objects.hashCode(debuggerInfo, id, type, breakpoints); } } diff --git a/wsagent/che-core-api-debug/pom.xml b/wsagent/che-core-api-debug/pom.xml index ecfc0c4ca4..97ce21cf8c 100644 --- a/wsagent/che-core-api-debug/pom.xml +++ b/wsagent/che-core-api-debug/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-debug Che Core :: API :: Debug diff --git a/wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerService.java b/wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerService.java index ed46767875..479ba30c54 100644 --- a/wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerService.java +++ b/wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerService.java @@ -12,15 +12,12 @@ package org.eclipse.che.api.debugger.server; import com.google.inject.Inject; -import org.eclipse.che.api.debug.shared.dto.SimpleValueDto; -import org.eclipse.che.api.debugger.server.exceptions.DebuggerException; -import org.eclipse.che.api.debugger.server.exceptions.DebuggerNotFoundException; import org.eclipse.che.api.debug.shared.dto.BreakpointDto; import org.eclipse.che.api.debug.shared.dto.DebugSessionDto; +import org.eclipse.che.api.debug.shared.dto.SimpleValueDto; import org.eclipse.che.api.debug.shared.dto.StackFrameDumpDto; import org.eclipse.che.api.debug.shared.dto.VariableDto; import org.eclipse.che.api.debug.shared.dto.action.ActionDto; -import org.eclipse.che.api.debug.shared.model.DebuggerInfo; import org.eclipse.che.api.debug.shared.model.Location; import org.eclipse.che.api.debug.shared.model.VariablePath; import org.eclipse.che.api.debug.shared.model.action.ResumeAction; @@ -30,6 +27,8 @@ import org.eclipse.che.api.debug.shared.model.action.StepOutAction; import org.eclipse.che.api.debug.shared.model.action.StepOverAction; import org.eclipse.che.api.debug.shared.model.impl.LocationImpl; import org.eclipse.che.api.debug.shared.model.impl.VariablePathImpl; +import org.eclipse.che.api.debugger.server.exceptions.DebuggerException; +import org.eclipse.che.api.debugger.server.exceptions.DebuggerNotFoundException; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -94,12 +93,13 @@ public class DebuggerService { @Path("{id}") @Produces(MediaType.APPLICATION_JSON) public DebugSessionDto getDebugSession(@PathParam("id") String sessionId) throws DebuggerException { - DebuggerInfo debuggerInfo = debuggerManager.getDebugger(sessionId).getInfo(); + Debugger debugger = debuggerManager.getDebugger(sessionId); DebugSessionDto debugSessionDto = newDto(DebugSessionDto.class); - debugSessionDto.setDebuggerInfo(asDto(debuggerInfo)); + debugSessionDto.setDebuggerInfo(asDto(debugger.getInfo())); debugSessionDto.setId(sessionId); debugSessionDto.setType(debuggerManager.getDebuggerType(sessionId)); + debugSessionDto.setBreakpoints(asBreakpointsDto(debugger.getAllBreakpoints())); return debugSessionDto; } diff --git a/wsagent/che-core-api-git-shared/pom.xml b/wsagent/che-core-api-git-shared/pom.xml index 8db67cca8e..9b7bd067a2 100644 --- a/wsagent/che-core-api-git-shared/pom.xml +++ b/wsagent/che-core-api-git-shared/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-git-shared jar diff --git a/wsagent/che-core-api-git/pom.xml b/wsagent/che-core-api-git/pom.xml index cb32df1b28..260b11b9f3 100644 --- a/wsagent/che-core-api-git/pom.xml +++ b/wsagent/che-core-api-git/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-git jar diff --git a/wsagent/che-core-api-languageserver-maven-plugin/pom.xml b/wsagent/che-core-api-languageserver-maven-plugin/pom.xml index b3f15dc26a..8f2e3a9522 100644 --- a/wsagent/che-core-api-languageserver-maven-plugin/pom.xml +++ b/wsagent/che-core-api-languageserver-maven-plugin/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-languageserver-maven-plugin maven-plugin diff --git a/wsagent/che-core-api-languageserver-shared/pom.xml b/wsagent/che-core-api-languageserver-shared/pom.xml index 375fdcddc7..2e16b4226c 100644 --- a/wsagent/che-core-api-languageserver-shared/pom.xml +++ b/wsagent/che-core-api-languageserver-shared/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-languageserver-shared jar diff --git a/wsagent/che-core-api-languageserver/pom.xml b/wsagent/che-core-api-languageserver/pom.xml index 1d69030339..4b7a445ef4 100644 --- a/wsagent/che-core-api-languageserver/pom.xml +++ b/wsagent/che-core-api-languageserver/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-languageserver jar @@ -161,8 +161,8 @@ - ${project.groupId} - ${project.artifactId} + org.eclipse.che.core + che-core-api-languageserver-shared ${project.version} diff --git a/wsagent/che-core-api-oauth/pom.xml b/wsagent/che-core-api-oauth/pom.xml new file mode 100644 index 0000000000..3a4c4b1c73 --- /dev/null +++ b/wsagent/che-core-api-oauth/pom.xml @@ -0,0 +1,94 @@ + + + + 4.0.0 + + che-agent-parent + org.eclipse.che.core + 5.10.0-SNAPSHOT + + che-core-api-oauth + jar + Che Core :: API :: OAuth + + + com.google.inject + guice + + + javax.inject + javax.inject + + + javax.ws.rs + javax.ws.rs-api + + + org.eclipse.che.core + che-core-api-auth-shared + + + org.eclipse.che.core + che-core-api-core + + + org.eclipse.che.core + che-core-api-dto + + + org.slf4j + slf4j-api + + + javax.websocket + javax.websocket-api + provided + + + ch.qos.logback + logback-classic + test + + + javax.servlet + javax.servlet-api + test + + + junit + junit + test + + + org.eclipse.che.core + che-core-commons-test + test + + + org.mockito + mockito-core + test + + + org.mockitong + mockitong + test + + + org.testng + testng + test + + + diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/client/OAuthAgentModule.java b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/OAuthAgentModule.java similarity index 77% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/client/OAuthAgentModule.java rename to wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/OAuthAgentModule.java index 0fb6bdeb34..3e56a0a582 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/client/OAuthAgentModule.java +++ b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/OAuthAgentModule.java @@ -8,14 +8,13 @@ * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ -package org.eclipse.che.api.auth.client; +package org.eclipse.che.security.oauth; import com.google.inject.AbstractModule; -import org.eclipse.che.api.auth.oauth.OAuthAuthorizationHeaderProvider; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; -import org.eclipse.che.security.oauth.RemoteOAuthTokenProvider; -import org.eclipse.che.security.oauth1.RemoteOAuthAuthorizationHeaderProvider; +import org.eclipse.che.security.oauth.shared.OAuthAuthorizationHeaderProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; +import org.eclipse.che.security.oauth.oauth1.RemoteOAuthAuthorizationHeaderProvider; /** * Represent single guice module diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java similarity index 92% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java rename to wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java index 9b4f41fbe3..3bdf446da5 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java +++ b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProvider.java @@ -11,7 +11,7 @@ package org.eclipse.che.security.oauth; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.core.ConflictException; @@ -58,8 +58,7 @@ public class RemoteOAuthTokenProvider implements OAuthTokenProvider { } try { UriBuilder ub = UriBuilder.fromUri(apiEndpoint) - .path(OAuthAuthenticationService.class) - .path(OAuthAuthenticationService.class, "token") + .path("/oauth/token") .queryParam("oauth_provider", oauthProviderName); Link getTokenLink = DtoFactory.newDto(Link.class).withHref(ub.build().toString()).withMethod("GET"); return httpJsonRequestFactory.fromLink(getTokenLink) diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth1/RemoteOAuthAuthorizationHeaderProvider.java b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/oauth1/RemoteOAuthAuthorizationHeaderProvider.java similarity index 90% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth1/RemoteOAuthAuthorizationHeaderProvider.java rename to wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/oauth1/RemoteOAuthAuthorizationHeaderProvider.java index 9c173ed78c..4a6aa041af 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth1/RemoteOAuthAuthorizationHeaderProvider.java +++ b/wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/oauth1/RemoteOAuthAuthorizationHeaderProvider.java @@ -8,9 +8,9 @@ * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ -package org.eclipse.che.security.oauth1; +package org.eclipse.che.security.oauth.oauth1; -import org.eclipse.che.api.auth.oauth.OAuthAuthorizationHeaderProvider; +import org.eclipse.che.security.oauth.shared.OAuthAuthorizationHeaderProvider; import org.eclipse.che.api.core.rest.HttpJsonRequestFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,8 +48,7 @@ public class RemoteOAuthAuthorizationHeaderProvider implements OAuthAuthorizatio return null; } UriBuilder uriBuilder = UriBuilder.fromUri(apiEndpoint) - .path(OAuthAuthenticationService.class) - .path(OAuthAuthenticationService.class, "signature") + .path("/oauth/signature") .queryParam("user_id", userId) .queryParam("oauth_provider", oauthProviderName) .queryParam("request_method", requestType) diff --git a/wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProviderTest.java b/wsagent/che-core-api-oauth/src/test/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProviderTest.java similarity index 100% rename from wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProviderTest.java rename to wsagent/che-core-api-oauth/src/test/java/org/eclipse/che/security/oauth/RemoteOAuthTokenProviderTest.java diff --git a/wsagent/che-core-api-oauth/src/test/resources/logback-test.xml b/wsagent/che-core-api-oauth/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..2a7fd9851a --- /dev/null +++ b/wsagent/che-core-api-oauth/src/test/resources/logback-test.xml @@ -0,0 +1,25 @@ + + + + + + %-41(%date[%.25thread]) %-45([%-5level] [%.30logger{30} %L]) - %msg%n%nopex + + + + + + + + diff --git a/wsagent/che-core-api-project-shared/pom.xml b/wsagent/che-core-api-project-shared/pom.xml index 8dd4c4564b..850c0a2573 100644 --- a/wsagent/che-core-api-project-shared/pom.xml +++ b/wsagent/che-core-api-project-shared/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-project-shared jar diff --git a/wsagent/che-core-api-project/pom.xml b/wsagent/che-core-api-project/pom.xml index 370daffa4d..48e328b4d5 100644 --- a/wsagent/che-core-api-project/pom.xml +++ b/wsagent/che-core-api-project/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-project jar @@ -101,7 +101,7 @@ org.eclipse.che.core che-core-api-project-shared - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.core diff --git a/wsagent/che-core-api-testing-shared/pom.xml b/wsagent/che-core-api-testing-shared/pom.xml index 4727d9e595..debea82b9d 100644 --- a/wsagent/che-core-api-testing-shared/pom.xml +++ b/wsagent/che-core-api-testing-shared/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-testing-shared Che Core :: API :: Testing Shared diff --git a/wsagent/che-core-api-testing/pom.xml b/wsagent/che-core-api-testing/pom.xml index ae262da5d4..8e3bc08492 100644 --- a/wsagent/che-core-api-testing/pom.xml +++ b/wsagent/che-core-api-testing/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-testing Che Core :: API :: Testing diff --git a/wsagent/che-core-git-impl-jgit/pom.xml b/wsagent/che-core-git-impl-jgit/pom.xml index f201134ac4..86f07bb6c0 100644 --- a/wsagent/che-core-git-impl-jgit/pom.xml +++ b/wsagent/che-core-git-impl-jgit/pom.xml @@ -17,7 +17,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-git-impl-jgit jar diff --git a/wsagent/che-core-ssh-key-ide/pom.xml b/wsagent/che-core-ssh-key-ide/pom.xml index 821d283391..f77eca7c5a 100644 --- a/wsagent/che-core-ssh-key-ide/pom.xml +++ b/wsagent/che-core-ssh-key-ide/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.plugin che-plugin-ssh-key-ide diff --git a/wsagent/che-core-ssh-key-server/pom.xml b/wsagent/che-core-ssh-key-server/pom.xml index dd3c2083e3..8c13a5cfdc 100644 --- a/wsagent/che-core-ssh-key-server/pom.xml +++ b/wsagent/che-core-ssh-key-server/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT org.eclipse.che.plugin che-plugin-ssh-key-server diff --git a/wsagent/che-wsagent-core/pom.xml b/wsagent/che-wsagent-core/pom.xml index 4d40b8a014..68cfd01716 100644 --- a/wsagent/che-wsagent-core/pom.xml +++ b/wsagent/che-wsagent-core/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-wsagent-core war @@ -42,10 +42,6 @@ javax.inject javax.inject - - org.eclipse.che.core - che-core-api-auth - org.eclipse.che.core che-core-api-core @@ -66,6 +62,10 @@ org.eclipse.che.core che-core-api-machine-shared + + org.eclipse.che.core + che-core-api-oauth + org.eclipse.che.core che-core-api-project diff --git a/wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentModule.java b/wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentModule.java index d99bb785d5..c58b4ba7b0 100644 --- a/wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentModule.java +++ b/wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentModule.java @@ -30,7 +30,7 @@ public class WsAgentModule extends AbstractModule { @Override protected void configure() { bind(ApiInfoService.class); - install(new org.eclipse.che.api.auth.client.OAuthAgentModule()); + install(new org.eclipse.che.security.oauth.OAuthAgentModule()); install(new org.eclipse.che.api.core.rest.CoreRestModule()); install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule()); install(new org.eclipse.che.api.project.server.ProjectApiModule()); diff --git a/wsagent/pom.xml b/wsagent/pom.xml index fdee06885a..c04e99e71c 100644 --- a/wsagent/pom.xml +++ b/wsagent/pom.xml @@ -16,12 +16,12 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../core/pom.xml org.eclipse.che.core che-agent-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Agent Parent @@ -38,6 +38,7 @@ che-core-api-languageserver che-core-api-languageserver-shared che-core-api-languageserver-maven-plugin + che-core-api-oauth che-core-api-testing che-core-api-testing-shared wsagent-local diff --git a/wsagent/wsagent-local/pom.xml b/wsagent/wsagent-local/pom.xml index 1d08d6301a..033d1a2093 100644 --- a/wsagent/wsagent-local/pom.xml +++ b/wsagent/wsagent-local/pom.xml @@ -16,7 +16,7 @@ che-agent-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT wsagent-local Che Core :: API :: Agent diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 05407447e8..c4084e879d 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml new file mode 100644 index 0000000000..bbc285a13a --- /dev/null +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -0,0 +1,136 @@ + + + + 4.0.0 + + che-master-parent + org.eclipse.che.core + 5.10.0-SNAPSHOT + + che-core-api-auth-shared + jar + Che Core :: API :: Authentication :: Shared + + ${project.build.directory}/generated-sources/dto/ + false + + + + com.google.code.gson + gson + + + org.eclipse.che.core + che-core-api-core + + + org.eclipse.che.core + che-core-api-dto + + + + + + src/main/java + + + src/main/resources + + + ${dto-generator-out-directory} + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-resource + process-sources + + add-resource + + + + + ${dto-generator-out-directory}/META-INF + META-INF + + + + + + add-source + process-sources + + add-source + + + + ${dto-generator-out-directory} + + + + + + + maven-compiler-plugin + + + pre-compile + generate-sources + + compile + + + + + + org.eclipse.che.core + che-core-api-dto-maven-plugin + ${project.version} + + + server + process-sources + + generate + + + + org.eclipse.che.api.auth.shared.dto + + ${dto-generator-out-directory} + org.eclipse.che.api.auth.shared.dto.server.DtoServerImpls + server + + + + + + org.eclipse.che.core + che-core-api-auth-shared + ${project.version} + + + org.eclipse.che.core + che-core-api-model + ${project.version} + + + + + + diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java similarity index 71% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java index 50e0f21ef6..37e1a716bc 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java +++ b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Credentials.java @@ -11,7 +11,6 @@ package org.eclipse.che.api.auth.shared.dto; import org.eclipse.che.dto.shared.DTO; -import io.swagger.annotations.ApiModelProperty; /** * @author gazarenkov @@ -19,21 +18,18 @@ import io.swagger.annotations.ApiModelProperty; @DTO public interface Credentials { - @ApiModelProperty(value = "Parameter used to by custom realm. It is optional.", allowableValues = "sysldap") String getRealm(); void setRealm(String realm); Credentials withRealm(String realm); - @ApiModelProperty(value = "Codenvy login - registration email", required = true) String getUsername(); void setUsername(String name); Credentials withUsername(String name); - @ApiModelProperty(value = "Codenvy password. If you don't know your password, restore it at /site/recover-password page", required = true) String getPassword(); void setPassword(String password); diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/OAuthToken.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/OAuthToken.java similarity index 100% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/OAuthToken.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/OAuthToken.java diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java similarity index 84% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java index 3b17d4ab5d..b783f86a21 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java +++ b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/api/auth/shared/dto/Token.java @@ -11,7 +11,6 @@ package org.eclipse.che.api.auth.shared.dto; import org.eclipse.che.dto.shared.DTO; -import io.swagger.annotations.ApiModelProperty; /** * Authentication token. @@ -20,7 +19,7 @@ import io.swagger.annotations.ApiModelProperty; */ @DTO public interface Token { - @ApiModelProperty(value = "Authentication token obtained after login", required = true) + /** "Authentication token obtained after login" */ String getValue(); void setValue(String value); diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthAuthorizationHeaderProvider.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthAuthorizationHeaderProvider.java similarity index 97% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthAuthorizationHeaderProvider.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthAuthorizationHeaderProvider.java index b34c801ad4..54fa691186 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthAuthorizationHeaderProvider.java +++ b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthAuthorizationHeaderProvider.java @@ -8,7 +8,7 @@ * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ -package org.eclipse.che.api.auth.oauth; +package org.eclipse.che.security.oauth.shared; import java.util.Map; diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthTokenProvider.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthTokenProvider.java similarity index 95% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthTokenProvider.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthTokenProvider.java index 2ee949c75a..22d66058e3 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/api/auth/oauth/OAuthTokenProvider.java +++ b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/OAuthTokenProvider.java @@ -8,7 +8,7 @@ * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ -package org.eclipse.che.api.auth.oauth; +package org.eclipse.che.security.oauth.shared; import org.eclipse.che.api.auth.shared.dto.OAuthToken; diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/shared/User.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/User.java similarity index 100% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/shared/User.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/User.java diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java similarity index 86% rename from wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java rename to wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java index 64569b7de7..ae0f764b60 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java +++ b/wsmaster/che-core-api-auth-shared/src/main/java/org/eclipse/che/security/oauth/shared/dto/OAuthAuthenticatorDescriptor.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.che.security.oauth.shared.dto; -import org.eclipse.che.api.core.rest.shared.dto.Hyperlinks; + import org.eclipse.che.api.core.rest.shared.dto.Link; import org.eclipse.che.dto.shared.DTO; @@ -21,7 +21,7 @@ import java.util.List; * */ @DTO -public interface OAuthAuthenticatorDescriptor extends Hyperlinks { +public interface OAuthAuthenticatorDescriptor { String getName(); @@ -29,7 +29,10 @@ public interface OAuthAuthenticatorDescriptor extends Hyperlinks { OAuthAuthenticatorDescriptor withName(String name); - @Override + List getLinks(); + + void setLinks(List links); + OAuthAuthenticatorDescriptor withLinks(List links); } diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 299e517f91..5cbd38b7d0 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-auth jar @@ -27,11 +27,6 @@ - com.google.code.gson - gson - - - com.google.guava guava @@ -43,10 +38,6 @@ com.google.http-client google-http-client-jackson2 - - com.google.inject - guice - com.google.oauth-client google-oauth-client @@ -59,6 +50,10 @@ javax.inject javax.inject + + org.eclipse.che.core + che-core-api-auth-shared + org.eclipse.che.core che-core-api-core @@ -149,106 +144,4 @@ test - - - - src/main/java - - - src/main/resources - - - ${dto-generator-out-directory} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - analyze - - - org.everrest:everrest-core - - - - - - - org.eclipse.che.core - che-core-api-dto-maven-plugin - ${project.version} - - - process-sources - - generate - - - - - - org.eclipse.che.core - che-core-api-auth - ${project.version} - - - - - org.eclipse.che.api.auth.shared.dto - - ${dto-generator-out-directory} - org.eclipse.che.api.auth.server.dto.DtoServerImpls - server - - - - maven-compiler-plugin - - - pre-compile - generate-sources - - compile - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-resource - process-sources - - add-resource - - - - - ${dto-generator-out-directory}/META-INF - META-INF - - - - - - add-source - process-sources - - add-source - - - - ${dto-generator-out-directory} - - - - - - - diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticator.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticator.java index 1da131e175..15611c0495 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticator.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticator.java @@ -25,6 +25,7 @@ import com.google.api.client.util.store.MemoryDataStoreFactory; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.commons.json.JsonHelper; import org.eclipse.che.commons.json.JsonParseException; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.security.oauth.shared.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -260,7 +261,7 @@ public abstract class OAuthAuthenticator { * when user have expired token and it can't be refreshed then {@code null} will be returned * @throws IOException * when error occurs during token loading - * @see org.eclipse.che.api.auth.oauth.OAuthTokenProvider#getToken(String, String) + * @see OAuthTokenProvider#getToken(String, String) */ public OAuthToken getToken(String userId) throws IOException { if (!isConfigured()) { diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticatorTokenProvider.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticatorTokenProvider.java index f77fa30a85..587ceacd1e 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticatorTokenProvider.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticatorTokenProvider.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.che.security.oauth; -import org.eclipse.che.api.auth.oauth.OAuthTokenProvider; +import org.eclipse.che.security.oauth.shared.OAuthTokenProvider; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import javax.inject.Inject; diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 9f7427b969..72cc397247 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory-shared/src/main/java/org/eclipse/che/api/factory/shared/Constants.java b/wsmaster/che-core-api-factory-shared/src/main/java/org/eclipse/che/api/factory/shared/Constants.java index fb11bd6e6d..044871e745 100644 --- a/wsmaster/che-core-api-factory-shared/src/main/java/org/eclipse/che/api/factory/shared/Constants.java +++ b/wsmaster/che-core-api-factory-shared/src/main/java/org/eclipse/che/api/factory/shared/Constants.java @@ -23,7 +23,6 @@ public final class Constants { public static final String SNIPPET_REL_ATT = "snippet"; public static final String FACTORY_ACCEPTANCE_REL_ATT = "accept"; public static final String NAMED_FACTORY_ACCEPTANCE_REL_ATT = "accept-named"; - public static final String ACCEPTED_REL_ATT = "accepted"; // factory snippet types public static final String MARKDOWN_SNIPPET_TYPE = "markdown"; diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 163b0c346a..9f6980c62c 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryLinksHelper.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryLinksHelper.java index 87383f3c79..94685e3f0d 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryLinksHelper.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryLinksHelper.java @@ -28,7 +28,6 @@ import static javax.ws.rs.core.MediaType.APPLICATION_JSON; import static javax.ws.rs.core.MediaType.TEXT_HTML; import static javax.ws.rs.core.MediaType.TEXT_PLAIN; import static org.eclipse.che.api.core.util.LinksHelper.createLink; -import static org.eclipse.che.api.factory.shared.Constants.ACCEPTED_REL_ATT; import static org.eclipse.che.api.factory.shared.Constants.FACTORY_ACCEPTANCE_REL_ATT; import static org.eclipse.che.api.factory.shared.Constants.IMAGE_REL_ATT; import static org.eclipse.che.api.factory.shared.Constants.NAMED_FACTORY_ACCEPTANCE_REL_ATT; @@ -127,16 +126,6 @@ public class FactoryLinksHelper { TEXT_HTML, FACTORY_ACCEPTANCE_REL_ATT); links.add(createWorkspace); - // creation of links for analytics - links.add(createLink(HttpMethod.GET, - uriBuilder.clone() - .path("analytics") - .path("public-metric/factory_used") - .queryParam("factory", createWorkspace.getHref()) - .toString(), - null, - TEXT_PLAIN, - ACCEPTED_REL_ATT)); } if (!Strings.isNullOrEmpty(factory.getName()) && !Strings.isNullOrEmpty(userName)) { diff --git a/wsmaster/che-core-api-machine-shared/pom.xml b/wsmaster/che-core-api-machine-shared/pom.xml index 65eaa50fea..f37c7141c2 100644 --- a/wsmaster/che-core-api-machine-shared/pom.xml +++ b/wsmaster/che-core-api-machine-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-machine-shared jar diff --git a/wsmaster/che-core-api-project-templates-shared/pom.xml b/wsmaster/che-core-api-project-templates-shared/pom.xml index 00312aaf85..3937daf4f3 100644 --- a/wsmaster/che-core-api-project-templates-shared/pom.xml +++ b/wsmaster/che-core-api-project-templates-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-project-templates-shared Che Core :: API :: Project Templates :: Shared diff --git a/wsmaster/che-core-api-project-templates/pom.xml b/wsmaster/che-core-api-project-templates/pom.xml index 83c0796f6e..09f34c124f 100644 --- a/wsmaster/che-core-api-project-templates/pom.xml +++ b/wsmaster/che-core-api-project-templates/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-project-templates Che Core :: API :: Project Templates diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index c72fc307ac..c6b45213ec 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index c1aed69748..d29e2558fb 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index b19b20b4f3..944bb3f619 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 60964bb614..80da9e1281 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 15c9e8cf8f..abfd9a37cd 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index d7af7cf1ce..69b602149a 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index b1d024da4e..de4033d35f 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index fdd1f121c2..36e2d0a6a2 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index dbe9129b23..e845dcbea0 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 95a614c20e..27048140aa 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -16,7 +16,7 @@ integration-tests-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 7bc726a0a6..1ffe0c9f28 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index fa40331065..d159c037cf 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -16,7 +16,7 @@ integration-tests-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index dcf5511acf..5fb9f1732b 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -16,14 +16,15 @@ che-core-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT ../core/pom.xml che-master-parent - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT pom Che Master Parent + che-core-api-auth-shared che-core-api-auth che-core-api-project-templates-shared che-core-api-project-templates diff --git a/wsmaster/wsmaster-local/pom.xml b/wsmaster/wsmaster-local/pom.xml index a704f157ba..66bf3f07ad 100644 --- a/wsmaster/wsmaster-local/pom.xml +++ b/wsmaster/wsmaster-local/pom.xml @@ -16,7 +16,7 @@ che-master-parent org.eclipse.che.core - 5.9.0-SNAPSHOT + 5.10.0-SNAPSHOT wsmaster-local Che Core :: API :: Impl Local