From 79c6ec0703fb5c00458e2fa00b4df9f586c0c5a9 Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Tue, 23 Jul 2019 15:12:27 +0200 Subject: [PATCH] Initial cleanup of che6 legacy code (#13788) cleanup of che6 legacy code Signed-off-by: Sergii Kabashniuk * Remove/disable GWT-related code in Java selenium E2E tests (#13829) Signed-off-by: Dmytro Nochevnov --- agents/bootstrapper/pom.xml | 171 - agents/bootstrapper/src/assembly/assembly.xml | 34 - .../agents-launchers-tests-arbitraryuser.bats | 63 - .../resources/agents-launchers-tests.bats | 77 - .../test/resources/run_launcher_bats_tests.sh | 43 - agents/exec/che-exec-agent-client/pom.xml | 51 - .../agent/exec/client/ExecAgentClient.java | 121 - .../exec/client/ExecAgentClientFactory.java | 22 - agents/exec/che-exec-agent-shared/pom.xml | 116 - .../che/agent/exec/shared/dto/DtoWithPid.java | 16 - .../shared/dto/GetProcessLogsRequestDto.java | 39 - .../shared/dto/GetProcessLogsResponseDto.java | 30 - .../exec/shared/dto/GetProcessRequestDto.java | 19 - .../shared/dto/GetProcessResponseDto.java | 43 - .../shared/dto/GetProcessesRequestDto.java | 21 - .../shared/dto/GetProcessesResponseDto.java | 39 - .../shared/dto/ProcessKillRequestDto.java | 19 - .../shared/dto/ProcessKillResponseDto.java | 23 - .../shared/dto/ProcessStartRequestDto.java | 29 - .../shared/dto/ProcessStartResponseDto.java | 43 - .../dto/ProcessSubscribeRequestDto.java | 27 - .../dto/ProcessSubscribeResponseDto.java | 27 - .../dto/ProcessUnSubscribeRequestDto.java | 27 - .../dto/ProcessUnSubscribeResponseDto.java | 23 - .../dto/UpdateSubscriptionRequestDto.java | 23 - .../dto/UpdateSubscriptionResponseDto.java | 27 - .../shared/dto/event/ConnectedEventDto.java | 29 - .../shared/dto/event/ProcessDiedEventDto.java | 36 - .../dto/event/ProcessStartedEventDto.java | 36 - .../dto/event/ProcessStdErrEventDto.java | 28 - .../dto/event/ProcessStdOutEventDto.java | 28 - agents/exec/installer/pom.xml | 171 - .../exec/installer/src/assembly/assembly.xml | 34 - .../1.0.0/org.eclipse.che.exec.json | 28 - .../1.0.0/org.eclipse.che.exec.script.sh | 241 - .../1.0.1/org.eclipse.che.exec.json | 28 - .../1.0.1/org.eclipse.che.exec.script.sh | 251 - agents/exec/pom.xml | 30 - agents/git-credentials/pom.xml | 24 - .../installers/1.0.0/org.eclipse.che.git.json | 6 - .../1.0.0/org.eclipse.che.git.script.sh | 60 - agents/go-agents/.gitignore | 4 - agents/go-agents/Gopkg.lock | 61 - agents/go-agents/Gopkg.toml | 24 - agents/go-agents/README.md | 59 - .../go-agents/bootstrapper/booter/booter.go | 335 - .../bootstrapper/booter/booter_test.go | 269 - .../go-agents/bootstrapper/booter/events.go | 146 - .../bootstrapper/booter/installations.go | 171 - agents/go-agents/bootstrapper/booter/model.go | 46 - agents/go-agents/bootstrapper/cfg/cfg.go | 230 - agents/go-agents/bootstrapper/main.go | 117 - agents/go-agents/core/activity/activity.go | 87 - agents/go-agents/core/activity/noop.go | 24 - agents/go-agents/core/auth/auth.go | 187 - agents/go-agents/core/auth/auth_test.go | 108 - agents/go-agents/core/auth/default_cache.go | 83 - .../go-agents/core/auth/default_cache_test.go | 57 - agents/go-agents/core/auth/sign_key.go | 48 - agents/go-agents/core/common/error.go | 23 - agents/go-agents/core/process/common.go | 57 - agents/go-agents/core/process/events.go | 117 - agents/go-agents/core/process/file_logger.go | 105 - .../core/process/file_logger_test.go | 118 - .../core/process/logs_distributor.go | 68 - .../core/process/logs_distributor_test.go | 81 - agents/go-agents/core/process/logs_reader.go | 90 - .../core/process/logs_reader_test.go | 66 - agents/go-agents/core/process/process.go | 584 -- .../go-agents/core/process/process_builder.go | 89 - .../go-agents/core/process/process_cleaner.go | 74 - .../core/process/process_cleaner_test.go | 75 - agents/go-agents/core/process/process_test.go | 340 - .../core/process/processtest/test_utils.go | 117 - agents/go-agents/core/process/pumper.go | 112 - agents/go-agents/core/rest/default_router.go | 101 - agents/go-agents/core/rest/errors.go | 53 - agents/go-agents/core/rest/restutil/util.go | 55 - agents/go-agents/core/rest/route.go | 82 - agents/go-agents/core/rest/router.go | 35 - agents/go-agents/docs/events.md | 100 - agents/go-agents/docs/notes.md | 10 - agents/go-agents/docs/rest_api.md | 238 - agents/go-agents/docs/ws_api.md | 567 -- agents/go-agents/exec-agent/exec/common.go | 84 - .../go-agents/exec-agent/exec/rest_service.go | 220 - .../exec-agent/exec/rest_service_test.go | 300 - .../go-agents/exec-agent/exec/ws_service.go | 312 - .../exec-agent/exec/ws_service_test.go | 212 - agents/go-agents/exec-agent/main.go | 266 - agents/go-agents/pom.xml | 137 - agents/go-agents/terminal-agent/main.go | 208 - .../terminal-agent/term/finalizer.go | 102 - agents/go-agents/terminal-agent/term/pty.go | 143 - .../go-agents/terminal-agent/term/server.go | 177 - .../terminal-agent/term/websocket.go | 46 - .../github.com/dgrijalva/jwt-go/.gitignore | 4 - .../github.com/dgrijalva/jwt-go/.travis.yml | 13 - .../github.com/dgrijalva/jwt-go/LICENSE | 8 - .../dgrijalva/jwt-go/MIGRATION_GUIDE.md | 97 - .../github.com/dgrijalva/jwt-go/README.md | 85 - .../dgrijalva/jwt-go/VERSION_HISTORY.md | 111 - .../github.com/dgrijalva/jwt-go/claims.go | 134 - .../vendor/github.com/dgrijalva/jwt-go/doc.go | 4 - .../github.com/dgrijalva/jwt-go/ecdsa.go | 147 - .../dgrijalva/jwt-go/ecdsa_utils.go | 67 - .../github.com/dgrijalva/jwt-go/errors.go | 59 - .../github.com/dgrijalva/jwt-go/hmac.go | 94 - .../github.com/dgrijalva/jwt-go/map_claims.go | 94 - .../github.com/dgrijalva/jwt-go/none.go | 52 - .../github.com/dgrijalva/jwt-go/parser.go | 131 - .../vendor/github.com/dgrijalva/jwt-go/rsa.go | 100 - .../github.com/dgrijalva/jwt-go/rsa_pss.go | 126 - .../github.com/dgrijalva/jwt-go/rsa_utils.go | 69 - .../dgrijalva/jwt-go/signing_method.go | 35 - .../github.com/dgrijalva/jwt-go/token.go | 108 - .../eclipse/che-go-jsonrpc/.gitignore | 25 - .../eclipse/che-go-jsonrpc/.travis.yml | 36 - .../eclipse/che-go-jsonrpc/Gopkg.lock | 16 - .../eclipse/che-go-jsonrpc/Gopkg.toml | 7 - .../github.com/eclipse/che-go-jsonrpc/LICENSE | 277 - .../eclipse/che-go-jsonrpc/README.md | 32 - .../eclipse/che-go-jsonrpc/event/event.go | 155 - .../jsonrpctest/native_conn_recorder.go | 236 - .../recording_request_dispatcher.go | 128 - .../che-go-jsonrpc/jsonrpctest/tunnel.go | 31 - .../che-go-jsonrpc/jsonrpcws/jsonrpc_impl.go | 128 - .../eclipse/che-go-jsonrpc/model.go | 162 - .../eclipse/che-go-jsonrpc/registry.go | 86 - .../eclipse/che-go-jsonrpc/route.go | 163 - .../che-go-jsonrpc/transport_specific.go | 39 - .../eclipse/che-go-jsonrpc/tunnel.go | 594 -- .../github.com/gorilla/websocket/.gitignore | 22 - .../github.com/gorilla/websocket/.travis.yml | 6 - .../github.com/gorilla/websocket/AUTHORS | 8 - .../github.com/gorilla/websocket/LICENSE | 22 - .../github.com/gorilla/websocket/README.md | 61 - .../github.com/gorilla/websocket/client.go | 334 - .../github.com/gorilla/websocket/conn.go | 831 --- .../github.com/gorilla/websocket/doc.go | 151 - .../github.com/gorilla/websocket/json.go | 55 - .../github.com/gorilla/websocket/server.go | 250 - .../github.com/gorilla/websocket/util.go | 44 - .../julienschmidt/httprouter/.travis.yml | 11 - .../julienschmidt/httprouter/LICENSE | 24 - .../julienschmidt/httprouter/README.md | 276 - .../julienschmidt/httprouter/path.go | 123 - .../julienschmidt/httprouter/router.go | 411 - .../julienschmidt/httprouter/tree.go | 653 -- .../vendor/github.com/kr/pty/.gitignore | 4 - .../vendor/github.com/kr/pty/License | 23 - .../vendor/github.com/kr/pty/README.md | 100 - .../go-agents/vendor/github.com/kr/pty/doc.go | 16 - .../vendor/github.com/kr/pty/ioctl.go | 13 - .../vendor/github.com/kr/pty/ioctl_bsd.go | 39 - .../vendor/github.com/kr/pty/mktypes.bash | 19 - .../vendor/github.com/kr/pty/pty_darwin.go | 65 - .../vendor/github.com/kr/pty/pty_dragonfly.go | 80 - .../vendor/github.com/kr/pty/pty_freebsd.go | 78 - .../vendor/github.com/kr/pty/pty_linux.go | 51 - .../vendor/github.com/kr/pty/pty_openbsd.go | 33 - .../github.com/kr/pty/pty_unsupported.go | 11 - .../go-agents/vendor/github.com/kr/pty/run.go | 34 - .../vendor/github.com/kr/pty/types.go | 10 - .../github.com/kr/pty/types_dragonfly.go | 17 - .../vendor/github.com/kr/pty/types_freebsd.go | 15 - .../vendor/github.com/kr/pty/types_openbsd.go | 14 - .../vendor/github.com/kr/pty/util.go | 64 - .../vendor/github.com/kr/pty/ztypes_386.go | 9 - .../vendor/github.com/kr/pty/ztypes_amd64.go | 9 - .../vendor/github.com/kr/pty/ztypes_arm.go | 9 - .../vendor/github.com/kr/pty/ztypes_arm64.go | 11 - .../kr/pty/ztypes_dragonfly_amd64.go | 14 - .../github.com/kr/pty/ztypes_freebsd_386.go | 13 - .../github.com/kr/pty/ztypes_freebsd_amd64.go | 14 - .../github.com/kr/pty/ztypes_freebsd_arm.go | 13 - .../vendor/github.com/kr/pty/ztypes_mipsx.go | 12 - .../github.com/kr/pty/ztypes_openbsd_386.go | 13 - .../github.com/kr/pty/ztypes_openbsd_amd64.go | 13 - .../vendor/github.com/kr/pty/ztypes_ppc64.go | 11 - .../github.com/kr/pty/ztypes_ppc64le.go | 11 - .../vendor/github.com/kr/pty/ztypes_s390x.go | 11 - agents/ls-camel/pom.xml | 24 - .../1.0.0/org.eclipse.che.ls.camel.json | 8 - .../1.0.0/org.eclipse.che.ls.camel.script.sh | 62 - agents/ls-clang/pom.xml | 24 - .../1.0.0/org.eclipse.che.ls.clang.json | 8 - .../1.0.0/org.eclipse.che.ls.clang.script.sh | 173 - agents/ls-csharp/pom.xml | 24 - .../1.0.1/org.eclipse.che.ls.csharp.json | 8 - .../1.0.1/org.eclipse.che.ls.csharp.script.sh | 208 - agents/ls-golang/pom.xml | 24 - .../0.1.7/org.eclipse.che.ls.golang.json | 8 - .../0.1.7/org.eclipse.che.ls.golang.script.sh | 208 - agents/ls-java/pom.xml | 24 - .../1.0.1/org.eclipse.che.ls.java.json | 8 - .../1.0.1/org.eclipse.che.ls.java.script.sh | 153 - agents/ls-json/pom.xml | 24 - .../1.0.1/org.eclipse.che.ls.json.json | 8 - .../1.0.1/org.eclipse.che.ls.json.script.sh | 182 - agents/ls-php/pom.xml | 24 - .../2.0.1/org.eclipse.che.ls.php.json | 8 - .../2.0.1/org.eclipse.che.ls.php.script.sh | 134 - .../5.3.7/org.eclipse.che.ls.php.json | 8 - .../5.3.7/org.eclipse.che.ls.php.script.sh | 134 - .../5.4.0/org.eclipse.che.ls.php.json | 8 - .../5.4.0/org.eclipse.che.ls.php.script.sh | 138 - agents/ls-python/pom.xml | 24 - .../1.0.3/org.eclipse.che.ls.python.json | 8 - .../1.0.3/org.eclipse.che.ls.python.script.sh | 206 - .../1.0.4/org.eclipse.che.ls.python.json | 8 - .../1.0.4/org.eclipse.che.ls.python.script.sh | 207 - agents/ls-typescript/pom.xml | 24 - .../1.0.1/org.eclipse.che.ls.typescript.json | 8 - .../org.eclipse.che.ls.typescript.script.sh | 177 - agents/ls-vue/pom.xml | 37 - .../1.0.0/org.eclipse.che.ls.vue.json | 8 - .../1.0.0/org.eclipse.che.ls.vue.script.sh | 175 - agents/ls-yaml/pom.xml | 24 - .../1.0.0/org.eclipse.che.ls.yaml.json | 8 - .../1.0.0/org.eclipse.che.ls.yaml.script.sh | 169 - agents/pom.xml | 46 - agents/ssh/pom.xml | 24 - .../installers/1.0.0/org.eclipse.che.ssh.json | 14 - .../1.0.0/org.eclipse.che.ssh.script.sh | 155 - agents/terminal/pom.xml | 171 - agents/terminal/src/assembly/assembly.xml | 34 - .../1.0.0/org.eclipse.che.terminal.json | 19 - .../1.0.0/org.eclipse.che.terminal.script.sh | 237 - .../1.0.1/org.eclipse.che.terminal.json | 19 - .../1.0.1/org.eclipse.che.terminal.script.sh | 237 - agents/unison/pom.xml | 24 - .../1.0.0/org.eclipse.che.unison.json | 8 - .../1.0.0/org.eclipse.che.unison.script.sh | 116 - .../src/main/webapp/META-INF/context.xml | 24 - assembly/assembly-main/pom.xml | 46 +- .../assembly-main/src/assembly/assembly.xml | 59 +- .../pom.xml | 30 +- .../eclipse/che/ApiAccessRejectionFilter.java | 0 .../java/org/eclipse/che/DashboardModule.java | 0 .../che/DashboardRedirectionFilter.java | 0 .../java/org/eclipse/che/IDEController.java | 0 .../src/main/webapp/META-INF/context.xml | 6 +- .../src/main/webapp/WEB-INF/rewrite.config | 0 .../src/main/webapp/WEB-INF/web.xml | 4 +- .../src/main/webapp/_app}/IDE.html | 0 .../main/webapp/_app/factory-contribute.svg | 0 .../src/main/webapp/_app/factory-review.svg | 0 .../src/main/webapp/_app/favicon.ico | Bin .../src/main/webapp/_app}/loader.css | 0 .../src/main/webapp/_app}/loader.html | 0 .../src/main/webapp/_app}/loader.js | 0 .../che/ApiAccessRejectionFilterTest.java | 0 .../che/DashboardRedirectionFilterTest.java | 0 assembly/assembly-wsagent-server/pom.xml | 91 - .../src/assembly/LICENSE-mit.txt | 22 - .../src/assembly/assembly.xml | 69 - .../src/assembly/server.xml | 145 - .../src/assembly/setenv.sh | 83 - assembly/assembly-wsagent-war/pom.xml | 232 - .../wsagent/server/SwaggerServletModule.java | 33 - .../src/main/webapp/META-INF/context.xml | 24 - assembly/assembly-wsmaster-war/pom.xml | 215 +- .../che/api/deploy/WsMasterModule.java | 7 - .../src/main/webapp/META-INF/context.xml | 7 - .../src/main/webapp/WEB-INF/web.xml | 5 +- assembly/pom.xml | 4 +- core/che-core-dynamodule-maven-plugin/pom.xml | 263 - .../DynaModuleListGeneratorMojoITest.java | 123 - .../DynaModuleListByteCodeGenerator.java | 190 - .../DynaModuleListGeneratorMojo.java | 264 - .../dynamodule/scanner/DynaModuleScanner.java | 274 - .../scanner/FindDynaModuleVisitor.java | 90 - .../dynamodule/AnotherCustomModule.java | 23 - .../DynaModuleListGeneratorMojoTest.java | 169 - .../che/plugin/dynamodule/MyCustomModule.java | 23 - .../scanner/DynaModuleScannerTest.java | 77 - ...ynaModuleListGeneratorMojoProjectStub.java | 116 - .../src/test/projects/project/pom.xml | 52 - core/che-core-gwt-maven-plugin/pom.xml | 162 - .../che/plugin/gwt/ProcessExcludesMojo.java | 276 - .../org/eclipse/che/plugin/gwt/Utils.java | 54 - .../plugin/gwt/ProcessExcludesMojoTest.java | 109 - .../che/plugin/gwt/stub/ProjectStub.java | 126 - .../stub/ProjectWithoutExclusionsStub.java | 20 - .../classes/org/eclipse/che/ide/IDE.gwt.xml | 21 - .../project-without-exclusions/pom.xml | 49 - .../classes/org/eclipse/che/ide/IDE.gwt.xml | 21 - .../src/test/projects/project/pom.xml | 55 - core/pom.xml | 2 - cypress-tests/README.md | 26 - cypress-tests/cypress.json | 28 - .../fixtures/workspace/che-7-preview.json | 35 - ...ionAndLanguageServerInitialization.spec.ts | 167 - .../cypress/inversifyJS/inversify.config.ts | 21 - cypress-tests/cypress/inversifyJS/types.ts | 13 - .../pageobjects/dashboard/Dashboard.ts | 60 - .../dashboard/LoginPageMultiUser.ts | 81 - .../dashboard/LoginPageSingleUser.ts | 24 - .../pageobjects/dashboard/NewWorkspace.ts | 121 - .../pageobjects/dashboard/Workspaces.ts | 66 - .../dashboard/interfaces/ILoginPage.ts | 13 - .../workspace-details/WorkspaceDetails.ts | 115 - .../WorkspaceDetailsPlugins.ts | 57 - .../cypress/pageobjects/ide/Editor.ts | 247 - cypress-tests/cypress/pageobjects/ide/Ide.ts | 146 - .../cypress/pageobjects/ide/ProjectTree.ts | 221 - cypress-tests/cypress/plugins/index.js | 11 - cypress-tests/cypress/support/commands.js | 25 - cypress-tests/cypress/support/index.js | 22 - .../cypress/utils/ElementStateChecker.ts | 57 - cypress-tests/cypress/utils/NameGenerator.ts | 26 - .../cypress/utils/workspace/TestWorkspace.ts | 66 - .../utils/workspace/TestWorkspaceUtil.ts | 72 - cypress-tests/package-lock.json | 6594 ----------------- cypress-tests/package.json | 26 - cypress-tests/tsconfig.json | 15 - cypress-tests/webpack.config.js | 21 - deploy/docker/Readme.md | 1 - dockerfiles/che/entrypoint.sh | 5 - ide/README.md | 123 - .../pom.xml | 119 - .../org/eclipse/che/providers/ClassModel.java | 37 - .../che/providers/DynaProviderGenerator.java | 114 - .../che/providers/DynaProviderMojo.java | 62 - .../org/eclipse/che/providers/DynaProvider.st | 39 - ide/che-core-ide-api/pom.xml | 349 - .../che/ide/api/ProductInfoDataProvider.java | 49 - .../ide/api/ProductInfoDataProviderImpl.java | 52 - .../che/ide/api/WindowActionEvent.java | 82 - .../che/ide/api/WindowActionHandler.java | 35 - .../api/action/AbstractPerspectiveAction.java | 126 - .../eclipse/che/ide/api/action/Action.java | 56 - .../che/ide/api/action/ActionEvent.java | 80 - .../che/ide/api/action/ActionGroup.java | 91 - .../che/ide/api/action/ActionManager.java | 118 - .../ide/api/action/ActionSelectedHandler.java | 23 - .../ide/api/action/AppCloseActionEvent.java | 52 - .../che/ide/api/action/BaseAction.java | 119 - .../ide/api/action/CustomComponentAction.java | 34 - .../ide/api/action/DefaultActionGroup.java | 307 - .../che/ide/api/action/IdeActions.java | 75 - .../che/ide/api/action/Presentation.java | 226 - .../che/ide/api/action/ProjectAction.java | 58 - .../che/ide/api/action/PromisableAction.java | 34 - .../ide/api/action/PropertyChangeEvent.java | 125 - .../api/action/PropertyChangeListener.java | 27 - .../eclipse/che/ide/api/action/Separator.java | 45 - .../che/ide/api/action/ToggleAction.java | 63 - .../che/ide/api/action/Toggleable.java | 20 - .../eclipse/che/ide/api/app/AppContext.java | 196 - .../eclipse/che/ide/api/app/CurrentUser.java | 22 - .../che/ide/api/app/StartUpAction.java | 38 - .../eclipse/che/ide/api/auth/Credentials.java | 47 - .../che/ide/api/auth/OAuthServiceClient.java | 55 - .../che/ide/api/command/BaseCommandGoal.java | 53 - .../ide/api/command/CommandAddedEvent.java | 73 - .../che/ide/api/command/CommandExecutor.java | 45 - .../che/ide/api/command/CommandGoal.java | 23 - .../ide/api/command/CommandGoalRegistry.java | 57 - .../che/ide/api/command/CommandImpl.java | 277 - .../che/ide/api/command/CommandManager.java | 116 - .../che/ide/api/command/CommandPage.java | 73 - .../che/ide/api/command/CommandProducer.java | 38 - .../ide/api/command/CommandRemovedEvent.java | 73 - .../che/ide/api/command/CommandType.java | 47 - .../ide/api/command/CommandTypeRegistry.java | 35 - .../ide/api/command/CommandUpdatedEvent.java | 81 - .../ide/api/command/CommandsLoadedEvent.java | 52 - .../exec/AbstractExecAgentEventHandler.java | 64 - .../command/exec/ConnectedEventHandler.java | 40 - .../command/exec/ExecAgentCommandManager.java | 122 - .../api/command/exec/ExecAgentConsumer.java | 157 - .../command/exec/ExecAgentEventManager.java | 76 - .../command/exec/ProcessDiedEventHandler.java | 43 - .../command/exec/ProcessFinishedEvent.java | 53 - .../api/command/exec/ProcessStartedEvent.java | 51 - .../exec/ProcessStartedEventHandler.java | 44 - .../exec/ProcessStdErrEventHandler.java | 44 - .../exec/ProcessStdOutEventHandler.java | 44 - .../che/ide/api/constraints/Anchor.java | 31 - .../che/ide/api/constraints/Constraints.java | 66 - .../che/ide/api/constraints/Direction.java | 26 - .../che/ide/api/debug/BreakpointManager.java | 41 - .../debug/BreakpointManagerObservable.java | 22 - .../api/debug/BreakpointManagerObserver.java | 30 - .../che/ide/api/debug/BreakpointRenderer.java | 82 - .../api/debug/BreakpointRendererFactory.java | 31 - .../che/ide/api/debug/BreakpointStorage.java | 75 - .../che/ide/api/debug/DebugConfiguration.java | 121 - .../ide/api/debug/DebugConfigurationPage.java | 60 - .../ide/api/debug/DebugConfigurationType.java | 32 - .../api/debug/DebugConfigurationsManager.java | 68 - .../ide/api/debug/DebuggerServiceClient.java | 194 - .../api/debug/DebuggerServiceClientImpl.java | 233 - .../ide/api/debug/HasBreakpointRenderer.java | 17 - .../che/ide/api/debug/HasLocation.java | 23 - .../api/editor/AbstractEditorPresenter.java | 99 - .../ide/api/editor/AsyncEditorProvider.java | 32 - .../api/editor/DeletedFilesController.java | 52 - .../che/ide/api/editor/EditorAgent.java | 146 - .../ide/api/editor/EditorInitException.java | 38 - .../che/ide/api/editor/EditorInput.java | 71 - .../editor/EditorLocalizationConstants.java | 116 - .../che/ide/api/editor/EditorOpenedEvent.java | 60 - .../api/editor/EditorOpenedEventHandler.java | 29 - .../ide/api/editor/EditorPartPresenter.java | 113 - .../che/ide/api/editor/EditorProvider.java | 32 - .../che/ide/api/editor/EditorRegistry.java | 77 - .../ide/api/editor/EditorWithAutoSave.java | 29 - .../che/ide/api/editor/EditorWithErrors.java | 32 - .../api/editor/OpenEditorCallbackImpl.java | 29 - .../editor/annotation/AnnotationGroup.java | 57 - .../annotation/AnnotationGroupImpl.java | 261 - .../editor/annotation/AnnotationModel.java | 114 - .../annotation/AnnotationModelEvent.java | 173 - .../annotation/AnnotationModelHandler.java | 19 - .../annotation/AnnotationModelImpl.java | 367 - .../annotation/AnnotationsIterator.java | 73 - .../annotation/ClearAnnotationModelEvent.java | 52 - .../ClearAnnotationModelHandler.java | 19 - .../annotation/GutterAnnotationRenderer.java | 167 - .../annotation/HasAnnotationRendering.java | 24 - .../annotation/InlineAnnotationRenderer.java | 131 - .../editor/annotation/ListTooltipFactory.java | 69 - .../annotation/MinimapAnnotationRenderer.java | 144 - .../api/editor/annotation/PositionHolder.java | 179 - .../annotation/QueryAnnotationsEvent.java | 169 - .../annotation/QueryAnnotationsHandler.java | 21 - .../api/editor/annotation/RegionIterator.java | 106 - .../ide/api/editor/autosave/AutoSaveMode.java | 62 - .../ChangeInterceptorProvider.java | 26 - .../CloseCStyleCommentChangeInterceptor.java | 47 - .../editor/changeintercept/TextChange.java | 181 - .../TextChangeInterceptor.java | 31 - .../codeassist/AdditionalInfoCallback.java | 28 - .../codeassist/AutoCompleteResources.java | 36 - .../editor/codeassist/CodeAssistCallback.java | 20 - .../codeassist/CodeAssistProcessor.java | 45 - .../api/editor/codeassist/CodeAssistant.java | 57 - .../codeassist/CodeAssistantFactory.java | 28 - .../editor/codeassist/CodeAssistantImpl.java | 105 - .../ide/api/editor/codeassist/Completion.java | 39 - .../editor/codeassist/CompletionProposal.java | 57 - .../CompletionProposalExtension.java | 28 - .../codeassist/CompletionReadyCallback.java | 24 - .../editor/codeassist/CompletionsSource.java | 23 - .../DefaultChainedCodeAssistProcessor.java | 99 - .../codeassist/HasCompletionInformation.java | 17 - .../AbstractTextEditorProvider.java | 59 - .../DefaultTextEditorProvider.java | 25 - .../editor/defaulteditor/EditorBuilder.java | 19 - .../api/editor/document/AbstractDocument.java | 86 - .../che/ide/api/editor/document/Document.java | 131 - .../api/editor/document/DocumentEventBus.java | 20 - .../api/editor/document/DocumentHandle.java | 38 - .../api/editor/document/DocumentStorage.java | 80 - .../editor/document/DocumentStorageImpl.java | 126 - .../api/editor/document/ReadOnlyDocument.java | 127 - .../editor/document/UseDocumentHandle.java | 33 - .../AutoSaveTextEditorConfiguration.java | 28 - .../DefaultTextEditorConfiguration.java | 86 - .../editorconfig/EditorUpdateAction.java | 19 - .../editorconfig/TextEditorConfiguration.java | 108 - .../events/BeforeSelectionChangeEvent.java | 34 - .../events/BeforeSelectionChangeHandler.java | 23 - .../editor/events/CompletionRequestEvent.java | 31 - .../events/CompletionRequestHandler.java | 25 - .../editor/events/CursorActivityEvent.java | 34 - .../editor/events/CursorActivityHandler.java | 29 - .../editor/events/DocumentChangedEvent.java | 78 - .../editor/events/DocumentChangedHandler.java | 19 - .../editor/events/DocumentChangingEvent.java | 78 - .../events/DocumentChangingHandler.java | 19 - .../api/editor/events/DocumentReadyEvent.java | 44 - .../editor/events/DocumentReadyHandler.java | 20 - .../events/EditorDirtyStateChangedEvent.java | 53 - .../EditorDirtyStateChangedHandler.java | 30 - .../events/EditorSettingsChangedEvent.java | 46 - .../editor/events/FileContentUpdateEvent.java | 68 - .../events/FileContentUpdateHandler.java | 24 - .../che/ide/api/editor/events/FileEvent.java | 137 - .../api/editor/events/GutterClickEvent.java | 79 - .../api/editor/events/GutterClickHandler.java | 23 - .../HasBeforeSelectionChangeHandlers.java | 24 - .../events/HasCursorActivityHandlers.java | 30 - .../events/HasDocumentReadyHandlers.java | 20 - .../editor/events/HasGutterClickHandlers.java | 24 - .../events/HasViewPortChangeHandlers.java | 24 - .../api/editor/events/TextChangeEvent.java | 62 - .../api/editor/events/TextChangeHandler.java | 19 - .../editor/events/ViewPortChangeEvent.java | 50 - .../editor/events/ViewPortChangeHandler.java | 23 - .../editor/events/doc/DocReadyWrapper.java | 79 - .../DefaultExtensionToMimeTypeMappings.java | 140 - .../filetype/ExtensionFileTypeIdentifier.java | 95 - .../filetype/FileNameFileTypeIdentifier.java | 64 - .../editor/filetype/FileTypeIdentifier.java | 31 - .../filetype/FirstLineFileTypeIdentifier.java | 121 - .../MultipleMethodFileIdentifier.java | 68 - .../editor/formatter/ContentFormatter.java | 38 - .../che/ide/api/editor/gutter/Gutter.java | 90 - .../che/ide/api/editor/gutter/Gutters.java | 29 - .../che/ide/api/editor/gutter/HasGutter.java | 23 - .../api/editor/hotkeys/HasHotKeyItems.java | 29 - .../ide/api/editor/hotkeys/HotKeyItem.java | 57 - .../che/ide/api/editor/keymap/KeyBinding.java | 147 - .../api/editor/keymap/KeyBindingAction.java | 19 - .../che/ide/api/editor/keymap/Keymap.java | 139 - .../api/editor/keymap/KeymapChangeEvent.java | 55 - .../editor/keymap/KeymapChangeHandler.java | 29 - .../ide/api/editor/link/HasLinkedMode.java | 28 - .../che/ide/api/editor/link/LinkedMode.java | 68 - .../che/ide/api/editor/link/LinkedModel.java | 26 - .../ide/api/editor/link/LinkedModelData.java | 21 - .../ide/api/editor/link/LinkedModelGroup.java | 23 - .../ide/api/editor/minimap/HasMinimap.java | 23 - .../che/ide/api/editor/minimap/Minimap.java | 46 - .../editor/partition/CharacterScanner.java | 49 - .../editor/partition/ConstantPartitioner.java | 103 - .../editor/partition/DefaultPartitioner.java | 430 -- .../editor/partition/DocumentPartitioner.java | 69 - .../editor/partition/DocumentPositionMap.java | 115 - .../partition/DocumentPositionMapImpl.java | 406 - .../editor/partition/PartitionScanner.java | 33 - .../editor/partition/PartitionerFactory.java | 22 - .../partition/StringCharacterScanner.java | 98 - .../api/editor/partition/TokenScanner.java | 50 - .../editor/position/PositionConverter.java | 93 - .../editor/quickfix/QuickAssistAssistant.java | 64 - .../QuickAssistInvocationContext.java | 56 - .../editor/quickfix/QuickAssistProcessor.java | 21 - .../quickfix/QuickAssistantFactory.java | 28 - .../editor/reconciler/DefaultReconciler.java | 103 - .../api/editor/reconciler/DirtyRegion.java | 103 - .../editor/reconciler/DirtyRegionQueue.java | 108 - .../ide/api/editor/reconciler/Reconciler.java | 56 - .../editor/reconciler/ReconcilerFactory.java | 20 - .../reconciler/ReconcilerWithAutoSave.java | 249 - .../reconciler/ReconcilingStrategy.java | 58 - .../api/editor/signature/ParameterInfo.java | 38 - .../api/editor/signature/SignatureHelp.java | 46 - .../signature/SignatureHelpProvider.java | 42 - .../api/editor/signature/SignatureInfo.java | 46 - .../api/editor/text/BadLocationException.java | 42 - .../text/BadPositionCategoryException.java | 43 - .../che/ide/api/editor/text/LinearRange.java | 134 - .../che/ide/api/editor/text/Position.java | 187 - .../che/ide/api/editor/text/Region.java | 37 - .../che/ide/api/editor/text/RegionImpl.java | 67 - .../che/ide/api/editor/text/TextPosition.java | 79 - .../che/ide/api/editor/text/TextRange.java | 94 - .../ide/api/editor/text/TypedPosition.java | 84 - .../che/ide/api/editor/text/TypedRegion.java | 31 - .../ide/api/editor/text/TypedRegionImpl.java | 64 - .../editor/text/annotation/Annotation.java | 238 - .../che/ide/api/editor/text/rules/Token.java | 50 - .../ide/api/editor/text/rules/TokenImpl.java | 108 - .../api/editor/texteditor/CanWrapLines.java | 30 - .../texteditor/ContentInitializedHandler.java | 22 - .../api/editor/texteditor/CursorModel.java | 31 - .../texteditor/CursorModelWithHandler.java | 28 - .../editor/texteditor/EditorResources.java | 35 - .../api/editor/texteditor/EditorWidget.java | 221 - .../texteditor/EditorWidgetFactory.java | 35 - .../texteditor/HandlesTextOperations.java | 36 - .../editor/texteditor/HandlesUndoRedo.java | 63 - .../api/editor/texteditor/HasKeyBindings.java | 33 - .../texteditor/HasNotificationPanel.java | 28 - .../texteditor/HasReadOnlyProperty.java | 29 - .../api/editor/texteditor/HasTextMarkers.java | 33 - .../ide/api/editor/texteditor/LineStyler.java | 49 - .../ide/api/editor/texteditor/TextEditor.java | 198 - .../texteditor/TextEditorOperations.java | 82 - .../editor/texteditor/TextEditorPartView.java | 108 - .../api/editor/texteditor/UndoableEditor.java | 19 - .../api/extension/DependencyDescription.java | 52 - .../che/ide/api/extension/Extension.java | 29 - .../api/extension/ExtensionDescription.java | 101 - .../ide/api/extension/ExtensionGinModule.java | 20 - .../ide/api/extension/ExtensionRegistry.java | 30 - .../extension/ExtensionsInitializedEvent.java | 65 - .../eclipse/che/ide/api/extension/SDK.java | 22 - .../ide/api/factory/FactoryAcceptedEvent.java | 45 - .../api/factory/FactoryAcceptedHandler.java | 30 - .../ide/api/factory/FactoryServiceClient.java | 98 - .../che/ide/api/factory/model/ActionImpl.java | 73 - .../che/ide/api/factory/model/AuthorImpl.java | 62 - .../factory/model/ButtonAttributesImpl.java | 97 - .../che/ide/api/factory/model/ButtonImpl.java | 67 - .../ide/api/factory/model/FactoryImpl.java | 169 - .../che/ide/api/factory/model/IdeImpl.java | 93 - .../api/factory/model/OnAppClosedImpl.java | 67 - .../api/factory/model/OnAppLoadedImpl.java | 67 - .../factory/model/OnProjectsLoadedImpl.java | 67 - .../ide/api/factory/model/PoliciesImpl.java | 92 - .../che/ide/api/filetypes/FileType.java | 129 - .../ide/api/filetypes/FileTypeRegistry.java | 134 - .../filewatcher/ClientServerEventService.java | 60 - .../FileWatcherExcludesOperation.java | 160 - .../org/eclipse/che/ide/api/icon/Icon.java | 134 - .../che/ide/api/icon/IconRegistry.java | 60 - .../che/ide/api/jsonrpc/Constants.java | 20 - .../jsonrpc/SubscriptionManagerClient.java | 51 - .../WorkspaceMasterJsonRpcInitializer.java | 114 - .../ide/api/keybinding/KeyBindingAgent.java | 89 - .../che/ide/api/keybinding/KeyBuilder.java | 103 - .../che/ide/api/keybinding/Scheme.java | 82 - .../che/ide/api/keybinding/SchemeImpl.java | 111 - .../eclipse/che/ide/api/macro/BaseMacro.java | 88 - .../org/eclipse/che/ide/api/macro/Macro.java | 44 - .../che/ide/api/macro/MacroProcessor.java | 31 - .../che/ide/api/macro/MacroRegistry.java | 39 - .../eclipse/che/ide/api/mvp/Presenter.java | 30 - .../org/eclipse/che/ide/api/mvp/View.java | 24 - .../ide/api/notification/Notification.java | 255 - .../notification/NotificationListener.java | 28 - .../api/notification/NotificationManager.java | 228 - .../notification/NotificationObserver.java | 22 - .../che/ide/api/notification/ReadState.java | 23 - .../api/notification/StatusNotification.java | 145 - .../StatusNotificationListener.java | 22 - .../ide/api/oauth/OAuth2Authenticator.java | 26 - .../oauth/OAuth2AuthenticatorRegistry.java | 24 - .../oauth/OAuth2AuthenticatorUrlProvider.java | 50 - .../ide/api/outputconsole/OutputConsole.java | 55 - .../ide/api/parts/AbstractPartPresenter.java | 156 - .../ide/api/parts/ActivePartChangedEvent.java | 44 - .../api/parts/ActivePartChangedHandler.java | 28 - .../ide/api/parts/EditorMultiPartStack.java | 120 - .../api/parts/EditorMultiPartStackState.java | 60 - .../che/ide/api/parts/EditorPartStack.java | 100 - .../eclipse/che/ide/api/parts/EditorTab.java | 96 - .../eclipse/che/ide/api/parts/Focusable.java | 30 - .../che/ide/api/parts/PartPresenter.java | 134 - .../eclipse/che/ide/api/parts/PartStack.java | 178 - .../api/parts/PartStackStateChangedEvent.java | 71 - .../che/ide/api/parts/PartStackType.java | 37 - .../ide/api/parts/PartStackUIResources.java | 59 - .../che/ide/api/parts/PartStackView.java | 89 - .../che/ide/api/parts/Perspective.java | 125 - .../che/ide/api/parts/PerspectiveManager.java | 101 - .../che/ide/api/parts/PerspectiveView.java | 56 - .../che/ide/api/parts/PropertyListener.java | 29 - .../che/ide/api/parts/WorkspaceAgent.java | 82 - .../api/parts/base/BaseActionDelegate.java | 29 - .../che/ide/api/parts/base/BasePresenter.java | 40 - .../che/ide/api/parts/base/BaseView.java | 121 - .../ide/api/parts/base/MaximizePartEvent.java | 57 - .../che/ide/api/parts/base/ToolButton.java | 87 - .../che/ide/api/parts/base/ToolButton.ui.xml | 92 - .../AbstractPreferencePagePresenter.java | 65 - .../preferences/PreferencePagePresenter.java | 63 - .../api/preferences/PreferencesManager.java | 56 - .../ide/api/project/MutableProjectConfig.java | 222 - .../ide/api/project/NewProjectConfigImpl.java | 183 - .../che/ide/api/project/QueryExpression.java | 128 - .../project/type/ProjectTemplateRegistry.java | 22 - .../api/project/type/ProjectTypeRegistry.java | 25 - .../project/type/ProjectTypesLoadedEvent.java | 35 - .../wizard/PreSelectedProjectTypeManager.java | 30 - .../type/wizard/ProjectWizardMode.java | 53 - .../type/wizard/ProjectWizardRegistrar.java | 49 - .../project/wizard/ImportWizardRegistrar.java | 38 - .../che/ide/api/reference/FqnProvider.java | 35 - .../che/ide/api/resources/Container.java | 549 -- .../api/resources/ExternalResourceDelta.java | 114 - .../eclipse/che/ide/api/resources/File.java | 80 - .../eclipse/che/ide/api/resources/Folder.java | 78 - .../api/resources/ModificationTracker.java | 44 - .../che/ide/api/resources/Project.java | 203 - .../ide/api/resources/RenamingSupport.java | 22 - .../che/ide/api/resources/Resource.java | 684 -- .../api/resources/ResourceChangedEvent.java | 121 - .../che/ide/api/resources/ResourceDelta.java | 185 - .../api/resources/ResourceInterceptor.java | 54 - .../api/resources/ResourceNameComparator.java | 40 - .../api/resources/ResourcePathComparator.java | 40 - .../api/resources/SearchItemReference.java | 84 - .../api/resources/SearchOccurrenceImpl.java | 94 - .../che/ide/api/resources/SearchResult.java | 35 - .../che/ide/api/resources/SyntheticFile.java | 101 - .../che/ide/api/resources/VirtualFile.java | 87 - .../che/ide/api/resources/marker/Marker.java | 64 - .../resources/marker/MarkerChangedEvent.java | 124 - .../marker/PresentableTextMarker.java | 50 - .../modification/ClipboardManager.java | 54 - .../resources/modification/CopyProvider.java | 59 - .../resources/modification/CutProvider.java | 59 - .../modification/CutResourceMarker.java | 32 - .../resources/modification/PasteProvider.java | 59 - .../che/ide/api/selection/Selection.java | 128 - .../che/ide/api/selection/SelectionAgent.java | 33 - .../api/selection/SelectionChangedEvent.java | 45 - .../selection/SelectionChangedHandler.java | 28 - .../che/ide/api/ssh/SshServiceClient.java | 40 - .../AppStateServiceClient.java | 37 - .../api/statepersistance/StateComponent.java | 97 - .../org/eclipse/che/ide/api/theme/Style.java | 668 -- .../org/eclipse/che/ide/api/theme/Theme.java | 1725 ----- .../eclipse/che/ide/api/theme/ThemeAgent.java | 47 - .../ide/api/vcs/HasVcsChangeMarkerRender.java | 19 - .../eclipse/che/ide/api/vcs/HasVcsStatus.java | 30 - .../ide/api/vcs/VcsChangeMarkerRender.java | 30 - .../api/vcs/VcsChangeMarkerRenderFactory.java | 28 - .../eclipse/che/ide/api/vcs/VcsStatus.java | 55 - .../che/ide/api/wizard/AbstractWizard.java | 190 - .../ide/api/wizard/AbstractWizardPage.java | 69 - .../eclipse/che/ide/api/wizard/Wizard.java | 91 - .../che/ide/api/wizard/WizardPage.java | 48 - .../api/workspace/WorkspaceReadyEvent.java | 91 - .../ide/api/workspace/WsAgentServerUtil.java | 161 - .../event/ExecAgentServerRunningEvent.java | 51 - .../event/ExecAgentServerStoppedEvent.java | 51 - .../workspace/event/InstallerFailedEvent.java | 60 - .../event/InstallerRunningEvent.java | 60 - .../event/InstallerStartingEvent.java | 53 - .../workspace/event/MachineFailedEvent.java | 54 - .../workspace/event/MachineRunningEvent.java | 47 - .../workspace/event/MachineStartingEvent.java | 47 - .../workspace/event/MachineStoppedEvent.java | 47 - .../workspace/event/ServerRunningEvent.java | 59 - .../workspace/event/ServerStoppedEvent.java | 59 - .../TerminalAgentServerRunningEvent.java | 52 - .../TerminalAgentServerStoppedEvent.java | 52 - .../event/WorkspaceRunningEvent.java | 35 - .../event/WorkspaceStartingEvent.java | 35 - .../event/WorkspaceStoppedEvent.java | 57 - .../event/WorkspaceStoppingEvent.java | 45 - .../event/WsAgentServerRunningEvent.java | 51 - .../event/WsAgentServerStoppedEvent.java | 51 - .../api/workspace/model/EnvironmentImpl.java | 83 - .../workspace/model/MachineConfigImpl.java | 166 - .../ide/api/workspace/model/MachineImpl.java | 118 - .../workspace/model/ProjectConfigImpl.java | 164 - .../ide/api/workspace/model/RecipeImpl.java | 91 - .../ide/api/workspace/model/RuntimeImpl.java | 144 - .../api/workspace/model/ServerConfigImpl.java | 107 - .../ide/api/workspace/model/ServerImpl.java | 57 - .../workspace/model/SourceStorageImpl.java | 88 - .../ide/api/workspace/model/VolumeImpl.java | 57 - .../ide/api/workspace/model/WarningImpl.java | 66 - .../workspace/model/WorkspaceConfigImpl.java | 181 - .../api/workspace/model/WorkspaceImpl.java | 198 - ide/che-core-ide-api/src/main/module.gwt.xml | 47 - .../org/eclipse/che/agent/exec/Exec.gwt.xml | 18 - .../org/eclipse/che/api/auth/Auth.gwt.xml | 20 - .../org/eclipse/che/api/core/Core.gwt.xml | 21 - .../eclipse/che/api/core/model/Model.gwt.xml | 25 - .../org/eclipse/che/api/debug/Debug.gwt.xml | 20 - .../eclipse/che/api/factory/Factory.gwt.xml | 20 - .../org/eclipse/che/api/git/Git.gwt.xml | 22 - .../eclipse/che/api/machine/Machine.gwt.xml | 23 - .../eclipse/che/api/project/Project.gwt.xml | 24 - .../org/eclipse/che/api/ssh/Ssh.gwt.xml | 22 - .../eclipse/che/api/testing/Testing.gwt.xml | 20 - .../org/eclipse/che/api/user/User.gwt.xml | 20 - .../che/api/workspace/Workspace.gwt.xml | 22 - .../codeassist/AutocompleteComponent.css | 58 - .../che/ide/api/editor/texteditor/Editor.css | 44 - .../che/ide/api/parts/arrow-bottom.svg | 26 - .../eclipse/che/ide/api/parts/close-icon.svg | 21 - .../ide/api/parts/collapse-expand-icon.svg | 19 - .../org/eclipse/che/ide/api/parts/erase.svg | 27 - .../che/ide/api/parts/maximize-part.svg | 19 - .../eclipse/che/ide/api/parts/partstack.css | 55 - .../che/ide/api/parts/tabLineError.svg | 24 - .../che/ide/api/parts/tabLineWarning.svg | 24 - .../eclipse/che/ide/api/parts/wrap-text.svg | 18 - .../org/eclipse/che/ide/api/ui/style.css | 417 -- .../action/AbstractPerspectiveActionTest.java | 79 - .../api/action/DefaultActionGroupTest.java | 573 -- .../api/editor/AnnotationIteratorTest.java | 98 - ...oseCStyleCommentChangeInterceptorTest.java | 196 - .../che/ide/api/macro/BaseMacroTest.java | 59 - .../api/wizard/AbstractWizardPageTest.java | 78 - .../ide/api/wizard/AbstractWizardTest.java | 277 - .../api/workspace/WsAgentServerUtilTest.java | 145 - ide/che-core-ide-app/pom.xml | 415 -- .../che/ide/CoreLocalizationConstant.java | 1362 ---- .../java/org/eclipse/che/ide/Resources.java | 260 - .../che/ide/actions/ActionApiModule.java | 29 - .../che/ide/actions/ActionManagerImpl.java | 391 - .../AddToFileWatcherExcludesAction.java | 95 - .../ide/actions/CloseActiveEditorAction.java | 55 - .../che/ide/actions/CollapseAllAction.java | 68 - .../che/ide/actions/CompleteAction.java | 67 - .../actions/ConvertFolderToProjectAction.java | 82 - .../che/ide/actions/CreateProjectAction.java | 55 - .../che/ide/actions/DeleteResourceAction.java | 150 - .../ide/actions/DownloadProjectAction.java | 84 - .../ide/actions/DownloadResourceAction.java | 76 - .../che/ide/actions/DownloadWsAction.java | 72 - .../che/ide/actions/EditFileAction.java | 70 - .../che/ide/actions/EditorActions.java | 28 - .../che/ide/actions/ExpandEditorAction.java | 133 - .../che/ide/actions/FormatterAction.java | 74 - .../che/ide/actions/FullTextSearchAction.java | 86 - .../eclipse/che/ide/actions/GoIntoAction.java | 88 - .../che/ide/actions/HotKeysListAction.java | 47 - .../che/ide/actions/ImportProjectAction.java | 61 - .../che/ide/actions/LinkWithEditorAction.java | 96 - .../che/ide/actions/NavigateToFileAction.java | 61 - .../che/ide/actions/NewXmlFileAction.java | 67 - .../che/ide/actions/OpenFileAction.java | 183 - .../actions/ProjectConfigurationAction.java | 83 - .../eclipse/che/ide/actions/RedoAction.java | 74 - .../che/ide/actions/RefreshPathAction.java | 117 - .../RemoveFromFileWatcherExcludesAction.java | 95 - .../che/ide/actions/RenameItemAction.java | 321 - .../che/ide/actions/RunCommandAction.java | 70 - .../eclipse/che/ide/actions/SaveAction.java | 61 - .../che/ide/actions/SaveAllAction.java | 91 - .../ide/actions/ShowConsoleTreeAction.java | 68 - .../ide/actions/ShowHiddenFilesAction.java | 98 - .../ide/actions/ShowPreferencesAction.java | 53 - .../che/ide/actions/ShowReferenceAction.java | 64 - .../che/ide/actions/ShowToolbarAction.java | 56 - .../che/ide/actions/SignatureHelpAction.java | 72 - .../che/ide/actions/SoftWrapAction.java | 65 - .../che/ide/actions/StartUpActionsParser.java | 78 - .../ide/actions/StartUpActionsProcessor.java | 64 - .../eclipse/che/ide/actions/UndoAction.java | 74 - .../che/ide/actions/UploadFileAction.java | 78 - .../che/ide/actions/UploadFolderAction.java | 78 - .../actions/common/CollapseTreeAction.java | 54 - .../ide/actions/common/ExpandTreeAction.java | 54 - .../ide/actions/common/HidePartAction.java | 61 - .../actions/common/MaximizePartAction.java | 63 - .../ide/actions/common/RestorePartAction.java | 61 - .../ide/actions/find/FindActionAction.java | 52 - .../ide/actions/find/FindActionPresenter.java | 296 - .../che/ide/actions/find/FindActionView.java | 43 - .../ide/actions/find/FindActionViewImpl.java | 303 - .../actions/find/FindActionViewImpl.ui.xml | 69 - .../CommandsExplorerDisplayingModeAction.java | 88 - .../switching/EditorDisplayingModeAction.java | 110 - .../EventLogsDisplayingModeAction.java | 88 - .../FindResultDisplayingModeAction.java | 88 - .../ProjectExplorerDisplayingModeAction.java | 88 - .../TerminalDisplayingModeAction.java | 109 - .../bootstrap/BasicIDEInitializedEvent.java | 41 - .../che/ide/bootstrap/BootstrapModule.java | 24 - .../ide/bootstrap/CurrentUserInitializer.java | 144 - .../DefaultIdeInitializationStrategy.java | 167 - .../ide/bootstrap/ExtensionInitializer.java | 59 - .../FactoryIdeInitializationStrategy.java | 137 - .../che/ide/bootstrap/IdeBootstrap.java | 76 - .../bootstrap/IdeInitializationStrategy.java | 30 - .../IdeInitializationStrategyProvider.java | 50 - .../java/org/eclipse/che/ide/client/IDE.java | 28 - .../che/ide/clipboard/ClipboardModule.java | 25 - .../che/ide/command/CommandApiModule.java | 162 - .../che/ide/command/CommandResources.java | 113 - .../eclipse/che/ide/command/CommandUtils.java | 111 - .../ide/command/actions/ActionMessages.java | 28 - .../actions/CommandExplorerContextMenu.java | 36 - .../command/actions/MoveCommandAction.java | 88 - .../command/actions/RenameCommandAction.java | 88 - .../che/ide/command/editor/CommandEditor.java | 339 - .../command/editor/CommandEditorProvider.java | 50 - .../ide/command/editor/CommandEditorView.java | 48 - .../command/editor/CommandEditorViewImpl.java | 102 - .../editor/CommandEditorViewImpl.ui.xml | 63 - .../ide/command/editor/EditorMessages.java | 73 - .../page/AbstractCommandEditorPage.java | 73 - .../editor/page/CommandEditorPage.java | 67 - .../page/commandline/CommandLinePage.java | 64 - .../command/editor/page/goal/GoalPage.java | 152 - .../editor/page/goal/GoalPageView.java | 47 - .../editor/page/goal/GoalPageViewImpl.java | 87 - .../editor/page/goal/GoalPageViewImpl.ui.xml | 24 - .../command/editor/page/name/NamePage.java | 92 - .../editor/page/name/NamePageView.java | 44 - .../editor/page/name/NamePageViewImpl.java | 81 - .../editor/page/name/NamePageViewImpl.ui.xml | 49 - .../page/previewurl/PreviewUrlPage.java | 63 - .../editor/page/project/ProjectSwitcher.java | 66 - .../page/project/ProjectSwitcher.ui.xml | 47 - .../editor/page/project/ProjectsPage.java | 130 - .../editor/page/project/ProjectsPageView.java | 34 - .../page/project/ProjectsPageViewImpl.java | 70 - .../page/project/ProjectsPageViewImpl.ui.xml | 46 - .../page/text/AbstractPageWithTextEditor.java | 158 - .../editor/page/text/EditorInputImpl.java | 53 - .../page/text/MacroCodeAssistProcessor.java | 119 - .../page/text/MacroCompletionProposal.java | 125 - .../page/text/MacroEditorConfiguration.java | 39 - .../page/text/PageWithTextEditorView.java | 39 - .../page/text/PageWithTextEditorViewImpl.java | 80 - .../text/PageWithTextEditorViewImpl.ui.xml | 53 - .../command/execute/CommandExecutorImpl.java | 114 - .../command/execute/CommandsActionGroup.java | 63 - .../che/ide/command/execute/ExecMessages.java | 25 - .../command/execute/ExecuteCommandAction.java | 59 - .../execute/ExecuteCommandActionFactory.java | 28 - .../execute/ExecuteCommandActionManager.java | 205 - .../ide/command/execute/GoalPopUpGroup.java | 80 - .../execute/GoalPopUpGroupFactory.java | 23 - .../JsonRpcExecAgentCommandManager.java | 304 - .../execute/JsonRpcExecAgentEventManager.java | 95 - .../explorer/CommandsExplorerPresenter.java | 286 - .../explorer/CommandsExplorerView.java | 67 - .../explorer/CommandsExplorerViewImpl.java | 179 - .../explorer/CommandsExplorerViewImpl.ui.xml | 19 - .../explorer/CommandsTreeRenderer.java | 161 - .../command/explorer/ExplorerMessages.java | 46 - .../che/ide/command/goal/BuildGoal.java | 28 - .../command/goal/CommandGoalRegistryImpl.java | 104 - .../che/ide/command/goal/CommonGoal.java | 29 - .../che/ide/command/goal/DebugGoal.java | 28 - .../che/ide/command/goal/DeployGoal.java | 28 - .../che/ide/command/goal/GoalMessages.java | 25 - .../eclipse/che/ide/command/goal/RunGoal.java | 28 - .../che/ide/command/goal/TestGoal.java | 28 - .../command/manager/CommandManagerImpl.java | 453 -- .../command/manager/CommandNameGenerator.java | 89 - .../ProjectCommandManagerDelegate.java | 180 - .../WorkspaceCommandManagerDelegate.java | 111 - .../ide/command/node/AbstractCommandNode.java | 60 - .../che/ide/command/node/CommandFileNode.java | 91 - .../che/ide/command/node/CommandGoalNode.java | 75 - .../command/node/ExecutableCommandNode.java | 47 - .../che/ide/command/node/NodeFactory.java | 28 - .../palette/CommandsPalettePresenter.java | 112 - .../command/palette/CommandsPaletteView.java | 49 - .../palette/CommandsPaletteViewImpl.java | 192 - .../palette/CommandsPaletteViewImpl.ui.xml | 56 - .../ide/command/palette/PaletteMessages.java | 40 - .../palette/ShowCommandsPaletteAction.java | 40 - .../producer/CommandProducerAction.java | 54 - .../CommandProducerActionFactory.java | 21 - .../CommandProducerActionManager.java | 129 - .../command/producer/ProducerMessages.java | 28 - .../command/toolbar/CommandCreationGuide.java | 71 - .../toolbar/CommandToolbarPresenter.java | 84 - .../command/toolbar/CommandToolbarView.java | 33 - .../toolbar/CommandToolbarViewImpl.java | 87 - .../toolbar/CommandToolbarViewImpl.ui.xml | 67 - .../toolbar/OpenCommandsPaletteButton.java | 89 - .../ide/command/toolbar/ToolbarButton.java | 45 - .../toolbar/ToolbarButtonsFactory.java | 20 - .../ide/command/toolbar/ToolbarMessages.java | 46 - .../commands/ExecuteCommandPresenter.java | 98 - .../toolbar/commands/ExecuteCommandView.java | 43 - .../commands/ExecuteCommandViewImpl.java | 125 - .../commands/button/AbstractMenuItem.java | 29 - .../toolbar/commands/button/CommandItem.java | 31 - .../commands/button/ExecuteCommandButton.java | 140 - .../button/ExecuteCommandButtonFactory.java | 131 - .../ExecuteCommandButtonItemsProvider.java | 155 - .../toolbar/commands/button/GuideItem.java | 38 - .../toolbar/commands/button/MachineItem.java | 49 - .../commands/button/MenuItemsFactory.java | 29 - .../controller/ToolbarControllerMenu.java | 39 - .../ToolbarControllerPresenter.java | 43 - .../controller/ToolbarControllerView.java | 24 - .../controller/ToolbarControllerViewImpl.java | 71 - .../ToolbarControllerViewImpl.ui.xml | 70 - .../command/toolbar/previews/PreviewUrl.java | 90 - .../previews/PreviewUrlItemRenderer.java | 70 - .../toolbar/previews/PreviewsPresenter.java | 122 - .../toolbar/previews/PreviewsView.java | 33 - .../toolbar/previews/PreviewsViewImpl.java | 142 - .../processes/ActivateProcessOutputEvent.java | 48 - .../toolbar/processes/EmptyListWidget.java | 43 - .../command/toolbar/processes/Process.java | 26 - .../toolbar/processes/ProcessImpl.java | 77 - .../processes/ProcessItemRenderer.java | 70 - .../processes/ProcessOutputClosedEvent.java | 49 - .../toolbar/processes/ProcessWidget.java | 201 - .../processes/ProcessesListPresenter.java | 194 - .../toolbar/processes/ProcessesListView.java | 57 - .../processes/ProcessesListViewImpl.java | 238 - .../selector/PanelSelectorPresenter.java | 189 - .../toolbar/selector/PanelSelectorView.java | 65 - .../selector/PanelSelectorViewImpl.java | 176 - .../selector/PanelSelectorViewImpl.ui.xml | 127 - .../ide/command/type/CommandTypeMessages.java | 28 - .../command/type/CommandTypeRegistryImpl.java | 64 - .../type/chooser/CommandTypeChooser.java | 100 - .../type/chooser/CommandTypeChooserView.java | 50 - .../chooser/CommandTypeChooserViewImpl.java | 147 - .../chooser/CommandTypeChooserViewImpl.ui.xml | 22 - .../type/custom/CustomCommandType.java | 75 - .../type/custom/CustomPagePresenter.java | 81 - .../command/type/custom/CustomPageView.java | 37 - .../type/custom/CustomPageViewImpl.java | 77 - .../type/custom/CustomPageViewImpl.ui.xml | 47 - .../ide/console/AbstractOutputCustomizer.java | 178 - .../che/ide/console/CPPOutputCustomizer.java | 187 - .../ide/console/CSharpOutputCustomizer.java | 190 - .../ide/console/CommandConsoleFactory.java | 33 - .../che/ide/console/CommandOutputConsole.java | 86 - .../CommandOutputConsolePresenter.java | 295 - .../ide/console/CompositeOutputConsole.java | 69 - .../ide/console/CompoundOutputCustomizer.java | 46 - .../che/ide/console/ConsoleGinModule.java | 34 - .../che/ide/console/DefaultOutputConsole.java | 197 - .../che/ide/console/JavaOutputCustomizer.java | 143 - .../che/ide/console/OutputConsoleView.java | 144 - .../ide/console/OutputConsoleViewImpl.java | 461 -- .../ide/console/OutputConsoleViewImpl.ui.xml | 225 - .../che/ide/console/OutputCustomizer.java | 25 - .../che/ide/context/AppContextImpl.java | 454 -- .../che/ide/context/BrowserAddress.java | 108 - .../che/ide/context/CurrentUserImpl.java | 46 - .../che/ide/core/AgentURLModifier.java | 64 - .../che/ide/core/BrowserTabCloseHandler.java | 87 - .../che/ide/core/ClientServerEventModule.java | 32 - .../eclipse/che/ide/core/CoreGinModule.java | 171 - .../ide/core/FileOpenCloseEventListener.java | 98 - .../che/ide/core/FontAwesomeInjector.java | 34 - .../che/ide/core/FreeDiskSpaceNotifier.java | 69 - .../core/FreeDiskSpaceStatusBarAction.java | 76 - .../core/ServerSubscriptionBroadcaster.java | 41 - .../core/StandardComponentInitializer.java | 1050 --- .../org/eclipse/che/ide/core/UiModule.java | 135 - .../eclipse/che/ide/core/WebSocketModule.java | 44 - .../che/ide/debug/BreakpointManagerImpl.java | 506 -- .../che/ide/debug/BreakpointRendererImpl.java | 197 - .../che/ide/debug/BreakpointResources.java | 39 - .../che/ide/debug/BreakpointStorageImpl.java | 226 - .../eclipse/che/ide/debug/DebugApiModule.java | 43 - .../org/eclipse/che/ide/debug/Debugger.java | 142 - .../che/ide/debug/DebuggerDescriptor.java | 65 - .../che/ide/debug/DebuggerManager.java | 89 - .../ide/debug/DebuggerManagerObservable.java | 22 - .../ide/debug/DebuggerManagerObserver.java | 21 - .../che/ide/debug/DebuggerObservable.java | 22 - .../che/ide/debug/DebuggerObserver.java | 56 - .../che/ide/devmode/BookmarkletParams.java | 50 - .../che/ide/devmode/DevModeOffAction.java | 36 - .../ide/devmode/DevModeScriptInjector.java | 58 - .../che/ide/devmode/DevModeSetUpAction.java | 43 - .../eclipse/che/ide/devmode/GWTDevMode.java | 175 - .../che/ide/download/DownloadContainer.java | 49 - .../org/eclipse/che/ide/dto/DtoModule.java | 23 - .../org/eclipse/che/ide/dto/DtoRegistrar.java | 29 - .../editor/ClientServerEventServiceImpl.java | 93 - .../che/ide/editor/EditorAgentImpl.java | 953 --- .../che/ide/editor/EditorApiModule.java | 129 - ...EditorFileStatusNotificationOperation.java | 133 - .../che/ide/editor/EditorInputImpl.java | 53 - .../che/ide/editor/EditorRegistryImpl.java | 98 - .../che/ide/editor/ResourceProvider.java | 74 - .../ide/editor/autosave/AutoSaveModeImpl.java | 279 - .../AdditionalInformationWidget.java | 33 - .../ide/editor/macro/AbstractEditorMacro.java | 51 - .../macro/EditorCurrentFileBaseNameMacro.java | 89 - .../macro/EditorCurrentFileNameMacro.java | 73 - .../macro/EditorCurrentFilePathMacro.java | 81 - .../EditorCurrentFileRelativePathMacro.java | 74 - .../macro/EditorCurrentProjectNameMacro.java | 89 - .../macro/EditorCurrentProjectTypeMacro.java | 89 - .../EditorPrefLocalizationConstant.java | 34 - .../EditorPreferencePresenter.java | 80 - .../preferences/EditorPreferenceSection.java | 36 - .../preferences/EditorPreferenceView.java | 20 - .../preferences/EditorPreferenceViewImpl.java | 44 - .../EditorPreferenceViewImpl.ui.xml | 26 - .../preferences/EditorPreferencesManager.java | 266 - .../preferences/EditorPreferencesModule.java | 69 - .../editorproperties/EditorProperties.java | 66 - .../EditorPropertiesManager.java | 187 - .../EditorPropertiesPresenter.java | 103 - .../EditorPropertiesView.java | 26 - .../EditorPropertiesViewImpl.java | 48 - .../EditorPropertiesViewImpl.ui.xml | 27 - .../EditorPropertiesSectionPresenter.java | 109 - .../EditorPropertiesSectionView.java | 46 - .../EditorPropertiesSectionViewImpl.java | 108 - .../EditorPropertiesSectionViewImpl.ui.xml | 36 - .../property/EditorBooleanPropertyWidget.java | 55 - .../property/EditorNumberPropertyWidget.java | 70 - .../property/EditorPropertyBaseWidget.java | 59 - .../property/EditorPropertyBaseWidget.ui.xml | 62 - .../property/EditorPropertyWidget.java | 40 - .../property/EditorPropertyWidgetFactory.java | 42 - .../property/EditorStringPropertyWidget.java | 60 - .../sections/EditPropertiesSection.java | 44 - .../EditorPreferenceSectionFactory.java | 32 - .../sections/EditorPropertiesSection.java | 28 - .../LanguageToolsPropertiesSection.java | 49 - .../sections/RulersPropertiesSection.java | 57 - .../sections/TabsPropertiesSection.java | 48 - .../sections/TypingPropertiesSection.java | 61 - .../WhiteSpacesPropertiesSection.java | 47 - .../keymaps/KeyMapsPreferencePresenter.java | 108 - .../keymaps/KeymapsPreferenceView.java | 33 - .../keymaps/KeymapsPreferenceViewImpl.java | 74 - .../keymaps/KeymapsPreferenceViewImpl.ui.xml | 55 - .../quickfix/QuickAssistAssistantImpl.java | 82 - .../editor/quickfix/QuickAssistWidget.java | 127 - .../quickfix/QuickAssistWidgetFactory.java | 26 - .../EditorContentSynchronizer.java | 38 - .../EditorContentSynchronizerImpl.java | 174 - .../EditorGroupSynchronization.java | 55 - .../EditorGroupSynchronizationImpl.java | 284 - .../EditorWorkingCopySynchronizer.java | 31 - .../EditorWorkingCopySynchronizerImpl.java | 91 - .../texteditor/TextEditorPartViewImpl.java | 189 - .../texteditor/TextEditorPartViewImpl.ui.xml | 57 - .../texteditor/infopanel/InfoPanel.java | 109 - .../texteditor/infopanel/InfoPanel.ui.xml | 61 - .../che/ide/factory/FactoryExtension.java | 49 - .../che/ide/factory/FactoryGinModule.java | 29 - .../che/ide/factory/FactoryResources.java | 58 - .../ide/factory/FactoryServiceClientImpl.java | 194 - .../che/ide/factory/JsIntervalSetter.java | 38 - .../factory/accept/AcceptFactoryHandler.java | 130 - .../factory/action/CreateFactoryAction.java | 45 - .../configure/CreateFactoryPresenter.java | 124 - .../factory/configure/CreateFactoryView.java | 66 - .../configure/CreateFactoryViewImpl.java | 196 - .../configure/CreateFactoryViewImpl.ui.xml | 106 - .../factory/utils/FactoryProjectImporter.java | 413 -- .../welcome/GreetingPartPresenter.java | 111 - .../ide/factory/welcome/GreetingPartView.java | 37 - .../factory/welcome/GreetingPartViewImpl.java | 94 - .../welcome/OpenWelcomePageAction.java | 37 - .../che/ide/factory/welcome/TooltipHint.java | 91 - .../ide/factory/welcome/TooltipHint.ui.xml | 105 - .../che/ide/filetypes/FileTypeApiModule.java | 124 - .../ide/filetypes/FileTypeProviderImpl.java | 130 - .../ide/filetypes/FileTypeRegistryImpl.java | 151 - .../che/ide/hotkeys/HotKeyResources.java | 61 - .../dialog/HotKeysDialogPresenter.java | 245 - .../ide/hotkeys/dialog/HotKeysDialogView.java | 76 - .../hotkeys/dialog/HotKeysDialogViewImpl.java | 205 - .../dialog/HotKeysDialogViewImpl.ui.xml | 34 - .../che/ide/icon/DefaultIconsRegistrar.java | 38 - .../che/ide/icon/IconRegistryImpl.java | 57 - .../che/ide/imageviewer/ImageViewer.java | 193 - .../ide/imageviewer/ImageViewerProvider.java | 47 - .../ide/imageviewer/ImageViewerResources.java | 33 - .../ide/imageviewer/PreviewImageAction.java | 98 - .../jsonrpc/ExecAgentJsonRpcInitializer.java | 118 - .../che/ide/jsonrpc/JsonRpcModule.java | 50 - .../jsonrpc/WsAgentJsonRpcInitializer.java | 111 - .../jsonrpc/WsMasterJsonRpcInitializer.java | 243 - .../che/ide/keybinding/KeyBindingManager.java | 226 - .../che/ide/machine/MachineApiModule.java | 36 - .../che/ide/machine/MachineFailNotifier.java | 40 - .../che/ide/machine/MachineResources.java | 115 - .../ide/machine/ProcessesOutputRestorer.java | 88 - .../ide/machine/chooser/MachineChooser.java | 95 - .../machine/chooser/MachineChooserView.java | 43 - .../chooser/MachineChooserViewImpl.java | 141 - .../chooser/MachineChooserViewImpl.ui.xml | 20 - .../CurrentProjectEldestParentPathMacro.java | 81 - .../ide/macro/CurrentProjectPathMacro.java | 80 - .../CurrentProjectRelativePathMacro.java | 71 - .../ide/macro/DevMachineHostNameMacro.java | 73 - .../eclipse/che/ide/macro/MacroApiModule.java | 74 - .../che/ide/macro/MacroProcessorImpl.java | 93 - .../che/ide/macro/MacroRegistryImpl.java | 70 - .../macro/ServerAddressMacroRegistrar.java | 105 - .../che/ide/macro/WorkspaceNameMacro.java | 68 - .../ide/macro/WorkspaceNamespaceMacro.java | 64 - .../che/ide/macro/chooser/MacroChooser.java | 110 - .../ide/macro/chooser/MacroChooserView.java | 51 - .../macro/chooser/MacroChooserViewImpl.java | 140 - .../macro/chooser/MacroChooserViewImpl.ui.xml | 34 - .../org/eclipse/che/ide/menu/ContextMenu.java | 191 - .../che/ide/menu/MainMenuPresenter.java | 45 - .../eclipse/che/ide/menu/MainMenuView.java | 20 - .../che/ide/menu/MainMenuViewImpl.java | 330 - .../org/eclipse/che/ide/menu/MenuBarItem.java | 185 - .../eclipse/che/ide/menu/MenuResources.java | 50 - .../org/eclipse/che/ide/menu/PartMenu.java | 42 - .../ide/menu/StatusPanelGroupPresenter.java | 44 - .../che/ide/menu/StatusPanelGroupView.java | 20 - .../ide/menu/StatusPanelGroupViewImpl.java | 219 - .../navigation/NavigateToFilePresenter.java | 147 - .../ide/navigation/NavigateToFileView.java | 70 - .../navigation/NavigateToFileViewImpl.java | 356 - .../navigation/NavigateToFileViewImpl.ui.xml | 80 - .../AbstractNewResourceAction.java | 192 - .../che/ide/newresource/NewFileAction.java | 52 - .../che/ide/newresource/NewFolderAction.java | 144 - .../notification/NotificationApiModule.java | 30 - .../notification/NotificationContainer.java | 124 - .../NotificationContainerItem.java | 282 - .../notification/NotificationManagerImpl.java | 370 - .../notification/NotificationManagerView.java | 78 - .../NotificationManagerViewImpl.java | 91 - .../NotificationManagerViewImpl.ui.xml | 35 - .../ide/notification/NotificationPopup.java | 372 - .../notification/NotificationPopupStack.java | 143 - .../notification/NotificationResources.java | 86 - .../oauth/DefaultOAuthAuthenticatorImpl.java | 109 - .../OAuth2AuthenticatorRegistryImpl.java | 59 - .../eclipse/che/ide/oauth/OAuthApiModule.java | 38 - .../eclipse/che/ide/part/FocusManager.java | 121 - .../eclipse/che/ide/part/PartApiModule.java | 99 - .../che/ide/part/PartStackPresenter.java | 542 -- .../ide/part/PartStackPresenterFactory.java | 34 - .../che/ide/part/PartStackViewFactory.java | 33 - .../che/ide/part/PartStackViewImpl.java | 320 - .../che/ide/part/PartStackViewImpl.ui.xml | 298 - .../eclipse/che/ide/part/PartsComparator.java | 81 - .../ide/part/WorkBenchControllerFactory.java | 35 - .../che/ide/part/WorkBenchPartController.java | 64 - .../ide/part/WorkBenchPartControllerImpl.java | 95 - .../che/ide/part/WorkBenchResources.java | 49 - .../che/ide/part/editor/AddEditorTabMenu.java | 48 - .../part/editor/AddEditorTabMenuFactory.java | 23 - .../part/editor/EditorPartStackPresenter.java | 573 -- .../ide/part/editor/EditorPartStackView.java | 416 -- .../part/editor/EditorPartStackView.ui.xml | 90 - .../ide/part/editor/EditorTabContextMenu.java | 85 - .../editor/EditorTabContextMenuFactory.java | 32 - .../ide/part/editor/EmptyEditorsPanel.java | 264 - .../ide/part/editor/EmptyEditorsPanel.ui.xml | 85 - .../che/ide/part/editor/TabItemWithMarks.java | 28 - .../ide/part/editor/actions/CloseAction.java | 51 - .../part/editor/actions/CloseAllAction.java | 51 - .../actions/CloseAllExceptPinnedAction.java | 46 - .../actions/CloseAllTabsPaneAction.java | 50 - .../part/editor/actions/CloseOtherAction.java | 72 - .../part/editor/actions/ClosePaneAction.java | 46 - .../editor/actions/EditorAbstractAction.java | 95 - .../editor/actions/EditorSwitchAction.java | 56 - .../editor/actions/PinEditorTabAction.java | 43 - .../actions/ReopenClosedFileAction.java | 63 - .../actions/SplitHorizontallyAction.java | 54 - .../editor/actions/SplitVerticallyAction.java | 54 - .../actions/SwitchNextEditorAction.java | 50 - .../actions/SwitchPreviousEditorAction.java | 50 - .../event/CloseNonPinnedEditorsEvent.java | 60 - .../EditorMultiPartStackPresenter.java | 349 - .../multipart/EditorMultiPartStackView.java | 66 - .../EditorMultiPartStackViewImpl.java | 136 - .../multipart/EditorPlaceholderWidget.java | 40 - .../multipart/EditorPlaceholderWidget.ui.xml | 208 - .../editor/multipart/SplitEditorPartView.java | 67 - .../multipart/SplitEditorPartViewFactory.java | 31 - .../multipart/SplitEditorPartViewImpl.java | 234 - .../editor/recent/ClearRecentListAction.java | 55 - .../editor/recent/OpenRecentFileViewImpl.java | 201 - .../recent/OpenRecentFileViewImpl.ui.xml | 17 - .../editor/recent/OpenRecentFilesAction.java | 54 - .../recent/OpenRecentFilesPresenter.java | 72 - .../editor/recent/OpenRecentFilesView.java | 41 - .../part/editor/recent/RecentFileAction.java | 64 - .../recent/RecentFileActionFactory.java | 29 - .../part/editor/recent/RecentFileList.java | 28 - .../part/editor/recent/RecentFileStore.java | 224 - .../ide/part/editor/recent/RecentList.java | 62 - .../project/DefaultNodeInterceptor.java | 41 - .../part/explorer/project/EmptyTreePanel.java | 82 - .../explorer/project/NodeTypeComparator.java | 58 - .../ProjectExplorerPlaceholderWidget.java | 29 - .../ProjectExplorerPlaceholderWidget.ui.xml | 107 - .../project/ProjectExplorerPresenter.java | 569 -- .../ProjectExplorerStateComponent.java | 159 - .../project/ProjectExplorerTreeExpander.java | 95 - .../explorer/project/ProjectExplorerView.java | 102 - .../project/ProjectExplorerViewImpl.java | 288 - .../project/TreeResourceRevealer.java | 282 - .../ExplorerCurrentFileBaseNameMacro.java | 130 - .../macro/ExplorerCurrentFileNameMacro.java | 129 - .../ExplorerCurrentFileParentPathMacro.java | 136 - .../macro/ExplorerCurrentFilePathMacro.java | 134 - .../ExplorerCurrentFileRelativePathMacro.java | 130 - .../ExplorerCurrentProjectNameMacro.java | 94 - .../ExplorerCurrentProjectTypeMacro.java | 94 - .../synchronize/ChangeLocationWidget.java | 46 - .../ProjectConfigSynchronized.java | 170 - .../general/AbstractPerspective.java | 524 -- .../general/PerspectiveViewImpl.java | 272 - .../general/PerspectiveViewImpl.ui.xml | 62 - .../project/ProjectPerspective.java | 125 - .../che/ide/part/widgets/TabItemFactory.java | 30 - .../widgets/editortab/EditorTabWidget.java | 362 - .../widgets/editortab/EditorTabWidget.ui.xml | 233 - .../part/widgets/panemenu/EditorPaneMenu.java | 46 - .../widgets/panemenu/EditorPaneMenuItem.java | 40 - .../panemenu/EditorPaneMenuItemFactory.java | 46 - .../panemenu/EditorPaneMenuWidget.java | 145 - .../panemenu/EditorPaneMenuWidget.ui.xml | 87 - .../panemenu/PaneMenuActionItemWidget.java | 76 - .../panemenu/PaneMenuActionItemWidget.ui.xml | 83 - .../panemenu/PaneMenuTabItemWidget.java | 96 - .../panemenu/PaneMenuTabItemWidget.ui.xml | 123 - .../part/widgets/partbutton/PartButton.java | 35 - .../widgets/partbutton/PartButtonWidget.java | 228 - .../partbutton/PartButtonWidget.ui.xml | 41 - .../ide/preferences/PreferencesApiModule.java | 48 - .../PreferencesLocalizationConstants.java | 23 - .../preferences/PreferencesManagerImpl.java | 109 - .../ide/preferences/PreferencesPresenter.java | 259 - .../che/ide/preferences/PreferencesView.java | 84 - .../ide/preferences/PreferencesViewImpl.java | 184 - .../preferences/PreferencesViewImpl.ui.xml | 32 - .../che/ide/preferences/StyleInjector.java | 53 - .../extensions/ExtensionManagerPresenter.java | 68 - .../extensions/ExtensionManagerView.java | 24 - .../extensions/ExtensionManagerViewImpl.java | 117 - .../ExtensionManagerViewImpl.ui.xml | 101 - .../IdeGeneralPreferencesPresenter.java | 116 - .../general/IdeGeneralPreferencesView.java | 33 - .../IdeGeneralPreferencesViewImpl.java | 95 - .../IdeGeneralPreferencesViewImpl.ui.xml | 48 - .../processes/CommandNodeRenderStrategy.java | 143 - .../processes/DisplayMachineOutputEvent.java | 52 - .../processes/HasPreviewSshClickHandler.java | 30 - .../ide/processes/HasStopProcessHandler.java | 30 - .../processes/MachineNodeRenderStrategy.java | 146 - .../che/ide/processes/NewTerminalAction.java | 90 - .../ide/processes/OpenInTerminalAction.java | 81 - .../ide/processes/PreviewSshClickHandler.java | 30 - .../che/ide/processes/ProcessDataAdapter.java | 114 - .../che/ide/processes/ProcessTreeNode.java | 182 - .../ProcessTreeNodeRenderStrategy.java | 43 - .../ProcessTreeNodeSelectedEvent.java | 55 - .../ide/processes/ProcessTreeRenderer.java | 102 - .../che/ide/processes/ProcessesGinModule.java | 53 - .../che/ide/processes/StopProcessHandler.java | 36 - .../processes/TerminalNodeRenderStrategy.java | 126 - .../che/ide/processes/actions/AddTabMenu.java | 187 - .../processes/actions/AddTabMenuFactory.java | 23 - .../processes/actions/CloseConsoleAction.java | 85 - .../actions/ConsoleTreeContextMenu.java | 42 - .../ConsoleTreeContextMenuFactory.java | 30 - .../actions/DisplayMachineOutputAction.java | 70 - .../processes/actions/PreviewSSHAction.java | 59 - .../processes/actions/ReRunProcessAction.java | 81 - .../processes/actions/StopProcessAction.java | 81 - .../loading/ShowWorkspaceStatusAction.java | 38 - .../loading/WorkspaceLoadingTracker.java | 22 - .../loading/WorkspaceLoadingTrackerImpl.java | 349 - .../loading/WorkspaceLoadingTrackerView.java | 70 - .../WorkspaceLoadingTrackerViewImpl.java | 653 -- .../WorkspaceLoadingTrackerViewImpl.ui.xml | 360 - .../processes/monitoring/MachineMonitors.java | 98 - .../processes/monitoring/MonitorWidget.java | 111 - .../processes/monitoring/MonitorWidget.ui.xml | 203 - .../panel/EnvironmentOutputEvent.java | 63 - .../panel/ProcessesPanelPresenter.java | 1505 ---- .../processes/panel/ProcessesPanelView.java | 200 - .../panel/ProcessesPanelViewImpl.java | 502 -- .../panel/ProcessesPanelViewImpl.ui.xml | 64 - .../CellTableRuntimeInfoWidgetFactory.java | 250 - .../ContextBasedRuntimeInfoProvider.java | 110 - .../ide/processes/runtime/RuntimeInfo.java | 104 - .../runtime/RuntimeInfoGinModule.java | 29 - .../runtime/RuntimeInfoLocalization.java | 47 - .../runtime/RuntimeInfoProvider.java | 32 - .../runtime/RuntimeInfoWidgetFactory.java | 33 - .../runtime/ShowRuntimeInfoAction.java | 67 - .../che/ide/project/ProjectApiModule.java | 80 - .../che/ide/project/ProjectServiceClient.java | 543 -- .../ProjectTreeNotificationsSubscriber.java | 67 - .../project/ResolvingProjectStateHolder.java | 69 - .../ResolvingProjectStateHolderRegistry.java | 33 - ...solvingProjectStateHolderRegistryImpl.java | 61 - .../ide/project/WorkspaceProjectsSyncer.java | 51 - .../che/ide/project/node/SyntheticNode.java | 115 - .../node/SyntheticNodeUpdateEvent.java | 54 - .../node/icon/DockerfileIconProvider.java | 44 - .../project/node/icon/FileIconProvider.java | 52 - .../project/node/icon/NodeIconProvider.java | 30 - .../ide/project/shared/NodesResources.java | 33 - .../ide/projectimport/AbstractImporter.java | 82 - .../projectimport/InitialProjectImporter.java | 304 - .../ProjectImporterResource.java | 30 - .../wizard/ImportProgressJsonRpcHandler.java | 54 - ...tProjectNotificationSubscriberFactory.java | 23 - .../projectimport/wizard/ImportWizard.java | 42 - .../wizard/ImportWizardFactory.java | 24 - .../wizard/ImportWizardRegistry.java | 57 - .../ProjectImportOutputJsonRpcNotifier.java | 100 - .../projectimport/wizard/ProjectImporter.java | 256 - .../wizard/ProjectNotificationSubscriber.java | 52 - .../projectimport/wizard/ProjectResolver.java | 106 - .../wizard/mainpage/MainPagePresenter.java | 233 - .../wizard/mainpage/MainPageView.java | 58 - .../wizard/mainpage/MainPageViewImpl.java | 145 - .../wizard/mainpage/MainPageViewImpl.ui.xml | 90 - .../ImportProjectWizardPresenter.java | 212 - .../presenter/ImportProjectWizardView.java | 85 - .../ImportProjectWizardViewImpl.java | 124 - .../ImportProjectWizardViewImpl.ui.xml | 34 - .../zip/ZipImportWizardRegistrar.java | 47 - .../zip/ZipImporterPagePresenter.java | 175 - .../zip/ZipImporterPageView.java | 94 - .../zip/ZipImporterPageViewImpl.java | 192 - .../zip/ZipImporterPageViewImpl.ui.xml | 61 - .../BlankProjectWizardRegistrar.java | 52 - .../ProjectTemplateRegistryImpl.java | 86 - .../projecttype/ProjectTypeRegistryImpl.java | 109 - .../PreSelectedProjectTypeManagerImpl.java | 33 - .../ide/projecttype/wizard/ProjectWizard.java | 238 - .../wizard/ProjectWizardFactory.java | 25 - .../wizard/ProjectWizardRegistry.java | 77 - .../wizard/ProjectWizardResources.java | 22 - .../CategoriesPagePresenter.java | 296 - .../categoriespage/CategoriesPageView.java | 69 - .../CategoriesPageViewImpl.java | 485 -- .../CategoriesPageViewImpl.ui.xml | 108 - .../presenter/ProjectWizardPresenter.java | 268 - .../wizard/presenter/ProjectWizardView.java | 54 - .../presenter/ProjectWizardViewImpl.java | 166 - .../presenter/ProjectWizardViewImpl.ui.xml | 41 - .../ide/reference/ShowReferencePresenter.java | 58 - .../che/ide/reference/ShowReferenceView.java | 34 - .../ide/reference/ShowReferenceViewImpl.java | 84 - .../reference/ShowReferenceViewImpl.ui.xml | 40 - .../ide/resources/DeleteResourceManager.java | 311 - .../resources/ProjectTreeChangeHandler.java | 287 - ...ProjectTreeStateNotificationOperation.java | 45 - .../che/ide/resources/ResourceApiModule.java | 63 - .../resources/action/CopyResourceAction.java | 94 - .../resources/action/CutResourceAction.java | 94 - .../resources/action/PasteResourceAction.java | 94 - .../action/RevealResourceAction.java | 133 - .../resources/impl/ClipboardManagerImpl.java | 171 - .../che/ide/resources/impl/ContainerImpl.java | 227 - .../ide/resources/impl/CopyPasteManager.java | 331 - .../che/ide/resources/impl/FileImpl.java | 170 - .../che/ide/resources/impl/FolderImpl.java | 75 - .../resources/impl/InMemoryResourceStore.java | 246 - .../che/ide/resources/impl/ProjectImpl.java | 214 - .../ide/resources/impl/ResourceDeltaImpl.java | 144 - .../che/ide/resources/impl/ResourceImpl.java | 288 - .../ide/resources/impl/ResourceManager.java | 1309 ---- .../che/ide/resources/impl/ResourceStore.java | 124 - .../resources/reveal/RevealResourceEvent.java | 128 - .../selector/SelectPathPresenter.java | 106 - .../resources/selector/SelectPathView.java | 35 - .../selector/SelectPathViewImpl.java | 228 - .../selector/SelectPathViewImpl.ui.xml | 17 - .../selector/SelectionPathHandler.java | 21 - .../che/ide/resources/tree/ContainerNode.java | 44 - .../che/ide/resources/tree/FileNode.java | 58 - .../che/ide/resources/tree/ResourceNode.java | 270 - .../tree/SkipHiddenNodesInterceptor.java | 51 - .../resources/tree/SkipLeafsInterceptor.java | 49 - .../ide/search/FullTextSearchPresenter.java | 170 - .../che/ide/search/FullTextSearchView.java | 83 - .../ide/search/FullTextSearchViewImpl.java | 201 - .../ide/search/FullTextSearchViewImpl.ui.xml | 113 - .../search/factory/FindResultNodeFactory.java | 42 - .../presentation/FindResultPresenter.java | 186 - .../search/presentation/FindResultView.java | 67 - .../presentation/FindResultViewImpl.java | 163 - .../presentation/FindResultViewImpl.ui.xml | 66 - .../search/presentation/FoundItemNode.java | 125 - .../presentation/FoundOccurrenceNode.java | 172 - .../selectpath/FolderNodeInterceptor.java | 46 - .../selectpath/SelectPathPresenter.java | 77 - .../ide/search/selectpath/SelectPathView.java | 41 - .../search/selectpath/SelectPathViewImpl.java | 139 - .../selectpath/SelectPathViewImpl.ui.xml | 28 - .../che/ide/selection/SelectionAgentImpl.java | 75 - .../che/ide/ssh/SshServiceClientImpl.java | 88 - .../AppStateBackwardCompatibility.java | 108 - .../statepersistance/AppStateConstants.java | 33 - .../ide/statepersistance/AppStateManager.java | 195 - .../AppStateServiceClientImpl.java | 61 - .../statepersistance/AppStateSyncWriter.java | 62 - .../ide/statepersistance/AppStateTracker.java | 167 - .../PersistenceApiModule.java | 37 - .../StateComponentRegistry.java | 48 - .../ide/terminal/AddTerminalClickHandler.java | 29 - .../CustomKeyEventTerminalHandler.java | 43 - .../terminal/HasAddTerminalClickHandler.java | 30 - .../che/ide/terminal/TerminalFactory.java | 37 - .../che/ide/terminal/TerminalGeometryJso.java | 32 - .../TerminalInitializePromiseHolder.java | 33 - .../che/ide/terminal/TerminalInitializer.java | 60 - .../eclipse/che/ide/terminal/TerminalJso.java | 105 - .../che/ide/terminal/TerminalPresenter.java | 321 - .../che/ide/terminal/TerminalView.java | 64 - .../che/ide/terminal/TerminalViewImpl.java | 143 - .../che/ide/terminal/TerminalViewImpl.ui.xml | 51 - .../che/ide/terminal/addons/FitAddonJso.java | 32 - .../terminal/options/TerminalOptionsJso.java | 53 - .../terminal/options/TerminalThemeJso.java | 44 - .../org/eclipse/che/ide/theme/DarkTheme.java | 1889 ----- .../org/eclipse/che/ide/theme/LightTheme.java | 1861 ----- .../eclipse/che/ide/theme/ThemeAgentImpl.java | 109 - .../eclipse/che/ide/theme/ThemeApiModule.java | 32 - .../ide/upload/file/UploadFilePresenter.java | 186 - .../che/ide/upload/file/UploadFileView.java | 87 - .../ide/upload/file/UploadFileViewImpl.java | 164 - .../ide/upload/file/UploadFileViewImpl.ui.xml | 49 - .../folder/UploadFolderFromZipPresenter.java | 139 - .../folder/UploadFolderFromZipView.java | 97 - .../folder/UploadFolderFromZipViewImpl.java | 181 - .../folder/UploadFolderFromZipViewImpl.ui.xml | 55 - .../ide/user/AskCredentialsDialogImpl.java | 123 - .../ide/user/AskCredentialsDialogImpl.ui.xml | 37 - .../workspace/CurrentWorkspaceManager.java | 113 - .../EphemeralStateStatusBarItem.java | 108 - .../ide/workspace/RestartingStateHolder.java | 28 - .../ide/workspace/StartWorkspaceAction.java | 53 - .../workspace/StartWorkspaceNotification.java | 102 - .../StartWorkspaceNotification.ui.xml | 45 - .../workspace/StartWsAgentNotification.java | 123 - .../workspace/StartWsAgentNotification.ui.xml | 47 - .../ide/workspace/StopWorkspaceAction.java | 66 - .../che/ide/workspace/WorkspaceApiModule.java | 26 - .../che/ide/workspace/WorkspacePresenter.java | 206 - .../ide/workspace/WorkspaceServiceClient.java | 191 - .../WorkspaceStatusNotification.java | 245 - .../che/ide/workspace/WorkspaceView.java | 49 - .../che/ide/workspace/WorkspaceViewImpl.java | 103 - .../ide/workspace/WorkspaceViewImpl.ui.xml | 62 - .../activity/ActivityTrackingExtension.java | 53 - .../workspace/events/InstallerLogHandler.java | 38 - .../events/InstallerStatusEventHandler.java | 60 - .../events/MachineStatusChangedEvent.java | 53 - .../events/MachineStatusEventHandler.java | 116 - .../workspace/events/RuntimeLogHandler.java | 38 - .../events/ServerStatusEventHandler.java | 114 - .../events/WorkspaceEventsModule.java | 28 - .../events/WorkspaceStatusEventHandler.java | 92 - ide/che-core-ide-app/src/main/module.gwt.xml | 40 - .../resources/org/eclipse/che/ide/Core.css | 831 --- .../ide/CoreLocalizationConstant.properties | 613 -- .../AboutLocalizationConstant.properties | 17 - .../org/eclipse/che/ide/actions/about.svg | 37 - .../org/eclipse/che/ide/actions/copy.svg | 27 - .../org/eclipse/che/ide/actions/cut.svg | 27 - .../org/eclipse/che/ide/actions/delete.svg | 23 - .../org/eclipse/che/ide/actions/evaluate.svg | 29 - .../eclipse/che/ide/actions/find-actions.svg | 28 - .../org/eclipse/che/ide/actions/find.svg | 28 - .../org/eclipse/che/ide/actions/format.svg | 27 - .../che/ide/actions/fullscreen-icon.svg | 30 - .../org/eclipse/che/ide/actions/import.svg | 23 - .../eclipse/che/ide/actions/importGroup.svg | 23 - .../ide/actions/importProjectFromLocation.svg | 82 - .../che/ide/actions/navigate-to-file.svg | 25 - .../eclipse/che/ide/actions/new-resource.svg | 27 - .../eclipse/che/ide/actions/newProject.svg | 24 - .../org/eclipse/che/ide/actions/paste.svg | 24 - .../eclipse/che/ide/actions/preferences.svg | 24 - .../che/ide/actions/project-configuration.svg | 29 - .../org/eclipse/che/ide/actions/redo.svg | 23 - .../org/eclipse/che/ide/actions/refresh.svg | 24 - .../org/eclipse/che/ide/actions/rename.svg | 29 - .../org/eclipse/che/ide/actions/save.svg | 22 - .../che/ide/actions/showHiddenFiles.svg | 28 - .../org/eclipse/che/ide/actions/undo.svg | 23 - .../eclipse/che/ide/actions/upload-file.svg | 24 - .../eclipse/che/ide/actions/zip-folder.svg | 27 - .../resources/org/eclipse/che/ide/blank.svg | 19 - .../command/actions/ActionMessages.properties | 16 - .../command/editor/EditorMessages.properties | 35 - .../eclipse/che/ide/command/editor/styles.css | 22 - .../command/execute/ExecMessages.properties | 13 - .../explorer/ExplorerMessages.properties | 20 - .../command/explorer/add-command-button.svg | 21 - .../explorer/duplicate-command-button.svg | 25 - .../ide/command/explorer/explorer-part.svg | 26 - .../explorer/remove-command-button.svg | 23 - .../che/ide/command/explorer/styles.css | 81 - .../ide/command/goal/GoalMessages.properties | 13 - .../org/eclipse/che/ide/command/magnifier.svg | 20 - .../palette/PaletteMessages.properties | 20 - .../che/ide/command/palette/styles.css | 21 - .../producer/ProducerMessages.properties | 14 - .../toolbar/ToolbarMessages.properties | 22 - .../che/ide/command/toolbar/button.css | 38 - .../ide/command/toolbar/processes/styles.css | 171 - .../type/CommandTypeMessages.properties | 14 - .../eclipse/che/ide/command/type/styles.css | 14 - .../org/eclipse/che/ide/console/clear.svg | 26 - .../org/eclipse/che/ide/debug/breakpoint.css | 72 - .../eclipse/che/ide/defaulticons/default.svg | 19 - .../org/eclipse/che/ide/defaulticons/file.svg | 31 - .../eclipse/che/ide/defaulticons/folder.svg | 26 - .../che/ide/defaulticons/image-icon.svg | 24 - .../org/eclipse/che/ide/defaulticons/json.svg | 32 - .../org/eclipse/che/ide/defaulticons/md.svg | 24 - .../eclipse/che/ide/defaulticons/project.svg | 19 - .../che/ide/defaulticons/projectFolder.svg | 24 - .../EditorPrefLocalizationConstant.properties | 18 - .../org/eclipse/che/ide/factory/Factory.css | 40 - .../org/eclipse/che/ide/factory/cog-icon.svg | 19 - .../org/eclipse/che/ide/factory/execute.svg | 21 - .../eclipse/che/ide/factory/export-config.svg | 31 - .../eclipse/che/ide/factory/import-config.svg | 31 - .../eclipse/che/ide/hotkeys/HotKeysCss.css | 77 - .../org/eclipse/che/ide/hotkeys/find-icon.svg | 20 - .../che/ide/hotkeys/print_template.html | 58 - .../che/ide/imageviewer/image-viewer-bg.png | Bin 1281 -> 0 bytes .../che/ide/imageviewer/imageViewer.css | 20 - .../che/ide/machine/console/clear-logs.svg | 26 - .../org/eclipse/che/ide/machine/cube.svg | 21 - .../che/ide/machine/custom-command-type.svg | 20 - .../eclipse/che/ide/machine/edit-commands.svg | 26 - .../eclipse/che/ide/machine/machine-cube.svg | 36 - .../org/eclipse/che/ide/machine/machine.css | 238 - .../che/ide/machine/process/add-terminal.svg | 26 - .../che/ide/machine/process/clear-outputs.svg | 21 - .../che/ide/machine/process/line-wrap.svg | 21 - .../che/ide/machine/process/output-icon.svg | 21 - .../che/ide/machine/process/re-run.svg | 20 - .../ide/machine/process/scroll-to-bottom.svg | 21 - .../eclipse/che/ide/machine/process/stop.svg | 19 - .../che/ide/machine/process/terminal-icon.svg | 21 - .../machine/process/terminal-tree-icon.svg | 21 - .../che/ide/machine/project-perspective.svg | 25 - .../org/eclipse/che/ide/machine/remote.svg | 29 - .../org/eclipse/che/ide/menu/menu.css | 116 - .../org/eclipse/che/ide/menu/submenu.svg | 19 - .../org/eclipse/che/ide/notification/fail.svg | 25 - .../che/ide/notification/notification.css | 312 - .../eclipse/che/ide/notification/progress.svg | 34 - .../eclipse/che/ide/notification/success.svg | 17 - .../eclipse/che/ide/notification/warning.svg | 25 - .../che/ide/panel/panel-selector-bottom.svg | 25 - .../ide/panel/panel-selector-full-editor.svg | 24 - .../ide/panel/panel-selector-left-bottom.svg | 30 - .../panel-selector-left-right-bottom.svg | 27 - .../che/ide/panel/panel-selector-left.svg | 25 - .../che/ide/panel/panel-selector-right.svg | 25 - .../org/eclipse/che/ide/part/che-logo.svg | 23 - .../che/ide/part/editor/recent/recent.css | 22 - .../eclipse/che/ide/part/events-part-icon.svg | 19 - .../eclipse/che/ide/part/output-part-icon.svg | 19 - .../part/perspectives/general/WorkBench.css | 71 - .../ide/part/project-explorer-part-icon.svg | 34 - ...referencesLocalizationConstants.properties | 17 - .../ide/processes/runtime/TableResources.css | 81 - .../che/ide/project/node/icon/dockerfile.svg | 229 - ...ectExplorerLocalizationConstant.properties | 34 - .../eclipse/che/ide/project/shared/file.svg | 31 - .../ide/project/shared/hiddenSimpleFolder.svg | 22 - .../project/shared/notValidProjectFolder.svg | 30 - .../che/ide/project/shared/projectFolder.svg | 24 - .../che/ide/project/shared/simpleFolder.svg | 21 - .../che/ide/projectimport/ImporterPage.css | 87 - .../che/ide/projecttype/wizard/Wizard.css | 16 - .../wizard/categoriespage/MainPage.css | 98 - .../ide/resources/selector/pathSelector.css | 22 - .../org/eclipse/che/ide/run/debug.svg | 38 - .../resources/org/eclipse/che/ide/run/run.svg | 38 - .../org/eclipse/che/ide/searchMatch.svg | 102 - .../che/ide/texteditor/multi-file-icon.svg | 24 - .../org/eclipse/che/ide/workspace/recipe.svg | 25 - .../resources/org/eclipse/che/ide/xml/xml.svg | 26 - .../org/eclipse/che/public/activity.js | 74 - .../che/ide/actions/ActionManagerTest.java | 56 - .../ConvertFolderToProjectActionTest.java | 138 - .../che/ide/actions/DefaultGroupTest.java | 18 - .../che/ide/actions/DownloadWsActionTest.java | 103 - .../ide/actions/FullTextSearchActionTest.java | 87 - .../ide/actions/LinkWithEditorActionTest.java | 114 - .../che/ide/actions/RenameItemActionTest.java | 151 - .../che/ide/actions/RunCommandActionTest.java | 78 - .../ide/actions/ShowReferenceActionTest.java | 91 - .../ide/actions/StartUpActionsParserTest.java | 59 - .../common/CollapseTreeActionTest.java | 81 - .../actions/common/ExpandTreeActionTest.java | 81 - .../editor/CommandEditorProviderTest.java | 53 - .../ide/command/editor/CommandEditorTest.java | 228 - .../editor/page/goal/GoalPageTest.java | 173 - .../page/goal/GoalPageViewImplTest.java | 94 - .../editor/page/name/NamePageTest.java | 96 - .../page/name/NamePageViewImplTest.java | 78 - .../page/project/ProjectSwitcherTest.java | 69 - .../editor/page/project/ProjectsPageTest.java | 151 - .../project/ProjectsPageViewImplTest.java | 72 - .../CommandsExplorerPresenterTest.java | 334 - .../palette/CommandsPalettePresenterTest.java | 148 - .../ShowCommandsPaletteActionTest.java | 45 - .../commands/ExecuteCommandPresenterTest.java | 102 - .../commands/button/AbstractMenuItemTest.java | 52 - .../commands/button/CommandItemTest.java | 44 - ...ExecuteCommandButtonItemsProviderTest.java | 105 - .../commands/button/MachineItemTest.java | 52 - .../toolbar/previews/PreviewUrlTest.java | 68 - .../type/custom/CustomCommandTypeTest.java | 42 - .../type/custom/CustomPagePresenterTest.java | 79 - .../ide/console/BaseOutputCustomizerTest.java | 109 - .../ide/console/CPPOutputCustomizerTest.java | 133 - .../console/CSharpOutputCustomizerTest.java | 126 - .../console/CompoundOutputCustomizerTest.java | 164 - .../ide/console/JavaOutputCustomizerTest.java | 127 - .../che/ide/devmode/DevModeOffActionTest.java | 40 - .../ide/devmode/DevModeSetUpActionTest.java | 40 - .../che/ide/devmode/GWTDevModeTest.java | 109 - .../editor/macro/AbstractEditorMacroTest.java | 68 - .../EditorCurrentFileBaseNameMacroTest.java | 66 - .../macro/EditorCurrentFileNameMacroTest.java | 65 - .../macro/EditorCurrentFilePathMacroTest.java | 68 - ...ditorCurrentFileRelativePathMacroTest.java | 66 - .../EditorCurrentProjectNameMacroTest.java | 66 - .../EditorCurrentProjectTypeMacroTest.java | 66 - .../EditorContentSynchronizerImplTest.java | 243 - .../EditorGroupSynchronizationImplTest.java | 319 - .../ide/keybinding/KeyBindingManagerTest.java | 91 - .../che/ide/macro/WorkspaceNameMacroTest.java | 71 - .../NavigateToFilePresenterTest.java | 81 - .../AbstractNewResourceActionTest.java | 110 - .../ide/newresource/NewFolderActionTest.java | 108 - .../NotificationManagerImplTest.java | 163 - .../che/ide/part/PartStackPresenterTest.java | 275 - .../che/ide/part/PartStackViewImplTest.java | 110 - .../che/ide/part/TestFocusManager.java | 99 - .../editor/EditorPartStackPresenterTest.java | 446 -- .../EditorMultiPartStackPresenterTest.java | 210 - .../macro/AbstractExplorerMacroTest.java | 121 - .../ExplorerCurrentFileBaseNameMacroTest.java | 74 - .../ExplorerCurrentFileNameMacroTest.java | 72 - ...xplorerCurrentFileParentPathMacroTest.java | 80 - .../ExplorerCurrentFilePathMacroTest.java | 80 - ...lorerCurrentFileRelativePathMacroTest.java | 73 - .../ExplorerCurrentProjectNameMacroTest.java | 72 - .../ExplorerCurrentProjectTypeMacroTest.java | 72 - .../synchronize/ChangeLocationWidgetTest.java | 47 - .../ProjectConfigSynchronizedTest.java | 245 - .../AbstractPerspectivePersistenceTest.java | 260 - .../general/AbstractPerspectiveTest.java | 302 - .../general/PerspectiveManagerTest.java | 70 - .../project/ProjectPerspectiveTest.java | 126 - .../editortab/EditorTabWidgetTest.java | 187 - .../partbutton/PartButtonWidgetTest.java | 62 - .../ide/processes/NewTerminalActionTest.java | 55 - .../ContextBasedRuntimeInfoProviderTest.java | 128 - .../ide/project/ProjectServiceClientTest.java | 404 - .../wizard/ImportWizardTest.java | 43 - ...rojectImportOutputJsonRpcNotifierTest.java | 159 - .../wizard/ProjectImporterTest.java | 105 - .../zip/ZipImporterPagePresenterTest.java | 170 - .../BlankProjectWizardRegistrarTest.java | 43 - ...PreSelectedProjectTypeManagerImplTest.java | 60 - .../projecttype/wizard/ProjectWizardTest.java | 332 - .../reference/ShowReferencePresenterTest.java | 82 - .../search/FullTextSearchPresenterTest.java | 225 - .../presentation/FindResultPresenterTest.java | 212 - .../selectpath/SelectPathPresenterTest.java | 62 - .../che/ide/selection/TestSelectionAgent.java | 174 - .../statepersistance/AppStateManagerTest.java | 169 - .../ide/terminal/TerminalViewImplTest.java | 43 - .../upload/file/UploadFileViewImplTest.java | 119 - .../workspace/StopWorkspaceActionTest.java | 78 - .../WorkspacePresenterPersistenceTest.java | 108 - ide/che-core-ide-generators/pom.xml | 108 - .../DtoFactoryVisitorRegistryGenerator.java | 194 - .../che/util/ExtensionManagerGenerator.java | 198 - .../che/util/ExtensionRegistryGenerator.java | 271 - .../org/eclipse/che/util/GeneratorUtils.java | 98 - .../che/util/IDEInjectorGenerator.java | 152 - ...sourcesReflectionConfigurationBuilder.java | 56 - .../util/TestExtensionManagerGenerator.java | 64 - .../eclipse/che/util/TestGeneratorUtils.java | 132 - .../src/test/resources/logback-test.xml | 27 - ide/che-core-ide-stacks/pom.xml | 42 - .../resources/stacks-images/type-android.svg | 21 - .../stacks-images/type-apache-camel.svg | 204 - .../resources/stacks-images/type-blank.svg | 20 - .../resources/stacks-images/type-ceylon.svg | 1439 ---- .../main/resources/stacks-images/type-che.svg | 25 - .../resources/stacks-images/type-che7.svg | 100 - .../main/resources/stacks-images/type-cpp.svg | 38 - .../resources/stacks-images/type-dotnet.svg | 22 - .../main/resources/stacks-images/type-go.svg | 18 - .../resources/stacks-images/type-hadoop.svg | 22 - .../stacks-images/type-java-mysql.svg | 38 - .../resources/stacks-images/type-java.svg | 32 - .../resources/stacks-images/type-node.svg | 22 - .../main/resources/stacks-images/type-php.svg | 24 - .../resources/stacks-images/type-python.svg | 16 - .../resources/stacks-images/type-ruby.svg | 16 - .../stacks-images/type-spring-boot.svg | 22 - .../resources/stacks-images/type-theia.svg | 53 - .../resources/stacks-images/type-zend.svg | 72 - .../src/main/resources/stacks.json | 3105 -------- ide/che-core-ide-templates/pom.xml | 25 - .../src/main/resources/samples.json | 1725 ----- ide/che-core-ide-ui/pom.xml | 123 - .../org/eclipse/che/ide/ui/Constants.java | 24 - .../org/eclipse/che/ide/ui/ElementWidget.java | 27 - .../org/eclipse/che/ide/ui/Resources.java | 27 - .../eclipse/che/ide/ui/ShiftableTextArea.java | 41 - .../eclipse/che/ide/ui/SplitterFancyUtil.java | 68 - .../java/org/eclipse/che/ide/ui/Styles.java | 22 - .../java/org/eclipse/che/ide/ui/TextBox.java | 39 - .../che/ide/ui/UILocalizationConstant.java | 32 - .../che/ide/ui/button/ButtonAlignment.java | 22 - .../che/ide/ui/button/ButtonResources.java | 30 - .../che/ide/ui/button/ConsoleButton.java | 34 - .../ide/ui/button/ConsoleButtonFactory.java | 28 - .../che/ide/ui/button/ConsoleButtonImpl.java | 119 - .../ide/ui/button/ConsoleButtonImpl.ui.xml | 43 - .../buttonLoader/ButtonLoaderResources.java | 36 - .../ide/ui/cellview/CellTableResources.java | 23 - .../ide/ui/cellview/CellTreeResources.java | 24 - .../ide/ui/cellview/DataGridResources.java | 24 - .../che/ide/ui/dialogs/CancelCallback.java | 24 - .../che/ide/ui/dialogs/DialogFactory.java | 293 - .../askcredentials/AskCredentialsDialog.java | 31 - .../ide/ui/dialogs/choice/ChoiceDialog.java | 23 - .../ui/dialogs/choice/ChoiceDialogFooter.java | 105 - .../dialogs/choice/ChoiceDialogFooter.ui.xml | 51 - .../dialogs/choice/ChoiceDialogPresenter.java | 177 - .../ui/dialogs/choice/ChoiceDialogView.java | 72 - .../dialogs/choice/ChoiceDialogViewImpl.java | 121 - .../choice/ChoiceDialogViewImpl.ui.xml | 45 - .../ui/dialogs/confirm/ConfirmCallback.java | 24 - .../ide/ui/dialogs/confirm/ConfirmDialog.java | 24 - .../dialogs/confirm/ConfirmDialogFooter.java | 117 - .../confirm/ConfirmDialogFooter.ui.xml | 52 - .../confirm/ConfirmDialogPresenter.java | 133 - .../ui/dialogs/confirm/ConfirmDialogView.java | 63 - .../confirm/ConfirmDialogViewImpl.java | 106 - .../confirm/ConfirmDialogViewImpl.ui.xml | 52 - .../ide/ui/dialogs/input/InputCallback.java | 27 - .../che/ide/ui/dialogs/input/InputDialog.java | 35 - .../ui/dialogs/input/InputDialogFooter.java | 108 - .../ui/dialogs/input/InputDialogFooter.ui.xml | 52 - .../dialogs/input/InputDialogPresenter.java | 185 - .../ide/ui/dialogs/input/InputDialogView.java | 83 - .../ui/dialogs/input/InputDialogViewImpl.java | 160 - .../dialogs/input/InputDialogViewImpl.ui.xml | 53 - .../ide/ui/dialogs/input/InputValidator.java | 49 - .../ide/ui/dialogs/message/MessageDialog.java | 24 - .../dialogs/message/MessageDialogFooter.java | 87 - .../message/MessageDialogFooter.ui.xml | 52 - .../message/MessageDialogPresenter.java | 90 - .../ui/dialogs/message/MessageDialogView.java | 49 - .../message/MessageDialogViewImpl.java | 96 - .../message/MessageDialogViewImpl.ui.xml | 41 - .../che/ide/ui/dropdown/BaseListItem.java | 42 - .../che/ide/ui/dropdown/DropdownList.java | 234 - .../che/ide/ui/dropdown/DropdownList.ui.xml | 67 - .../che/ide/ui/dropdown/DropdownListItem.java | 19 - .../ui/dropdown/DropdownListItemRenderer.java | 34 - .../ui/dropdown/DropdownListResources.java | 33 - .../che/ide/ui/dropdown/DropdownMenu.java | 105 - .../ide/ui/dropdown/StringItemRenderer.java | 53 - .../che/ide/ui/list/CategoriesList.java | 175 - .../org/eclipse/che/ide/ui/list/Category.java | 56 - .../che/ide/ui/list/CategoryNodeElement.java | 266 - .../che/ide/ui/list/CategoryRenderer.java | 50 - .../che/ide/ui/menubutton/ActionHandler.java | 23 - .../che/ide/ui/menubutton/ItemsList.java | 153 - .../che/ide/ui/menubutton/ItemsProvider.java | 47 - .../che/ide/ui/menubutton/MenuButton.java | 187 - .../che/ide/ui/menubutton/MenuItem.java | 18 - .../che/ide/ui/multisplitpanel/SubPanel.java | 124 - .../ui/multisplitpanel/SubPanelFactory.java | 28 - .../ide/ui/multisplitpanel/WidgetToShow.java | 32 - .../actions/ClosePaneAction.java | 41 - .../actions/RemoveAllWidgetsInPaneAction.java | 39 - .../actions/SplitHorizontallyAction.java | 36 - .../actions/SplitVerticallyAction.java | 36 - .../che/ide/ui/multisplitpanel/menu/Menu.java | 40 - .../ide/ui/multisplitpanel/menu/MenuItem.java | 34 - .../menu/MenuItemActionWidget.java | 77 - .../menu/MenuItemActionWidget.ui.xml | 75 - .../multisplitpanel/menu/MenuItemWidget.java | 91 - .../menu/MenuItemWidget.ui.xml | 123 - .../ui/multisplitpanel/menu/MenuWidget.java | 162 - .../ui/multisplitpanel/menu/MenuWidget.ui.xml | 87 - .../panel/ActiveTabClosedHandler.java | 27 - .../panel/SubPanelPresenter.java | 185 - .../multisplitpanel/panel/SubPanelView.java | 92 - .../panel/SubPanelViewFactory.java | 31 - .../panel/SubPanelViewImpl.java | 525 -- .../panel/SubPanelViewImpl.ui.xml | 86 - .../che/ide/ui/multisplitpanel/tab/Tab.java | 48 - .../multisplitpanel/tab/TabItemFactory.java | 25 - .../ide/ui/multisplitpanel/tab/TabWidget.java | 151 - .../ui/multisplitpanel/tab/TabWidget.ui.xml | 208 - .../ide/ui/popup/PopupKeyDownListener.java | 169 - .../che/ide/ui/popup/PopupResources.java | 43 - .../eclipse/che/ide/ui/popup/PopupWidget.java | 239 - .../ui/radiobuttongroup/RadioButtonGroup.java | 117 - .../che/ide/ui/smartTree/DefaultGoInto.java | 137 - .../eclipse/che/ide/ui/smartTree/GoInto.java | 56 - .../smartTree/KeyboardNavigationHandler.java | 201 - .../che/ide/ui/smartTree/NodeDescriptor.java | 297 - .../che/ide/ui/smartTree/NodeLoader.java | 500 -- .../che/ide/ui/smartTree/NodeStorage.java | 814 -- .../ui/smartTree/NodeUniqueKeyProvider.java | 26 - .../che/ide/ui/smartTree/SelectionModel.java | 817 -- .../eclipse/che/ide/ui/smartTree/SortDir.java | 68 - .../che/ide/ui/smartTree/SpeedSearch.java | 356 - .../ide/ui/smartTree/SpeedSearchRender.java | 131 - .../eclipse/che/ide/ui/smartTree/Tree.java | 1694 ----- .../che/ide/ui/smartTree/TreeStyles.java | 68 - .../che/ide/ui/smartTree/TreeView.java | 337 - .../ide/ui/smartTree/UniqueKeyProvider.java | 31 - .../ui/smartTree/compare/NameComparator.java | 29 - .../ui/smartTree/converter/NodeConverter.java | 29 - .../converter/impl/NodeNameConverter.java | 29 - .../ui/smartTree/data/AbstractTreeNode.java | 110 - .../che/ide/ui/smartTree/data/HasAction.java | 23 - .../ide/ui/smartTree/data/HasAttributes.java | 36 - .../ide/ui/smartTree/data/HasDataObject.java | 34 - .../ide/ui/smartTree/data/MutableNode.java | 26 - .../che/ide/ui/smartTree/data/Node.java | 105 - .../ui/smartTree/data/NodeInterceptor.java | 52 - .../ide/ui/smartTree/data/TreeExpander.java | 44 - .../smartTree/data/settings/HasSettings.java | 17 - .../smartTree/data/settings/NodeSettings.java | 45 - .../data/settings/SettingsProvider.java | 33 - .../settings/impl/DummySettingsProvider.java | 28 - .../event/BeforeCollapseNodeEvent.java | 78 - .../event/BeforeExpandNodeEvent.java | 78 - .../ui/smartTree/event/BeforeLoadEvent.java | 77 - .../che/ide/ui/smartTree/event/BlurEvent.java | 55 - .../ui/smartTree/event/CancellableEvent.java | 34 - .../ui/smartTree/event/CollapseNodeEvent.java | 64 - .../ui/smartTree/event/ExpandNodeEvent.java | 63 - .../ide/ui/smartTree/event/FocusEvent.java | 55 - .../ui/smartTree/event/GoIntoStateEvent.java | 72 - .../che/ide/ui/smartTree/event/LoadEvent.java | 79 - .../smartTree/event/LoadExceptionEvent.java | 70 - .../ide/ui/smartTree/event/LoaderHandler.java | 41 - .../ui/smartTree/event/NodeAddedEvent.java | 69 - .../ide/ui/smartTree/event/PostLoadEvent.java | 69 - .../event/SelectionChangedEvent.java | 66 - .../ide/ui/smartTree/event/StoreAddEvent.java | 78 - .../ui/smartTree/event/StoreClearEvent.java | 54 - .../smartTree/event/StoreDataChangeEvent.java | 65 - .../ide/ui/smartTree/event/StoreHandlers.java | 60 - .../event/StoreRecordChangeEvent.java | 56 - .../ui/smartTree/event/StoreRemoveEvent.java | 86 - .../ui/smartTree/event/StoreSortEvent.java | 54 - .../ui/smartTree/event/StoreUpdateEvent.java | 67 - .../event/internal/NativeTreeEvent.java | 78 - .../handler/GroupingHandlerRegistration.java | 45 - .../AbstractPresentationNode.java | 36 - .../AbstractPresentationRenderer.java | 139 - .../DefaultPresentationRenderer.java | 168 - .../presentation/HasNewPresentation.java | 29 - .../presentation/HasPresentation.java | 33 - .../presentation/NewNodePresentation.java | 111 - .../presentation/NodePresentation.java | 102 - .../presentation/PresentationRenderer.java | 99 - .../presentation/StyleConfigurator.java | 97 - .../smartTree/presentation/TextAttribute.java | 17 - .../ui/status/ComponentWithEmptyStatus.java | 20 - .../che/ide/ui/status/EmptyStatus.java | 29 - .../eclipse/che/ide/ui/status/StatusText.java | 81 - .../che/ide/ui/status/StatusWidget.java | 41 - .../eclipse/che/ide/ui/switcher/Switcher.java | 112 - .../che/ide/ui/toolbar/ActionButton.java | 244 - .../che/ide/ui/toolbar/ActionPopupButton.java | 312 - .../che/ide/ui/toolbar/CloseMenuHandler.java | 19 - .../che/ide/ui/toolbar/MainToolbar.java | 29 - .../che/ide/ui/toolbar/MenuLockLayer.java | 93 - .../eclipse/che/ide/ui/toolbar/PopupMenu.java | 717 -- .../ide/ui/toolbar/PresentationFactory.java | 36 - .../che/ide/ui/toolbar/ToolbarPresenter.java | 57 - .../che/ide/ui/toolbar/ToolbarResources.java | 67 - .../che/ide/ui/toolbar/ToolbarView.java | 34 - .../che/ide/ui/toolbar/ToolbarViewImpl.java | 237 - .../org/eclipse/che/ide/ui/toolbar/Utils.java | 189 - .../che/ide/ui/tooltip/TooltipWidget.java | 46 - .../che/ide/ui/tooltip/TooltipWidgetImpl.java | 49 - .../ide/ui/tooltip/TooltipWidgetImpl.ui.xml | 52 - .../ide/ui/window/CompositeWindowView.java | 525 -- .../org/eclipse/che/ide/ui/window/Window.java | 435 -- .../che/ide/ui/window/WindowClientBundle.java | 53 - .../che/ide/ui/window/WindowManager.java | 105 - .../eclipse/che/ide/ui/window/WindowView.java | 190 - .../ui/window/event/WindowOpenedEvent.java | 40 - ide/che-core-ide-ui/src/main/module.gwt.xml | 18 - .../css/font-awesome.min.css | 4 - .../font-awesome-4.5.0/fonts/FontAwesome.otf | Bin 109688 -> 0 bytes .../fonts/fontawesome-webfont.eot | Bin 70807 -> 0 bytes .../fonts/fontawesome-webfont.svg | 655 -- .../fonts/fontawesome-webfont.ttf | Bin 142072 -> 0 bytes .../fonts/fontawesome-webfont.woff | Bin 83588 -> 0 bytes .../fonts/fontawesome-webfont.woff2 | Bin 66624 -> 0 bytes .../org/eclipse/che/ide/ui/Styles.css | 18 - .../org/eclipse/che/ide/ui/button/button.css | 22 - .../che/ide/ui/buttonLoader/buttonLoader.css | 51 - .../che/ide/ui/buttonLoader/loader.png | Bin 818 -> 0 bytes .../eclipse/che/ide/ui/cellview/cellTable.css | 156 - .../eclipse/che/ide/ui/cellview/cellTree.css | 75 - .../eclipse/che/ide/ui/cellview/dataGrid.css | 131 - .../org/eclipse/che/ide/ui/constants.css | 55 - .../che/ide/ui/dropdown/expansionIcon.svg | 19 - .../eclipse/che/ide/ui/dropdown/styles.css | 29 - .../che/ide/ui/list/CategoriesList.css | 132 - .../che/ide/ui/list/arrowExpansionIcon.svg | 19 - .../org/eclipse/che/ide/ui/logo/che-logo.svg | 26 - .../che/ide/ui/logo/water-mark-logo.svg | 26 - .../che/ide/ui/menubutton/arrowIcon.svg | 19 - .../eclipse/che/ide/ui/menubutton/button.css | 104 - .../multisplitpanel/menu/multi-file-icon.svg | 24 - .../che/ide/ui/multisplitpanel/menu/style.css | 19 - .../org/eclipse/che/ide/ui/popup/popup.css | 122 - .../radiobuttongroup/radio-button-group.css | 73 - .../che/ide/ui/smartTree/TreeStyles.css | 167 - .../che/ide/ui/smartTree/iconCollapsed.svg | 21 - .../che/ide/ui/smartTree/iconExpanded.svg | 21 - .../eclipse/che/ide/ui/switcher/switcher.css | 90 - .../eclipse/che/ide/ui/toolbar/popup-menu.css | 180 - .../eclipse/che/ide/ui/toolbar/toolbar.css | 309 - .../che/ide/ui/window/CompositeWindowView.css | 149 - .../eclipse/che/ide/ui/window/close-icon.svg | 21 - .../ide/ui/button/ConsoleButtonImplTest.java | 110 - .../eclipse/che/ide/ui/dialogs/BaseTest.java | 35 - .../confirm/ConfirmDialogFooterTest.java | 55 - .../confirm/ConfirmDialogPresenterTest.java | 103 - .../confirm/ConfirmDialogViewTest.java | 46 - .../dialogs/input/InputDialogFooterTest.java | 56 - .../input/InputDialogPresenterTest.java | 206 - .../ui/dialogs/input/InputDialogViewTest.java | 47 - .../message/MessageDialogFooterTest.java | 48 - .../message/MessageDialogPresenterTest.java | 69 - .../message/MessageDialogViewTest.java | 63 - .../ide/ui/tooltip/TooltipWidgetImplTest.java | 35 - ide/che-core-orion-editor/pom.xml | 146 - .../che/ide/editor/orion/client/Action.java | 17 - .../orion/client/ContentAssistWidget.java | 849 --- .../client/ContentAssistWidgetFactory.java | 19 - .../client/EditorInitializePromiseHolder.java | 192 - .../che/ide/editor/orion/client/KeyMode.java | 34 - .../editor/orion/client/KeyModeInstances.java | 35 - .../orion/client/KeymodeDisplayConstants.java | 26 - .../OrionAnnotationSeverityProvider.java | 18 - .../orion/client/OrionBreakpointRuler.java | 197 - .../client/OrionContentTypeRegistrant.java | 77 - .../editor/orion/client/OrionCursorModel.java | 73 - .../editor/orion/client/OrionDocument.java | 326 - .../orion/client/OrionEditorBuilder.java | 40 - .../orion/client/OrionEditorExtension.java | 26 - .../editor/orion/client/OrionEditorInit.java | 371 - .../orion/client/OrionEditorPresenter.java | 1267 ---- .../orion/client/OrionEditorWidget.java | 1012 --- .../orion/client/OrionEditorWidget.ui.xml | 60 - .../orion/client/OrionEventConstants.java | 29 - .../orion/client/OrionHoverHandler.java | 21 - .../orion/client/OrionHoverRegistrant.java | 67 - .../editor/orion/client/OrionLineStyler.java | 97 - .../orion/client/OrionOccurrencesHandler.java | 21 - .../client/OrionOccurrencesRegistrant.java | 65 - .../editor/orion/client/OrionResource.java | 35 - .../orion/client/OrionSettingsController.java | 102 - .../editor/orion/client/OrionUndoRedo.java | 72 - .../client/OrionVcsChangeMarkersRuler.java | 103 - .../client/TemporaryKeyBindingsManager.java | 37 - .../orion/client/WordDetectionUtil.java | 47 - .../client/events/HasScrollHandlers.java | 24 - .../orion/client/events/ScrollEvent.java | 32 - .../orion/client/events/ScrollHandler.java | 23 - .../IncrementalFindReportStatusObserver.java | 101 - .../inject/JavaHighlightingOrionPlugin.java | 25 - .../inject/OrionCodeEditWidgetProvider.java | 64 - .../client/inject/OrionEditorGinModule.java | 53 - .../OrionEditorOptionsOverlayProvider.java | 23 - .../orion/client/inject/OrionPlugin.java | 29 - .../client/jso/AnnotationStylerOverlay.java | 47 - .../orion/client/jso/MarkedOverlay.java | 63 - .../client/jso/ModelChangedEventOverlay.java | 50 - .../jso/OrionAnnotationIteratorOverlay.java | 38 - .../jso/OrionAnnotationModelOverlay.java | 92 - .../client/jso/OrionAnnotationOverlay.java | 97 - .../jso/OrionAnnotationTypeOverlay.java | 33 - .../client/jso/OrionAnnotationsOverlay.java | 23 - .../client/jso/OrionAttributesOverlay.java | 33 - .../jso/OrionCodeEditWidgetOverlay.java | 59 - .../client/jso/OrionContentAssistOverlay.java | 39 - .../client/jso/OrionContentTypeOverlay.java | 91 - .../client/jso/OrionEditorOptionsOverlay.java | 38 - .../orion/client/jso/OrionEditorOverlay.java | 222 - .../client/jso/OrionEditorViewOverlay.java | 44 - .../orion/client/jso/OrionEventOverlay.java | 19 - .../client/jso/OrionEventTargetOverlay.java | 32 - .../client/jso/OrionExtRulerOverlay.java | 259 - .../client/jso/OrionFindIteratorOverlay.java | 27 - .../client/jso/OrionFindOptionsOverlay.java | 90 - ...OrionHighlightingConfigurationOverlay.java | 63 - .../client/jso/OrionHoverContextOverlay.java | 43 - .../orion/client/jso/OrionHoverOverlay.java | 98 - .../jso/OrionInputChangedEventOverlay.java | 49 - .../client/jso/OrionKeyBindingModule.java | 23 - .../client/jso/OrionKeyBindingOverlay.java | 36 - .../jso/OrionKeyBindingsRelationOverlay.java | 37 - .../orion/client/jso/OrionKeyModeOverlay.java | 73 - .../client/jso/OrionKeyStrokeOverlay.java | 61 - .../client/jso/OrionLinkedModeOverlay.java | 128 - .../jso/OrionLinkedModelDataOverlay.java | 44 - .../jso/OrionLinkedModelGroupOverlay.java | 59 - .../client/jso/OrionLinkedModelOverlay.java | 50 - .../jso/OrionLinkedModelPositionOverlay.java | 27 - .../jso/OrionModelChangedEventOverlay.java | 67 - .../jso/OrionOccurrenceContextOverlay.java | 39 - .../client/jso/OrionOccurrenceOverlay.java | 39 - .../client/jso/OrionPixelPositionOverlay.java | 39 - .../orion/client/jso/OrionProblemOverlay.java | 39 - .../jso/OrionRulerClickEventOverlay.java | 28 - .../jso/OrionSelectionEventOverlay.java | 17 - .../client/jso/OrionSelectionOverlay.java | 39 - .../jso/OrionServiceRegistrationOverlay.java | 28 - .../jso/OrionServiceRegistryOverlay.java | 39 - .../orion/client/jso/OrionStyleOverlay.java | 57 - .../client/jso/OrionTextChangeOverlay.java | 47 - .../client/jso/OrionTextModelOverlay.java | 110 - .../client/jso/OrionTextThemeOverlay.java | 49 - .../jso/OrionTextViewOptionsOverlay.java | 87 - .../client/jso/OrionTextViewOverlay.java | 343 - .../jso/OrionTextViewShowOptionsOverlay.java | 71 - .../client/jso/OrionUndoStackOverlay.java | 72 - .../client/jso/OrionUndoStackSizeOverlay.java | 27 - .../jso/StatusMessageReporterOverlay.java | 38 - .../orion/client/jso/UiUtilsOverlay.java | 35 - .../orion/client/menu/EditorContextMenu.java | 37 - .../client/signature/SignatureWidget.java | 688 -- .../signature/SignatureWidgetFactory.java | 24 - .../che/ide/status/message/StatusMessage.java | 85 - .../status/message/StatusMessageObserver.java | 26 - .../status/message/StatusMessageReporter.java | 48 - .../src/main/module.gwt.xml | 19 - .../client/incremental-find-container.css | 27 - .../orion/client/orion-codenvy-theme.css | 519 -- .../orion/public/orion-codenvy-theme.css | 15 - ide/che-ide-core/pom.xml | 129 - ide/che-ide-full/pom.xml | 239 - ide/che-ide-gwt-app/pom.xml | 209 - ide/commons-gwt/pom.xml | 275 - .../google/gwt/webworker/WebWorker.gwt.xml | 6 - .../gwt/webworker/client/AbstractWorker.java | 61 - .../client/DedicatedWorkerEntryPoint.java | 77 - .../client/DedicatedWorkerGlobalScope.java | 62 - .../gwt/webworker/client/ErrorEvent.java | 41 - .../gwt/webworker/client/ErrorHandler.java | 21 - .../gwt/webworker/client/MessageEvent.java | 54 - .../gwt/webworker/client/MessageHandler.java | 21 - .../gwt/webworker/client/MessagePort.java | 82 - .../google/gwt/webworker/client/Worker.java | 80 - .../webworker/client/WorkerGlobalScope.java | 79 - .../gwt/webworker/client/WorkerLocation.java | 64 - .../webworker/client/messages/Message.java | 25 - .../client/messages/MessageFilter.java | 65 - .../client/messages/MessageImpl.java | 35 - .../client/messages/SerializationIndex.java | 33 - .../linker/DedicatedWorkerLinker.java | 51 - .../linker/DedicatedWorkerTemplate.js | 52 - .../che/api/promises/async/Delayer.java | 94 - .../eclipse/che/api/promises/async/Task.java | 17 - .../api/promises/async/ThrottledDelayer.java | 41 - .../che/api/promises/async/Throttler.java | 38 - .../che/api/promises/client/BiFunction.java | 25 - .../che/api/promises/client/BiOperation.java | 26 - .../che/api/promises/client/Function.java | 26 - .../promises/client/FunctionException.java | 31 - .../che/api/promises/client/Operation.java | 26 - .../promises/client/OperationException.java | 31 - .../che/api/promises/client/Promise.java | 96 - .../che/api/promises/client/PromiseError.java | 40 - .../api/promises/client/PromiseProvider.java | 118 - .../che/api/promises/client/Thenable.java | 23 - .../client/callback/AsyncPromiseHelper.java | 58 - .../callback/CallbackPromiseHelper.java | 68 - .../che/api/promises/client/js/Executor.java | 62 - .../che/api/promises/client/js/JsPromise.java | 187 - .../promises/client/js/JsPromiseError.java | 70 - .../promises/client/js/JsPromiseProvider.java | 100 - .../che/api/promises/client/js/Promises.java | 107 - .../promises/client/js/RejectFunction.java | 24 - .../promises/client/js/ResolveFunction.java | 23 - .../java/org/eclipse/che/ide/CommandLine.java | 116 - .../java/org/eclipse/che/ide/DelayedTask.java | 56 - .../java/org/eclipse/che/ide/FontAwesome.java | 147 - .../java/org/eclipse/che/ide/MimeType.java | 156 - .../org/eclipse/che/ide/QueryParameters.java | 59 - .../eclipse/che/ide/collections/Array.java | 83 - .../che/ide/collections/ArrayIterator.java | 64 - .../che/ide/collections/Collections.gwt.xml | 4 - .../org/eclipse/che/ide/collections/Jso.java | 228 - .../che/ide/collections/JsonObject.java | 45 - .../che/ide/collections/ListHelper.java | 145 - .../che/ide/collections/StringMap.java | 60 - .../che/ide/collections/js/JsoArray.java | 322 - .../che/ide/collections/js/JsoStringMap.java | 153 - .../eclipse/che/ide/commons/GwtXmlUtils.java | 115 - .../ide/commons/ParsingResponseException.java | 28 - .../exception/JobNotFoundException.java | 29 - .../ServerDisconnectedException.java | 29 - .../commons/exception/ServerException.java | 124 - .../exception/UnauthorizedException.java | 34 - .../exception/UnmarshallerException.java | 31 - .../che/ide/dto/ClientDtoFactoryVisitor.java | 20 - .../org/eclipse/che/ide/dto/DtoFactory.java | 118 - .../che/ide/dto/DtoFactoryVisitor.java | 24 - .../org/eclipse/che/ide/dto/DtoGen.gwt.xml | 20 - .../org/eclipse/che/ide/dto/DtoProvider.java | 29 - .../eclipse/che/ide/dto/JsonSerializable.java | 22 - .../eclipse/che/ide/filters/FuzzyMatches.java | 287 - .../org/eclipse/che/ide/filters/Match.java | 43 - .../org/eclipse/che/ide/filters/Matcher.java | 61 - .../org/eclipse/che/ide/json/JsonHelper.java | 117 - .../jsonrpc/ClientSideRequestProcessor.java | 24 - .../ClientSideTimeoutActionRunner.java | 30 - .../ide/jsonrpc/ElementalJsonRpcComposer.java | 83 - .../jsonrpc/ElementalJsonRpcMarshaller.java | 175 - .../jsonrpc/ElementalJsonRpcQualifier.java | 50 - .../jsonrpc/ElementalJsonRpcUnmarshaller.java | 172 - .../che/ide/jsonrpc/JsonRpcErrorUtils.java | 36 - .../che/ide/jsonrpc/JsonRpcInitializer.java | 58 - .../jsonrpc/WebSocketJsonRpcInitializer.java | 60 - .../eclipse/che/ide/mvp/CompositeView.java | 67 - .../java/org/eclipse/che/ide/mvp/HasView.java | 21 - .../che/ide/mvp/ShowableComponent.java | 51 - .../org/eclipse/che/ide/mvp/UiComponent.java | 51 - .../java/org/eclipse/che/ide/mvp/View.java | 34 - .../org/eclipse/che/ide/resource/Path.java | 1179 --- .../eclipse/che/ide/rest/AsyncRequest.java | 299 - .../che/ide/rest/AsyncRequestCallback.java | 223 - .../che/ide/rest/AsyncRequestFactory.java | 240 - .../che/ide/rest/AsyncRequestLoader.java | 40 - .../eclipse/che/ide/rest/DtoUnmarshaller.java | 60 - .../che/ide/rest/DtoUnmarshallerFactory.java | 84 - .../org/eclipse/che/ide/rest/HTTPHeader.java | 298 - .../org/eclipse/che/ide/rest/HTTPMethod.java | 59 - .../org/eclipse/che/ide/rest/HTTPStatus.java | 198 - .../che/ide/rest/LocationUnmarshaller.java | 35 - .../eclipse/che/ide/rest/Marshallable.java | 21 - .../che/ide/rest/RequestStatusHandler.java | 43 - .../ide/rest/StringMapListUnmarshaller.java | 34 - .../che/ide/rest/StringMapUnmarshaller.java | 33 - .../che/ide/rest/StringUnmarshaller.java | 35 - .../eclipse/che/ide/rest/Unmarshallable.java | 41 - .../org/eclipse/che/ide/rest/UrlBuilder.java | 123 - .../org/eclipse/che/ide/runtime/Assert.java | 111 - .../ide/runtime/AssertionFailedException.java | 40 - .../che/ide/runtime/CoreException.java | 80 - .../org/eclipse/che/ide/runtime/IStatus.java | 179 - .../runtime/OperationCanceledException.java | 36 - .../eclipse/che/ide/runtime/Runtime.gwt.xml | 4 - .../org/eclipse/che/ide/runtime/Status.java | 265 - .../che/ide/ui/DialogBoxResources.java | 27 - .../org/eclipse/che/ide/ui/ElementView.java | 49 - .../java/org/eclipse/che/ide/ui/Popup.java | 128 - .../java/org/eclipse/che/ide/ui/Tooltip.java | 509 -- .../che/ide/ui/list/FilterableSimpleList.java | 102 - .../eclipse/che/ide/ui/list/HasSelection.java | 53 - .../eclipse/che/ide/ui/list/SimpleList.java | 481 -- .../che/ide/ui/listbox/CustomComboBox.java | 485 -- .../che/ide/ui/listbox/CustomListBox.java | 474 -- .../ui/listbox/CustomListBoxResources.java | 29 - .../loaders/DownloadWorkspaceOutputEvent.java | 40 - .../che/ide/ui/loaders/PopupLoader.java | 41 - .../ide/ui/loaders/PopupLoaderFactory.java | 47 - .../che/ide/ui/loaders/PopupLoaderImpl.java | 150 - .../che/ide/ui/loaders/PopupLoaderImpl.ui.xml | 93 - .../ide/ui/loaders/PopupLoaderMessages.java | 61 - .../ide/ui/loaders/request/LoaderFactory.java | 34 - .../ide/ui/loaders/request/MessageLoader.java | 115 - .../request/MessageLoaderResources.java | 41 - .../che/ide/ui/menu/AutoHideComponent.java | 281 - .../che/ide/ui/menu/AutoHideController.java | 38 - .../eclipse/che/ide/ui/menu/AutoHideView.java | 60 - .../che/ide/ui/menu/PositionController.java | 632 -- .../che/ide/ui/tree/BaseNodeRenderer.java | 36 - .../che/ide/ui/tree/NodeDataAdapter.java | 99 - .../eclipse/che/ide/ui/tree/NodeRenderer.java | 48 - .../che/ide/ui/tree/SelectionModel.java | 376 - .../org/eclipse/che/ide/ui/tree/Tree.java | 1677 ----- .../che/ide/ui/tree/TreeNodeElement.java | 352 - .../che/ide/ui/tree/TreeNodeLabelRenamer.java | 129 - .../che/ide/ui/tree/TreeNodeMutator.java | 187 - .../zeroclipboard/ClipboardButtonBuilder.java | 87 - .../ClipboardButtonBuilderImpl.java | 185 - .../ui/zeroclipboard/ClipboardConstant.java | 34 - .../ui/zeroclipboard/ClipboardResources.java | 29 - .../eclipse/che/ide/util/AbstractTrie.java | 178 - .../che/ide/util/AnimationController.java | 558 -- .../eclipse/che/ide/util/AnimationUtils.java | 222 - .../java/org/eclipse/che/ide/util/Arrays.java | 154 - .../java/org/eclipse/che/ide/util/Base64.java | 36 - .../java/org/eclipse/che/ide/util/Box.java | 65 - .../java/org/eclipse/che/ide/util/Bytes.java | 169 - .../eclipse/che/ide/util/ClipboardUtils.java | 45 - .../org/eclipse/che/ide/util/CssUtils.java | 159 - .../eclipse/che/ide/util/ExceptionUtils.java | 120 - .../org/eclipse/che/ide/util/Function.java | 64 - .../eclipse/che/ide/util/HoverController.java | 261 - .../che/ide/util/ImageResourceUtils.java | 59 - .../eclipse/che/ide/util/ListenerManager.java | 170 - .../che/ide/util/ListenerRegistrar.java | 69 - .../org/eclipse/che/ide/util/MathUtils.java | 50 - .../org/eclipse/che/ide/util/NameUtils.java | 73 - .../java/org/eclipse/che/ide/util/Pair.java | 229 - .../org/eclipse/che/ide/util/PathEncoder.java | 48 - .../org/eclipse/che/ide/util/PrefixIndex.java | 32 - .../org/eclipse/che/ide/util/RegExpUtils.java | 174 - .../che/ide/util/RelativeClientRect.java | 68 - .../eclipse/che/ide/util/RequestPromise.java | 47 - .../org/eclipse/che/ide/util/SortedList.java | 292 - .../org/eclipse/che/ide/util/StringUtils.java | 596 -- .../org/eclipse/che/ide/util/TextUtils.java | 304 - .../org/eclipse/che/ide/util/TrieNode.java | 80 - .../java/org/eclipse/che/ide/util/UIUtil.java | 53 - .../java/org/eclipse/che/ide/util/UUID.java | 75 - .../eclipse/che/ide/util/UnicodeUtils.java | 565 -- .../che/ide/util/browser/BrowserUtils.java | 114 - .../che/ide/util/browser/QuirksConstants.java | 339 - .../che/ide/util/browser/UserAgent.java | 120 - .../browser/UserAgentRuntimeProperties.java | 232 - .../browser/UserAgentStaticProperties.java | 96 - .../che/ide/util/dom/CaptureReleaser.java | 20 - .../eclipse/che/ide/util/dom/DomUtils.java | 339 - .../eclipse/che/ide/util/dom/Elements.java | 447 -- .../util/dom/FontDimensionsCalculator.java | 227 - .../ide/util/dom/MouseCaptureListener.java | 99 - .../che/ide/util/dom/MouseEventCapture.java | 137 - .../ide/util/dom/MouseGestureListener.java | 141 - .../ide/util/dom/MouseMovePauseDetector.java | 102 - .../ide/util/dom/ScrollbarSizeCalculator.java | 88 - .../che/ide/util/executor/AsyncRunner.java | 101 - .../executor/BasicIncrementalScheduler.java | 161 - .../executor/DeferredCommandExecutor.java | 153 - .../che/ide/util/executor/Executor.java | 29 - .../util/executor/IncrementalScheduler.java | 38 - .../executor/ScheduledCommandExecutor.java | 63 - .../util/executor/UserActivityManager.java | 98 - .../ide/util/input/CharCodeWithModifiers.java | 71 - .../che/ide/util/input/KeyCodeMap.java | 288 - .../che/ide/util/input/KeyMapUtil.java | 89 - .../che/ide/util/input/MackeyMapUtil.java | 102 - .../che/ide/util/input/ModifierKeys.java | 100 - .../che/ide/util/input/SignalEvent.java | 328 - .../che/ide/util/input/SignalEventImpl.java | 649 -- .../che/ide/util/input/SignalEventUtils.java | 51 - .../che/ide/util/input/SignalKeyLogic.java | 359 - .../che/ide/util/loging/BrowserLogger.java | 112 - .../che/ide/util/loging/DummyLogger.java | 41 - .../org/eclipse/che/ide/util/loging/Log.java | 52 - .../che/ide/util/loging/LogConfig.java | 83 - .../eclipse/che/ide/util/loging/Logger.java | 28 - .../util/storage/BrowserLocalStorageImpl.java | 54 - .../BrowserLocalStorageProviderImpl.java | 28 - .../util/storage/DummyLocalStorageImpl.java | 65 - .../DummyLocalStorageProviderImpl.java | 21 - .../che/ide/util/storage/LocalStorage.java | 39 - .../util/storage/LocalStorageProvider.java | 24 - .../eclipse/che/ide/websocket/Message.java | 116 - .../eclipse/che/ide/websocket/WebSocket.java | 156 - .../events/ConnectionClosedHandler.java | 21 - .../events/ConnectionErrorHandler.java | 17 - .../events/ConnectionOpenedHandler.java | 21 - .../events/MessageReceivedEvent.java | 35 - .../events/MessageReceivedHandler.java | 26 - .../events/WebSocketClosedEvent.java | 130 - .../impl/BasicWebSocketEndpoint.java | 70 - .../BasicWebSocketMessageTransmitter.java | 54 - .../impl/DelayableWebSocketConnection.java | 96 - .../ide/websocket/impl/MessagesReSender.java | 83 - .../che/ide/websocket/impl/UrlResolver.java | 75 - .../impl/WebSocketActionManager.java | 87 - .../websocket/impl/WebSocketConnection.java | 63 - .../impl/WebSocketConnectionManager.java | 118 - .../impl/WebSocketConnectionSustainer.java | 72 - .../websocket/impl/WebSocketDispatcher.java | 48 - .../ide/websocket/impl/WebSocketEndpoint.java | 51 - .../ide/websocket/impl/WebSocketFactory.java | 22 - .../websocket/impl/WebSocketInitializer.java | 105 - .../websocket/impl/WebSocketJsoWrapper.java | 67 - .../impl/WebSocketPropertyManager.java | 142 - .../ide/websocket/rest/DtoUnmarshaller.java | 54 - .../eclipse/che/ide/websocket/rest/Pair.java | 44 - .../ide/websocket/rest/Unmarshallable.java | 42 - .../rest/exceptions/ServerException.java | 88 - .../org/eclipse/che/providers/DynaObject.java | 29 - .../eclipse/che/providers/DynaProvider.java | 35 - .../eclipse/che/requirejs/ModuleHolder.java | 34 - .../che/requirejs/RequireJsLoader.java | 214 - .../org/eclipse/che/requirejs/Requirejs.java | 92 - .../che/requirejs/RequirejsCallback.java | 29 - .../che/requirejs/RequirejsErrorHandler.java | 46 - .../che/requirejs/RequirejsModule.java | 26 - .../requirejs/conf/AssocitativeJsObject.java | 32 - .../requirejs/conf/BundlesConfigProperty.java | 40 - .../requirejs/conf/ConfigConfigProperty.java | 36 - .../che/requirejs/conf/ConfigItem.java | 23 - .../che/requirejs/conf/MapConfigProperty.java | 36 - .../eclipse/che/requirejs/conf/MapItem.java | 21 - .../requirejs/conf/PathsConfigProperty.java | 21 - .../che/requirejs/conf/RequirejsConfig.java | 168 - .../requirejs/conf/ShimConfigProperty.java | 36 - .../eclipse/che/requirejs/conf/ShimItem.java | 54 - .../che/security/oauth/JsOAuthWindow.java | 149 - .../che/security/oauth/OAuthCallback.java | 17 - .../che/security/oauth/OAuthStatus.java | 42 - .../security/oauth/SecurityTokenProvider.java | 28 - .../org/eclipse/che/Requirejs.gwt.xml | 18 - .../eclipse/che/api/promises/Promises.gwt.xml | 21 - .../org/eclipse/che/ide/Commons.gwt.xml | 45 - .../org/eclipse/che/ide/Util.gwt.xml | 18 - .../org/eclipse/che/ide/ui/DialogBox.css | 134 - .../org/eclipse/che/ide/ui/Popup.css | 34 - .../org/eclipse/che/ide/ui/Tooltip.css | 114 - .../eclipse/che/ide/ui/list/SimpleList.css | 68 - .../eclipse/che/ide/ui/listbox/ListBox.css | 136 - .../org/eclipse/che/ide/ui/listbox/arrow.svg | 18 - .../ui/loaders/PopupLoaderMessages.properties | 25 - .../ide/ui/loaders/initialization/Loader.css | 176 - .../ide/ui/loaders/initialization/arrow.svg | 26 - .../ide/ui/loaders/initialization/done.svg | 25 - .../ide/ui/loaders/initialization/error.svg | 25 - .../loaders/initialization/expansionIcon.svg | 20 - .../ui/loaders/initialization/loaderIcon.svg | 34 - .../ide/ui/loaders/request/RequestLoader.css | 63 - .../che/ide/ui/loaders/request/progress.svg | 34 - .../che/ide/ui/tree/FileTreeSection.css | 31 - .../org/eclipse/che/ide/ui/tree/Tree.css | 145 - .../eclipse/che/ide/ui/tree/collapsedIcon.svg | 22 - .../eclipse/che/ide/ui/tree/expandedIcon.svg | 21 - .../che/ide/ui/zeroclipboard/Clipboard.css | 75 - .../ClipboardConstant.properties | 18 - .../che/ide/ui/zeroclipboard/clipboard.svg | 33 - .../eclipse/che/providers/Providers.gwt.xml | 19 - .../org/eclipse/che/security/OAuth.gwt.xml | 18 - .../promises/ExecutorPromiseMocker.java | 68 - .../ide/client/promises/FunctionAnswer.java | 36 - .../ide/client/promises/MockitoPrinter.java | 46 - .../ide/client/promises/PromiseMocker.java | 103 - .../jsonrpc/JsonRpcErrorTransmitterTest.java | 73 - .../WebSocketJsonRpcInitializerTest.java | 48 - .../eclipse/che/ide/resource/PathTest.java | 400 - .../org/eclipse/che/ide/util/ArraysTest.java | 122 - .../org/eclipse/che/ide/util/BytesTest.java | 183 - .../eclipse/che/ide/util/NameUtilsTest.java | 97 - .../che/ide/util/RequestPromiseTest.java | 48 - .../eclipse/che/ide/util/TextUtilsTest.java | 28 - .../org/eclipse/che/ide/util/UUIDTest.java | 40 - .../impl/BasicWebSocketEndpointTest.java | 77 - .../BasicWebSocketMessageTransmitterTest.java | 81 - .../websocket/impl/MessagesReSenderTest.java | 72 - .../ide/websocket/impl/UrlResolverTest.java | 43 - .../impl/WebSocketConnectionManagerTest.java | 89 - .../WebSocketConnectionSustainerTest.java | 145 - .../impl/WebSocketDispatcherTest.java | 58 - .../impl/WebSocketInitializerTest.java | 98 - .../impl/WebSocketPropertyManagerTest.java | 73 - ide/gwt-logger/pom.xml | 101 - .../slf4j/gwtbackend/GWTLoggerFactory.java | 36 - .../gwtbackend/GwtLoggerSlf4jBackend.java | 196 - ide/gwt-logger/src/main/module.gwt.xml | 33 - .../main/super/org/slf4j/LoggerFactory.java | 74 - .../org/slf4j/helpers/NamedLoggerBase.java | 43 - .../main/super/org/slf4j/helpers/Util.java | 65 - ide/pom.xml | 50 - .../che-multiuser-keycloak-ide/pom.xml | 94 - .../che/multiuser/keycloak/ide/Keycloak.java | 118 - .../keycloak/ide/KeycloakAsyncRequest.java | 84 - .../ide/KeycloakAsyncRequestFactory.java | 87 - .../keycloak/ide/KeycloakProvider.java | 141 - .../ide/KeycloakSecurityTokenProvider.java | 29 - .../ide/inject/KeycloakAuthGinModule.java | 32 - .../src/main/module.gwt.xml | 25 - multiuser/keycloak/pom.xml | 1 - .../pom.xml | 190 - .../ide/MachineAsyncRequest.java | 74 - .../ide/MachineAsyncRequestFactory.java | 140 - .../src/main/module.gwt.xml | 25 - multiuser/machine-auth/pom.xml | 1 - plugins/README.md | 15 - .../che-plugin-camel-server/pom.xml | 53 - .../camel/server/inject/CamelModule.java | 33 - .../CamelLanguageServerConfig.java | 90 - plugins/plugin-camel/pom.xml | 29 - .../che-plugin-ceylon-lang-ide/pom.xml | 114 - .../plugin/ceylon/ide/CeylonExtension.java | 62 - .../CeylonLanguageDescriptionProvider.java | 34 - .../ide/CeylonLocalizationConstant.java | 31 - .../plugin/ceylon/ide/CeylonResources.java | 31 - .../ide/action/CreateCeylonFileAction.java | 73 - .../ceylon/ide/inject/CeylonGinModule.java | 52 - .../project/CeylonProjectWizardRegistrar.java | 51 - .../src/main/module.gwt.xml | 26 - .../plugin/ceylon/ide/json/highlighting.json | 25 - .../che/plugin/ceylon/ide/svg/ceylon.svg | 1439 ---- .../che-plugin-ceylon-lang-server/pom.xml | 76 - .../plugin/ceylon/inject/CeylonModule.java | 36 - .../ceylon/projecttype/CeylonProjectType.java | 29 - .../CreateCeylonProjectHandler.java | 88 - .../.ceylon/bootstrap/ceylon-bootstrap.jar | Bin 35580 -> 0 bytes .../bootstrap/ceylon-bootstrap.properties | 2 - .../src/main/resources/project/.ceylon/config | 11 - .../main/resources/project/.ceylon/ide-config | 4 - .../src/main/resources/project/ceylonb | 81 - .../src/main/resources/project/ceylonb.bat | 132 - .../main/resources/project/source/run.ceylon | 5 - .../che-plugin-ceylon-lang-shared/pom.xml | 31 - .../che/plugin/ceylon/shared/Constants.java | 32 - plugins/plugin-ceylon/pom.xml | 42 - .../che-plugin-clangd-lang-server/pom.xml | 57 - .../plugin/clangd/inject/ClangModule.java | 43 - .../ClangDLanguageServerConfig.java | 99 - plugins/plugin-clangd/pom.xml | 40 - .../che-plugin-composer-ide/pom.xml | 131 - .../composer/ide/ComposerExtension.java | 26 - .../composer/ide/ComposerJsonRpcHandler.java | 82 - .../ide/ComposerLocalizationConstant.java | 34 - .../communication/ComposerOutputHandler.java | 67 - .../ide/inject/ComposerGinModule.java | 30 - .../ide/project/ComposerPagePresenter.java | 197 - .../ide/project/ComposerPageView.java | 44 - .../ide/project/ComposerPageViewImpl.java | 89 - .../ide/project/ComposerPageViewImpl.ui.xml | 112 - .../ComposerProjectWizardRegistrar.java | 58 - .../src/main/module.gwt.xml | 26 - .../ComposerLocalizationConstant.properties | 17 - .../che-plugin-composer-server/pom.xml | 79 - .../composer/server/ComposerModule.java | 54 - .../executor/ComposerCommandExecutor.java | 94 - .../executor/ComposerJsonRpcMessenger.java | 90 - .../server/executor/ComposerOutputImpl.java | 46 - .../projecttype/ComposerProjectGenerator.java | 64 - .../ComposerProjectInitializer.java | 57 - .../projecttype/ComposerProjectType.java | 35 - .../ComposerValueProviderFactory.java | 81 - .../che-plugin-composer-shared/pom.xml | 144 - .../che/plugin/composer/shared/Constants.java | 25 - .../composer/shared/dto/ComposerOutput.java | 49 - plugins/plugin-composer/pom.xml | 42 - .../che-plugin-cpp-lang-ide/pom.xml | 105 - .../che/plugin/cpp/ide/CppExtension.java | 66 - .../ide/CppLanguageDescriptionProvider.java | 36 - .../cpp/ide/CppLocalizationConstant.java | 47 - .../che/plugin/cpp/ide/CppResources.java | 33 - .../ide/action/CreateCSourceFileAction.java | 75 - .../ide/action/CreateCppSourceFileAction.java | 76 - .../action/CreateHeaderSourceFileAction.java | 70 - .../ide/action/NewClikeResourceAction.java | 64 - .../plugin/cpp/ide/inject/CppGinModule.java | 71 - .../ide/project/CProjectWizardRegistrar.java | 52 - .../project/CppProjectWizardRegistrar.java | 52 - .../src/main/module.gwt.xml | 26 - .../ide/CppLocalizationConstant.properties | 13 - .../eclipse/che/plugin/cpp/ide/svg/c_file.svg | 32 - .../che/plugin/cpp/ide/svg/c_header_file.svg | 30 - .../che/plugin/cpp/ide/svg/category.svg | 32 - .../che/plugin/cpp/ide/svg/cpp_file.svg | 32 - .../che-plugin-cpp-lang-server/pom.xml | 53 - .../cpp/generator/CProjectGenerator.java | 59 - .../cpp/generator/CppProjectGenerator.java | 58 - .../che/plugin/cpp/inject/CppModule.java | 41 - .../plugin/cpp/projecttype/CProjectType.java | 38 - .../cpp/projecttype/CppProjectType.java | 32 - .../main/resources/files/default_c_content | 9 - .../main/resources/files/default_cpp_content | 9 - .../che-plugin-cpp-lang-shared/pom.xml | 31 - .../che/plugin/cpp/shared/Constants.java | 37 - plugins/plugin-cpp/pom.xml | 42 - .../che-plugin-csharp-lang-ide/pom.xml | 105 - .../plugin/csharp/ide/CSharpExtension.java | 53 - .../CSharpLanguageDescriptionProvider.java | 32 - .../ide/CSharpLocalizationConstant.java | 31 - .../plugin/csharp/ide/CSharpResources.java | 27 - .../action/CreateCSharpSourceFileAction.java | 80 - .../action/NewCSharplikeResourceAction.java | 64 - .../csharp/ide/inject/CSharpGinModule.java | 52 - .../project/CSharpProjectWizardRegistrar.java | 51 - .../src/main/module.gwt.xml | 26 - .../che/plugin/csharp/ide/svg/category.svg | 19 - .../che/plugin/csharp/ide/svg/csharp_file.svg | 22 - .../che-plugin-csharp-lang-server/pom.xml | 77 - .../plugin/csharp/inject/CSharpModule.java | 46 - .../CSharpLanguageServerConfig.java | 156 - .../csharp/projecttype/CSharpProjectType.java | 29 - .../CreateNetCoreProjectHandler.java | 76 - .../src/main/resources/project.json.default | 17 - .../che-plugin-csharp-lang-shared/pom.xml | 31 - .../che/plugin/csharp/shared/Constants.java | 30 - plugins/plugin-csharp/pom.xml | 42 - plugins/plugin-dashboard/README.md | 4 - .../che-plugin-ext-dashboard/pom.xml | 68 - .../dashboard/client/DashboardExtension.java | 44 - .../client/DashboardLocalizationConstant.java | 33 - .../dashboard/client/DashboardResources.java | 30 - .../client/RedirectToDashboardAction.java | 203 - .../ide/ext/dashboard/client/Dashboard.css | 25 - .../DashboardLocalizationConstant.properties | 19 - plugins/plugin-dashboard/pom.xml | 29 - .../che-plugin-debugger-ide/pom.xml | 249 - .../debugger/ide/DebuggerExtension.java | 259 - .../ide/DebuggerLocalizationConstant.java | 301 - .../debugger/ide/DebuggerResources.java | 86 - .../ide/actions/AddWatchExpressionAction.java | 53 - .../debugger/ide/actions/DebugAction.java | 77 - .../actions/DebuggerDisplayingModeAction.java | 88 - .../actions/DeleteAllBreakpointsAction.java | 55 - .../ide/actions/DeleteBreakpointAction.java | 54 - .../ide/actions/DisableBreakpointAction.java | 61 - .../ide/actions/DisconnectDebuggerAction.java | 59 - .../ide/actions/EditConfigurationsAction.java | 55 - .../ide/actions/EditDebugVariableAction.java | 72 - .../ide/actions/EnableBreakpointAction.java | 61 - .../ide/actions/EvaluateExpressionAction.java | 63 - .../actions/RemoveWatchExpressionAction.java | 59 - .../ide/actions/ResumeExecutionAction.java | 60 - .../ide/actions/RunToCursorAction.java | 78 - .../actions/ShowHideDebuggerPanelAction.java | 45 - .../debugger/ide/actions/StepIntoAction.java | 60 - .../debugger/ide/actions/StepOutAction.java | 60 - .../debugger/ide/actions/StepOverAction.java | 60 - .../debugger/ide/actions/SuspendAction.java | 66 - .../DebugConfigurationAction.java | 64 - .../DebugConfigurationActionFactory.java | 24 - .../DebugConfigurationTypeRegistry.java | 69 - .../DebugConfigurationsGroup.java | 65 - .../DebugConfigurationsManagerImpl.java | 305 - .../EditConfigurationsResources.java | 55 - .../EditDebugConfigurationsPresenter.java | 392 - .../EditDebugConfigurationsView.java | 127 - .../EditDebugConfigurationsViewImpl.java | 483 -- .../EditDebugConfigurationsViewImpl.ui.xml | 151 - .../dto/DebugConfigurationDto.java | 50 - .../debugger/ide/debug/AbstractDebugger.java | 901 --- .../ide/debug/BreakpointItemRender.java | 97 - .../ide/debug/DebuggerLocationHandler.java | 49 - .../debug/DebuggerLocationHandlerManager.java | 46 - .../debugger/ide/debug/DebuggerPresenter.java | 590 -- .../debugger/ide/debug/DebuggerToolbar.java | 28 - .../debugger/ide/debug/DebuggerView.java | 197 - .../debugger/ide/debug/DebuggerViewImpl.java | 389 - .../ide/debug/DebuggerViewImpl.ui.xml | 129 - .../ide/debug/DebuggerWatchToolBar.java | 28 - .../debug/FileResourceLocationHandler.java | 283 - .../debugger/ide/debug/FrameItemRender.java | 73 - .../breakpoint/BreakpointActionGroup.java | 31 - .../BreakpointConfigurationAction.java | 58 - .../BreakpointConfigurationPresenter.java | 57 - .../BreakpointConfigurationView.java | 43 - .../BreakpointConfigurationViewImpl.java | 165 - .../BreakpointConfigurationViewImpl.ui.xml | 75 - .../breakpoint/BreakpointContextMenu.java | 59 - .../BreakpointContextMenuFactory.java | 30 - .../debug/dialogs/DebuggerDialogFactory.java | 29 - .../changevalue/ChangeValuePresenter.java | 97 - .../dialogs/common/TextAreaDialogView.java | 80 - .../common/TextAreaDialogViewImpl.java | 141 - .../common/TextAreaDialogViewImpl.ui.xml | 36 - .../add/AddWatchExpressionPresenter.java | 75 - .../edit/EditWatchExpressionPresenter.java | 82 - .../EvaluateExpressionPresenter.java | 91 - .../expression/EvaluateExpressionView.java | 74 - .../EvaluateExpressionViewImpl.java | 149 - .../EvaluateExpressionViewImpl.ui.xml | 55 - .../debug/tree/node/AbstractDebuggerNode.java | 41 - .../debug/tree/node/DebuggerNodeFactory.java | 28 - .../ide/debug/tree/node/VariableNode.java | 64 - .../debug/tree/node/WatchExpressionNode.java | 82 - .../comparator/DebugNodeTypeComparator.java | 53 - .../comparator/VariableNodeComparator.java | 34 - .../node/key/DebugNodeUniqueKeyProvider.java | 66 - .../ide/inject/DebuggerGinModule.java | 84 - .../src/main/module.gwt.xml | 20 - .../DebuggerLocalizationConstant.properties | 128 - .../ide/add-watch-expression-button.svg | 23 - .../che/plugin/debugger/ide/breakpoint.svg | 23 - .../add-configuration-button.svg | 21 - .../duplicate-configuration-button.svg | 25 - .../ide/configuration/editConfigurations.css | 125 - .../debugger/ide/configuration/find-icon.svg | 19 - .../remove-configuration-button.svg | 23 - .../che/plugin/debugger/ide/connect.svg | 28 - .../che/plugin/debugger/ide/debug-icon.svg | 18 - .../eclipse/che/plugin/debugger/ide/debug.svg | 19 - .../che/plugin/debugger/ide/debug/Debug.css | 22 - .../che/plugin/debugger/ide/debugger.css | 76 - .../che/plugin/debugger/ide/disconnect.svg | 23 - .../eclipse/che/plugin/debugger/ide/edit.svg | 24 - .../che/plugin/debugger/ide/evaluate.svg | 29 - .../ide/remove-watch-expression-button.svg | 23 - .../che/plugin/debugger/ide/remove.svg | 22 - .../che/plugin/debugger/ide/resume.svg | 26 - .../che/plugin/debugger/ide/runtocursor.svg | 38 - .../che/plugin/debugger/ide/separator.svg | 27 - .../che/plugin/debugger/ide/stepinto.svg | 23 - .../che/plugin/debugger/ide/stepout.svg | 23 - .../che/plugin/debugger/ide/stepover.svg | 23 - .../debugger/ide/watch-expression-icon.svg | 21 - .../che/plugin/debugger/ide/BaseTest.java | 53 - .../debugger/ide/EvaluateExpressionTest.java | 144 - .../debugger/ide/actions/DebugActionTest.java | 68 - .../DebugConfigurationActionTest.java | 75 - .../DebugConfigurationsGroupTest.java | 76 - .../DebugConfigurationsManagerImplTest.java | 107 - .../ide/debug/DebuggerPresenterTest.java | 262 - .../debugger/ide/debug/DebuggerTest.java | 622 -- .../changevalue/ChangeValuePresenterTest.java | 132 - .../src/test/resources/logback-test.xml | 27 - plugins/plugin-debugger/pom.xml | 29 - plugins/plugin-gdb/.gitignore | 58 - plugins/plugin-gdb/README.md | 1 - plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml | 109 - .../che/plugin/gdb/ide/GdbDebugger.java | 110 - .../che/plugin/gdb/ide/GdbExtension.java | 32 - .../che/plugin/gdb/ide/GdbGinModule.java | 36 - .../gdb/ide/GdbLocalizationConstant.java | 39 - .../che/plugin/gdb/ide/GdbResources.java | 23 - .../GdbConfigurationPagePresenter.java | 182 - .../GdbConfigurationPageView.java | 73 - .../GdbConfigurationPageViewImpl.java | 153 - .../GdbConfigurationPageViewImpl.ui.xml | 29 - .../configuration/GdbConfigurationType.java | 60 - .../src/main/module.gwt.xml | 25 - .../ide/GdbLocalizationConstant.properties | 19 - .../configuration/gdb-configuration-type.svg | 21 - .../GdbConfigurationPagePresenterTest.java | 140 - .../GdbConfigurationTypeTest.java | 59 - .../src/test/resources/logback-test.xml | 27 - .../plugin-gdb/che-plugin-gdb-server/pom.xml | 209 - .../eclipse/che/plugin/gdb/server/Gdb.java | 323 - .../che/plugin/gdb/server/GdbDebugger.java | 472 -- .../plugin/gdb/server/GdbDebuggerFactory.java | 61 - .../plugin/gdb/server/GdbDebuggerModule.java | 29 - .../che/plugin/gdb/server/GdbProcess.java | 154 - .../gdb/server/exception/GdbException.java | 25 - .../server/exception/GdbParseException.java | 29 - .../exception/GdbTerminatedException.java | 23 - .../gdb/server/parser/GdbBacktrace.java | 83 - .../plugin/gdb/server/parser/GdbBreak.java | 64 - .../plugin/gdb/server/parser/GdbClear.java | 40 - .../plugin/gdb/server/parser/GdbContinue.java | 60 - .../plugin/gdb/server/parser/GdbDelete.java | 41 - .../gdb/server/parser/GdbDirectory.java | 50 - .../che/plugin/gdb/server/parser/GdbFile.java | 49 - .../plugin/gdb/server/parser/GdbInfoArgs.java | 56 - .../gdb/server/parser/GdbInfoBreak.java | 63 - .../plugin/gdb/server/parser/GdbInfoLine.java | 61 - .../gdb/server/parser/GdbInfoLocals.java | 56 - .../gdb/server/parser/GdbInfoProgram.java | 57 - .../plugin/gdb/server/parser/GdbOutput.java | 43 - .../plugin/gdb/server/parser/GdbPType.java | 49 - .../plugin/gdb/server/parser/GdbPrint.java | 49 - .../che/plugin/gdb/server/parser/GdbRun.java | 60 - .../gdb/server/parser/GdbTargetRemote.java | 62 - .../plugin/gdb/server/parser/GdbVersion.java | 56 - .../plugin/gdb/server/parser/ProcessInfo.java | 59 - .../plugin/gdb/server/GdbDebuggerTest.java | 232 - .../che/plugin/gdb/server/GdbTest.java | 226 - .../gdb/server/parser/GdbBacktraceTest.java | 58 - .../gdb/server/parser/GdbBreakTest.java | 42 - .../gdb/server/parser/GdbClearTest.java | 32 - .../gdb/server/parser/GdbDeleteTest.java | 34 - .../gdb/server/parser/GdbDirectoryTest.java | 40 - .../plugin/gdb/server/parser/GdbFileTest.java | 36 - .../gdb/server/parser/GdbInfoArgsTest.java | 32 - .../gdb/server/parser/GdbInfoBreakTest.java | 44 - .../gdb/server/parser/GdbInfoLineTest.java | 62 - .../gdb/server/parser/GdbInfoLocalsTest.java | 32 - .../gdb/server/parser/GdbInfoProgramTest.java | 41 - .../gdb/server/parser/GdbPTypeTest.java | 29 - .../gdb/server/parser/GdbPrintTest.java | 36 - .../plugin/gdb/server/parser/GdbRunTest.java | 41 - .../server/parser/GdbTargetRemoteTest.java | 52 - .../gdb/server/parser/GdbVersionTest.java | 52 - .../gdb/server/parser/ProcessInfoTest.java | 70 - .../gdb/server/util/GdbDebuggerUtils.java | 37 - .../test/resources/GdbDebuggerTestsSuite.xml | 23 - .../src/test/resources/docker/assembly.xml | 30 - .../src/test/resources/docker/entrypoint.sh | 15 - .../src/test/resources/h.cpp | 11 - .../src/test/resources/hello | Bin 20019 -> 0 bytes .../src/test/resources/logback-test.xml | 25 - plugins/plugin-gdb/pom.xml | 43 - .../che-plugin-git-ext-git/maven-eclipse.xml | 8 - .../plugin-git/che-plugin-git-ext-git/pom.xml | 312 - .../ext/git/client/BranchFilterByRemote.java | 46 - .../ide/ext/git/client/BranchSearcher.java | 80 - .../ide/ext/git/client/DateTimeFormatter.java | 33 - .../git/client/GitAuthActionPresenter.java | 91 - .../GitChangeMarkerRendererFactory.java | 40 - .../ext/git/client/GitEventSubscribable.java | 20 - .../ide/ext/git/client/GitEventsHandler.java | 129 - .../ext/git/client/GitEventsSubscriber.java | 49 - .../che/ide/ext/git/client/GitExtension.java | 247 - .../git/client/GitLocalizationConstant.java | 795 -- .../client/GitNotificationsSubscriber.java | 80 - .../che/ide/ext/git/client/GitResources.java | 164 - .../ide/ext/git/client/GitServiceClient.java | 399 - .../ext/git/client/GitServiceClientImpl.java | 557 -- .../che/ide/ext/git/client/GitUtil.java | 66 - .../git/client/action/AddToIndexAction.java | 147 - .../action/CheckoutReferenceAction.java | 57 - .../ext/git/client/action/CommitAction.java | 56 - .../action/CompareWithBranchAction.java | 52 - .../action/CompareWithLatestAction.java | 122 - .../action/CompareWithRevisionAction.java | 65 - .../client/action/DeleteRepositoryAction.java | 65 - .../ext/git/client/action/FetchAction.java | 53 - .../ide/ext/git/client/action/GitAction.java | 57 - .../ext/git/client/action/HistoryAction.java | 49 - .../client/action/InitRepositoryAction.java | 79 - .../ext/git/client/action/NextDiffAction.java | 37 - .../git/client/action/PreviousDiffAction.java | 38 - .../ide/ext/git/client/action/PullAction.java | 52 - .../ide/ext/git/client/action/PushAction.java | 52 - .../client/action/RemoveFromIndexAction.java | 53 - .../git/client/action/ResetFilesAction.java | 53 - .../client/action/ResetToCommitAction.java | 53 - .../git/client/action/RevertCommitAction.java | 52 - .../git/client/action/ShowBranchesAction.java | 56 - .../git/client/action/ShowMergeAction.java | 53 - .../git/client/action/ShowRemoteAction.java | 56 - .../git/client/action/ShowStatusAction.java | 53 - .../client/action/StatusBarBranchPointer.java | 101 - .../client/action/ToggleGitPanelAction.java | 37 - .../git/client/add/AddToIndexPresenter.java | 117 - .../ext/git/client/add/AddToIndexView.java | 57 - .../git/client/add/AddToIndexViewImpl.java | 123 - .../git/client/add/AddToIndexViewImpl.ui.xml | 49 - .../git/client/branch/BranchPresenter.java | 318 - .../ide/ext/git/client/branch/BranchView.java | 118 - .../ext/git/client/branch/BranchViewImpl.java | 285 - .../git/client/branch/BranchViewImpl.ui.xml | 66 - .../checkout/CheckoutReferencePresenter.java | 117 - .../checkout/CheckoutReferenceView.java | 54 - .../checkout/CheckoutReferenceViewImpl.java | 105 - .../checkout/CheckoutReferenceViewImpl.ui.xml | 41 - .../git/client/commit/CommitPresenter.java | 320 - .../ide/ext/git/client/commit/CommitView.java | 115 - .../ext/git/client/commit/CommitViewImpl.java | 221 - .../git/client/commit/CommitViewImpl.ui.xml | 40 - .../ext/git/client/compare/AlteredFiles.java | 136 - .../git/client/compare/ComparePresenter.java | 382 - .../ext/git/client/compare/CompareView.java | 81 - .../git/client/compare/CompareViewImpl.java | 197 - .../git/client/compare/CompareViewImpl.ui.xml | 44 - .../ext/git/client/compare/FileStatus.java | 62 - .../client/compare/MutableAlteredFiles.java | 84 - .../branchlist/BranchListPresenter.java | 190 - .../compare/branchlist/BranchListView.java | 84 - .../branchlist/BranchListViewImpl.java | 220 - .../branchlist/BranchListViewImpl.ui.xml | 57 - .../changeslist/ChangesListPresenter.java | 112 - .../compare/changeslist/ChangesListView.java | 51 - .../changeslist/ChangesListViewImpl.java | 80 - .../compare/changespanel/ChangedFileNode.java | 135 - .../changespanel/ChangedFolderNode.java | 89 - .../changespanel/ChangesPanelPresenter.java | 107 - .../changespanel/ChangesPanelView.java | 102 - .../changespanel/ChangesPanelViewImpl.java | 340 - .../changespanel/ChangesPanelViewImpl.ui.xml | 59 - .../client/compare/changespanel/ViewMode.java | 22 - .../revisionslist/RevisionListPresenter.java | 177 - .../revisionslist/RevisionListView.java | 81 - .../revisionslist/RevisionListViewImpl.java | 196 - .../revisionslist/RevisionListViewImpl.ui.xml | 32 - .../CheckBoxRender.java | 161 - .../SelectableChangesPanelPresenter.java | 81 - .../SelectableChangesPanelView.java | 51 - .../SelectableChangesPanelViewImpl.java | 55 - .../SelectionCallBack.java | 30 - .../delete/DeleteRepositoryPresenter.java | 82 - .../ext/git/client/fetch/FetchPresenter.java | 261 - .../ide/ext/git/client/fetch/FetchView.java | 155 - .../ext/git/client/fetch/FetchViewImpl.java | 260 - .../ext/git/client/fetch/FetchViewImpl.ui.xml | 71 - .../git/client/history/HistoryPresenter.java | 202 - .../ext/git/client/history/HistoryView.java | 78 - .../git/client/history/HistoryViewImpl.java | 210 - .../git/client/history/HistoryViewImpl.ui.xml | 32 - .../importer/GitImportWizardRegistrar.java | 48 - .../page/GitImporterPagePresenter.java | 271 - .../importer/page/GitImporterPageView.java | 202 - .../page/GitImporterPageViewImpl.java | 323 - .../page/GitImporterPageViewImpl.ui.xml | 80 - .../client/init/InitRepositoryPresenter.java | 96 - .../ext/git/client/inject/GitGinModule.java | 138 - .../ext/git/client/merge/MergePresenter.java | 223 - .../ide/ext/git/client/merge/MergeView.java | 69 - .../ext/git/client/merge/MergeViewImpl.java | 215 - .../ext/git/client/merge/MergeViewImpl.ui.xml | 38 - .../ide/ext/git/client/merge/Reference.java | 75 - .../merge/ReferenceTreeNodeDataAdapter.java | 99 - .../merge/ReferenceTreeNodeRenderer.java | 89 - .../outputconsole/GitOutputConsole.java | 47 - .../GitOutputConsoleFactory.java | 19 - .../GitOutputConsolePresenter.java | 142 - .../outputconsole/GitOutputPartView.java | 57 - .../outputconsole/GitOutputPartViewImpl.java | 128 - .../GitOutputPartViewImpl.ui.xml | 81 - .../git/client/panel/GitPanelPresenter.java | 373 - .../ext/git/client/panel/GitPanelView.java | 70 - .../git/client/panel/GitPanelViewImpl.java | 142 - .../git/client/panel/GitPanelViewImpl.ui.xml | 34 - .../ext/git/client/panel/RepositoryNode.java | 115 - .../client/panel/RepositoryNodeFactory.java | 23 - .../client/plugins/EditorTabsColorizer.java | 141 - .../plugins/GitChangeMarkerManager.java | 124 - .../client/plugins/GitChangeMarkerRender.java | 69 - .../client/plugins/GitCheckoutNotifier.java | 93 - .../plugins/ProjectExplorerTreeColorizer.java | 108 - .../CommitterPreferencePresenter.java | 105 - .../preference/CommitterPreferenceView.java | 38 - .../CommitterPreferenceViewImpl.java | 74 - .../CommitterPreferenceViewImpl.ui.xml | 45 - .../ext/git/client/pull/PullPresenter.java | 264 - .../che/ide/ext/git/client/pull/PullView.java | 111 - .../ide/ext/git/client/pull/PullViewImpl.java | 218 - .../ext/git/client/pull/PullViewImpl.ui.xml | 59 - .../client/push/PushToRemotePresenter.java | 392 - .../ext/git/client/push/PushToRemoteView.java | 120 - .../git/client/push/PushToRemoteViewImpl.java | 225 - .../client/push/PushToRemoteViewImpl.ui.xml | 59 - .../git/client/remote/RemotePresenter.java | 166 - .../ide/ext/git/client/remote/RemoteView.java | 72 - .../ext/git/client/remote/RemoteViewImpl.java | 218 - .../git/client/remote/RemoteViewImpl.ui.xml | 38 - .../add/AddRemoteRepositoryPresenter.java | 94 - .../remote/add/AddRemoteRepositoryView.java | 71 - .../add/AddRemoteRepositoryViewImpl.java | 149 - .../add/AddRemoteRepositoryViewImpl.ui.xml | 50 - .../remove/RemoveFromIndexPresenter.java | 151 - .../client/remove/RemoveFromIndexView.java | 63 - .../remove/RemoveFromIndexViewImpl.java | 131 - .../remove/RemoveFromIndexViewImpl.ui.xml | 50 - .../reset/commit/ResetToCommitPresenter.java | 172 - .../reset/commit/ResetToCommitView.java | 100 - .../reset/commit/ResetToCommitViewImpl.java | 291 - .../reset/commit/ResetToCommitViewImpl.ui.xml | 67 - .../reset/files/ResetFilesPresenter.java | 206 - .../client/reset/files/ResetFilesView.java | 49 - .../reset/files/ResetFilesViewImpl.java | 166 - .../reset/files/ResetFilesViewImpl.ui.xml | 39 - .../client/revert/RevertCommitPresenter.java | 205 - .../git/client/revert/RevertCommitView.java | 55 - .../client/revert/RevertCommitViewImpl.java | 187 - .../client/revert/RevertCommitViewImpl.ui.xml | 41 - .../client/status/StatusCommandPresenter.java | 106 - .../META-INF/NativeGitAskPassTemplate | 2 - .../src/main/resources/META-INF/SshTemplate | 1 - .../client/GitLocalizationConstant.properties | 311 - .../che/ide/ext/git/client/branch/current.svg | 25 - .../che/ide/ext/git/client/changeMarkers.css | 66 - .../ide/ext/git/client/controls/branches.svg | 43 - .../git/client/controls/checkoutReference.svg | 27 - .../che/ide/ext/git/client/controls/clone.svg | 15 - .../ide/ext/git/client/controls/commit.svg | 15 - .../ext/git/client/controls/delete-repo.svg | 15 - .../che/ide/ext/git/client/controls/fetch.svg | 24 - .../git/client/controls/git-output-icon.svg | 21 - .../che/ide/ext/git/client/controls/init.svg | 15 - .../che/ide/ext/git/client/controls/merge.svg | 15 - .../che/ide/ext/git/client/controls/pull.svg | 15 - .../che/ide/ext/git/client/controls/push.svg | 15 - .../ide/ext/git/client/controls/remote.svg | 29 - .../ide/ext/git/client/controls/remotes.svg | 15 - .../ide/ext/git/client/controls/revert.svg | 34 - .../eclipse/che/ide/ext/git/client/git.css | 63 - .../ide/ext/git/client/history/diff_index.svg | 59 - .../git/client/history/diff_prev_version.svg | 57 - .../git/client/history/diff_working_dir.svg | 54 - .../ide/ext/git/client/history/history.svg | 15 - .../ext/git/client/history/project_level.svg | 51 - .../ide/ext/git/client/history/refresh.svg | 26 - .../ext/git/client/history/resource_level.svg | 51 - .../che/ide/ext/git/client/icons/added.svg | 28 - .../che/ide/ext/git/client/icons/copied.svg | 28 - .../che/ide/ext/git/client/icons/deleted.svg | 28 - .../che/ide/ext/git/client/icons/modified.svg | 28 - .../che/ide/ext/git/client/icons/renamed.svg | 28 - .../ide/ext/git/client/icons/untracked.svg | 28 - .../client/importer/page/GitImporterPage.css | 69 - .../che/ide/ext/git/client/merge/Merge.css | 46 - .../che/ide/ext/git/client/panel/git-logo.svg | 31 - .../che/ide/ext/git/client/panel/git.svg | 52 - .../che/ide/ext/git/client/panel/gitPanel.css | 45 - .../ide/ext/git/client/panel/repository.svg | 67 - .../che/ide/ext/git/client/push/arrow.svg | 21 - .../ext/git/client/reset/commit/custom.css | 66 - .../che/ide/ext/git/client/BaseTest.java | 153 - .../git/client/BranchFilterByRemoteTest.java | 78 - .../client/add/AddToIndexPresenterTest.java | 154 - .../client/branch/BranchPresenterTest.java | 409 - .../checkout/CheckoutReferenceTest.java | 128 - .../client/commit/CommitPresenterTest.java | 331 - .../git/client/compare/AlteredFilesTest.java | 113 - .../git/client/fetch/FetchPresenterTest.java | 154 - .../client/history/HistoryPresenterTest.java | 219 - .../page/GitImporterPagePresenterTest.java | 365 - .../init/InitRepositoryPresenterTest.java | 87 - .../git/client/merge/MergePresenterTest.java | 132 - .../client/patcher/JsOAuthWindowPatcher.java | 38 - .../git/client/patcher/JsoArrayPatcher.java | 39 - .../ext/git/client/patcher/WindowPatcher.java | 44 - .../CommitterPreferencePresenterTest.java | 101 - .../add/AddRemoteRepositoryPresenterTest.java | 95 - .../reset/files/ResetFilesPresenterTest.java | 227 - .../commit/RevertCommitPresenterTest.java | 128 - .../status/StatusCommandPresenterTest.java | 85 - .../META-INF/gwt-test-utils.properties | 14 - .../src/test/resources/logback-test.xml | 36 - plugins/plugin-git/pom.xml | 43 - .../che-plugin-github-ide/pom.xml | 251 - .../plugin/github/ide/GitHubExtension.java | 52 - .../ide/GitHubLocalizationConstant.java | 108 - .../plugin/github/ide/GitHubResources.java | 25 - .../github/ide/GitHubServiceClient.java | 230 - .../github/ide/GitHubServiceClientImpl.java | 301 - .../github/ide/GitHubSshKeyUploader.java | 149 - .../github/ide/action/OpenOnGitHubAction.java | 152 - .../GitHubAuthenticatorImpl.java | 157 - .../GitHubAuthenticatorView.java | 34 - .../GitHubAuthenticatorViewImpl.java | 101 - .../importer/GitHubImportWizardRegistrar.java | 48 - .../page/GithubImporterPagePresenter.java | 538 -- .../importer/page/GithubImporterPageView.java | 254 - .../page/GithubImporterPageViewImpl.java | 501 -- .../page/GithubImporterPageViewImpl.ui.xml | 104 - .../github/ide/inject/GitHubGinModule.java | 39 - .../plugin/github/ide/load/ProjectData.java | 149 - .../src/main/module.gwt.xml | 24 - .../ide/GitHubLocalizationConstant.properties | 45 - .../ide/importer/page/GithubImporterPage.css | 91 - .../GitHubAuthenticatorImplTest.java | 287 - .../page/GithubImporterPagePresenterTest.java | 526 -- .../che-plugin-github-provider-github/pom.xml | 58 - .../github/GitHubOAuthCredentialProvider.java | 58 - .../git/server/github/GithubGitModule.java | 34 - .../che-plugin-github-pullrequest/pom.xml | 162 - .../client/GitHubContributionWorkflow.java | 155 - .../client/GitHubHostingService.java | 571 -- .../pullrequest/client/GitHubTemplates.java | 33 - .../client/GithubStagesProvider.java | 104 - .../inject/GithubPullRequestGinModule.java | 49 - .../src/main/module.gwt.xml | 19 - .../che-plugin-github-server/pom.xml | 176 - .../github/server/GitHubDTOFactory.java | 269 - .../plugin/github/server/GitHubFactory.java | 40 - .../github/server/GitHubKeyUploader.java | 152 - .../github/server/GitHubProjectImporter.java | 44 - .../github/server/inject/GitHubModule.java | 47 - .../github/server/rest/GitHubService.java | 426 -- .../maven-eclipse.xml | 8 - .../che-plugin-github-shared/pom.xml | 43 - .../plugin/github/shared/Collaborators.java | 26 - .../github/shared/GitHubIssueComment.java | 50 - .../shared/GitHubIssueCommentInput.java | 28 - .../che/plugin/github/shared/GitHubKey.java | 34 - .../github/shared/GitHubPullRequest.java | 138 - .../GitHubPullRequestCreationInput.java | 61 - .../github/shared/GitHubPullRequestHead.java | 50 - .../github/shared/GitHubPullRequestList.java | 65 - .../github/shared/GitHubRepository.java | 233 - .../github/shared/GitHubRepositoryList.java | 66 - .../plugin/github/shared/GitHubUrlUtils.java | 66 - .../che/plugin/github/shared/GitHubUser.java | 101 - .../che/plugin/github/GitHUbUrlUtilsTest.java | 75 - plugins/plugin-github/pom.xml | 33 - .../che-plugin-golang-lang-ide/pom.xml | 97 - .../plugin/golang/ide/GolangExtension.java | 69 - .../plugin/golang/ide/GolangResources.java | 26 - .../golang/ide/inject/GolangGinModule.java | 30 - .../project/GolangProjectWizardRegistrar.java | 51 - .../src/main/module.gwt.xml | 21 - .../che/plugin/golang/ide/icons/go.svg | 18 - .../che-plugin-golang-lang-server/pom.xml | 57 - .../plugin/golang/inject/GolangModule.java | 38 - .../GolangLanguageServerConfig.java | 96 - .../golang/projecttype/GolangProjectType.java | 26 - .../che-plugin-golang-lang-shared/pom.xml | 24 - .../che/plugin/golang/shared/Constants.java | 27 - plugins/plugin-golang/pom.xml | 31 - .../plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml | 98 - .../che/ide/ext/gwt/client/GwtExtension.java | 29 - .../che/ide/ext/gwt/client/GwtGinModule.java | 32 - .../gwt/client/GwtLocalizationConstants.java | 32 - .../che/ide/ext/gwt/client/GwtResources.java | 26 - .../gwt/client/command/GwtCommandModel.java | 95 - .../command/GwtCommandPagePresenter.java | 114 - .../client/command/GwtCommandPageView.java | 55 - .../command/GwtCommandPageViewImpl.java | 131 - .../command/GwtCommandPageViewImpl.ui.xml | 76 - .../gwt/client/command/GwtCommandType.java | 91 - .../GwtLocalizationConstants.properties | 16 - .../gwt/client/images/gwt-command-type.svg | 21 - .../client/command/GwtCommandTypeTest.java | 55 - .../client/command/GwtPagePresenterTest.java | 115 - plugins/plugin-gwt/pom.xml | 29 - .../che-plugin-help-ext-client/pom.xml | 82 - .../ide/ext/help/client/AboutResources.java | 44 - .../ext/help/client/BuildDetailsProvider.java | 29 - .../che/ide/ext/help/client/BuildInfo.java | 34 - .../ext/help/client/HelpAboutExtension.java | 43 - .../HelpExtensionLocalizationConstant.java | 29 - .../help/client/RedirectToSupportAction.java | 54 - .../about/AboutLocalizationConstant.java | 33 - .../ext/help/client/about/AboutPresenter.java | 55 - .../ide/ext/help/client/about/AboutView.java | 44 - .../ext/help/client/about/AboutViewImpl.java | 108 - .../help/client/about/AboutViewImpl.ui.xml | 32 - .../help/client/about/ShowAboutAction.java | 42 - .../impl/FormattedBuildDetailsProvider.java | 97 - .../BuildDetailsLocalizationConstant.java | 28 - .../about/info/BuildDetailsPresenter.java | 38 - .../client/about/info/BuildDetailsView.java | 29 - .../about/info/BuildDetailsViewImpl.java | 88 - .../about/info/BuildDetailsViewImpl.ui.xml | 21 - .../client/inject/HelpAboutGinModule.java | 33 - .../eclipse/che/ide/ext/help/client/About.css | 52 - ...lpExtensionLocalizationConstant.properties | 19 - .../AboutLocalizationConstant.properties | 16 - ...uildDetailsLocalizationConstant.properties | 14 - .../che/ide/ext/help/client/actions/about.svg | 27 - .../ide/ext/help/client/actions/support.svg | 25 - .../FormattedBuildDetailsProviderTest.java | 32 - plugins/plugin-help/pom.xml | 29 - plugins/plugin-java-debugger/.gitignore | 58 - plugins/plugin-java-debugger/README.md | 1 - .../che-plugin-java-debugger-ide/pom.xml | 152 - .../plugin/jdb/ide/JavaDebuggerExtension.java | 44 - .../ide/JavaDebuggerLocalizationConstant.java | 33 - .../plugin/jdb/ide/JavaDebuggerResources.java | 23 - .../JavaDebugConfigurationPagePresenter.java | 136 - .../JavaDebugConfigurationPageView.java | 62 - .../JavaDebugConfigurationPageViewImpl.java | 157 - .../JavaDebugConfigurationPageViewImpl.ui.xml | 33 - .../JavaDebugConfigurationType.java | 62 - .../ExternalResourceLocationHandler.java | 106 - .../plugin/jdb/ide/debug/JavaDebugger.java | 90 - .../jdb/ide/inject/JavaRuntimeGinModule.java | 39 - .../src/main/module.gwt.xml | 24 - ...avaDebuggerLocalizationConstant.properties | 17 - .../java-debug-configuration-type.svg | 21 - ...vaDebugConfigurationPagePresenterTest.java | 121 - .../JavaDebugConfigurationTypeTest.java | 58 - .../src/test/resources/logback-test.xml | 27 - .../che-plugin-java-debugger-server/pom.xml | 289 - .../jdb/server/BreakPointComparator.java | 42 - .../plugin/jdb/server/EventsCollector.java | 58 - .../che/plugin/jdb/server/EventsHandler.java | 25 - .../che/plugin/jdb/server/JavaDebugger.java | 862 --- .../jdb/server/JavaDebuggerFactory.java | 68 - .../plugin/jdb/server/JavaDebuggerModule.java | 29 - .../jdb/server/model/JdbArrayElement.java | 68 - .../che/plugin/jdb/server/model/JdbField.java | 108 - .../jdb/server/model/JdbFieldComparator.java | 34 - .../plugin/jdb/server/model/JdbLocation.java | 98 - .../plugin/jdb/server/model/JdbMethod.java | 66 - .../plugin/jdb/server/model/JdbNullValue.java | 33 - .../jdb/server/model/JdbStackFrame.java | 129 - .../che/plugin/jdb/server/model/JdbType.java | 49 - .../che/plugin/jdb/server/model/JdbValue.java | 87 - .../plugin/jdb/server/model/JdbVariable.java | 67 - .../jdb/server/BreakpointConditionTest.java | 109 - .../server/BreakpointsByConditionTest.java | 90 - .../plugin/jdb/server/BreakpointsTest.java | 164 - .../jdb/server/EvaluateExpressionTest.java | 80 - .../che/plugin/jdb/server/GetValueTest.java | 138 - .../plugin/jdb/server/JavaDebuggerTest.java | 154 - .../plugin/jdb/server/StackFrameDumpTest.java | 227 - .../plugin/jdb/server/SuspendPolicyTest.java | 109 - .../che/plugin/jdb/server/ThreadDumpTest.java | 153 - .../server/util/JavaDebuggerTestUtils.java | 116 - .../util/JavaLanguageServerExtensionStub.java | 66 - .../jdb/server/util/ProjectApiUtils.java | 137 - .../test/resources/JavaDebuggerTestsSuite.xml | 29 - .../src/test/resources/docker/assembly.xml | 54 - .../src/test/resources/docker/entrypoint.sh | 33 - .../src/test/resources/logback-test.xml | 25 - .../BreakpointsByConditionTest.java | 28 - .../testclasses/BreakpointsTest.java | 44 - .../testclasses/EvaluateExpressionTest.java | 24 - .../resources/testclasses/GetValueTest.java | 29 - .../resources/testclasses/HelloWorld.java | 31 - .../testclasses/StackFrameDumpTest.java | 28 - .../testclasses/SuspendPolicyTest.java | 21 - .../resources/testclasses/ThreadDumpTest.java | 47 - .../resources/workspace/test/.che/classpath | 17 - plugins/plugin-java-debugger/pom.xml | 43 - .../che-plugin-java-ext-lang-client/pom.xml | 356 - .../java/client/CurrentClassFQN_Macro.java | 75 - .../che/ide/ext/java/client/JavaCss.java | 51 - .../ext/java/client/JavaEditorExtension.java | 37 - .../ide/ext/java/client/JavaExtension.java | 254 - .../java/client/JavaLocalizationConstant.java | 500 -- .../ide/ext/java/client/JavaResources.java | 155 - .../che/ide/ext/java/client/JavaUtils.java | 307 - .../ide/ext/java/client/MavenResources.java | 41 - .../che/ide/ext/java/client/Resources.java | 39 - .../client/action/FileStructureAction.java | 57 - .../java/client/action/FindUsagesAction.java | 62 - .../client/action/GetEffectivePomAction.java | 145 - .../java/client/action/JavaEditorAction.java | 61 - .../client/action/MarkDirAsSourceAction.java | 112 - .../client/action/MarkDirectoryAsGroup.java | 57 - .../action/NewJavaSourceFileAction.java | 96 - .../java/client/action/NewPackageAction.java | 171 - .../action/OpenImplementationAction.java | 59 - .../client/action/OrganizeImportsAction.java | 70 - .../client/action/ProjectClasspathAction.java | 75 - .../java/client/action/ProposalAction.java | 26 - .../action/QuickDocumentationAction.java | 62 - .../java/client/action/QuickFixAction.java | 57 - .../ReimportMavenDependenciesAction.java | 120 - .../action/UnmarkDirAsSourceAction.java | 106 - .../client/command/ClasspathContainer.java | 80 - .../java/client/command/JavaCommandModel.java | 71 - .../command/JavaCommandPagePresenter.java | 141 - .../client/command/JavaCommandPageView.java | 51 - .../command/JavaCommandPageViewImpl.java | 118 - .../command/JavaCommandPageViewImpl.ui.xml | 89 - .../java/client/command/JavaCommandType.java | 109 - .../mainclass/ClassNodeInterceptor.java | 48 - .../mainclass/SelectNodePresenter.java | 76 - .../command/mainclass/SelectNodeView.java | 42 - .../command/mainclass/SelectNodeViewImpl.java | 178 - .../mainclass/SelectNodeViewImpl.ui.xml | 28 - .../valueproviders/ClasspathMacro.java | 129 - .../valueproviders/MainClassMacro.java | 62 - .../valueproviders/OutputDirMacro.java | 89 - .../valueproviders/SourcepathMacro.java | 109 - .../diagnostics/PomDiagnosticsRequestor.java | 60 - .../documentation/QuickDocPresenter.java | 48 - .../documentation/QuickDocumentation.java | 18 - .../formatter/JavaFormatterServiceClient.java | 116 - .../FormatterPreferencePagePresenter.java | 137 - .../FormatterPreferencePageView.java | 46 - .../FormatterPreferencePageViewImpl.java | 159 - .../FormatterPreferencePageViewImpl.ui.xml | 53 - .../client/inject/FormatterGinModule.java | 32 - .../ext/java/client/inject/JavaGinModule.java | 202 - .../JavaLanguageDescriptionProvider.java | 29 - .../factories/ProgressWidgetFactory.java | 29 - .../factories/PropertyWidgetFactory.java | 34 - .../ElementSelectionDelegate.java | 24 - .../filestructure/FileStructurePresenter.java | 98 - .../filestructure/FileStructureTree.java | 61 - .../filestructure/FileStructureView.java | 115 - .../filestructure/FileStructureView.ui.xml | 17 - .../filestructure/FileStructureWindow.java | 142 - .../filestructure/FileStructureWindow.ui.xml | 37 - .../navigation/filestructure/NodeFactory.java | 20 - .../navigation/filestructure/SymbolNode.java | 84 - .../ImplementationWidget.java | 127 - .../OpenImplementationPresenter.java | 119 - .../newsourcefile/JavaSourceFileType.java | 35 - .../NewJavaSourceFilePresenter.java | 218 - .../newsourcefile/NewJavaSourceFileView.java | 55 - .../NewJavaSourceFileViewImpl.java | 118 - .../NewJavaSourceFileViewImpl.ui.xml | 42 - .../OrganizeImportsPresenter.java | 238 - .../organizeimports/OrganizeImportsView.java | 87 - .../OrganizeImportsViewImpl.java | 164 - .../OrganizeImportsViewImpl.ui.xml | 34 - .../progressor/ProgressMessagesHandler.java | 140 - .../progressor/ProgressMonitorPresenter.java | 107 - .../progressor/ProgressMonitorView.java | 43 - .../progressor/ProgressMonitorViewImpl.java | 64 - .../progressor/ProgressMonitorViewImpl.ui.xml | 31 - .../java/client/progressor/ProgressView.java | 31 - .../client/progressor/ProgressViewImpl.java | 61 - .../client/progressor/ProgressViewImpl.ui.xml | 63 - .../progressor/ProgressorJsonRpcHandler.java | 85 - .../background/BackgroundLoaderPresenter.java | 87 - .../background/BackgroundLoaderView.java | 54 - .../background/BackgroundLoaderViewImpl.java | 121 - .../BackgroundLoaderViewImpl.ui.xml | 44 - .../background/ProgressMonitorAction.java | 44 - .../project/classpath/ClasspathResolver.java | 147 - .../ProjectClasspathChangedEvent.java | 47 - .../classpath/ProjectClasspathPresenter.java | 206 - .../classpath/ProjectClasspathResources.java | 50 - .../classpath/ProjectClasspathView.java | 74 - .../classpath/ProjectClasspathViewImpl.java | 190 - .../classpath/ProjectClasspathViewImpl.ui.xml | 100 - .../valueproviders/node/NodeEntry.java | 36 - .../valueproviders/node/NodeWidget.java | 117 - .../valueproviders/node/NodeWidget.ui.xml | 79 - .../pages/AbstractClasspathPagePresenter.java | 55 - .../pages/ClasspathPagePresenter.java | 75 - .../pages/libraries/LibEntryPresenter.java | 189 - .../pages/libraries/LibEntryView.java | 49 - .../pages/libraries/LibEntryViewImpl.java | 220 - .../pages/libraries/LibEntryViewImpl.ui.xml | 56 - .../pages/sources/SourceEntryPresenter.java | 185 - .../pages/sources/SourceEntryView.java | 60 - .../pages/sources/SourceEntryViewImpl.java | 202 - .../pages/sources/SourceEntryViewImpl.ui.xml | 53 - .../selectnode/SelectNodePresenter.java | 92 - .../selectnode/SelectNodeView.java | 43 - .../selectnode/SelectNodeViewImpl.java | 158 - .../selectnode/SelectNodeViewImpl.ui.xml | 28 - .../ClasspathNodeInterceptor.java | 30 - .../interceptors/JarNodeInterceptor.java | 58 - .../SourceFolderNodeInterceptor.java | 57 - .../projecttree/JavaSourceFolderUtil.java | 94 - .../java/client/refactoring/RefactorInfo.java | 62 - .../RefactoringActionDelegate.java | 22 - .../refactoring/move/CutJavaSourceAction.java | 113 - .../client/refactoring/move/MoveAction.java | 184 - .../client/refactoring/move/MoveType.java | 18 - .../refactoring/move/RefactoredItemType.java | 19 - .../move/wizard/MovePresenter.java | 262 - .../refactoring/move/wizard/MoveView.java | 105 - .../refactoring/move/wizard/MoveViewImpl.java | 272 - .../move/wizard/MoveViewImpl.ui.xml | 115 - .../move/wizard/ProjectsAndPackagesModel.java | 115 - .../refactoring/preview/ChangePreview.java | 78 - .../refactoring/preview/PreviewNode.java | 147 - .../refactoring/preview/PreviewPresenter.java | 312 - .../refactoring/preview/PreviewView.java | 79 - .../refactoring/preview/PreviewViewImpl.java | 380 - .../preview/PreviewViewImpl.ui.xml | 94 - .../preview/StringStreamEditor.java | 122 - .../rename/JavaRefactoringRename.java | 366 - .../rename/RenameRefactoringAction.java | 232 - .../rename/wizard/EmptyOperation.java | 37 - .../refactoring/rename/wizard/Operation.java | 61 - .../rename/wizard/RenamePresenter.java | 501 -- .../refactoring/rename/wizard/RenameView.java | 162 - .../rename/wizard/RenameViewImpl.java | 364 - .../rename/wizard/RenameViewImpl.ui.xml | 193 - .../SimilarNamesConfigurationPresenter.java | 43 - .../SimilarNamesConfigurationView.java | 32 - .../SimilarNamesConfigurationViewImpl.java | 100 - .../SimilarNamesConfigurationViewImpl.ui.xml | 66 - .../client/reference/JavaFqnProvider.java | 36 - .../client/resource/ClassInterceptor.java | 39 - .../resource/JavaSourceRenameValidator.java | 31 - .../resource/SourceFolderInterceptor.java | 81 - .../client/resource/SourceFolderMarker.java | 39 - .../ext/java/client/search/ElementNode.java | 100 - .../client/search/FindUsagesPresenter.java | 217 - .../java/client/search/FindUsagesView.java | 24 - .../client/search/FindUsagesViewImpl.java | 159 - .../ide/ext/java/client/search/MatchNode.java | 120 - .../ext/java/client/search/NodeFactory.java | 30 - .../ext/java/client/search/PackageNode.java | 97 - .../ext/java/client/search/ProjectNode.java | 73 - .../ext/java/client/search/UsagesNode.java | 135 - .../service/CustomNotificationReceiver.java | 130 - .../JavaLanguageExtensionServiceClient.java | 529 -- .../compiler/ErrorWarningsOptions.java | 70 - .../settings/compiler/ErrorWarningsView.java | 33 - .../compiler/ErrorWarningsViewImpl.java | 48 - .../compiler/ErrorWarningsViewImpl.ui.xml | 26 - .../ErrorsWarningsPreferenceManager.java | 108 - .../JavaCompilerPreferenceManager.java | 28 - .../JavaCompilerPreferencePresenter.java | 206 - .../property/PropertyNameManager.java | 92 - .../settings/property/PropertyWidget.java | 43 - .../settings/property/PropertyWidgetImpl.java | 93 - .../property/PropertyWidgetImpl.ui.xml | 56 - .../ext/java/client/tree/JavaNodeFactory.java | 40 - .../client/tree/JavaPackageConnector.java | 168 - .../java/client/tree/LibraryNodeProvider.java | 81 - .../ide/ext/java/client/tree/PackageNode.java | 112 - .../client/tree/SourceFolderDecorator.java | 73 - .../java/client/tree/TestFolderDecorator.java | 97 - .../java/client/tree/library/EntryType.java | 20 - .../java/client/tree/library/JarFileNode.java | 282 - .../client/tree/library/JarFolderNode.java | 131 - .../ext/java/client/tree/library/JarNode.java | 119 - .../client/tree/library/LibrariesNode.java | 132 - .../ide/ext/java/client/util/JavaUtil.java | 149 - .../ide/ext/java/client/util/SymbolIcons.java | 89 - .../src/main/module.gwt.xml | 22 - .../JavaLocalizationConstant.properties | 211 - .../che/ide/ext/java/client/Semantic.css | 40 - .../che/ide/ext/java/client/images/class.svg | 27 - .../ext/java/client/images/default_field.svg | 21 - .../ext/java/client/images/default_method.svg | 21 - .../ide/ext/java/client/images/interface.svg | 23 - .../ide/ext/java/client/images/package.svg | 24 - .../ext/java/client/images/private_field.svg | 20 - .../java/client/images/protected_field.svg | 20 - .../ext/java/client/images/public_field.svg | 20 - .../ide/ext/java/client/images/taskmrk.svg | 30 - .../ide/ext/java/client/images/template.svg | 34 - .../text/correction/proposals/add.svg | 105 - .../correction/proposals/correction_cast.svg | 115 - .../proposals/correction_change.svg | 107 - .../proposals/correction_delete_import.svg | 28 - .../proposals/correction_rename.svg | 117 - .../text/correction/proposals/import.svg | 108 - .../text/correction/proposals/javadoc.svg | 41 - .../correction/proposals/jexception_obj.svg | 30 - .../text/correction/proposals/local.svg | 24 - .../text/correction/proposals/remove.svg | 22 - .../proposals/remove_correction.svg | 23 - .../eclipse/che/ide/ext/java/client/java.css | 103 - .../eclipse/che/ide/ext/java/client/maven.css | 27 - .../client/progressor/background/Loader.css | 72 - .../client/progressor/background/error.svg | 25 - .../progressor/background/loaderIcon.svg | 34 - .../project/classpath/PropertiesRenderer.css | 155 - .../project/classpath/remove-node-button.svg | 23 - .../ext/java/client/svg/annotation_type.svg | 31 - .../ide/ext/java/client/svg/category/java.svg | 32 - .../che/ide/ext/java/client/svg/enum_type.svg | 25 - .../ext/java/client/svg/externalLibraries.svg | 33 - .../ext/java/client/svg/file-navigation.svg | 34 - .../ide/ext/java/client/svg/jarFileIcon.svg | 35 - .../che/ide/ext/java/client/svg/javaFile.svg | 26 - .../che/ide/ext/java/client/svg/jsfFile.svg | 43 - .../che/ide/ext/java/client/svg/jspFile.svg | 37 - .../ide/ext/java/client/svg/mark-error.svg | 20 - .../ide/ext/java/client/svg/mark-warning.svg | 22 - .../java/client/svg/maven-command-type.svg | 21 - .../che/ide/ext/java/client/svg/maven.svg | 26 - .../ext/java/client/svg/openDeclaration.svg | 27 - .../ext/java/client/svg/private_method.svg | 20 - .../ext/java/client/svg/protected_method.svg | 20 - .../ide/ext/java/client/svg/publicMethod.svg | 20 - .../java/client/svg/quickDocumentation.svg | 23 - .../ide/ext/java/client/svg/searchMatch.svg | 102 - .../ide/ext/java/client/svg/sourceFolder.svg | 21 - .../ide/ext/java/client/svg/testFolder.svg | 21 - .../java/client/svg/update-dependencies.svg | 23 - .../ls/extension/api/JdtlsExtension.gwt.xml | 19 - .../ide/ext/java/client/JavaUtilsTest.java | 70 - .../action/OrganizeImportsActionTest.java | 72 - .../command/ClasspathContainerTest.java | 75 - .../command/JavaCommandPagePresenterTest.java | 86 - .../valueproviders/ClasspathMacroTest.java | 170 - .../valueproviders/OutputDirMacroTest.java | 132 - .../valueproviders/SourcepathMacroTest.java | 127 - .../FormatterPreferencePagePresenterTest.java | 140 - .../action/FileStructureActionTest.java | 64 - .../OpenImplementationPresenterTest.java | 153 - .../move/CutJavaSourceActionTest.java | 94 - ...imilarNamesConfigurationPresenterTest.java | 46 - ...SimilarNamesConfigurationViewImplTest.java | 62 - .../JavaSourceRenameValidatorTest.java | 71 - .../client/search/SnippetLoadingTest.java | 135 - .../compiler/ErrorWarningsViewImplTest.java | 37 - .../JavaCompilerPreferencePresenterTest.java | 246 - .../property/PropertyNameManagerTest.java | 74 - .../property/PropertyWidgetImplTest.java | 86 - .../META-INF/gwt-test-utils.properties | 14 - .../src/test/resources/logback-test.xml | 27 - .../client/core/CreateJavaClassPresenter.txt | 1025 --- .../che/ide/ext/java/patchers/parser1.rscjson | 1 - .../ide/ext/java/patchers/parser10.rscjson | 1 - .../ide/ext/java/patchers/parser11.rscjson | 1 - .../ide/ext/java/patchers/parser12.rscjson | 1 - .../ide/ext/java/patchers/parser13.rscjson | 1 - .../ide/ext/java/patchers/parser14.rscjson | 1 - .../ide/ext/java/patchers/parser15.rscjson | 1 - .../ide/ext/java/patchers/parser16.rscjson | 1 - .../che/ide/ext/java/patchers/parser17.rsc | 1 - .../che/ide/ext/java/patchers/parser18.rsc | 1 - .../che/ide/ext/java/patchers/parser19.rsc | 1 - .../che/ide/ext/java/patchers/parser2.rscjson | 1 - .../ide/ext/java/patchers/parser20.rscjson | 1 - .../che/ide/ext/java/patchers/parser21.rsc | 1 - .../ide/ext/java/patchers/parser22.rscjson | 1 - .../ide/ext/java/patchers/parser23.rscjson | 1 - .../ide/ext/java/patchers/parser24.rscjson | 1 - .../che/ide/ext/java/patchers/parser3.rscjson | 1 - .../che/ide/ext/java/patchers/parser4.rscjson | 1 - .../che/ide/ext/java/patchers/parser5.rscjson | 1 - .../che/ide/ext/java/patchers/parser6.rscjson | 1 - .../che/ide/ext/java/patchers/parser7.rscjson | 1 - .../che/ide/ext/java/patchers/parser8.rscjson | 1 - .../che/ide/ext/java/patchers/parser9.rscjson | 1 - .../che/ide/ext/java/patchers/readableNames | 1 - .../resources/projects/testproject/pom.xml | 26 - .../main/java/com/codenvy/test/MyClass.java | 33 - .../test/java/com/codenvy/testtest/Test.java | 16 - .../resolve/src/ResolveArrayLength.java | 6 - .../workspace/resolve/src/ResolveClass1.java | 5 - .../workspace/resolve/src/ResolveClass2.java | 6 - .../workspace/resolve/src/ResolveClass3.java | 4 - .../workspace/resolve/src/ResolveClass4.java | 6 - .../workspace/resolve/src/ResolveClass5.java | 5 - .../workspace/resolve/src/ResolveClass6.java | 4 - .../resolve/src/ResolveConstructor.java | 9 - .../ResolveExplicitSuperConstructorCall.java | 6 - .../ResolveExplicitThisConstructorCall.java | 9 - .../workspace/resolve/src/ResolveField.java | 6 - .../src/ResolveInnerClassAsParamater.java | 11 - .../resolve/src/ResolveInterface.java | 3 - .../resolve/src/ResolveLocalClass1.java | 9 - .../resolve/src/ResolveLocalClass2.java | 7 - .../resolve/src/ResolveLocalClass3.java | 7 - .../resolve/src/ResolveLocalClass4.java | 11 - .../resolve/src/ResolveLocalClass5.java | 10 - .../resolve/src/ResolveLocalClass6.java | 8 - .../resolve/src/ResolveLocalClass7.java | 18 - .../resolve/src/ResolveLocalConstructor.java | 13 - .../resolve/src/ResolveLocalField.java | 10 - .../resolve/src/ResolveLocalField2.java | 16 - .../src/ResolveLocalFieldDeclaration.java | 7 - .../resolve/src/ResolveLocalMethod.java | 13 - .../resolve/src/ResolveLocalMethod2.java | 17 - .../resolve/src/ResolveLocalName.java | 21 - .../src/ResolveMessageSendOnBaseType.java | 6 - .../src/ResolvePartiallyQualifiedType.java | 5 - .../resolve/src/ResolveQualifiedType.java | 5 - .../src/ResolveTypeEmptySelection.java | 3 - .../src/ResolveTypeEmptySelection2.java | 3 - .../resolve/src/ResolveTypeInComment.java | 4 - .../workspace/resolve/src2/test0001/Test.java | 8 - .../workspace/resolve/src2/test0002/Test.java | 9 - .../workspace/resolve/src2/test0003/Test.java | 9 - .../workspace/resolve/src2/test0005/Test.java | 9 - .../workspace/resolve/src2/test0006/Test.java | 8 - .../workspace/resolve/src2/test0007/Test.java | 8 - .../workspace/resolve/src2/test0008/Test.java | 9 - .../workspace/resolve/src2/test0009/Test.java | 10 - .../workspace/resolve/src2/test0010/Test.java | 10 - .../workspace/resolve/src2/test0011/Test.java | 9 - .../workspace/resolve/src2/test0012/Test.java | 10 - .../workspace/resolve/src2/test0013/Test.java | 11 - .../workspace/resolve/src2/test0014/Test.java | 12 - .../workspace/resolve/src2/test0015/Test.java | 8 - .../workspace/resolve/src2/test0016/Test.java | 7 - .../workspace/resolve/src2/test0017/Test.java | 7 - .../workspace/resolve/src2/test0018/Test.java | 7 - .../workspace/resolve/src2/test0019/Test.java | 7 - .../workspace/resolve/src2/test0020/Test.java | 10 - .../workspace/resolve/src2/test0021/Test.java | 7 - .../workspace/resolve/src2/test0024/Test.java | 6 - .../workspace/resolve/src2/test0025/Test.java | 5 - .../che-plugin-java-ext-lang-server/pom.xml | 183 - .../plugin/java/server/inject/JavaModule.java | 32 - .../java/server/inject/JdtGuiceModule.java | 26 - .../server/projecttype/JavaProjectType.java | 35 - .../projecttype/JavaValueProviderFactory.java | 130 - .../server/rest/JavaFormatterService.java | 113 - .../JavaValueProviderFactoryTest.java | 120 - .../src/test/resources/FormatterTest/pom.xml | 14 - .../RenameMethodInInterface/test0/in/A.java | 8 - .../RenameMethodInInterface/test0/out/A.java | 8 - .../RenameMethodInInterface/test1/in/A.java | 8 - .../RenameMethodInInterface/test1/out/A.java | 8 - .../RenameMethodInInterface/test10/in/A.java | 9 - .../RenameMethodInInterface/test10/out/A.java | 9 - .../RenameMethodInInterface/test11/in/A.java | 10 - .../RenameMethodInInterface/test11/out/A.java | 10 - .../RenameMethodInInterface/test12/in/A.java | 11 - .../RenameMethodInInterface/test12/out/A.java | 11 - .../RenameMethodInInterface/test14/in/A.java | 11 - .../RenameMethodInInterface/test14/out/A.java | 11 - .../RenameMethodInInterface/test15/in/A.java | 15 - .../RenameMethodInInterface/test15/out/A.java | 15 - .../RenameMethodInInterface/test16/in/A.java | 11 - .../RenameMethodInInterface/test16/out/A.java | 11 - .../RenameMethodInInterface/test17/in/A.java | 14 - .../RenameMethodInInterface/test17/out/A.java | 14 - .../RenameMethodInInterface/test18/in/A.java | 18 - .../RenameMethodInInterface/test18/out/A.java | 18 - .../RenameMethodInInterface/test19/in/A.java | 18 - .../RenameMethodInInterface/test19/out/A.java | 18 - .../RenameMethodInInterface/test2/in/A.java | 9 - .../RenameMethodInInterface/test2/out/A.java | 9 - .../RenameMethodInInterface/test20/in/A.java | 17 - .../RenameMethodInInterface/test20/out/A.java | 17 - .../RenameMethodInInterface/test21/in/A.java | 39 - .../RenameMethodInInterface/test21/out/A.java | 39 - .../RenameMethodInInterface/test22/in/A.java | 7 - .../RenameMethodInInterface/test22/out/A.java | 7 - .../RenameMethodInInterface/test24/in/A.java | 11 - .../RenameMethodInInterface/test24/out/A.java | 11 - .../RenameMethodInInterface/test25/in/A.java | 13 - .../RenameMethodInInterface/test25/out/A.java | 13 - .../RenameMethodInInterface/test26/in/A.java | 4 - .../RenameMethodInInterface/test26/out/A.java | 4 - .../RenameMethodInInterface/test27/in/A.java | 12 - .../RenameMethodInInterface/test27/out/A.java | 12 - .../RenameMethodInInterface/test28/in/A.java | 14 - .../RenameMethodInInterface/test28/out/A.java | 14 - .../RenameMethodInInterface/test29/in/A.java | 17 - .../RenameMethodInInterface/test29/out/A.java | 17 - .../RenameMethodInInterface/test3/in/A.java | 10 - .../RenameMethodInInterface/test3/out/A.java | 10 - .../RenameMethodInInterface/test30/in/A.java | 16 - .../RenameMethodInInterface/test30/out/A.java | 16 - .../RenameMethodInInterface/test31/in/A.java | 13 - .../RenameMethodInInterface/test31/out/A.java | 13 - .../RenameMethodInInterface/test32/in/A.java | 14 - .../RenameMethodInInterface/test32/out/A.java | 14 - .../RenameMethodInInterface/test33/in/A.java | 23 - .../RenameMethodInInterface/test33/out/A.java | 23 - .../RenameMethodInInterface/test34/in/A.java | 12 - .../RenameMethodInInterface/test34/out/A.java | 12 - .../RenameMethodInInterface/test35/in/A.java | 14 - .../RenameMethodInInterface/test35/out/A.java | 14 - .../RenameMethodInInterface/test36/in/A.java | 8 - .../RenameMethodInInterface/test36/out/A.java | 8 - .../RenameMethodInInterface/test37/in/A.java | 12 - .../RenameMethodInInterface/test37/out/A.java | 12 - .../RenameMethodInInterface/test38/in/A.java | 13 - .../RenameMethodInInterface/test38/out/A.java | 13 - .../RenameMethodInInterface/test39/in/A.java | 12 - .../RenameMethodInInterface/test39/out/A.java | 12 - .../RenameMethodInInterface/test4/in/A.java | 11 - .../RenameMethodInInterface/test4/out/A.java | 11 - .../RenameMethodInInterface/test40/in/A.java | 16 - .../RenameMethodInInterface/test40/out/A.java | 16 - .../RenameMethodInInterface/test41/in/A.java | 20 - .../RenameMethodInInterface/test41/out/A.java | 20 - .../RenameMethodInInterface/test42/in/A.java | 17 - .../RenameMethodInInterface/test42/out/A.java | 17 - .../RenameMethodInInterface/test43/in/A.java | 12 - .../RenameMethodInInterface/test43/out/A.java | 12 - .../RenameMethodInInterface/test44/in/A.java | 23 - .../RenameMethodInInterface/test44/out/A.java | 23 - .../RenameMethodInInterface/test45/in/A.java | 20 - .../RenameMethodInInterface/test45/out/A.java | 20 - .../RenameMethodInInterface/test46/in/A.java | 21 - .../RenameMethodInInterface/test46/out/A.java | 21 - .../RenameMethodInInterface/test47/in/A.java | 14 - .../RenameMethodInInterface/test47/out/A.java | 14 - .../RenameMethodInInterface/test5/in/A.java | 11 - .../RenameMethodInInterface/test5/out/A.java | 11 - .../RenameMethodInInterface/test6/in/A.java | 11 - .../RenameMethodInInterface/test6/out/A.java | 11 - .../RenameMethodInInterface/test7/in/A.java | 8 - .../RenameMethodInInterface/test7/out/A.java | 8 - .../testAnnotation0/in/A.java | 17 - .../testAnnotation0/out/A.java | 17 - .../testAnnotation1/in/A.java | 23 - .../testAnnotation1/out/A.java | 23 - .../testAnnotation2/in/A.java | 6 - .../testAnnotation2/out/A.java | 6 - .../testAnnotation3/in/A.java | 15 - .../testAnnotation3/out/A.java | 15 - .../testAnnotation4/in/A.java | 19 - .../testAnnotation4/out/A.java | 19 - .../testDelegate01/in/A.java | 7 - .../testDelegate01/out/A.java | 12 - .../testDelegate02/in/A.java | 12 - .../testDelegate02/out/A.java | 22 - .../testFail0/in/A.java | 9 - .../testFail1/in/A.java | 6 - .../testFail10/in/A.java | 11 - .../testFail11/in/A.java | 11 - .../testFail12/in/A.java | 11 - .../testFail13/in/A.java | 13 - .../testFail14/in/A.java | 13 - .../testFail15/in/A.java | 13 - .../testFail16/in/A.java | 13 - .../testFail17/in/A.java | 13 - .../testFail18/in/A.java | 9 - .../testFail19/in/A.java | 10 - .../testFail20/in/A.java | 11 - .../testFail21/in/A.java | 15 - .../testFail22/in/A.java | 15 - .../testFail23/in/A.java | 4 - .../testFail24/in/A.java | 11 - .../testFail25/in/A.java | 18 - .../testFail26/in/A.java | 19 - .../testFail27/in/A.java | 19 - .../testFail28/in/A.java | 25 - .../testFail29/in/A.java | 14 - .../testFail3/in/A.java | 9 - .../testFail30/in/A.java | 7 - .../testFail31/in/A.java | 8 - .../testFail32/in/A.java | 6 - .../testFail33/in/A.java | 6 - .../testFail34/in/A.java | 6 - .../testFail35/in/A.java | 6 - .../testFail36/in/A.java | 6 - .../testFail37/in/A.java | 6 - .../testFail38/in/A.java | 6 - .../testFail39/in/A.java | 6 - .../testFail4/in/A.java | 11 - .../testFail40/in/A.java | 6 - .../testFail41/in/A.java | 6 - .../testFail42/in/A.java | 6 - .../testFail43/in/A.java | 6 - .../testFail44/in/A.java | 8 - .../testFail45/in/A.java | 10 - .../testFail5/in/A.java | 11 - .../testFail6/in/A.java | 11 - .../testFail7/in/A.java | 11 - .../testFail8/in/A.java | 11 - .../testFail9/in/A.java | 13 - .../testGenerics01/in/A.java | 24 - .../testGenerics01/out/A.java | 24 - .../RenameNonPrivateField/test0/in/A.java | 19 - .../RenameNonPrivateField/test0/out/A.java | 19 - .../RenameNonPrivateField/test1/in/A.java | 7 - .../RenameNonPrivateField/test1/out/A.java | 7 - .../RenameNonPrivateField/test10/in/A.java | 11 - .../RenameNonPrivateField/test10/out/A.java | 11 - .../RenameNonPrivateField/test11/in/A.java | 10 - .../RenameNonPrivateField/test11/out/A.java | 10 - .../RenameNonPrivateField/test12/in/A.java | 7 - .../RenameNonPrivateField/test12/out/A.java | 7 - .../RenameNonPrivateField/test13/in/A.java | 7 - .../RenameNonPrivateField/test13/out/A.java | 7 - .../RenameNonPrivateField/test14/in/A.java | 8 - .../RenameNonPrivateField/test14/out/A.java | 8 - .../RenameNonPrivateField/test15/in/A.java | 13 - .../RenameNonPrivateField/test15/out/A.java | 13 - .../RenameNonPrivateField/test16/in/A.java | 7 - .../RenameNonPrivateField/test16/out/A.java | 7 - .../RenameNonPrivateField/test17/in/A.java | 7 - .../RenameNonPrivateField/test17/out/A.java | 7 - .../RenameNonPrivateField/test18/in/A.java | 13 - .../RenameNonPrivateField/test18/out/A.java | 13 - .../RenameNonPrivateField/test19/in/A.java | 26 - .../RenameNonPrivateField/test19/out/A.java | 26 - .../RenameNonPrivateField/test2/in/A.java | 4 - .../RenameNonPrivateField/test2/out/A.java | 4 - .../RenameNonPrivateField/test20/in/A.java | 26 - .../RenameNonPrivateField/test20/out/A.java | 26 - .../RenameNonPrivateField/test21/in/A.java | 16 - .../RenameNonPrivateField/test21/out/A.java | 16 - .../RenameNonPrivateField/test22/in/A.java | 27 - .../RenameNonPrivateField/test22/out/A.java | 27 - .../RenameNonPrivateField/test23/in/A.java | 15 - .../RenameNonPrivateField/test23/out/A.java | 15 - .../RenameNonPrivateField/test3/in/A.java | 23 - .../RenameNonPrivateField/test3/out/A.java | 23 - .../RenameNonPrivateField/test4/in/A.java | 12 - .../RenameNonPrivateField/test4/out/A.java | 12 - .../RenameNonPrivateField/test5/in/A.java | 18 - .../RenameNonPrivateField/test5/out/A.java | 18 - .../RenameNonPrivateField/test6/in/A.java | 22 - .../RenameNonPrivateField/test6/out/A.java | 22 - .../RenameNonPrivateField/test7/in/A.java | 7 - .../RenameNonPrivateField/test7/out/A.java | 7 - .../RenameNonPrivateField/test8/in/A.java | 8 - .../RenameNonPrivateField/test8/out/A.java | 8 - .../RenameNonPrivateField/test9/in/A.java | 11 - .../RenameNonPrivateField/test9/out/A.java | 11 - .../testAnnotation1/in/A.java | 9 - .../testAnnotation1/out/A.java | 9 - .../testAnnotation2/in/A.java | 14 - .../testAnnotation2/out/A.java | 14 - .../testBug5821/in/A.java | 10 - .../testBug5821/out/A.java | 10 - .../testDelegate01/in/A.java | 6 - .../testDelegate01/out/A.java | 10 - .../testDelegate02/in/A.java | 14 - .../testDelegate02/out/A.java | 28 - .../testDelegate03/in/A.java | 11 - .../testDelegate03/out/A.java | 22 - .../testEnumConst/in/A.java | 4 - .../testEnumConst/in/B.java | 8 - .../testEnumConst/in/C.java | 7 - .../testEnumConst/out/A.java | 4 - .../testEnumConst/out/B.java | 8 - .../testEnumConst/out/C.java | 7 - .../testEnumField/in/A.java | 21 - .../testEnumField/out/A.java | 21 - .../RenameNonPrivateField/testFail0/in/A.java | 5 - .../RenameNonPrivateField/testFail1/in/A.java | 5 - .../testFail10/in/A.java | 10 - .../testFail11/in/A.java | 14 - .../testFail12/in/A.java | 7 - .../testFail13/in/A.java | 10 - .../testFail14/in/A.java | 11 - .../RenameNonPrivateField/testFail2/in/A.java | 5 - .../RenameNonPrivateField/testFail3/in/A.java | 5 - .../RenameNonPrivateField/testFail4/in/A.java | 5 - .../RenameNonPrivateField/testFail5/in/A.java | 7 - .../RenameNonPrivateField/testFail6/in/A.java | 7 - .../RenameNonPrivateField/testFail7/in/A.java | 7 - .../RenameNonPrivateField/testFail8/in/A.java | 8 - .../RenameNonPrivateField/testFail9/in/A.java | 9 - .../testGenerics1/in/A.java | 9 - .../testGenerics1/out/A.java | 9 - .../testGenerics2/in/A.java | 13 - .../testGenerics2/out/A.java | 13 - .../testGenerics3/in/A.java | 22 - .../testGenerics3/out/A.java | 22 - .../testGenerics4/in/A.java | 20 - .../testGenerics4/out/A.java | 20 - .../testRenameNLSAccessor01/in/A.java | 10 - .../in/messages.properties | 1 - .../testRenameNLSAccessor01/out/A.java | 10 - .../out/messages.properties | 1 - .../testStaticImport/in/A.java | 4 - .../testStaticImport/in/B.java | 7 - .../testStaticImport/in/C.java | 6 - .../testStaticImport/out/A.java | 4 - .../testStaticImport/out/B.java | 7 - .../testStaticImport/out/C.java | 6 - .../resources/RenamePackage/test0/in/r/A.java | 8 - .../RenamePackage/test0/out/p1/A.java | 8 - .../resources/RenamePackage/test1/in/r/A.java | 4 - .../RenamePackage/test1/out/p1/A.java | 4 - .../RenamePackage/test2/in/fred/A.java | 6 - .../resources/RenamePackage/test2/in/r/A.java | 4 - .../RenamePackage/test2/out/fred/A.java | 6 - .../RenamePackage/test2/out/p1/A.java | 4 - .../RenamePackage/test3/in/fred/A.java | 6 - .../RenamePackage/test3/in/r/r/B.java | 4 - .../RenamePackage/test3/out/r/A.java | 6 - .../RenamePackage/test3/out/r/r/B.java | 4 - .../RenamePackage/test4/in/Textfile.txt | 13 - .../resources/RenamePackage/test4/in/r/A.java | 2 - .../RenamePackage/test4/in/r/p1/A.java | 2 - .../RenamePackage/test4/out/Textfile.txt | 13 - .../RenamePackage/test4/out/q/A.java | 2 - .../RenamePackage/test4/out/r/A.java | 2 - .../resources/RenamePackage/test5/in/r/A.java | 5 - .../RenamePackage/test5/out/p1/A.java | 5 - .../resources/RenamePackage/test6/in/r/A.java | 5 - .../RenamePackage/test6/out/p1/A.java | 5 - .../resources/RenamePackage/test7/in/r/A.java | 3 - .../RenamePackage/test7/in/r/s/B.java | 4 - .../RenamePackage/test7/out/q/A.java | 3 - .../RenamePackage/test7/out/r/s/B.java | 4 - .../test8/in/java/lang/reflect/Klass.java | 5 - .../test8/out/nonjava/Klass.java | 9 - .../RenamePackage/testFail0/in/r/A.java | 2 - .../RenamePackage/testFail1/in/r/p1/A.java | 2 - .../RenamePackage/testFail10/in/r/A.java | 2 - .../RenamePackage/testFail10/in/r/p1/A.java | 2 - .../RenamePackage/testFail3/in/r/A.java | 4 - .../RenamePackage/testFail4/in/r/A.java | 6 - .../RenamePackage/testFail5/in/r/A.java | 7 - .../RenamePackage/testFail6/in/r/A.java | 5 - .../RenamePackage/testFail7/in/p1/A.java | 9 - .../RenamePackage/testFail7/in/r/A.java | 4 - .../RenamePackage/testFail8/in/p1/A.java | 10 - .../RenamePackage/testFail8/in/r/A.java | 3 - .../RenamePackage/testFail9/in/p1/A.java | 4 - .../RenamePackage/testFail9/in/r/A.java | 3 - .../testHierarchical01/in/my/MyA.java | 11 - .../testHierarchical01/in/my/a/ATest.java | 5 - .../testHierarchical01/in/my/b/B.java | 4 - .../testHierarchical01/out/your/MyA.java | 8 - .../testHierarchical01/out/your/a/ATest.java | 5 - .../testHierarchical01/out/your/b/B.java | 4 - .../testHierarchical02/in/your/Y.java | 5 - .../testHierarchical03/in/my/pack/C.java | 13 - .../testHierarchical03/out/your/pack/C.java | 13 - .../in/my/pack/C.java | 7 - .../out/your/pack/C.java | 6 - .../in/srcPrg/p/p/A.java | 7 - .../in/srcTest/p/p/ATest.java | 6 - .../in/srcTest/tests/AllTests.java | 12 - .../out/srcPrg/q/A.java | 7 - .../out/srcTest/p/p/ATest.java | 8 - .../out/srcTest/tests/AllTests.java | 13 - .../in/srcPrg/p/p/A.java | 5 - .../in/srcTest/p/p/ATest.java | 12 - .../in/srcTest/p/p/TestHelper.java | 7 - .../in/srcTest/tests/AllTests.java | 14 - .../in/srcTest/tests/QualifiedTests.java | 16 - .../out/srcPrg/q/A.java | 5 - .../out/srcTest/p/p/ATest.java | 12 - .../out/srcTest/p/p/TestHelper.java | 7 - .../out/srcTest/tests/AllTests.java | 12 - .../out/srcTest/tests/QualifiedTests.java | 15 - .../in/srcPrg/p/p/ToQ.java | 5 - .../in/srcTest/p/p/Ref.java | 6 - .../out/srcPrg/q/ToQ.java | 7 - .../out/srcTest/p/p/Ref.java | 8 - .../in/srcPrg/p/A.java | 11 - .../in/srcPrg/p/B.java | 15 - .../in/srcTest/p/ATest.java | 13 - .../out/srcPrg/a/b/c/A.java | 13 - .../out/srcPrg/a/b/c/B.java | 15 - .../out/srcTest/p/ATest.java | 14 - .../in/srcPrg/p/p/A.java | 4 - .../in/srcTest/p/p/ATest.java | 6 - .../out/srcPrg/p/p/A.java | 4 - .../out/srcTest/q/ATest.java | 8 - .../in/srcPrg/p/p/A.java | 4 - .../in/srcTest/p/p/ATest.java | 7 - .../out/srcPrg/p/p/A.java | 4 - .../out/srcTest/cheese/ATest.java | 7 - .../in/srcPrj.other/pack/Namesake.java | 4 - .../in/srcPrj.ref/pack/Referer.java | 6 - .../in/srcPrj.ref/pack/man/StarImporter.java | 9 - .../in/srcPrj/pack/DingsDa.java | 4 - .../out/srcPrj.other/pack/Namesake.java | 4 - .../out/srcPrj.ref/pack/Referer.java | 8 - .../out/srcPrj.ref/pack/man/StarImporter.java | 12 - .../out/srcPrj/com/packt/DingsDa.java | 4 - .../in/my/pack/Textfile.txt | 9 - .../out/my/Textfile.txt | 9 - .../RenamePackage/testReadOnly/in/r/A.java | 5 - .../RenamePackage/testReadOnly/out/p1/A.java | 5 - .../RenamePackage/testStatic1/in/s1/B.java | 9 - .../testStatic1/in/s1/j/l/S.java | 6 - .../RenamePackage/testStatic1/out/s1/B.java | 9 - .../testStatic1/out/s1/java/lang/S.java | 6 - .../in/srcPrg/p/p/A.java | 7 - .../in/srcTest/p/p/ATest.java | 8 - .../in/srcTest/tests/AllTests.java | 14 - .../testStaticMultiRoots1/out/srcPrg/q/A.java | 7 - .../out/srcTest/p/p/ATest.java | 8 - .../out/srcTest/tests/AllTests.java | 15 - .../testToEmptyPack/in/r/p1/A.java | 2 - .../testToEmptyPack/out/fred/A.java | 2 - .../RenameParameters/canRename/A_in.java | 1 - .../RenameParameters/canRename/A_out.java | 1 - .../canRename/A_test0_in.java | 6 - .../canRename/A_test0_out.java | 6 - .../canRename/A_test10_in.java | 5 - .../canRename/A_test10_out.java | 5 - .../canRename/A_test11_in.java | 12 - .../canRename/A_test11_out.java | 12 - .../canRename/A_test12_in.java | 11 - .../canRename/A_test12_out.java | 11 - .../canRename/A_test13_in.java | 8 - .../canRename/A_test13_out.java | 8 - .../canRename/A_test14_in.java | 8 - .../canRename/A_test14_out.java | 8 - .../canRename/A_test15_in.java | 7 - .../canRename/A_test15_out.java | 7 - .../canRename/A_test16_in.java | 9 - .../canRename/A_test16_out.java | 9 - .../canRename/A_test17_in.java | 9 - .../canRename/A_test17_out.java | 9 - .../canRename/A_test18_in.java | 8 - .../canRename/A_test18_out.java | 8 - .../canRename/A_test19_in.java | 10 - .../canRename/A_test19_out.java | 10 - .../canRename/A_test1_in.java | 7 - .../canRename/A_test1_out.java | 7 - .../canRename/A_test20_in.java | 16 - .../canRename/A_test20_out.java | 16 - .../canRename/A_test21_in.java | 12 - .../canRename/A_test21_out.java | 12 - .../canRename/A_test22_in.java | 8 - .../canRename/A_test22_out.java | 8 - .../canRename/A_test23_in.java | 8 - .../canRename/A_test23_out.java | 8 - .../canRename/A_test24_in.java | 8 - .../canRename/A_test24_out.java | 8 - .../canRename/A_test25_in.java | 8 - .../canRename/A_test25_out.java | 8 - .../canRename/A_test26_in.java | 13 - .../canRename/A_test26_out.java | 13 - .../canRename/A_test27_in.java | 13 - .../canRename/A_test27_out.java | 13 - .../canRename/A_test28_in.java | 8 - .../canRename/A_test28_out.java | 8 - .../canRename/A_test29_in.java | 13 - .../canRename/A_test29_out.java | 13 - .../canRename/A_test2_in.java | 6 - .../canRename/A_test2_out.java | 6 - .../canRename/A_test30_in.java | 12 - .../canRename/A_test30_out.java | 12 - .../canRename/A_test31_in.java | 12 - .../canRename/A_test31_out.java | 12 - .../canRename/A_test32_in.java | 5 - .../canRename/A_test32_out.java | 5 - .../canRename/A_test33_in.java | 13 - .../canRename/A_test33_out.java | 13 - .../canRename/A_test34_in.java | 6 - .../canRename/A_test34_out.java | 6 - .../canRename/A_test35_in.java | 15 - .../canRename/A_test35_out.java | 15 - .../canRename/A_test36_in.java | 6 - .../canRename/A_test36_out.java | 6 - .../canRename/A_test3_in.java | 9 - .../canRename/A_test3_out.java | 9 - .../canRename/A_test4_in.java | 8 - .../canRename/A_test4_out.java | 8 - .../canRename/A_test5_in.java | 8 - .../canRename/A_test5_out.java | 8 - .../canRename/A_test6_in.java | 7 - .../canRename/A_test6_out.java | 7 - .../canRename/A_test7_in.java | 10 - .../canRename/A_test7_out.java | 10 - .../canRename/A_test8_in.java | 5 - .../canRename/A_test8_out.java | 5 - .../canRename/A_test9_in.java | 5 - .../canRename/A_test9_out.java | 5 - .../cannotRename/A_testFail0.java | 12 - .../cannotRename/A_testFail1.java | 6 - .../cannotRename/A_testFail10.java | 5 - .../cannotRename/A_testFail11.java | 5 - .../cannotRename/A_testFail12.java | 11 - .../cannotRename/A_testFail13.java | 8 - .../cannotRename/A_testFail14.java | 11 - .../cannotRename/A_testFail15.java | 8 - .../cannotRename/A_testFail16.java | 9 - .../cannotRename/A_testFail17.java | 11 - .../cannotRename/A_testFail18.java | 8 - .../cannotRename/A_testFail19.java | 10 - .../cannotRename/A_testFail2.java | 7 - .../cannotRename/A_testFail20.java | 10 - .../cannotRename/A_testFail21.java | 13 - .../cannotRename/A_testFail3.java | 7 - .../cannotRename/A_testFail4.java | 8 - .../cannotRename/A_testFail5.java | 10 - .../cannotRename/A_testFail6.java | 13 - .../cannotRename/A_testFail7.java | 11 - .../cannotRename/A_testFail8.java | 11 - .../cannotRename/A_testFail9.java | 12 - .../RenameParameters/cannotRename/a.java | 0 .../RenamePrivateField/test0/in/A.java | 4 - .../RenamePrivateField/test0/out/A.java | 4 - .../RenamePrivateField/test1/in/A.java | 7 - .../RenamePrivateField/test1/out/A.java | 7 - .../RenamePrivateField/test10/in/A.java | 16 - .../RenamePrivateField/test10/out/A.java | 16 - .../RenamePrivateField/test11/in/A.java | 28 - .../RenamePrivateField/test11/out/A.java | 26 - .../RenamePrivateField/test2/in/A.java | 8 - .../RenamePrivateField/test2/out/A.java | 8 - .../RenamePrivateField/test3/in/A.java | 18 - .../RenamePrivateField/test3/out/A.java | 18 - .../RenamePrivateField/test4/in/A.java | 17 - .../RenamePrivateField/test4/out/A.java | 17 - .../RenamePrivateField/test5/in/A.java | 9 - .../RenamePrivateField/test5/out/A.java | 9 - .../RenamePrivateField/test6/in/A.java | 9 - .../RenamePrivateField/test6/out/A.java | 9 - .../RenamePrivateField/test7/in/A.java | 13 - .../RenamePrivateField/test7/out/A.java | 13 - .../RenamePrivateField/test8/in/A.java | 7 - .../RenamePrivateField/test8/out/A.java | 7 - .../RenamePrivateField/test9/in/A.java | 13 - .../RenamePrivateField/test9/out/A.java | 13 - .../RenamePrivateField/testFail0/in/A.java | 5 - .../RenamePrivateField/testFail1/in/A.java | 5 - .../RenamePrivateField/testFail10/in/A.java | 10 - .../RenamePrivateField/testFail2/in/A.java | 5 - .../RenamePrivateField/testFail3/in/A.java | 5 - .../RenamePrivateField/testFail4/in/A.java | 5 - .../RenamePrivateField/testFail5/in/A.java | 7 - .../RenamePrivateField/testFail6/in/A.java | 7 - .../RenamePrivateField/testFail7/in/A.java | 11 - .../RenamePrivateField/testFail8/in/A.java | 11 - .../RenamePrivateField/testFail9/in/A.java | 10 - .../testUnicode01/in/A.java | 23 - .../testUnicode01/out/A.java | 23 - .../RenamePrivateMethod/test0/in/A.java | 10 - .../RenamePrivateMethod/test0/out/A.java | 10 - .../RenamePrivateMethod/test10/in/A.java | 8 - .../RenamePrivateMethod/test10/out/A.java | 8 - .../RenamePrivateMethod/test11/in/A.java | 8 - .../RenamePrivateMethod/test11/out/A.java | 8 - .../RenamePrivateMethod/test12/in/A.java | 8 - .../RenamePrivateMethod/test12/out/A.java | 8 - .../RenamePrivateMethod/test13/in/A.java | 13 - .../RenamePrivateMethod/test13/out/A.java | 13 - .../RenamePrivateMethod/test14/in/A.java | 16 - .../RenamePrivateMethod/test14/out/A.java | 16 - .../RenamePrivateMethod/test15/in/A.java | 7 - .../RenamePrivateMethod/test15/out/A.java | 7 - .../RenamePrivateMethod/test16/in/A.java | 7 - .../RenamePrivateMethod/test16/out/A.java | 7 - .../RenamePrivateMethod/test17/in/A.java | 8 - .../RenamePrivateMethod/test17/out/A.java | 8 - .../RenamePrivateMethod/test18/in/A.java | 11 - .../RenamePrivateMethod/test18/in/C.java | 6 - .../RenamePrivateMethod/test18/out/A.java | 11 - .../RenamePrivateMethod/test18/out/C.java | 6 - .../RenamePrivateMethod/test2/in/A.java | 14 - .../RenamePrivateMethod/test2/out/A.java | 14 - .../RenamePrivateMethod/test20/in/A.java | 23 - .../RenamePrivateMethod/test20/out/A.java | 23 - .../RenamePrivateMethod/test23/in/A.java | 13 - .../RenamePrivateMethod/test23/out/A.java | 13 - .../RenamePrivateMethod/test24/in/A.java | 10 - .../RenamePrivateMethod/test24/out/A.java | 10 - .../RenamePrivateMethod/test25/in/A.java | 6 - .../RenamePrivateMethod/test25/out/A.java | 6 - .../RenamePrivateMethod/test26/in/A.java | 8 - .../RenamePrivateMethod/test26/out/A.java | 8 - .../RenamePrivateMethod/test27/in/A.java | 9 - .../RenamePrivateMethod/test27/out/A.java | 9 - .../RenamePrivateMethod/testAnon0/in/A.java | 13 - .../RenamePrivateMethod/testAnon0/out/A.java | 13 - .../testDelegate01/in/A.java | 9 - .../testDelegate01/out/A.java | 16 - .../RenamePrivateMethod/testFail0/in/A.java | 5 - .../RenamePrivateMethod/testFail1/in/A.java | 6 - .../RenamePrivateMethod/testFail2/in/A.java | 20 - .../RenamePrivateMethod/testFail5/in/A.java | 10 - .../RenameStaticMethod/test0/in/A.java | 4 - .../RenameStaticMethod/test0/out/A.java | 4 - .../RenameStaticMethod/test1/in/A.java | 18 - .../RenameStaticMethod/test1/out/A.java | 18 - .../RenameStaticMethod/test10/in/A.java | 8 - .../RenameStaticMethod/test10/in/B.java | 7 - .../RenameStaticMethod/test10/out/A.java | 8 - .../RenameStaticMethod/test10/out/B.java | 7 - .../RenameStaticMethod/test11/in/A.java | 8 - .../RenameStaticMethod/test11/in/B.java | 19 - .../RenameStaticMethod/test11/out/A.java | 8 - .../RenameStaticMethod/test11/out/B.java | 19 - .../RenameStaticMethod/test2/in/A.java | 39 - .../RenameStaticMethod/test2/out/A.java | 39 - .../RenameStaticMethod/test3/in/A.java | 15 - .../RenameStaticMethod/test3/out/A.java | 15 - .../RenameStaticMethod/test4/in/A.java | 15 - .../RenameStaticMethod/test4/out/A.java | 15 - .../RenameStaticMethod/test5/in/A.java | 10 - .../RenameStaticMethod/test5/out/A.java | 10 - .../RenameStaticMethod/test6/in/A.java | 13 - .../RenameStaticMethod/test6/out/A.java | 13 - .../RenameStaticMethod/test7/in/A.java | 7 - .../RenameStaticMethod/test7/out/A.java | 7 - .../RenameStaticMethod/test8/in/A.java | 13 - .../RenameStaticMethod/test8/out/A.java | 13 - .../RenameStaticMethod/test9/in/A.java | 14 - .../RenameStaticMethod/test9/out/A.java | 14 - .../testDelegate01/in/A.java | 8 - .../testDelegate01/out/A.java | 15 - .../RenameStaticMethod/testFail0/in/A.java | 5 - .../RenameStaticMethod/testFail1/in/A.java | 6 - .../RenameStaticMethod/testFail2/in/A.java | 8 - .../RenameStaticMethod/testFail4/in/A.java | 6 - .../RenameStaticMethod/testFail5/in/A.java | 5 - .../RenameStaticMethod/testFail6/in/A.java | 6 - .../RenameStaticMethod/testFail7/in/A.java | 6 - .../RenameStaticMethod/testFail8/in/A.java | 6 - .../testStaticImport1/in/A.java | 15 - .../testStaticImport1/in/C.java | 9 - .../testStaticImport1/out/A.java | 15 - .../testStaticImport1/out/C.java | 9 - .../testStaticImport2/in/A.java | 7 - .../testStaticImport2/in/C.java | 9 - .../testStaticImport2/out/A.java | 7 - .../testStaticImport2/out/C.java | 9 - .../testStaticImport3/in/A.java | 15 - .../testStaticImport3/out/A.java | 16 - .../testStaticImport4/in/A.java | 15 - .../testStaticImport4/out/A.java | 15 - .../testStaticImport5/in/A.java | 15 - .../testStaticImport5/out/A.java | 16 - .../testStaticImportFail0/in/A.java | 16 - .../testUnicode01/in/A.java | 15 - .../testUnicode01/out/A.java | 15 - .../RenameTests18/testLambda0/in/A.java | 12 - .../RenameTests18/testLambda0/out/A.java | 12 - .../RenameTests18/testLambda1/in/A.java | 12 - .../RenameTests18/testLambda1/out/A.java | 12 - .../RenameTests18/testLambda2/in/A.java | 13 - .../RenameTests18/testLambda2/out/A.java | 13 - .../RenameTests18/testLambda3/in/A.java | 12 - .../RenameTests18/testLambda3/out/A.java | 12 - .../RenameTests18/testMethod0/in/A.java | 9 - .../RenameTests18/testMethod0/out/A.java | 9 - .../RenameTests18/testMethod1/in/A.java | 19 - .../RenameTests18/testMethod1/out/A.java | 19 - .../RenameTests18/testMethod2/in/A.java | 14 - .../RenameTests18/testMethod2/out/A.java | 14 - .../testMethodReference0/in/A.java | 24 - .../testMethodReference0/out/A.java | 24 - .../test/resources/RenameType/test0/in/A.java | 3 - .../resources/RenameType/test0/out/B.java | 3 - .../test/resources/RenameType/test1/in/A.java | 4 - .../resources/RenameType/test1/out/B.java | 4 - .../resources/RenameType/test10/in/A.java | 12 - .../resources/RenameType/test10/out/B.java | 12 - .../resources/RenameType/test11/in/A.java | 3 - .../resources/RenameType/test11/in/AA.java | 3 - .../resources/RenameType/test11/out/AA.java | 3 - .../resources/RenameType/test11/out/B.java | 3 - .../resources/RenameType/test12/in/A.java | 6 - .../resources/RenameType/test12/out/B.java | 6 - .../resources/RenameType/test13/in/A.java | 6 - .../resources/RenameType/test13/out/B.java | 6 - .../resources/RenameType/test14/in/A.java | 4 - .../resources/RenameType/test14/out/B.java | 4 - .../resources/RenameType/test15/in/A.java | 9 - .../resources/RenameType/test15/out/B.java | 9 - .../resources/RenameType/test16/in/A.java | 23 - .../resources/RenameType/test16/out/B.java | 23 - .../resources/RenameType/test17/in/A.java | 7 - .../resources/RenameType/test17/out/B.java | 7 - .../resources/RenameType/test18/in/A.java | 11 - .../resources/RenameType/test18/out/B.java | 11 - .../resources/RenameType/test19/in/A.java | 9 - .../resources/RenameType/test19/out/B.java | 9 - .../test/resources/RenameType/test2/in/A.java | 4 - .../resources/RenameType/test2/out/B.java | 4 - .../resources/RenameType/test20/in/A.java | 3 - .../resources/RenameType/test20/out/B.java | 3 - .../resources/RenameType/test21/in/A.java | 6 - .../resources/RenameType/test21/out/B.java | 6 - .../resources/RenameType/test22/in/A.java | 4 - .../resources/RenameType/test22/out/B.java | 4 - .../resources/RenameType/test23/in/A.java | 4 - .../resources/RenameType/test23/out/B.java | 4 - .../resources/RenameType/test24/in/A.java | 5 - .../resources/RenameType/test24/out/B.java | 5 - .../resources/RenameType/test25/in/A.java | 4 - .../resources/RenameType/test25/out/B.java | 4 - .../resources/RenameType/test26/in/A.java | 9 - .../resources/RenameType/test26/out/B.java | 9 - .../resources/RenameType/test27/in/A.java | 12 - .../resources/RenameType/test27/out/B.java | 12 - .../resources/RenameType/test28/in/A.java | 11 - .../resources/RenameType/test28/out/B.java | 11 - .../resources/RenameType/test29/in/A.java | 2 - .../resources/RenameType/test29/in/C.java | 3 - .../resources/RenameType/test29/out/B.java | 2 - .../resources/RenameType/test29/out/C.java | 3 - .../test/resources/RenameType/test3/in/A.java | 5 - .../resources/RenameType/test3/out/B.java | 5 - .../resources/RenameType/test30/in/A.java | 4 - .../resources/RenameType/test30/in/AA.java | 5 - .../resources/RenameType/test30/out/AA.java | 5 - .../resources/RenameType/test30/out/B.java | 4 - .../resources/RenameType/test31/in/A.java | 2 - .../resources/RenameType/test31/in/AA.java | 5 - .../resources/RenameType/test31/out/AA.java | 5 - .../resources/RenameType/test31/out/B.java | 2 - .../resources/RenameType/test32/in/A.java | 6 - .../resources/RenameType/test32/out/B.java | 6 - .../resources/RenameType/test33/in/A.java | 6 - .../resources/RenameType/test33/out/B.java | 6 - .../resources/RenameType/test34/in/A.java | 5 - .../resources/RenameType/test34/out/B.java | 5 - .../resources/RenameType/test35/in/A.java | 5 - .../resources/RenameType/test35/out/B.java | 5 - .../resources/RenameType/test36/in/A.java | 6 - .../resources/RenameType/test36/out/B.java | 6 - .../resources/RenameType/test37/in/A.java | 6 - .../resources/RenameType/test37/out/B.java | 6 - .../resources/RenameType/test38/in/A.java | 8 - .../resources/RenameType/test38/out/B.java | 8 - .../resources/RenameType/test39/in/A.java | 8 - .../resources/RenameType/test39/out/B.java | 8 - .../test/resources/RenameType/test4/in/A.java | 4 - .../resources/RenameType/test4/out/B.java | 4 - .../resources/RenameType/test40/in/A.java | 12 - .../resources/RenameType/test40/out/B.java | 12 - .../resources/RenameType/test41/in/A.java | 8 - .../resources/RenameType/test41/out/B.java | 8 - .../resources/RenameType/test42/in/A.java | 8 - .../resources/RenameType/test42/out/B.java | 8 - .../resources/RenameType/test43/in/A.java | 10 - .../resources/RenameType/test43/out/B.java | 10 - .../resources/RenameType/test44/in/A.java | 7 - .../resources/RenameType/test44/out/B.java | 7 - .../resources/RenameType/test45/in/A.java | 10 - .../resources/RenameType/test45/out/B.java | 10 - .../resources/RenameType/test46/in/A.java | 2 - .../resources/RenameType/test46/in/C.java | 3 - .../resources/RenameType/test46/out/B.java | 2 - .../resources/RenameType/test46/out/C.java | 3 - .../resources/RenameType/test47/in/A.java | 10 - .../resources/RenameType/test47/out/B.java | 10 - .../resources/RenameType/test48/in/A.java | 10 - .../resources/RenameType/test48/out/B.java | 10 - .../resources/RenameType/test49/in/A.java | 18 - .../resources/RenameType/test49/out/B.java | 18 - .../test/resources/RenameType/test5/in/A.java | 4 - .../resources/RenameType/test5/out/B.java | 4 - .../resources/RenameType/test50/in/A.java | 14 - .../resources/RenameType/test50/out/B.java | 14 - .../resources/RenameType/test51/in/A.java | 4 - .../resources/RenameType/test51/in/C.java | 3 - .../resources/RenameType/test51/out/B.java | 4 - .../resources/RenameType/test51/out/C.java | 3 - .../resources/RenameType/test52/in/A.java | 6 - .../resources/RenameType/test52/out/B.java | 6 - .../resources/RenameType/test53/in/A.java | 9 - .../resources/RenameType/test53/out/B.java | 9 - .../resources/RenameType/test54/in/A.java | 16 - .../resources/RenameType/test54/out/A.java | 16 - .../resources/RenameType/test55/in/A.java | 16 - .../resources/RenameType/test55/out/A.java | 16 - .../resources/RenameType/test56/in/A.java | 4 - .../resources/RenameType/test56/in/B.java | 4 - .../RenameType/test56/in/default/A.java | 3 - .../resources/RenameType/test56/out/A.java | 4 - .../resources/RenameType/test56/out/B.java | 4 - .../RenameType/test56/out/default/B.java | 3 - .../resources/RenameType/test57/in/A.java | 10 - .../resources/RenameType/test57/out/B.java | 10 - .../resources/RenameType/test58/in/A.java | 12 - .../resources/RenameType/test58/out/B.java | 12 - .../resources/RenameType/test59/in/A.java | 6 - .../resources/RenameType/test59/out/B.java | 6 - .../test/resources/RenameType/test6/in/A.java | 4 - .../resources/RenameType/test6/out/B.java | 4 - .../resources/RenameType/test60/in/A.java | 9 - .../resources/RenameType/test60/out/B.java | 9 - .../resources/RenameType/test61/in/A.java | 5 - .../resources/RenameType/test61/out/A.java | 5 - .../resources/RenameType/test62/in/A.java | 9 - .../resources/RenameType/test62/out/B.java | 9 - .../resources/RenameType/test63/in/A.java | 10 - .../RenameType/test63/in/anotherp/A.java | 11 - .../resources/RenameType/test63/out/B.java | 10 - .../RenameType/test63/out/anotherp/A.java | 11 - .../resources/RenameType/test64/in/A.java | 10 - .../resources/RenameType/test64/in/p2/A.java | 11 - .../resources/RenameType/test64/out/B.java | 10 - .../resources/RenameType/test64/out/p2/A.java | 11 - .../resources/RenameType/test65/in/A.java | 3 - .../resources/RenameType/test65/in/B.java | 5 - .../resources/RenameType/test65/in/C.java | 3 - .../resources/RenameType/test65/out/B.java | 5 - .../resources/RenameType/test65/out/C.java | 3 - .../resources/RenameType/test65/out/NewC.java | 3 - .../resources/RenameType/test66/in/B.java | 5 - .../resources/RenameType/test66/out/B.java | 5 - .../test/resources/RenameType/test7/in/A.java | 4 - .../resources/RenameType/test7/out/B.java | 4 - .../test/resources/RenameType/test8/in/A.java | 6 - .../resources/RenameType/test8/out/B.java | 6 - .../test/resources/RenameType/test9/in/A.java | 6 - .../resources/RenameType/test9/out/B.java | 6 - .../RenameType/testAnnotation1/in/A.java | 16 - .../RenameType/testAnnotation1/out/B.java | 16 - .../RenameType/testAnnotation2/in/A.java | 21 - .../RenameType/testAnnotation2/out/B.java | 21 - .../RenameType/testAnnotation3/in/A.java | 21 - .../RenameType/testAnnotation3/out/A.java | 21 - .../resources/RenameType/testEnum1/in/A.java | 9 - .../RenameType/testEnum1/in/p2/A.java | 10 - .../resources/RenameType/testEnum1/out/B.java | 9 - .../RenameType/testEnum1/out/p2/A.java | 10 - .../resources/RenameType/testEnum2/in/A.java | 21 - .../resources/RenameType/testEnum2/out/B.java | 21 - .../resources/RenameType/testEnum3/in/A.java | 4 - .../RenameType/testEnum3/in/Enumbered.java | 20 - .../resources/RenameType/testEnum3/out/B.java | 4 - .../RenameType/testEnum3/out/Enumbered.java | 20 - .../resources/RenameType/testEnum4/in/A.java | 13 - .../resources/RenameType/testEnum4/out/A.java | 13 - .../resources/RenameType/testEnum5/in/A.java | 10 - .../resources/RenameType/testEnum5/out/B.java | 10 - .../resources/RenameType/testFail0/in/A.java | 5 - .../resources/RenameType/testFail00/in/A.java | 5 - .../resources/RenameType/testFail01/in/A.java | 9 - .../resources/RenameType/testFail02/in/A.java | 5 - .../resources/RenameType/testFail03/in/A.java | 9 - .../resources/RenameType/testFail04/in/A.java | 9 - .../resources/RenameType/testFail1/in/A.java | 9 - .../resources/RenameType/testFail10/in/A.java | 9 - .../resources/RenameType/testFail11/in/A.java | 4 - .../resources/RenameType/testFail12/in/A.java | 4 - .../resources/RenameType/testFail16/in/A.java | 5 - .../resources/RenameType/testFail17/in/A.java | 5 - .../resources/RenameType/testFail18/in/A.java | 7 - .../resources/RenameType/testFail19/in/A.java | 7 - .../resources/RenameType/testFail2/in/A.java | 6 - .../resources/RenameType/testFail20/in/A.java | 3 - .../RenameType/testFail20/in/AA.java | 4 - .../resources/RenameType/testFail21/in/A.java | 2 - .../resources/RenameType/testFail21/in/C.java | 2 - .../resources/RenameType/testFail22/in/A.java | 2 - .../resources/RenameType/testFail22/in/B.java | 2 - .../resources/RenameType/testFail23/in/A.java | 2 - .../resources/RenameType/testFail23/in/B.java | 2 - .../RenameType/testFail23/in/Bogus.java | 4 - .../resources/RenameType/testFail24/in/A.java | 2 - .../resources/RenameType/testFail24/in/B.java | 3 - .../resources/RenameType/testFail25/in/A.java | 2 - .../resources/RenameType/testFail25/in/B.java | 3 - .../resources/RenameType/testFail26/in/A.java | 3 - .../resources/RenameType/testFail26/in/B.java | 2 - .../resources/RenameType/testFail27/in/A.java | 3 - .../resources/RenameType/testFail27/in/B.java | 2 - .../resources/RenameType/testFail28/in/A.java | 9 - .../resources/RenameType/testFail29/in/A.java | 8 - .../resources/RenameType/testFail3/in/A.java | 8 - .../resources/RenameType/testFail30/in/A.java | 9 - .../resources/RenameType/testFail31/in/A.java | 2 - .../resources/RenameType/testFail31/in/B.java | 2 - .../resources/RenameType/testFail31/in/C.java | 6 - .../resources/RenameType/testFail32/in/A.java | 5 - .../resources/RenameType/testFail32/in/B.java | 2 - .../resources/RenameType/testFail33/in/A.java | 13 - .../resources/RenameType/testFail34/in/A.java | 13 - .../resources/RenameType/testFail35/in/A.java | 13 - .../resources/RenameType/testFail36/in/A.java | 13 - .../resources/RenameType/testFail37/in/A.java | 4 - .../resources/RenameType/testFail37/in/B.java | 2 - .../resources/RenameType/testFail38/in/A.java | 8 - .../resources/RenameType/testFail39/in/A.java | 4 - .../resources/RenameType/testFail4/in/A.java | 3 - .../resources/RenameType/testFail4/in/B.java | 4 - .../resources/RenameType/testFail40/in/A.java | 6 - .../resources/RenameType/testFail41/in/A.java | 10 - .../resources/RenameType/testFail42/in/A.java | 9 - .../resources/RenameType/testFail43/in/A.java | 10 - .../resources/RenameType/testFail44/in/A.java | 12 - .../resources/RenameType/testFail45/in/A.java | 12 - .../resources/RenameType/testFail46/in/A.java | 10 - .../resources/RenameType/testFail47/in/A.java | 9 - .../resources/RenameType/testFail48/in/A.java | 8 - .../resources/RenameType/testFail49/in/A.java | 10 - .../resources/RenameType/testFail5/in/A.java | 3 - .../resources/RenameType/testFail5/in/B.java | 4 - .../resources/RenameType/testFail5/in/C.java | 3 - .../resources/RenameType/testFail50/in/A.java | 9 - .../resources/RenameType/testFail51/in/A.java | 9 - .../resources/RenameType/testFail52/in/A.java | 9 - .../resources/RenameType/testFail53/in/A.java | 9 - .../resources/RenameType/testFail54/in/A.java | 10 - .../resources/RenameType/testFail55/in/A.java | 15 - .../resources/RenameType/testFail56/in/A.java | 8 - .../resources/RenameType/testFail57/in/A.java | 8 - .../resources/RenameType/testFail58/in/A.java | 8 - .../resources/RenameType/testFail59/in/A.java | 8 - .../resources/RenameType/testFail6/in/A.java | 3 - .../resources/RenameType/testFail6/in/B.java | 3 - .../resources/RenameType/testFail6/in/C.java | 4 - .../resources/RenameType/testFail60/in/A.java | 10 - .../resources/RenameType/testFail61/in/A.java | 10 - .../resources/RenameType/testFail62/in/A.java | 12 - .../resources/RenameType/testFail63/in/A.java | 12 - .../resources/RenameType/testFail64/in/A.java | 9 - .../resources/RenameType/testFail65/in/A.java | 9 - .../resources/RenameType/testFail66/in/A.java | 13 - .../resources/RenameType/testFail67/in/A.java | 12 - .../resources/RenameType/testFail68/in/A.java | 13 - .../resources/RenameType/testFail69/in/A.java | 12 - .../resources/RenameType/testFail7/in/A.java | 6 - .../resources/RenameType/testFail70/in/A.java | 12 - .../resources/RenameType/testFail71/in/A.java | 11 - .../resources/RenameType/testFail72/in/A.java | 19 - .../resources/RenameType/testFail73/in/A.java | 8 - .../resources/RenameType/testFail74/in/A.java | 9 - .../resources/RenameType/testFail75/in/A.java | 9 - .../resources/RenameType/testFail76/in/A.java | 9 - .../resources/RenameType/testFail77/in/A.java | 13 - .../resources/RenameType/testFail78/in/A.java | 13 - .../resources/RenameType/testFail79/in/A.java | 10 - .../resources/RenameType/testFail8/in/A.java | 4 - .../resources/RenameType/testFail8/in/B.java | 3 - .../resources/RenameType/testFail80/in/A.java | 6 - .../resources/RenameType/testFail81/in/A.java | 8 - .../resources/RenameType/testFail82/in/A.java | 5 - .../resources/RenameType/testFail83/in/A.java | 8 - .../resources/RenameType/testFail84/in/A.java | 4 - .../resources/RenameType/testFail85/in/A.java | 8 - .../resources/RenameType/testFail86/in/A.java | 5 - .../resources/RenameType/testFail87/in/A.java | 7 - .../resources/RenameType/testFail88/in/A.java | 8 - .../resources/RenameType/testFail89/in/A.java | 10 - .../resources/RenameType/testFail9/in/A.java | 3 - .../resources/RenameType/testFail90/in/A.java | 14 - .../resources/RenameType/testFail91/in/A.java | 14 - .../resources/RenameType/testFail92/in/A.java | 8 - .../resources/RenameType/testFail93/in/A.java | 10 - .../resources/RenameType/testFail94/in/A.java | 5 - .../resources/RenameType/testFail95/in/A.java | 18 - .../resources/RenameType/testFail96/in/A.java | 3 - .../resources/RenameType/testFail96/in/B.java | 4 - .../resources/RenameType/testFail96/in/C.java | 3 - .../testFailRegression1GCRKMQ/in/Blinky.java | 9 - .../RenameType/testGenerics1/in/A.java | 20 - .../RenameType/testGenerics1/out/B.java | 20 - .../RenameType/testGenerics2/in/A.java | 5 - .../RenameType/testGenerics2/out/B.java | 5 - .../RenameType/testGenerics3/in/A.java | 20 - .../RenameType/testGenerics3/out/B.java | 20 - .../RenameType/testGenerics4/in/A.java | 18 - .../RenameType/testGenerics4/out/B.java | 18 - .../testIllegalInnerClass/in/A.java | 4 - .../RenameType/testIllegalTypeName1/in/A.java | 5 - .../RenameType/testIllegalTypeName2/in/A.java | 5 - .../RenameType/testIllegalTypeName3/in/A.java | 5 - .../RenameType/testIllegalTypeName4/in/A.java | 5 - .../RenameType/testIllegalTypeName5/in/A.java | 5 - .../RenameType/testIllegalTypeName6/in/A.java | 5 - .../RenameType/testIllegalTypeName7/in/A.java | 5 - .../RenameType/testIllegalTypeName8/in/A.java | 5 - .../RenameType/testIllegalTypeName9/in/A.java | 3 - .../resources/RenameType/testNoOp/in/A.java | 5 - .../RenameType/testQualifiedName1/in/A.java | 4 - .../testQualifiedName1/in/build.xml | 1 - .../RenameType/testQualifiedName1/out/B.java | 4 - .../testQualifiedName1/out/build.xml | 1 - .../testQualifiedName2/in/Transient.java | 12 - .../testQualifiedName2/in/mapping.hbm.xml | 13 - .../out/TransientEquipment.java | 12 - .../testQualifiedName2/out/mapping.hbm.xml | 13 - .../testSimilarElements00/in/SomeClass.java | 20 - .../testSimilarElements00/out/SomeClass2.java | 20 - .../testSimilarElements01/in/SomeClass.java | 21 - .../testSimilarElements02/in/SomeClass.java | 24 - .../testSimilarElements03/in/SomeClass.java | 21 - .../testSimilarElements03/out/SomeClass2.java | 21 - .../testSimilarElements04/in/SomeClass.java | 21 - .../in/SomeOtherClass.java | 21 - .../testSimilarElements04/out/SomeClass2.java | 21 - .../out/SomeOtherClass.java | 21 - .../testSimilarElements05/in/SomeClass.java | 21 - .../testSimilarElements05/in/test.html | 1 - .../out/SomeDifferentClass.java | 21 - .../testSimilarElements05/out/test.html | 1 - .../testSimilarElements06/in/SomeClass.java | 21 - .../in/SomeNearlyIdenticalClass.java | 21 - .../out/SomeNearlyIdenticalClass.java | 21 - .../out/SomeOtherClass.java | 21 - .../testSimilarElements07/in/SomeClass.java | 36 - .../out/SomeDiffClass.java | 36 - .../testSimilarElements08/in/ISomeIf.java | 34 - .../testSimilarElements08/out/ISomeIf2.java | 34 - .../testSimilarElements09/in/SomeClass.java | 29 - .../in/SomeOtherClass.java | 7 - .../testSimilarElements09/out/SomeClass.java | 29 - .../out/SomeOtherClass.java | 7 - .../testSimilarElements10/in/SomeClass.java | 9 - .../in/SomeOtherClass.java | 10 - .../testSimilarElements10/out/SomeClass2.java | 9 - .../out/SomeOtherClass.java | 10 - .../testSimilarElements11/in/SomeClass.java | 22 - .../in/SomeOtherClass.java | 21 - .../out/SomeNewClass.java | 22 - .../out/SomeOtherClass.java | 21 - .../in/SomeFieldClass.java | 19 - .../out/SomeOtherFieldClass.java | 19 - .../testSimilarElements13/in/SomeClass.java | 23 - .../out/SomeOtherClass.java | 23 - .../testSimilarElements14/in/SomeClass2.java | 12 - .../out/SomeOtherClass2.java | 12 - .../testSimilarElements15/in/SomeClass3.java | 14 - .../out/SomeOtherClass3.java | 14 - .../testSimilarElements16/in/SomeClass4.java | 15 - .../out/SomeOtherClass4.java | 15 - .../testSimilarElements17/in/SomeClass6.java | 10 - .../testSimilarElements18/in/SomeClass.java | 9 - .../out/SomeOtherClass.java | 9 - .../in/ThreeHunkClass.java | 13 - .../testSimilarElements20/in/OtherClass.java | 9 - .../in/OverriddenMethodClass.java | 9 - .../testSimilarElements20/out/OtherClass.java | 9 - .../testSimilarElements20/out/ThirdClass.java | 9 - .../testSimilarElements21/in/SomeClass.java | 11 - .../in/SomeClassSecond.java | 11 - .../out/SomeClassSecond.java | 11 - .../out/SomeNewClass.java | 11 - .../testSimilarElements22/in/SomeClass.java | 12 - .../out/SomeNewClass.java | 12 - .../testSimilarElements23/in/SomeClass.java | 15 - .../out/SomeNewClass.java | 15 - .../testSimilarElements24/in/SomeClass.java | 5 - .../out/SomeNewClass.java | 5 - .../testSimilarElements25/in/ScrewUp.java | 7 - .../testSimilarElements25/out/ScrewDown.java | 7 - .../testSimilarElements26/in/ScrewUp.java | 9 - .../testSimilarElements26/out/ScrewDown.java | 9 - .../testSimilarElements27/in/ScrewUp.java | 9 - .../testSimilarElements27/out/ScrewDown.java | 9 - .../testSimilarElements28/in/ScrewUp.java | 9 - .../testSimilarElements28/out/ScrewDown.java | 9 - .../testSimilarElements29/in/ScrewUp.java | 7 - .../testSimilarElements29/out/ScrewDown.java | 7 - .../testSimilarElements30/in/SomeClass.java | 8 - .../out/SomeNewClass.java | 8 - .../testSimilarElements31/in/SomeClass.java | 13 - .../out/SomeDiffClass.java | 13 - .../testSimilarElements32/in/SomeClass.java | 8 - .../testSimilarElements33/in/Why.java | 17 - .../testSimilarElements33/out/WhyNot.java | 17 - .../testSimilarElements34/in/Try.java | 20 - .../testSimilarElements34/out/Bla.java | 20 - .../RenameType/testUnicode01/in/B.java | 14 - .../RenameType/testUnicode01/out/C.java | 14 - .../RenameType/testWrongArg1/in/A.java | 5 - .../RenameType/testWrongArg2/in/A.java | 5 - .../RenameType/testWrongArg3/in/A.java | 5 - .../RenameType/testWrongArg4/in/A.java | 5 - .../RenameTypeParameter/test0/in/A.java | 4 - .../RenameTypeParameter/test0/out/A.java | 4 - .../RenameTypeParameter/test1/in/A.java | 7 - .../RenameTypeParameter/test1/out/A.java | 7 - .../RenameTypeParameter/test10/in/A.java | 10 - .../RenameTypeParameter/test10/out/A.java | 10 - .../RenameTypeParameter/test11/in/A.java | 5 - .../RenameTypeParameter/test11/out/A.java | 5 - .../RenameTypeParameter/test12/in/A.java | 10 - .../RenameTypeParameter/test12/out/A.java | 10 - .../RenameTypeParameter/test13/in/A.java | 18 - .../RenameTypeParameter/test13/out/A.java | 18 - .../RenameTypeParameter/test14/in/A.java | 10 - .../RenameTypeParameter/test14/out/A.java | 10 - .../RenameTypeParameter/test15/in/A.java | 16 - .../RenameTypeParameter/test15/out/A.java | 16 - .../RenameTypeParameter/test2/in/A.java | 7 - .../RenameTypeParameter/test2/out/A.java | 7 - .../RenameTypeParameter/test3/in/A.java | 8 - .../RenameTypeParameter/test3/out/A.java | 8 - .../RenameTypeParameter/test4/in/A.java | 8 - .../RenameTypeParameter/test4/out/A.java | 8 - .../RenameTypeParameter/test5/in/A.java | 6 - .../RenameTypeParameter/test5/out/A.java | 6 - .../RenameTypeParameter/test6/in/A.java | 6 - .../RenameTypeParameter/test6/out/A.java | 6 - .../RenameTypeParameter/test7/in/A.java | 6 - .../RenameTypeParameter/test7/out/A.java | 6 - .../RenameTypeParameter/test8/in/A.java | 6 - .../RenameTypeParameter/test8/out/A.java | 6 - .../RenameTypeParameter/test9/in/A.java | 5 - .../RenameTypeParameter/test9/out/A.java | 5 - .../RenameTypeParameter/testFail0/in/A.java | 6 - .../RenameTypeParameter/testFail1/in/A.java | 6 - .../RenameTypeParameter/testFail2/in/A.java | 6 - .../RenameTypeParameter/testFail3/in/A.java | 5 - .../RenameTypeParameter/testFail4/in/A.java | 6 - .../RenameTypeParameter/testFail5/in/A.java | 11 - .../test1/in/A.java | 5 - .../test1/out/A.java | 5 - .../test10/in/A.java | 8 - .../test10/out/A.java | 8 - .../test11/in/A.java | 8 - .../test11/out/A.java | 8 - .../test12/in/A.java | 8 - .../test12/out/A.java | 8 - .../test13/in/A.java | 13 - .../test13/out/A.java | 13 - .../test14/in/A.java | 16 - .../test14/out/A.java | 16 - .../test15/in/A.java | 7 - .../test15/out/A.java | 7 - .../test16/in/A.java | 7 - .../test16/out/A.java | 7 - .../test17/in/A.java | 8 - .../test17/out/A.java | 8 - .../test18/in/A.java | 11 - .../test18/in/C.java | 6 - .../test18/out/A.java | 11 - .../test18/out/C.java | 6 - .../test19/in/A.java | 13 - .../test19/out/A.java | 13 - .../test2/in/A.java | 15 - .../test2/out/A.java | 15 - .../test20/in/A.java | 25 - .../test20/out/A.java | 25 - .../test21/in/A.java | 13 - .../test21/out/A.java | 13 - .../test22/in/A.java | 40 - .../test22/out/A.java | 40 - .../test23/in/A.java | 13 - .../test23/out/A.java | 13 - .../test24/in/A.java | 10 - .../test24/out/A.java | 10 - .../test25/in/A.java | 15 - .../test25/out/A.java | 15 - .../test26/in/A.java | 11 - .../test26/out/A.java | 11 - .../test27/in/A.java | 11 - .../test27/out/A.java | 11 - .../test28/in/A.java | 9 - .../test28/out/A.java | 9 - .../test29/in/A.java | 9 - .../test29/out/A.java | 9 - .../test30/in/A.java | 20 - .../test30/out/A.java | 20 - .../test31/in/A.java | 8 - .../test31/out/A.java | 8 - .../test32/in/A.java | 9 - .../test32/out/A.java | 9 - .../test33/in/A.java | 11 - .../test33/out/A.java | 11 - .../test34/in/A.java | 18 - .../test34/out/A.java | 18 - .../test35/in/A.java | 9 - .../test35/out/A.java | 9 - .../test36/in/A.java | 7 - .../test36/out/A.java | 7 - .../test37/in/A.java | 7 - .../test37/out/A.java | 7 - .../test38/in/A.java | 25 - .../test38/out/A.java | 25 - .../test39/in/A.java | 19 - .../test39/out/A.java | 19 - .../test40/in/A.java | 9 - .../test40/out/A.java | 9 - .../testAnon0/in/A.java | 13 - .../testAnon0/out/A.java | 13 - .../testDelegate01/in/A.java | 5 - .../testDelegate01/out/A.java | 12 - .../testDelegate02/in/A.java | 17 - .../testDelegate02/out/A.java | 36 - .../testDelegate03/in/A.java | 22 - .../testDelegate03/out/A.java | 48 - .../testEnum1/in/A.java | 27 - .../testEnum1/out/A.java | 27 - .../testEnum2/in/A.java | 22 - .../testEnum2/out/A.java | 22 - .../testEnum3/in/A.java | 13 - .../testEnum3/out/A.java | 13 - .../testEnumFail1/in/A.java | 12 - .../testFail0/in/A.java | 5 - .../testFail1/in/A.java | 7 - .../testFail10/in/A.java | 8 - .../testFail11/in/A.java | 8 - .../testFail12/in/A.java | 8 - .../testFail13/in/A.java | 8 - .../testFail14/in/A.java | 8 - .../testFail15/in/A.java | 10 - .../testFail17/in/A.java | 8 - .../testFail18/in/A.java | 8 - .../testFail19/in/A.java | 8 - .../testFail2/in/A.java | 8 - .../testFail20/in/A.java | 10 - .../testFail21/in/A.java | 10 - .../testFail22/in/A.java | 10 - .../testFail23/in/A.java | 10 - .../testFail24/in/A.java | 10 - .../testFail25/in/A.java | 10 - .../testFail26/in/A.java | 7 - .../testFail27/in/A.java | 7 - .../testFail28/in/A.java | 7 - .../testFail29/in/A.java | 10 - .../testFail3/in/A.java | 10 - .../testFail30/in/A.java | 8 - .../testFail31/in/A.java | 12 - .../testFail32/in/A.java | 12 - .../testFail33/in/A.java | 7 - .../testFail34/in/A.java | 10 - .../testFail36/in/A.java | 8 - .../testFail37/in/A.java | 8 - .../testFail38/in/A.java | 10 - .../testFail39/in/A.java | 15 - .../testFail4/in/A.java | 12 - .../testFail40/in/A.java | 11 - .../testFail41/in/A.java | 18 - .../testFail5/in/A.java | 16 - .../testFail6/in/A.java | 9 - .../testFail7/in/A.java | 6 - .../testFail8/in/A.java | 8 - .../testFail9/in/A.java | 11 - .../testGenerics1/in/A.java | 23 - .../testGenerics1/out/A.java | 23 - .../testGenerics2/in/A.java | 21 - .../testGenerics2/out/A.java | 21 - .../testGenerics3/in/A.java | 38 - .../testGenerics3/out/A.java | 38 - .../testGenerics4/in/A.java | 39 - .../testGenerics4/out/A.java | 39 - .../testGenerics5/in/A.java | 20 - .../testGenerics5/out/A.java | 20 - .../testLocal0/in/A.java | 12 - .../testLocal0/out/A.java | 12 - .../testVarargs1/in/A.java | 27 - .../testVarargs1/out/A.java | 27 - .../testVarargs2/in/A.java | 11 - .../testVarargs2/out/A.java | 11 - .../multimoduleProject/subModule/pom.xml | 23 - .../com/codenvy/sub/ClassInSubModule.java | 63 - .../projects/multimoduleProject/test/pom.xml | 23 - .../main/java/com/codenvy/test/MyClass.java | 63 - .../src/test/resources/projects/test/pom.xml | 43 - .../org/eclipse/che/test/GenerateLink.java | 23 - .../java/org/eclipse/che/test/MyClass.java | 63 - .../java/org/eclipse/che/test/TestClass.java | 5 - .../projects/test/src/main/java/p1/X.java | 6 - .../projects/test/src/main/java/zzz/Z.java | 8 - .../che-plugin-java-ext-lang-shared/pom.xml | 75 - .../ext/java/shared/ClasspathEntryKind.java | 25 - .../che/ide/ext/java/shared/Constants.java | 87 - .../che/ide/ext/java/shared/ContentRoot.java | 20 - .../che/ide/ext/java/shared/dto/Change.java | 45 - .../java/shared/dto/HighlightedPosition.java | 67 - .../ide/ext/java/shared/dto/LinkedData.java | 23 - .../ext/java/shared/dto/LinkedModeModel.java | 28 - .../java/shared/dto/LinkedPositionGroup.java | 28 - .../che/ide/ext/java/shared/dto/Problem.java | 123 - .../ext/java/shared/dto/ReconcileResult.java | 38 - .../che/ide/ext/java/shared/dto/Region.java | 43 - .../shared/dto/refactoring/ChangePreview.java | 37 - .../che-plugin-java-plain-ide/pom.xml | 135 - .../client/PlainJavaLocalizationConstant.java | 31 - .../client/inject/PlainJavaGinModule.java | 29 - .../ClasspathUpdaterServiceClient.java | 34 - .../ClasspathUpdaterServiceClientImpl.java | 59 - .../client/wizard/PlainJavaPagePresenter.java | 173 - .../client/wizard/PlainJavaPageView.java | 67 - .../client/wizard/PlainJavaPageViewImpl.java | 112 - .../wizard/PlainJavaPageViewImpl.ui.xml | 98 - .../PlainJavaProjectWizardRegistrar.java | 55 - .../wizard/selector/SelectNodePresenter.java | 86 - .../wizard/selector/SelectNodeView.java | 41 - .../wizard/selector/SelectNodeViewImpl.java | 145 - .../wizard/selector/SelectNodeViewImpl.ui.xml | 28 - .../wizard/selector/SelectionDelegate.java | 30 - .../PlainJavaLocalizationConstant.properties | 16 - .../wizard/PlainJavaPagePresenterTest.java | 195 - .../che-plugin-java-plain-server/pom.xml | 146 - .../java/plain/server/ProjectsListener.java | 71 - .../generator/PlainJavaProjectGenerator.java | 151 - .../server/inject/PlainJavaProjectModule.java | 39 - .../PlainJavaProjectSourceFolderWatcher.java | 154 - .../projecttype/PlainJavaInitHandler.java | 79 - .../projecttype/PlainJavaProjectType.java | 49 - .../PlainJavaValueProviderFactory.java | 114 - .../server/rest/ClasspathUpdaterService.java | 76 - .../java/plain/server/generator/Main.java | 18 - .../java/plain/server/generator/classpath | 7 - .../java/plain/server/generator/project | 12 - .../PlainJavaValueProviderFactoryTest.java | 54 - .../resources/projects/project/src/Main.java | 18 - .../che-plugin-java-plain-shared/pom.xml | 24 - .../shared/PlainJavaProjectConstants.java | 27 - .../plugin-java/che-plugin-java-plain/pom.xml | 31 - .../che-plugin-java-server/pom.xml | 206 - .../che/plugin/java/inject/JavaModule.java | 43 - ...xecuteClientCommandJsonRpcTransmitter.java | 93 - .../java/languageserver/JavaLSWrapper.java | 96 - .../languageserver/JavaLanguageClient.java | 45 - .../languageserver/JavaLanguageServer.java | 22 - .../JavaLanguageServerExtensionService.java | 1095 --- .../JavaLanguageServerJsonRpcMessenger.java | 92 - .../JavaLanguageServerLauncher.java | 362 - .../JavaTextDocumentServiceWraper.java | 116 - .../NotifyJsonRpcTransmitter.java | 89 - .../ProcessorJsonRpcCommunication.java | 73 - .../ProjectClassPathChangedEvent.java | 29 - .../java/languageserver/ProjectsListener.java | 93 - .../languageserver/ProjectsSynchronizer.java | 100 - .../languageserver/WorkspaceSynchronizer.java | 86 - .../plugin/java/languageserver/XMLParser.java | 43 - plugins/plugin-java/pom.xml | 58 - .../che-plugin-json-server/pom.xml | 61 - .../che/plugin/json/inject/JsonModule.java | 33 - .../json/languageserver/JsonExtension.java | 22 - .../JsonLanguageServerConfig.java | 126 - plugins/plugin-json/pom.xml | 29 - .../plugin-keybinding-eclipse-ide/pom.xml | 76 - .../plugin/keybinding/EclipseKeyBinding.java | 102 - .../src/main/module.gwt.xml | 18 - plugins/plugin-keybinding-eclipse/pom.xml | 29 - .../che-plugin-languageserver-ide/pom.xml | 305 - .../api/languageserver/util/EitherUtil.java | 49 - .../languageserver/util/JsonSerializable.java | 24 - .../che/api/languageserver/util/JsonUtil.java | 41 - .../ide/DefaultHoverProviderInitializer.java | 44 - ...DefaultOccurrencesProviderInitializer.java | 44 - .../ide/LanguageDescriptionInitializer.java | 84 - .../ide/LanguageRegexesInitializer.java | 92 - .../ide/LanguageServerExtension.java | 243 - .../ide/LanguageServerLocalization.java | 93 - .../ide/LanguageServerResources.java | 127 - .../ide/editor/DiagnosticAnnotation.java | 124 - .../ide/editor/DiagnosticCollector.java | 43 - .../editor/LanguageServerAnnotationModel.java | 187 - .../LanguageServerAnnotationModelFactory.java | 20 - ...guageServerCodeassistProcessorFactory.java | 21 - .../LanguageServerEditorConfiguration.java | 128 - ...guageServerEditorConfigurationFactory.java | 21 - .../editor/LanguageServerEditorProvider.java | 95 - .../ide/editor/LanguageServerFormatter.java | 267 - .../LanguageServerFormatterFactory.java | 20 - .../LanguageServerReconcileStrategy.java | 118 - ...anguageServerReconcileStrategyFactory.java | 19 - .../editor/PublishDiagnosticsProcessor.java | 61 - .../codeassist/CompletionImageProvider.java | 58 - ...CompletionItemBasedCompletionProposal.java | 353 - .../codeassist/DocumentVariableResolver.java | 105 - .../LanguageServerCodeAssistProcessor.java | 168 - .../codeassist/LatestCompletionResult.java | 120 - .../ide/editor/codeassist/snippet/Choice.java | 33 - .../codeassist/snippet/DollarExpression.java | 43 - .../editor/codeassist/snippet/Expression.java | 38 - .../codeassist/snippet/ExpressionVisitor.java | 31 - .../codeassist/snippet/Placeholder.java | 42 - .../editor/codeassist/snippet/Snippet.java | 38 - .../codeassist/snippet/SnippetParser.java | 225 - .../codeassist/snippet/SnippetResolver.java | 166 - .../ide/editor/codeassist/snippet/Text.java | 31 - .../editor/codeassist/snippet/Variable.java | 44 - .../codeassist/snippet/VariableResolver.java | 35 - .../quickassist/ApplyTextEditAction.java | 79 - .../quickassist/ApplyWorkspaceEditAction.java | 442 -- .../LanguageServerQuickAssistProcessor.java | 289 - ...uageServerQuickAssistProcessorFactory.java | 19 - .../quickassist/QuickassistActionEvent.java | 38 - .../LanguageServerSignatureHelp.java | 133 - .../LanguageServerSignatureHelpFactory.java | 19 - .../editor/signature/ParamterInfoImpl.java | 40 - .../editor/signature/SignatureHelpImpl.java | 51 - .../editor/signature/SignatureInfoImpl.java | 61 - .../sync/FullTextDocumentSynchronize.java | 72 - .../IncrementalTextDocumentSynchronize.java | 86 - .../editor/sync/TextDocumentSynchronize.java | 30 - .../sync/TextDocumentSynchronizeFactory.java | 69 - .../ide/highlighting/OccurrencesProvider.java | 111 - .../ide/hover/HoverProvider.java | 228 - .../ide/inject/LanguageServerGinModule.java | 59 - .../languageserver/ide/location/HasURI.java | 21 - .../ide/location/LanguageServerFile.java | 76 - .../ide/location/OpenLocationPresenter.java | 132 - .../OpenLocationPresenterFactory.java | 18 - .../ide/location/OpenLocationView.java | 32 - .../ide/location/OpenLocationViewImpl.java | 130 - .../declaration/FindDefinitionAction.java | 101 - .../references/FindReferencesAction.java | 111 - .../navigation/symbol/GoToSymbolAction.java | 303 - .../ide/navigation/symbol/SymbolEntry.java | 93 - .../navigation/symbol/SymbolKindHelper.java | 103 - .../workspace/FindSymbolAction.java | 191 - .../ide/navigation/workspace/SymbolEntry.java | 82 - .../ide/quickopen/QuickOpenEntry.java | 126 - .../ide/quickopen/QuickOpenEntryGroup.java | 115 - .../ide/quickopen/QuickOpenModel.java | 45 - .../ide/quickopen/QuickOpenPresenter.java | 59 - .../ide/quickopen/QuickOpenView.java | 35 - .../ide/quickopen/QuickOpenViewImpl.java | 303 - .../ide/quickopen/QuickOpenViewImpl.ui.xml | 54 - .../ide/quickopen/Renderer.java | 15 - .../ide/registry/LanguageServerRegistry.java | 134 - .../ide/rename/LSRenameAction.java | 93 - .../ide/rename/RenameDialog.java | 74 - .../ide/rename/RenameDialogFooter.java | 51 - .../ide/rename/RenameInputBox.java | 105 - .../ide/rename/RenamePresenter.java | 390 - .../languageserver/ide/rename/RenameView.java | 40 - .../ide/rename/RenameViewImpl.java | 176 - .../ide/rename/model/RenameChange.java | 34 - .../ide/rename/model/RenameFile.java | 53 - .../ide/rename/model/RenameFolder.java | 40 - .../ide/rename/model/RenameProject.java | 46 - .../ide/rename/node/ChangeNode.java | 150 - .../ide/rename/node/FileNode.java | 70 - .../ide/rename/node/FolderNode.java | 67 - .../ide/rename/node/ProjectNode.java | 72 - .../ide/rename/node/RenameNodeFactory.java | 29 - .../ExecuteClientCommandProcessor.java | 30 - .../service/ExecuteClientCommandReceiver.java | 62 - .../service/LanguageServerServiceClient.java | 79 - .../service/PublishDiagnosticsReceiver.java | 58 - .../ide/service/ServiceUtil.java | 34 - .../service/ShowMessageJsonRpcReceiver.java | 81 - .../service/TextDocumentServiceClient.java | 311 - .../ide/service/WorkspaceServiceClient.java | 70 - .../ide/util/DtoBuildHelper.java | 75 - .../ide/util/OpenFileInEditorHelper.java | 190 - .../ide/util/PromiseHelper.java | 45 - .../ide/window/ShowMessageProcessor.java | 57 - .../window/ShowMessageRequestProcessor.java | 53 - .../window/dialog/MessageDialogFooter.java | 93 - .../window/dialog/MessageDialogFooter.ui.xml | 50 - .../window/dialog/MessageDialogPresenter.java | 57 - .../ide/window/dialog/MessageDialogView.java | 52 - .../window/dialog/MessageDialogViewImpl.java | 91 - .../dialog/MessageDialogViewImpl.ui.xml | 41 - .../src/main/module.gwt.xml | 22 - .../api/languageserver/LanguageServer.gwt.xml | 20 - .../ide/LanguageServerLocalization.properties | 44 - .../languageserver/ide/QuickOpenList.css | 70 - .../languageserver/ide/languageserver.css | 57 - .../languageserver/ide/svg/category.svg | 32 - .../ide/svg/codeassist/class.svg | 27 - .../ide/svg/codeassist/enum_type.svg | 25 - .../ide/svg/codeassist/field.svg | 20 - .../ide/svg/codeassist/generic_file.svg | 113 - .../ide/svg/codeassist/interface.svg | 23 - .../ide/svg/codeassist/local.svg | 24 - .../ide/svg/codeassist/method.svg | 20 - .../ide/svg/codeassist/package.svg | 24 - .../ide/svg/codeassist/property.svg | 20 - .../ide/svg/codeassist/template.svg | 34 - .../ide/svg/codeassist/text.svg | 100 - .../ide/svg/codeassist/value.svg | 21 - .../plugin/languageserver/ide/svg/file.svg | 31 - .../plugin/languageserver/ide/svg/find.svg | 28 - .../plugin/languageserver/ide/svg/import.svg | 108 - .../languageserver/ide/svg/mark-error.svg | 20 - .../languageserver/ide/svg/mark-warning.svg | 22 - .../plugin/languageserver/ide/svg/taskmrk.svg | 30 - .../resources/org/eclipse/lsp4j/Lsp4j.gwt.xml | 19 - .../lsp4j/jsonrpc/messages/Either.java | 77 - .../lsp4j/jsonrpc/messages/Either3.java | 83 - .../orion/client/WordDetectionUtilTest.java | 63 - ...letionItemBasedCompletionProposalTest.java | 222 - .../DocumentVariableResolverTest.java | 40 - .../codeassist/snippet/ExpressionPrinter.java | 103 - .../snippet/SnippetParsingTest.java | 204 - .../snippet/SnippetResolverTest.java | 67 - plugins/plugin-languageserver/pom.xml | 29 - .../che-plugin-machine-ext-server/pom.xml | 122 - .../ide/ext/machine/server/MachineModule.java | 27 - .../ext/machine/server/ssh/KeysInjector.java | 150 - .../machine/server/ssh/WorkspaceSshKeys.java | 146 - .../server/ssh/WorkspaceStatusSubscriber.java | 63 - .../machine/server/ssh/KeysInjectorTest.java | 231 - .../server/ssh/WorkspaceSshKeysTest.java | 132 - .../che-plugin-machine-ssh-client/pom.xml | 136 - .../che/ide/ext/ssh/client/SshExtension.java | 28 - .../ssh/client/SshLocalizationConstant.java | 77 - .../che/ide/ext/ssh/client/SshResources.java | 17 - .../ext/ssh/client/inject/SshGinModule.java | 41 - .../ext/ssh/client/manage/ShowSshKeyView.java | 31 - .../ssh/client/manage/ShowSshKeyViewImpl.java | 77 - .../client/manage/ShowSshKeyViewImpl.ui.xml | 36 - .../client/manage/SshKeyManagerPresenter.java | 184 - .../ssh/client/manage/SshKeyManagerView.java | 54 - .../client/manage/SshKeyManagerViewImpl.java | 187 - .../manage/SshKeyManagerViewImpl.ui.xml | 63 - .../client/upload/UploadSshKeyPresenter.java | 116 - .../ssh/client/upload/UploadSshKeyView.java | 97 - .../client/upload/UploadSshKeyViewImpl.java | 151 - .../client/upload/UploadSshKeyViewImpl.ui.xml | 59 - .../src/main/module.gwt.xml | 26 - .../client/SshLocalizationConstant.properties | 40 - plugins/plugin-machine/pom.xml | 30 - .../pom.xml | 177 - .../archetype/ArchetypeGenerator.java | 185 - .../archetype/ArchetypeOutputImpl.java | 49 - .../archetype/MavenArchetypeImpl.java | 68 - .../MavenArchetypeJsonRpcMessenger.java | 86 - .../archetype/ArchetypeGeneratorTest.java | 59 - .../src/test/resources/test.log | 1 - .../plugin-maven/che-plugin-maven-ide/pom.xml | 161 - .../plugin/maven/client/MavenArchetype.java | 74 - .../plugin/maven/client/MavenExtension.java | 102 - .../client/MavenLocalizationConstant.java | 84 - .../plugin/maven/client/MavenResources.java | 41 - .../client/actions/MavenActionsConstants.java | 20 - .../client/command/MavenCommandModel.java | 85 - .../command/MavenCommandPagePresenter.java | 100 - .../client/command/MavenCommandPageView.java | 46 - .../command/MavenCommandPageViewImpl.java | 109 - .../command/MavenCommandPageViewImpl.ui.xml | 54 - .../client/command/MavenCommandType.java | 75 - .../ResolveDependencyPresenter.java | 59 - .../progressor/ResolveDependencyView.java | 46 - .../progressor/ResolveDependencyViewImpl.java | 75 - .../ResolveDependencyViewImpl.ui.xml | 60 - .../background/BackgroundLoaderPresenter.java | 77 - .../background/BackgroundLoaderView.java | 54 - .../background/BackgroundLoaderViewImpl.java | 129 - .../BackgroundLoaderViewImpl.ui.xml | 44 - .../background/DependencyResolverAction.java | 48 - .../maven/client/inject/MavenGinModule.java | 58 - .../preference/MavenPreferencePresenter.java | 92 - .../preference/MavenPreferenceView.java | 41 - .../preference/MavenPreferenceViewImpl.java | 73 - .../preference/MavenPreferenceViewImpl.ui.xml | 26 - .../resource/MavenProjectInterceptor.java | 57 - .../MavenSourceFolderInterceptor.java | 36 - .../maven/client/resource/PomInterceptor.java | 52 - .../client/wizard/MavenPagePresenter.java | 351 - .../maven/client/wizard/MavenPageView.java | 67 - .../client/wizard/MavenPageViewImpl.java | 264 - .../client/wizard/MavenPageViewImpl.ui.xml | 188 - .../wizard/MavenProjectWizardRegistrar.java | 54 - .../eclipse/che/plugin/maven/client/Maven.css | 27 - .../MavenLocalizationConstant.properties | 49 - .../client/command/maven-command-type.svg | 21 - .../progressor/background/Loader.css | 72 - .../progressor/background/error.svg | 25 - .../progressor/background/loaderIcon.svg | 34 - .../eclipse/che/plugin/maven/client/maven.svg | 26 - .../client/command/MavenCommandTypeTest.java | 42 - .../command/MavenPagePresenterTest.java | 93 - .../ResolveDependencyPresenterTest.java | 58 - .../DependencyResolverActionTest.java | 52 - .../client/wizard/MavenPagePresenterTest.java | 124 - .../che-plugin-maven-server/pom.xml | 98 - .../maven/server/inject/MavenModule.java | 70 - .../server/projecttype/MavenProjectType.java | 51 - .../MavenTargetExcludeMatcher.java | 49 - .../projecttype/MavenValueProvider.java | 139 - .../MavenValueProviderFactory.java | 28 - .../handler/ArchetypeGenerationStrategy.java | 127 - .../handler/GeneratorStrategy.java | 29 - .../handler/MavenProjectGenerator.java | 67 - .../handler/MavenProjectInitHandler.java | 34 - .../handler/SimpleGeneratorStrategy.java | 144 - .../che-plugin-maven-shared/pom.xml | 144 - .../plugin/maven/shared/MavenArchetype.java | 33 - .../plugin/maven/shared/MavenAttributes.java | 54 - .../maven/shared/dto/ArchetypeOutput.java | 49 - .../maven/shared/dto/MavenArchetypeDto.java | 45 - .../che-plugin-maven-tools/pom.xml | 65 - .../che/ide/maven/tools/Activation.java | 196 - .../che/ide/maven/tools/ActivationFile.java | 103 - .../che/ide/maven/tools/ActivationOS.java | 164 - .../ide/maven/tools/ActivationProperty.java | 110 - .../eclipse/che/ide/maven/tools/Build.java | 436 -- .../che/ide/maven/tools/BuildBase.java | 262 - .../che/ide/maven/tools/Dependencies.java | 162 - .../che/ide/maven/tools/Dependency.java | 515 -- .../ide/maven/tools/DependencyManagement.java | 66 - .../che/ide/maven/tools/Exclusion.java | 108 - .../che/ide/maven/tools/MavenArtifact.java | 111 - .../che/ide/maven/tools/MavenUtils.java | 284 - .../eclipse/che/ide/maven/tools/Model.java | 1103 --- .../eclipse/che/ide/maven/tools/Parent.java | 205 - .../eclipse/che/ide/maven/tools/Plugin.java | 324 - .../eclipse/che/ide/maven/tools/Profile.java | 450 -- .../che/ide/maven/tools/Repository.java | 258 - .../che/ide/maven/tools/RepositoryPolicy.java | 169 - .../eclipse/che/ide/maven/tools/Resource.java | 274 - .../che/ide/maven/tools/MavenUtilTest.java | 63 - .../che/ide/maven/tools/ModelTest.java | 1934 ----- .../resources/multi-module/module1/pom.xml | 25 - .../resources/multi-module/module2/pom.xml | 25 - .../multi-module/modulesX/module3/pom.xml | 25 - .../multi-module/modulesX/module4/pom.xml | 25 - .../resources/multi-module/modulesX/pom.xml | 26 - .../src/test/resources/multi-module/pom.xml | 27 - .../src/test/resources/no-packaging.xml | 23 - .../src/test/resources/test-artifactId.xml | 48 - .../src/test/resources/test-pom.xml | 32 - plugins/plugin-maven/pom.xml | 47 - .../che-plugin-nodejs-debugger-ide/pom.xml | 152 - .../plugin/nodejsdbg/ide/NodeJsDebugger.java | 109 - .../ide/NodeJsDebuggerExtension.java | 32 - .../ide/NodeJsDebuggerGinModule.java | 35 - .../NodeJsDebuggerLocalizationConstant.java | 34 - .../ide/NodeJsDebuggerResources.java | 23 - ...eJsDebuggerConfigurationPagePresenter.java | 97 - .../NodeJsDebuggerConfigurationPageView.java | 36 - ...deJsDebuggerConfigurationPageViewImpl.java | 71 - ...JsDebuggerConfigurationPageViewImpl.ui.xml | 22 - .../NodeJsDebuggerConfigurationType.java | 62 - .../src/main/module.gwt.xml | 25 - ...eJsDebuggerLocalizationConstant.properties | 17 - .../nodejs-debugger-configuration-type.svg | 21 - ...ebuggerConfigurationPagePresenterTest.java | 94 - .../NodeJsDebuggerConfigurationTypeTest.java | 58 - .../src/test/resources/logback-test.xml | 27 - .../che-plugin-nodejs-debugger-server/pom.xml | 110 - .../nodejsdbg/server/NodeJsDebugProcess.java | 206 - .../nodejsdbg/server/NodeJsDebugger.java | 301 - .../server/NodeJsDebuggerFactory.java | 86 - .../server/NodeJsDebuggerModule.java | 29 - .../plugin/nodejsdbg/server/NodeJsOutput.java | 45 - .../server/NodeJsProcessObservable.java | 22 - .../server/NodeJsProcessObserver.java | 25 - .../plugin/nodejsdbg/server/OutputReader.java | 118 - .../server/command/NodeJsDebugCommand.java | 36 - .../command/NodeJsDebugCommandImpl.java | 55 - .../command/NodeJsDebugCommandsLibrary.java | 242 - .../exception/NodeJsDebuggerException.java | 25 - .../NodeJsDebuggerParseException.java | 29 - .../NodeJsDebuggerTerminatedException.java | 19 - .../server/parser/NodeJsBackTraceParser.java | 53 - .../parser/NodeJsBreakpointsParser.java | 69 - .../server/parser/NodeJsOutputParser.java | 76 - .../server/parser/NodeJsScriptsParser.java | 70 - .../server/parser/NodeJsStepParser.java | 53 - .../nodejsdbg/server/NodeJsDebuggerTest.java | 158 - .../parser/NodeJsBackTraceParserTest.java | 68 - .../parser/NodeJsBreakpointsParserTest.java | 84 - .../parser/NodeJsScriptsParserTest.java | 44 - .../server/parser/NodeJsStepParserTest.java | 61 - .../src/test/resources/app.js | 7 - .../src/test/resources/logback-test.xml | 26 - plugins/plugin-nodejs-debugger/pom.xml | 43 - .../che-plugin-nodejs-lang-ide/pom.xml | 85 - .../plugin/nodejs/ide/NodeJsExtension.java | 30 - .../plugin/nodejs/ide/NodeJsResources.java | 26 - .../nodejs/ide/inject/NodeJsGinModule.java | 30 - .../project/NodeJsProjectWizardRegistrar.java | 51 - .../src/main/module.gwt.xml | 21 - .../che/plugin/nodejs/ide/icons/js.svg | 32 - .../che-plugin-nodejs-lang-server/pom.xml | 47 - .../generator/NodeJsProjectGenerator.java | 62 - .../plugin/nodejs/inject/NodeJsModule.java | 57 - .../nodejs/projecttype/NodeJsProjectType.java | 28 - .../main/resources/files/default_node_content | 13 - .../che-plugin-nodejs-lang-shared/pom.xml | 24 - .../che/plugin/nodejs/shared/Constants.java | 29 - plugins/plugin-nodejs/pom.xml | 31 - plugins/plugin-orion/README.md | 4 - .../che-plugin-orion-compare/pom.xml | 67 - .../che/ide/orion/compare/CompareConfig.java | 56 - .../che/ide/orion/compare/CompareFactory.java | 34 - .../ide/orion/compare/CompareFactoryImpl.java | 35 - .../ide/orion/compare/CompareInitializer.java | 140 - .../che/ide/orion/compare/FileOptions.java | 42 - .../orion/compare/OrionCompareExtension.java | 25 - .../ide/orion/compare/OrionCompareModule.java | 24 - .../orion/compare/jso/CompareConfigJs.java | 50 - .../ide/orion/compare/jso/FileOptionsJs.java | 35 - .../orion/compare/jso/GitCompareOverlay.java | 54 - .../src/main/module.gwt.xml | 19 - plugins/plugin-orion/pom.xml | 29 - .../che-plugin-php-lang-ide/pom.xml | 105 - .../che/plugin/php/ide/PhpExtension.java | 51 - .../ide/PhpLanguageDescriptionProvider.java | 33 - .../php/ide/PhpLocalizationConstant.java | 31 - .../che/plugin/php/ide/PhpResources.java | 27 - .../ide/action/CreatePhpSourceFileAction.java | 68 - .../ide/action/NewPhplikeResourceAction.java | 64 - .../plugin/php/ide/inject/PhpGinModule.java | 52 - .../project/PhpProjectWizardRegistrar.java | 50 - .../src/main/module.gwt.xml | 21 - .../che/plugin/php/ide/svg/category.svg | 28 - .../che/plugin/php/ide/svg/php_file.svg | 28 - .../che-plugin-php-lang-server/pom.xml | 57 - .../che/plugin/php/inject/PhpModule.java | 42 - .../PhpLanguageServerConfig.java | 95 - .../php/projecttype/PhpProjectGenerator.java | 56 - .../php/projecttype/PhpProjectType.java | 29 - .../main/resources/files/default_php_content | 3 - .../che-plugin-php-lang-shared/pom.xml | 31 - .../che/plugin/php/shared/Constants.java | 33 - plugins/plugin-php/pom.xml | 42 - plugins/plugin-product-info/pom.xml | 77 - .../info/client/CheProductExtension.java | 46 - .../client/CheProductInfoDataProvider.java | 72 - .../info/client/LocalizationConstant.java | 50 - .../client/RedirectToIssueTrackerAction.java | 47 - .../client/RedirectToPublicChatAction.java | 47 - .../client/inject/ProductInfoGinModule.java | 27 - .../src/main/module.gwt.xml | 22 - .../client/LocalizationConstant.properties | 23 - .../che-plugin-pullrequest-ide/pom.xml | 252 - .../client/ContributeMessages.java | 297 - .../client/ContributeResources.java | 54 - .../client/ContributionExtension.java | 77 - .../client/ContributionMixinProvider.java | 307 - .../ContributePartDisplayingModeAction.java | 91 - .../dialogs/commit/CommitPresenter.java | 155 - .../client/dialogs/commit/CommitView.java | 65 - .../client/dialogs/commit/CommitViewImpl.java | 106 - .../dialogs/commit/CommitViewImpl.ui.xml | 45 - .../dialogs/commit/CommitViewUiBinder.java | 24 - .../dialogs/paste/PasteAwareTextBox.java | 67 - .../client/dialogs/paste/PasteEvent.java | 30 - .../client/dialogs/paste/PasteHandler.java | 19 - .../events/ContextInvalidatedEvent.java | 43 - .../events/ContextInvalidatedHandler.java | 30 - .../events/ContextPropertyChangeEvent.java | 66 - .../events/ContextPropertyChangeHandler.java | 28 - .../events/CurrentContextChangedEvent.java | 43 - .../events/CurrentContextChangedHandler.java | 30 - .../pullrequest/client/events/StepEvent.java | 70 - .../client/events/StepHandler.java | 36 - .../client/inject/PullRequestGinModule.java | 54 - .../contribute/ContributePartPresenter.java | 816 -- .../parts/contribute/ContributePartView.java | 204 - .../contribute/ContributePartViewImpl.java | 523 -- .../contribute/ContributePartViewImpl.ui.xml | 213 - .../ContributePartViewUiBinder.java | 22 - .../parts/contribute/StagesProvider.java | 74 - .../parts/contribute/TextChangedHandler.java | 30 - .../ContributePreferencePresenter.java | 143 - .../preference/ContributePreferenceView.java | 32 - .../ContributePreferenceViewImpl.java | 62 - .../ContributePreferenceViewImpl.ui.xml | 38 - .../client/steps/AddForkRemoteStep.java | 161 - .../steps/AddForkRemoteStepFactory.java | 21 - .../client/steps/AddHttpForkRemoteStep.java | 42 - .../steps/AddReviewFactoryLinkStep.java | 40 - .../client/steps/AddSshForkRemoteStep.java | 42 - .../steps/AuthorizeCodenvyOnVCSHostStep.java | 120 - .../client/steps/CheckBranchToPush.java | 44 - .../client/steps/CommitWorkingTreeStep.java | 88 - .../client/steps/CreateForkStep.java | 109 - .../steps/DefineExecutionConfiguration.java | 31 - .../DefineForkRemoteUrlProtocolStep.java | 24 - .../client/steps/DefineWorkBranchStep.java | 76 - .../client/steps/DetectPullRequestStep.java | 83 - .../DetermineUpstreamRepositoryStep.java | 84 - .../steps/GenerateReviewFactoryStep.java | 133 - .../steps/InitializeWorkflowContextStep.java | 159 - .../client/steps/IssuePullRequestStep.java | 87 - .../client/steps/PushBranchOnForkStep.java | 41 - .../client/steps/PushBranchOnOriginStep.java | 44 - .../client/steps/PushBranchStep.java | 205 - .../client/steps/PushBranchStepFactory.java | 23 - .../client/steps/UpdatePullRequestStep.java | 177 - .../client/steps/WaitForkOnRemoteStep.java | 89 - .../steps/WaitForkOnRemoteStepFactory.java | 19 - .../client/utils/FactoryHelper.java | 43 - .../client/vcs/BranchUpToDateException.java | 33 - .../pullrequest/client/vcs/GitVcsService.java | 317 - .../pullrequest/client/vcs/VcsService.java | 134 - .../client/vcs/VcsServiceProvider.java | 47 - .../vcs/hosting/HostingServiceTemplates.java | 59 - .../NoCommitsInPullRequestException.java | 35 - .../hosting/NoHistoryInCommonException.java | 24 - .../vcs/hosting/NoPullRequestException.java | 28 - .../vcs/hosting/NoUserForkException.java | 31 - ...HostingServiceImplementationException.java | 28 - .../PullRequestAlreadyExistsException.java | 33 - .../client/vcs/hosting/ServiceUtil.java | 86 - .../client/vcs/hosting/VcsHostingService.java | 196 - .../hosting/VcsHostingServiceProvider.java | 84 - .../client/workflow/ChainExecutor.java | 61 - .../pullrequest/client/workflow/Context.java | 449 -- .../client/workflow/ContributionWorkflow.java | 41 - .../pullrequest/client/workflow/Step.java | 41 - .../client/workflow/StepsChain.java | 203 - .../client/workflow/SyntheticStep.java | 22 - .../client/workflow/WorkflowExecutor.java | 283 - .../client/workflow/WorkflowStatus.java | 92 - .../plugin/pullrequest/client/Contribute.css | 96 - .../client/ContributeMessages.properties | 172 - .../plugin/pullrequest/client/images/icon.svg | 33 - .../pullrequest/client/images/refresh.svg | 30 - .../che-plugin-pullrequest-server/pom.xml | 105 - .../server/ContributionProjectType.java | 42 - .../ContributionProjectTypeCleaner.java | 112 - .../server/ContributionProjectTypeModule.java | 33 - .../che-plugin-pullrequest-shared/pom.xml | 40 - .../ContributionProjectTypeConstants.java | 32 - .../pullrequest/shared/dto/Configuration.java | 30 - .../pullrequest/shared/dto/HostUser.java | 33 - .../pullrequest/shared/dto/IssueComment.java | 29 - .../pullrequest/shared/dto/PullRequest.java | 53 - .../pullrequest/shared/dto/Repository.java | 37 - plugins/plugin-pullrequest-parent/pom.xml | 30 - .../che-plugin-python-lang-ide/pom.xml | 105 - .../plugin/python/ide/PythonExtension.java | 52 - .../PythonLanguageDescriptionProvider.java | 33 - .../ide/PythonLocalizationConstant.java | 28 - .../plugin/python/ide/PythonResources.java | 27 - .../ide/action/CreatePythonFileAction.java | 68 - .../python/ide/inject/PythonGinModule.java | 51 - .../project/PythonProjectWizardRegistrar.java | 51 - .../src/main/module.gwt.xml | 21 - .../ide/PythonLocalizationConstant.properties | 15 - .../che/plugin/python/ide/svg/python.svg | 30 - .../che-plugin-python-lang-server/pom.xml | 61 - .../generator/PythonProjectGenerator.java | 57 - .../plugin/python/inject/PythonModule.java | 40 - .../PythonLanguageSeverConfig.java | 91 - .../python/projecttype/PythonProjectType.java | 32 - .../resources/files/default_python_content | 1 - .../che-plugin-python-lang-shared/pom.xml | 24 - .../python/shared/ProjectAttributes.java | 29 - plugins/plugin-python/pom.xml | 31 - .../che-plugin-sdk-ext-plugins/pom.xml | 60 - .../ext/plugins/client/GwtCheCommandType.java | 71 - .../ext/plugins/client/GwtCheExtension.java | 29 - .../ext/plugins/client/PluginsGinModule.java | 32 - .../ext/plugins/client/PluginsResources.java | 26 - .../client/images/gwt-che-command-type.svg | 21 - .../plugin-sdk/che-plugin-sdk-tools/pom.xml | 60 - .../che/ide/sdk/tools/InstallExtension.java | 208 - plugins/plugin-sdk/pom.xml | 45 - .../plugin-testing-base/pom.xml | 71 - .../java/testing/AbstractJavaTestRunner.java | 131 - .../plugin/java/testing/ClasspathUtil.java | 46 - .../testing/ProjectClasspathProvider.java | 81 - .../testing/ProjectClasspathProviderTest.java | 150 - .../che-plugin-testing-junit-ide/pom.xml | 110 - .../junit/ide/JUnitTestFileExtension.java | 30 - .../ide/JUnitTestLocalizationConstant.java | 33 - .../testing/junit/ide/JUnitTestResources.java | 22 - .../ide/action/AbstractJUnitTestAction.java | 139 - .../ide/action/DebugJUnitTestAction.java | 70 - .../ide/action/JUnitTestActionGroup.java | 49 - .../junit/ide/action/RunJUnitTestAction.java | 71 - .../junit/ide/inject/JUnitGinModule.java | 34 - .../src/main/module.gwt.xml | 19 - .../JUnitTestLocalizationConstant.properties | 21 - .../che/plugin/testing/junit/ide/svg/test.svg | 19 - .../che-plugin-testing-junit-runtime/pom.xml | 30 - .../che/junit/TestingMessageHelper.java | 299 - .../che/junit/junit4/CheJUnitCoreRunner.java | 67 - .../che/junit/junit4/CheJUnitLauncher.java | 33 - .../che/junit/junit4/JUnit4TestReference.java | 91 - .../che/junit/junit4/TestRunnerUtil.java | 86 - .../listeners/CheJUnitTestListener.java | 141 - .../listeners/JUnitExecutionListener.java | 84 - .../che-plugin-testing-junit-server/pom.xml | 76 - .../junit/server/inject/JunitGuiceModule.java | 29 - .../junit/server/junit4/JUnit4TestRunner.java | 86 - .../plugin-testing-junit/pom.xml | 41 - .../che-plugin-testing-testng-ide/pom.xml | 89 - .../ide/TestNgLocalizationConstant.java | 33 - .../testing/testng/ide/TestNgResources.java | 22 - .../testing/testng/ide/TestNgTestAction.java | 52 - .../testng/ide/TestNgTestFileExtension.java | 30 - .../ide/action/AbstractTestNgTestAction.java | 139 - .../ide/action/DebugTestNgTestAction.java | 66 - .../ide/action/RunTestNgTestAction.java | 65 - .../testng/ide/inject/TestNgGinModule.java | 32 - .../src/main/module.gwt.xml | 19 - .../ide/TestNgLocalizationConstant.properties | 21 - .../plugin/testing/testng/ide/svg/test.svg | 19 - .../che-plugin-testing-testng-runtime/pom.xml | 36 - .../src/main/java/org/testng/CheTestNG.java | 73 - .../java/org/testng/CheTestNGLauncher.java | 44 - .../java/org/testng/CheTestNGListener.java | 417 -- .../java/org/testng/TestResultWrapper.java | 118 - .../java/org/testng/TestingMessageHelper.java | 251 - .../listeners/CheConfigurationListener.java | 47 - .../listeners/CheInvokedMethodListener.java | 44 - .../testng/listeners/CheSuiteListener.java | 39 - .../org/testng/listeners/CheTestListener.java | 62 - .../org/testng/che/tests/ListeneterTest.java | 161 - .../che-plugin-testing-testng-server/pom.xml | 106 - .../testing/testng/server/TestNGRunner.java | 170 - .../testng/server/TestNGSuiteParser.java | 37 - .../testng/server/TestNGSuiteUtil.java | 94 - .../server/inject/TestNGGuiceModule.java | 28 - .../plugin-testing-testng/pom.xml | 41 - plugins/plugin-testing-java/pom.xml | 41 - .../che-plugin-testing-phpunit-ide/pom.xml | 77 - .../phpunit/ide/PHPTestFileExtension.java | 19 - .../testing/phpunit/ide/PHPUnitGinModule.java | 38 - .../ide/PHPUnitTestLocalizationConstant.java | 29 - .../phpunit/ide/PHPUnitTestResources.java | 26 - .../ide/action/PHPRunScriptTestAction.java | 113 - .../ide/action/PHPUnitTestActionGroup.java | 45 - .../src/main/module.gwt.xml | 19 - ...PHPUnitTestLocalizationConstant.properties | 15 - .../plugin/testing/phpunit/ide/svg/test.svg | 19 - .../testing/phpunit/ide/svg/test_all.svg | 75 - .../che-plugin-testing-phpunit-server/pom.xml | 74 - .../phpunit/server/PHPUnitMessageParser.java | 142 - .../phpunit/server/PHPUnitTestEngine.java | 148 - .../server/PHPUnitTestResultsProvider.java | 195 - .../phpunit/server/PHPUnitTestRunner.java | 78 - .../server/inject/PHPUnitGuiceModule.java | 32 - .../server/model/AbstractPHPUnitElement.java | 89 - .../model/AbstractPHPUnitTestEvent.java | 68 - .../model/AbstractPHPUnitTestResult.java | 102 - .../phpunit/server/model/PHPUnitTestCase.java | 95 - .../server/model/PHPUnitTestException.java | 63 - .../phpunit/server/model/PHPUnitTestRoot.java | 36 - .../server/model/PHPUnitTestSuite.java | 118 - .../server/model/PHPUnitTestWarning.java | 39 - .../server/model/PHPUnitTraceFrame.java | 77 - .../phpunit-printer/ZendPHPUnitLogger.php | 401 - .../plugin-testing-phpunit/pom.xml | 40 - plugins/plugin-testing-php/pom.xml | 46 - .../che-plugin-testing-ide/pom.xml | 217 - .../testing/ide/TestLocalizationConstant.java | 39 - .../che/plugin/testing/ide/TestResources.java | 67 - .../plugin/testing/ide/TestServiceClient.java | 58 - .../plugin/testing/ide/TestingExtension.java | 102 - .../testing/ide/action/DebugTestAction.java | 77 - .../action/RunDebugTestAbstractAction.java | 211 - .../testing/ide/action/RunTestAction.java | 77 - .../plugin/testing/ide/action/TestAction.java | 39 - .../testing/ide/detector/TestDetector.java | 158 - .../ide/detector/TestFileExtension.java | 25 - .../testing/ide/handler/TestingHandler.java | 224 - .../testing/ide/inject/TestingGinModule.java | 36 - .../testing/ide/messages/BaseTestMessage.java | 21 - .../ide/messages/BaseTestSuiteMessage.java | 21 - .../testing/ide/messages/BuildTreeEnded.java | 23 - .../ide/messages/ClientTestingMessage.java | 98 - .../plugin/testing/ide/messages/Message.java | 33 - .../ide/messages/RootPresentationMessage.java | 35 - .../testing/ide/messages/SuiteTreeEnded.java | 23 - .../testing/ide/messages/SuiteTreeNode.java | 28 - .../ide/messages/SuiteTreeStarted.java | 27 - .../testing/ide/messages/TestCount.java | 35 - .../testing/ide/messages/TestFailed.java | 41 - .../testing/ide/messages/TestFinished.java | 35 - .../testing/ide/messages/TestIgnored.java | 31 - .../ide/messages/TestReporterAttached.java | 23 - .../testing/ide/messages/TestStarted.java | 32 - .../testing/ide/messages/TestStdErr.java | 27 - .../testing/ide/messages/TestStdOut.java | 27 - .../ide/messages/TestSuiteFinished.java | 23 - .../ide/messages/TestSuiteStarted.java | 27 - .../ide/messages/TestingMessageVisitor.java | 70 - .../ide/messages/UncapturedOutputMessage.java | 34 - .../model/AbstractTestingEventsProcessor.java | 125 - .../model/GeneralTestingEventsProcessor.java | 449 -- .../testing/ide/model/PresentationUtil.java | 65 - .../plugin/testing/ide/model/Printable.java | 23 - .../che/plugin/testing/ide/model/Printer.java | 35 - .../plugin/testing/ide/model/TestLocator.java | 28 - .../testing/ide/model/TestRootState.java | 59 - .../plugin/testing/ide/model/TestState.java | 332 - .../ide/model/TestStateEventsListener.java | 103 - .../testing/ide/model/TestSuiteStack.java | 114 - .../ide/model/TestingEventsProcessor.java | 139 - .../ide/model/event/BaseStartEvent.java | 76 - .../ide/model/event/TestFailedEvent.java | 42 - .../ide/model/event/TestFinishedEvent.java | 30 - .../ide/model/event/TestIgnoredEvent.java | 35 - .../ide/model/event/TestNodeEvent.java | 40 - .../ide/model/event/TestOutputEvent.java | 34 - .../ide/model/event/TestStartedEvent.java | 41 - .../model/event/TestSuiteFinishedEvent.java | 21 - .../model/event/TestSuiteStartedEvent.java | 28 - .../ide/model/info/AbstractTestStateInfo.java | 25 - .../model/info/CompaundTestFailedInfo.java | 37 - .../testing/ide/model/info/NotRunInfo.java | 50 - .../ide/model/info/SuiteFinishedInfo.java | 132 - .../ide/model/info/SuiteInProgressInfo.java | 39 - .../ide/model/info/TerminatedInfo.java | 50 - .../model/info/TestComparisionFailedInfo.java | 38 - .../testing/ide/model/info/TestErrorInfo.java | 24 - .../ide/model/info/TestFailedInfo.java | 98 - .../ide/model/info/TestIgnoredInfo.java | 71 - .../ide/model/info/TestInProgressInfo.java | 50 - .../ide/model/info/TestPassedInfo.java | 50 - .../ide/model/info/TestStateDescription.java | 35 - .../testing/ide/model/info/TestStateInfo.java | 38 - .../ide/view/PrinterOutputConsole.java | 70 - .../testing/ide/view/TestResultPresenter.java | 90 - .../testing/ide/view/TestResultView.java | 36 - .../testing/ide/view/TestResultViewImpl.java | 221 - .../factory/TestResultNodeFactory.java | 29 - .../view/navigation/nodes/TestRootNode.java | 44 - .../view/navigation/nodes/TestStateNode.java | 113 - .../src/main/module.gwt.xml | 22 - .../ide/TestLocalizationConstant.properties | 18 - .../testing/ide/svg/show_all_tests_icon.svg | 30 - .../ide/svg/show_failures_only_icon.svg | 30 - .../che/plugin/testing/ide/svg/test.svg | 19 - .../che/plugin/testing/ide/svg/test_all.svg | 75 - .../testing/ide/svg/test_class_fail.svg | 27 - .../testing/ide/svg/test_in_progress.svg | 34 - .../testing/ide/svg/test_method_fail.svg | 20 - .../testing/ide/svg/test_result_failure.svg | 53 - .../testing/ide/svg/test_result_skipped.svg | 53 - .../testing/ide/svg/test_result_success.svg | 53 - .../ide/svg/test_result_trace_frame.svg | 22 - .../testing/ide/svg/test_result_warning.svg | 53 - .../plugin/testing/ide/svg/test_results.svg | 53 - .../testing/ide/svg/test_results_fail.svg | 53 - .../testing/ide/svg/test_results_pass.svg | 53 - .../ide/view/TestResultViewImpl.ui.xml | 24 - plugins/plugin-testing/pom.xml | 38 - .../che-plugin-web-ext-server/pom.xml | 58 - .../che/plugin/web/inject/WebModule.java | 47 - .../TypeScriptLanguageServerConfig.java | 92 - .../web/typescript/TypeScriptProjectType.java | 24 - .../web/vue/VueLanguageServerConfig.java | 96 - .../che/plugin/web/vue/VueProjectType.java | 28 - .../che-plugin-web-ext-shared/pom.xml | 23 - .../che/plugin/web/shared/Constants.java | 45 - .../plugin-web/che-plugin-web-ext-web/pom.xml | 117 - .../JsonLanguageDescriptionProvider.java | 34 - ...TypeScriptLanguageDescriptionProvider.java | 40 - .../VueLanguageDescriptionProvider.java | 34 - .../che/plugin/web/client/WebExtension.java | 152 - .../web/client/WebExtensionResource.java | 52 - .../web/client/WebLocalizationConstant.java | 58 - .../web/client/css/NewCssFileAction.java | 66 - .../web/client/css/NewLessFileAction.java | 66 - .../web/client/html/NewHtmlFileAction.java | 75 - .../web/client/html/PreviewHTMLAction.java | 77 - .../html/editor/AutoEditStrategyFactory.java | 29 - .../editor/DefaultCodeAssistProcessor.java | 33 - .../html/editor/HTMLCodeAssistProcessor.java | 21 - .../HTMLEditorConfigurationProvider.java | 40 - .../html/editor/HtmlEditorConfiguration.java | 82 - .../html/editor/HtmlEditorProvider.java | 42 - .../plugin/web/client/inject/WebModule.java | 126 - .../client/js/NewJavaScriptFileAction.java | 60 - .../js/editor/DefaultCodeAssistProcessor.java | 33 - .../js/editor/JsCodeAssistProcessor.java | 17 - .../js/editor/JsEditorConfiguration.java | 84 - .../editor/JsEditorConfigurationProvider.java | 41 - .../client/js/editor/JsEditorProvider.java | 46 - .../typescript/TSProjectWizardRegistrar.java | 45 - .../web/client/vue/NewVueFileAction.java | 74 - .../client/vue/VueProjectWizardRegistrar.java | 49 - .../client/WebLocalizationConstant.properties | 30 - .../che/plugin/web/client/category/js.svg | 32 - .../org/eclipse/che/plugin/web/client/css.svg | 29 - .../org/eclipse/che/plugin/web/client/es6.svg | 35 - .../eclipse/che/plugin/web/client/html.svg | 26 - .../org/eclipse/che/plugin/web/client/js.svg | 32 - .../org/eclipse/che/plugin/web/client/jsx.svg | 35 - .../eclipse/che/plugin/web/client/less.svg | 44 - .../org/eclipse/che/plugin/web/client/php.svg | 28 - .../org/eclipse/che/plugin/web/client/ts.svg | 33 - .../org/eclipse/che/plugin/web/client/vue.svg | 24 - plugins/plugin-web/pom.xml | 31 - .../plugin-yaml/che-plugin-yaml-ide/pom.xml | 162 - .../yaml/ide/YamlDescriptionProvider.java | 33 - .../che/plugin/yaml/ide/YamlExtension.java | 28 - .../yaml/ide/YamlLocalizationConstant.java | 49 - .../plugin/yaml/ide/YamlServiceClient.java | 24 - .../yaml/ide/YamlServiceClientImpl.java | 71 - .../plugin/yaml/ide/inject/YamlGinModule.java | 50 - .../YamlExtensionManagerPresenter.java | 264 - .../preferences/YamlExtensionManagerView.java | 49 - .../YamlExtensionManagerViewImpl.java | 189 - .../YamlExtensionManagerViewImpl.ui.xml | 63 - .../src/main/module.gwt.xml | 21 - .../ide/YamlLocalizationConstant.properties | 21 - .../che-plugin-yaml-server/pom.xml | 81 - .../plugin/yaml/server/inject/YamlModule.java | 40 - .../YamlLanguageServerConfig.java | 206 - .../YamlSchemaAssociations.java | 26 - .../server/languageserver/YamlService.java | 62 - .../che-plugin-yaml-shared/pom.xml | 145 - .../plugin/yaml/shared/PreferenceHelper.java | 50 - .../che/plugin/yaml/shared/YamlDTO.java | 39 - .../che/plugin/yaml/shared/YamlDTOImpl.java | 42 - .../plugin/yaml/shared/YamlPreference.java | 44 - plugins/plugin-yaml/pom.xml | 31 - plugins/plugin-zend-debugger/README.md | 49 - .../che-plugin-zend-debugger-ide/pom.xml | 107 - .../che/plugin/zdb/ide/ZendDbgExtension.java | 32 - .../che/plugin/zdb/ide/ZendDbgGinModule.java | 40 - .../zdb/ide/ZendDbgLocalizationConstant.java | 35 - .../che/plugin/zdb/ide/ZendDbgResources.java | 27 - .../che/plugin/zdb/ide/ZendDebugger.java | 84 - .../ZendDbgConfigurationPagePresenter.java | 143 - .../ZendDbgConfigurationPageView.java | 91 - .../ZendDbgConfigurationPageViewImpl.java | 136 - .../ZendDbgConfigurationPageViewImpl.ui.xml | 31 - .../ZendDbgConfigurationType.java | 83 - .../src/main/module.gwt.xml | 17 - .../ZendDbgLocalizationConstant.properties | 15 - .../zend-dbg-configuration-type.svg | 21 - ...ZendDbgConfigurationPagePresenterTest.java | 135 - .../ZendDbgConfigurationTypeTest.java | 58 - .../src/test/resources/logback-test.xml | 25 - .../che-plugin-zend-debugger-server/pom.xml | 128 - .../che/plugin/zdb/server/ZendDbgFactory.java | 88 - .../zdb/server/ZendDbgLocationHandler.java | 100 - .../che/plugin/zdb/server/ZendDbgModule.java | 33 - .../che/plugin/zdb/server/ZendDebugger.java | 543 -- .../server/connection/AbstractDbgMessage.java | 39 - .../zdb/server/connection/IDbgMessage.java | 44 - .../connection/ZendDbgClientMessages.java | 496 -- .../server/connection/ZendDbgConnection.java | 354 - .../connection/ZendDbgEngineMessages.java | 741 -- .../server/connection/ZendDbgSettings.java | 70 - .../exceptions/ZendDbgTimeoutException.java | 29 - .../zdb/server/expressions/IDbgDataFacet.java | 52 - .../zdb/server/expressions/IDbgDataType.java | 64 - .../server/expressions/IDbgExpression.java | 67 - .../server/expressions/ZendDbgExpression.java | 107 - .../ZendDbgExpressionEvaluator.java | 327 - .../expressions/ZendDbgExpressionResult.java | 87 - .../server/utils/ZendDbgConnectionUtils.java | 209 - .../zdb/server/utils/ZendDbgFileUtils.java | 37 - .../server/utils/ZendDbgVariableUtils.java | 58 - .../zdb/server/variables/IDbgVariable.java | 32 - .../zdb/server/variables/ZendDbgVariable.java | 121 - .../server/variables/ZendDbgVariables.java | 47 - .../server/AbstractZendDbgSessionTest.java | 114 - .../zdb/server/ZendDbgAvailabilityTest.java | 65 - .../zdb/server/ZendDbgConfigurationTest.java | 54 - .../plugin/zdb/server/ZendDbgSessionTest.java | 227 - .../src/test/resources/findbugs-exclude.xml | 16 - .../src/test/resources/logback-test.xml | 25 - .../src/test/resources/php/classes.php | 28 - .../src/test/resources/php/hello.php | 10 - plugins/plugin-zend-debugger/pom.xml | 53 - plugins/pom.xml | 64 - pom.xml | 1404 +--- selenium/che-selenium-core/pom.xml | 9 - .../che/selenium/core/client/GitHubKey.java | 54 + .../core/client/TestGitHubServiceClient.java | 1 - selenium/che-selenium-test/pom.xml | 9 - .../pageobject/debug/AbstractDebugConfig.java | 152 - .../pageobject/debug/CppDebugConfig.java | 85 - .../selenium/pageobject/debug/DebugPanel.java | 648 -- .../pageobject/debug/JavaDebugConfig.java | 59 - .../pageobject/debug/NodeJsDebugConfig.java | 86 - .../pageobject/debug/PhpDebugConfig.java | 116 - .../plugins/JavaTestRunnerPluginConsole.java | 259 - .../upload/AbstractUploadDialogPage.java | 85 - .../upload/UploadDirectoryDialogPage.java | 87 - .../upload/UploadFileDialogPage.java | 70 - .../CheckFindActionFeatureInCheTest.java | 125 - ...heckOpenedDialogThroughFindActionTest.java | 53 - .../selenium/assistant/KeyBindingsTest.java | 119 - .../assistant/OrganizeImportsTest.java | 166 - .../che/selenium/dashboard/AccountTest.java | 2 +- .../selenium/dashboard/CreateFactoryTest.java | 3 + .../selenium/dashboard/CreateStackTest.java | 144 - .../dashboard/DeleteRunningWorkspaceTest.java | 3 + .../DeleteStoppingWorkspaceTest.java | 3 + .../dashboard/ImportProjectFromZipTest.java | 121 - .../dashboard/RenameWorkspaceTest.java | 3 + .../selenium/dashboard/StacksListTest.java | 192 - .../AddWorkspaceToOrganizationTest.java | 2 +- .../AdminOfParentOrganizationTest.java | 2 +- .../AdminOfSubOrganizationTest.java | 2 +- .../CreateRootOrganizationTest.java | 2 +- .../DeleteOrganizationByBulkTest.java | 2 +- .../DeleteOrganizationInListTest.java | 2 +- .../organization/DeleteOrganizationTest.java | 2 +- .../organization/FilterOrganizationTest.java | 2 +- .../organization/MemberOrganizationTest.java | 2 +- .../organization/OrganizationMembersTest.java | 2 +- .../organization/RenameOrganizationTest.java | 2 +- .../ShareWorkspaceMemberTest.java | 2 +- .../organization/ShareWorkspaceOwnerTest.java | 9 +- .../SystemAdminOrganizationTest.java | 2 +- .../UserEmptyOrganizationTest.java | 2 +- .../AddOrImportProjectFormTest.java | 512 -- .../workspaces/WorkspacesListTest.java | 2 + .../WorkspaceDetailsMachineActionsTest.java | 261 - .../WorkspaceDetailsMachinesRamTest.java | 111 - .../details/WorkspaceDetailsOverviewTest.java | 3 + .../details/WorkspaceDetailsProjectsTest.java | 3 + .../WorkspaceDetailsSingleMachineTest.java | 245 - .../debugger/BreakpointReorderingTest.java | 127 - .../ChangeVariableWithEvaluatingTest.java | 194 - .../debugger/CheckBreakPointStateTest.java | 129 - .../debugger/ConditionalBreakpointsTest.java | 195 - .../debugger/CppProjectDebuggingTest.java | 143 - .../debugger/DebugExternalClassTest.java | 176 - .../che/selenium/debugger/DebuggerUtils.java | 80 - .../debugger/DebuggerWatchExpressionTest.java | 164 - .../InnerClassAndLambdaDebuggingTest.java | 208 - .../MultimoduleProjectDebuggingTest.java | 236 - .../selenium/debugger/NodeJsDebugTest.java | 154 - .../debugger/PhpProjectDebuggingTest.java | 244 - .../selenium/debugger/RunToCursorTest.java | 140 - ...pOverStepReturnWithChangeVariableTest.java | 223 - .../che/selenium/debugger/ThreadDumpTest.java | 167 - .../CheckReplaceFeatureInEditorTest.java | 112 - .../editor/CheckRestoringSplitEditorTest.java | 159 - .../CheckSearchFeatureInEditorTest.java | 110 - ...CheckWorkingWithTabByUsingTabListTest.java | 98 - ...WorkingWithTabsByUsingContextMenuTest.java | 150 - .../editor/ContextMenuEditorTest.java | 367 - .../editor/SplitEditorFeatureTest.java | 208 - .../AutocompleteFeaturesInEditorTest.java | 240 - .../autocomplete/AutocompleteJSFilesTest.java | 149 - .../AutocompleteProposalJavaDocTest.java | 276 - .../AutocompleteWithInheritTest.java | 126 - ...tocompleteFeaturesInTheTestFolderTest.java | 187 - ...ditorMemberActiveLineForOpenedTabTest.java | 143 - .../autocomplete/EditorValidationTest.java | 116 - .../editor/autocomplete/FormatterTest.java | 120 - .../editor/autocomplete/InheritClassTest.java | 151 - .../autocomplete/JavaDocPopupLinkTest.java | 117 - .../editor/autocomplete/JavaDocPopupTest.java | 234 - .../autocomplete/OpenDeclarationTest.java | 154 - .../QuickFixAndCodeAssistantFeaturesTest.java | 121 - .../autocomplete/ShowHintsCommandTest.java | 127 - .../CheckFactoryWithMultiModuleTest.java | 109 - ...ckFactoryWithPerClickCreatePolicyTest.java | 92 - ...eckFactoryWithPerUserCreatePolicyTest.java | 98 - .../CheckFactoryWithSincePolicyTest.java | 91 - .../CheckFactoryWithSparseCheckoutTest.java | 93 - .../CheckFactoryWithUntilPolicyTest.java | 93 - .../factory/CheckOpenFileFeatureTest.java | 129 - .../factory/CheckRunCommandFeatureTest.java | 126 - .../factory/CheckSkipRootFolderTest.java | 98 - .../CheckWelcomePanelOnCodenvyTest.java | 97 - .../CreateFactoryFromUiWithKeepDirTest.java | 242 - .../CreateNamedFactoryFromDashboardTest.java | 127 - ...DirectUrlFactoryWithKeepDirectoryTest.java | 10 +- .../DirectUrlFactoryWithRootFolderTest.java | 10 +- ...irectUrlFactoryWithSpecificBranchTest.java | 11 +- .../CheckDeletingProjectByApiTest.java | 67 - .../CheckFileWatcherExcludeFeatureTest.java | 173 - .../filewatcher/EditFilesWithTabsTest.java | 140 - .../filewatcher/RefactoringFeatureTest.java | 156 - .../RemoveFilesWithActiveTabs.java | 197 - .../UpdateFilesWithoutIDETest.java | 121 - .../che/selenium/git/AddFilesToIndexTest.java | 238 - .../che/selenium/git/AmendCommitTest.java | 178 - .../AuthorizeOnGithubFromPreferencesTest.java | 167 - .../eclipse/che/selenium/git/BranchTest.java | 321 - .../selenium/git/CheckoutReferenceTest.java | 216 - .../git/CheckoutToRemoteBranchTest.java | 190 - ...hWhichAlreadyHasLinkedLocalBranchTest.java | 75 - .../git/CommitFilesByMultiSelectTest.java | 297 - .../che/selenium/git/CommitFilesTest.java | 330 - .../git/CreateAndDeleteLocalBranchTest.java | 111 - ...etchAndMergeRemoteBranchIntoLocalTest.java | 159 - .../selenium/git/GitChangeMarkersTest.java | 209 - .../che/selenium/git/GitColorsTest.java | 253 - .../che/selenium/git/GitCompareTest.java | 283 - .../che/selenium/git/GitPanelTest.java | 428 -- .../che/selenium/git/GitPullConflictTest.java | 159 - .../eclipse/che/selenium/git/GitPullTest.java | 135 - .../che/selenium/git/GitResetTest.java | 126 - .../selenium/git/ImportWizardFormTest.java | 717 -- ...nitializeAndDeleteLocalRepositoryTest.java | 138 - .../che/selenium/git/OpenOnGitHubTest.java | 160 - .../selenium/git/PullRequestPluginTest.java | 344 - .../git/PullRequestPluginWithForkTest.java | 162 - .../che/selenium/git/PushingChangesTest.java | 165 - .../che/selenium/git/RevertCommitTest.java | 166 - .../che/selenium/git/SetGitCommitterTest.java | 59 - .../selenium/gwt/CheckSimpleGwtAppTest.java | 151 - .../AutocompleteCommandsEditorTest.java | 187 - ...icFunctionalityInCommandsExplorerTest.java | 130 - ...eckIntelligenceCommandFromToolbarTest.java | 217 - .../CommandsEditorTest.java | 126 - .../CommandsPaletteTest.java | 147 - .../MacrosCommandsEditorTest.java | 169 - .../PreviewUrlIntoCommandsEditorTest.java | 125 - .../ApacheCamelFileEditingTest.java | 153 - .../languageserver/ClangFileEditingTest.java | 188 - .../languageserver/GolangFileEditingTest.java | 365 - .../languageserver/JsonFileEditingTest.java | 248 - .../languageserver/TypeScriptEditingTest.java | 253 - .../languageserver/YamlFileEditingTest.java | 312 - .../csharp/CSharpClassRenamingTest.java | 97 - .../CSharpFileAdvancedOperationsTest.java | 124 - .../csharp/CSharpFileEditingTest.java | 145 - .../php/PhpAssistantFeaturesTest.java | 191 - .../php/PhpFileEditingTest.java | 139 - .../python/PythonAssistantFeaturesTest.java | 165 - .../python/PythonFileEditingTest.java | 142 - .../CheckGeneratingMavenArchetypeTest.java | 99 - .../mavenplugin/CheckMavenPluginTest.java | 153 - .../mavenplugin/GenerateEffectivePomTest.java | 108 - .../CheckCreatingProjectInEmptyWsTest.java | 133 - .../miscellaneous/CheckMacrosFeatureTest.java | 136 - ...kspaceAfterStoppingWsAgentProcessTest.java | 135 - .../ConvertToMavenProjectTest.java | 128 - ...ConvertToProjectFromConfigurationTest.java | 194 - .../miscellaneous/DialogAboutTest.java | 48 - .../FileStructureBaseOperationTest.java | 129 - .../FileStructureByKeyboardTest.java | 121 - .../FileStructureCodeEditorTest.java | 118 - .../miscellaneous/FileStructureNodesTest.java | 211 - .../miscellaneous/FindTextFeatureTest.java | 482 -- .../FindUsagesBaseOperationTest.java | 216 - .../ImplementationBaseOperationsTest.java | 181 - .../MachinesAsynchronousStartTest.java | 169 - .../miscellaneous/NavigateToFileTest.java | 259 - .../miscellaneous/OpenInTerminalTest.java | 173 - ...lveDependencyAfterRecreateProjectTest.java | 120 - .../miscellaneous/ServerRuntimeInfoTest.java | 70 - .../miscellaneous/TerminalTypingTest.java | 120 - .../WorkingWithSplitPanelTest.java | 224 - .../WorkingWithTerminalTest.java | 388 - .../opendeclaration/Eclipse0087Test.java | 69 - .../opendeclaration/Eclipse0091Test.java | 66 - .../opendeclaration/Eclipse0093Test.java | 68 - .../opendeclaration/Eclipse0097Test.java | 67 - .../opendeclaration/Eclipse0114Test.java | 71 - .../opendeclaration/Eclipse0115Test.java | 67 - .../opendeclaration/Eclipse0119Test.java | 67 - .../opendeclaration/Eclipse0120Test.java | 63 - .../opendeclaration/Eclipse0121Test.java | 67 - .../opendeclaration/Eclipse0122Test.java | 66 - .../plainjava/ConfigureClasspathBaseTest.java | 112 - .../ConfigureSomeSourceFoldersTest.java | 126 - ...lainJavaProjectConfigureClasspathTest.java | 208 - .../plainjava/RunPlainJavaProjectTest.java | 245 - .../CheckErrorsWarningsTabTest.java | 167 - .../preferences/ContributeTabTest.java | 276 - ...kAutoSaveForFileWhichAlreadyExistTest.java | 127 - .../CheckCollapseAllNodesProjectTest.java | 95 - .../CheckCopyCutFeaturesForFilesTest.java | 129 - .../CheckDisplayingArtifactIdTest.java | 95 - ...WhenCreationDuplicateFolderOrFileTest.java | 102 - ...enFolderAndFileCreatedFromCommandTest.java | 125 - .../CheckOnValidAndInvalidClassNameTest.java | 137 - ...CheckOnValidAndInvalidPackageNameTest.java | 154 - ...CheckRecentFilesAndRevealResourceTest.java | 118 - .../CheckRefreshProjectTreeTest.java | 94 - .../CheckShowHideHiddenFilesTest.java | 97 - .../CheckTreeStructureAfterCloseTest.java | 89 - .../ClosingSeveralOpenFilesTest.java | 84 - .../projectexplorer/CreateNewFoldersTest.java | 94 - ...CreateNewJavaFilesFromContextMenuTest.java | 119 - .../CreateNewJavaFilesTest.java | 124 - ...ateNewNotJavaFilesFromContextMenuTest.java | 154 - .../CreateNewNotJavaFilesTest.java | 165 - .../CreateNewPackageFromContextMenuTest.java | 80 - ...PackagesWithHelpCreationJavaClassTest.java | 100 - .../CreateProjectInSelectedFolderTest.java | 111 - .../projectexplorer/CreateProjectTest.java | 101 - .../CreateProjectsForArtikPluginTest.java | 145 - .../DeleteFilesFromContextMenuTest.java | 146 - .../projectexplorer/DeleteFilesTest.java | 144 - .../DeletePackageFromContextMenuTest.java | 142 - .../projectexplorer/DeletePackageTest.java | 142 - .../DeletePackageWithOpenedFilesTabTest.java | 148 - .../projectexplorer/DeleteProjectsTest.java | 153 - .../projectexplorer/DownloadProjectTest.java | 254 - ...FileNotExistIntoEditorAfterDeleteTest.java | 146 - .../FileOpenedAfterCreationTest.java | 101 - ...FileNotExistIntoEditorAfterDeleteTest.java | 104 - .../NavigationByKeyboardTest.java | 214 - .../OpenFileWithHelpContextMenuTest.java | 225 - .../projectexplorer/PreviewHtmlFileTest.java | 113 - .../RenameJustCreatedNotJavaFileTest.java | 99 - .../projectexplorer/RenameProjectTest.java | 109 - .../RenamedAlreadyCreatedNotJavaFileTest.java | 94 - .../ShowFileReferenceTest.java | 72 - .../UploadIntoProjectTest.java | 297 - ...enExternalLibraryFileAfterRefreshTest.java | 83 - .../TransitiveDependencyTest.java | 105 - .../dependencies/UpdateListOfLibraryTest.java | 175 - .../fields/FailNotPrivateFieldTest.java | 196 - .../refactor/fields/FailPrivateFieldTest.java | 176 - .../fields/RenameNotPrivateFieldTest.java | 469 -- .../fields/RenamePrivateFieldSmokeTest.java | 118 - .../fields/RenamePrivateFieldTest.java | 404 - .../methods/RenameMethodInInterfaceTest.java | 240 - .../methods/RenamePrivateMethodTest.java | 232 - .../methods/RenameStaticMethodsTest.java | 222 - .../methods/RenameVirtualMethodsTest.java | 216 - .../move/CodeAssistAfterMoveItemTest.java | 117 - .../refactor/move/FailMoveItemTest.java | 118 - .../selenium/refactor/move/MoveItemsTest.java | 354 - .../move/MoveJavaClassToSubpackageTest.java | 80 - .../MoveJavaFileInNewSourceFolderTest.java | 132 - .../packages/RenamePackageSmokeTest.java | 97 - .../packages/RenamePackageSpringTest.java | 146 - .../refactor/packages/RenamePackageTest.java | 699 -- .../parameters/FailParametersTest.java | 187 - .../parameters/RenameParametersTest.java | 324 - .../preview/CheckTreeInRefactorPanelTest.java | 91 - .../preview/PreviewRefactoringTest.java | 155 - .../selenium/refactor/types/GenericsTest.java | 130 - .../refactor/types/IllegalTypeNameTest.java | 104 - .../refactor/types/RenameTypeTest.java | 203 - .../refactor/types/TestAnnotationsTest.java | 120 - .../refactor/types/TestEnumerationsTest.java | 123 - .../selenium/refactor/types/TestFailTest.java | 152 - .../che/selenium/swagger/SwaggerTest.java | 14 +- .../selenium/testrunner/CompileCommand.java | 63 - ...uginJunit4CheckRunSuitesAndScopesTest.java | 143 - .../testrunner/JavaTestPluginJunit4Test.java | 177 - .../testrunner/JavaTestPluginTestNgTest.java | 216 - .../selenium/theia/TheiaBuildPluginTest.java | 1 + .../workspaces/CheckStopStartWsTest.java | 50 - .../CheckStoppingWsByTimeoutTest.java | 3 + .../CreateWorkspaceOnDashboardTest.java | 4 +- .../ProjectStateAfterRefreshTest.java | 4 +- .../ProjectStateAfterRenameWorkspaceTest.java | 3 + ...ProjectStateAfterWorkspaceRestartTest.java | 7 +- ...spaceFromOfficialUbuntuImageStartTest.java | 41 - .../suites/CheOneThreadTestsSuite.xml | 6 +- .../resources/suites/CheProdPreviewSuite.xml | 9 - .../src/test/resources/suites/CheSuite.xml | 208 +- .../test/resources/suites/SmokeTestsSuite.xml | 31 - wsagent/agent/pom.xml | 64 - .../1.0.0/org.eclipse.che.ws-agent.json | 31 - .../1.0.0/org.eclipse.che.ws-agent.script.sh | 304 - .../1.0.1/org.eclipse.che.ws-agent.json | 31 - .../1.0.1/org.eclipse.che.ws-agent.script.sh | 304 - .../1.0.2/org.eclipse.che.ws-agent.json | 31 - .../1.0.2/org.eclipse.che.ws-agent.script.sh | 312 - .../1.0.3/org.eclipse.che.ws-agent.json | 28 - .../1.0.3/org.eclipse.che.ws-agent.script.sh | 318 - wsagent/che-core-api-debug-shared/pom.xml | 39 - .../dto/BreakpointConfigurationDto.java | 55 - .../api/debug/shared/dto/BreakpointDto.java | 41 - .../api/debug/shared/dto/DebugSessionDto.java | 44 - .../api/debug/shared/dto/DebuggerInfoDto.java | 55 - .../che/api/debug/shared/dto/FieldDto.java | 73 - .../che/api/debug/shared/dto/LocationDto.java | 53 - .../che/api/debug/shared/dto/MethodDto.java | 34 - .../api/debug/shared/dto/SimpleValueDto.java | 34 - .../debug/shared/dto/StackFrameDumpDto.java | 41 - .../api/debug/shared/dto/ThreadStateDto.java | 64 - .../che/api/debug/shared/dto/VariableDto.java | 49 - .../api/debug/shared/dto/VariablePathDto.java | 26 - .../debug/shared/dto/action/ActionDto.java | 25 - .../shared/dto/action/ResumeActionDto.java | 26 - .../shared/dto/action/StartActionDto.java | 33 - .../shared/dto/action/StepIntoActionDto.java | 33 - .../shared/dto/action/StepOutActionDto.java | 33 - .../shared/dto/action/StepOverActionDto.java | 33 - .../shared/dto/action/SuspendActionDto.java | 25 - .../event/BreakpointActivatedEventDto.java | 35 - .../shared/dto/event/DebuggerEventDto.java | 25 - .../shared/dto/event/DisconnectEventDto.java | 24 - .../shared/dto/event/SuspendEventDto.java | 42 - .../api/debug/shared/model/Breakpoint.java | 25 - .../shared/model/BreakpointConfiguration.java | 30 - .../api/debug/shared/model/DebugSession.java | 33 - .../api/debug/shared/model/DebuggerInfo.java | 41 - .../che/api/debug/shared/model/Field.java | 27 - .../che/api/debug/shared/model/Location.java | 36 - .../che/api/debug/shared/model/Method.java | 23 - .../debug/shared/model/MutableVariable.java | 21 - .../api/debug/shared/model/SimpleValue.java | 23 - .../debug/shared/model/StackFrameDump.java | 26 - .../api/debug/shared/model/SuspendPolicy.java | 22 - .../api/debug/shared/model/ThreadState.java | 38 - .../api/debug/shared/model/ThreadStatus.java | 23 - .../che/api/debug/shared/model/Variable.java | 30 - .../api/debug/shared/model/VariablePath.java | 25 - .../debug/shared/model/WatchExpression.java | 30 - .../api/debug/shared/model/action/Action.java | 26 - .../shared/model/action/ResumeAction.java | 15 - .../shared/model/action/StartAction.java | 20 - .../shared/model/action/StepIntoAction.java | 19 - .../shared/model/action/StepOutAction.java | 19 - .../shared/model/action/StepOverAction.java | 19 - .../shared/model/action/SuspendAction.java | 15 - .../model/event/BreakpointActivatedEvent.java | 23 - .../shared/model/event/DebuggerEvent.java | 23 - .../shared/model/event/DisconnectEvent.java | 19 - .../shared/model/event/SuspendEvent.java | 26 - .../impl/BreakpointConfigurationImpl.java | 123 - .../shared/model/impl/BreakpointImpl.java | 93 - .../shared/model/impl/DebugSessionImpl.java | 70 - .../shared/model/impl/DebuggerInfoImpl.java | 94 - .../debug/shared/model/impl/FieldImpl.java | 85 - .../debug/shared/model/impl/LocationImpl.java | 149 - .../debug/shared/model/impl/MethodImpl.java | 63 - .../model/impl/MutableVariableImpl.java | 99 - .../shared/model/impl/SimpleValueImpl.java | 66 - .../shared/model/impl/StackFrameDumpImpl.java | 87 - .../shared/model/impl/ThreadStateImpl.java | 112 - .../debug/shared/model/impl/VariableImpl.java | 93 - .../shared/model/impl/VariablePathImpl.java | 49 - .../model/impl/WatchExpressionImpl.java | 63 - .../shared/model/impl/action/ActionImpl.java | 43 - .../model/impl/action/ResumeActionImpl.java | 22 - .../model/impl/action/StartActionImpl.java | 53 - .../model/impl/action/StepIntoActionImpl.java | 31 - .../model/impl/action/StepOutActionImpl.java | 31 - .../model/impl/action/StepOverActionImpl.java | 31 - .../model/impl/action/SuspendActionImpl.java | 21 - .../event/BreakpointActivatedEventImpl.java | 54 - .../model/impl/event/DebuggerEventImpl.java | 43 - .../model/impl/event/DisconnectEventImpl.java | 21 - .../model/impl/event/SuspendEventImpl.java | 59 - wsagent/che-core-api-debug/pom.xml | 157 - .../che/api/debugger/server/Debugger.java | 265 - .../server/DebuggerActionProvider.java | 97 - .../api/debugger/server/DebuggerFactory.java | 39 - .../server/DebuggerJsonRpcMessenger.java | 135 - .../api/debugger/server/DebuggerManager.java | 117 - .../api/debugger/server/DebuggerMessage.java | 39 - .../api/debugger/server/DebuggerModule.java | 38 - .../api/debugger/server/DebuggerService.java | 272 - .../che/api/debugger/server/DtoConverter.java | 216 - .../server/exceptions/DebuggerException.java | 29 - .../exceptions/DebuggerNotFoundException.java | 19 - wsagent/che-core-api-git-shared/pom.xml | 43 - .../che/api/git/shared/AddRequest.java | 51 - .../eclipse/che/api/git/shared/Branch.java | 42 - .../api/git/shared/BranchCreateRequest.java | 36 - .../che/api/git/shared/BranchListMode.java | 50 - .../che/api/git/shared/CheckoutRequest.java | 72 - .../che/api/git/shared/CloneRequest.java | 87 - .../che/api/git/shared/CommitRequest.java | 68 - .../eclipse/che/api/git/shared/Commiters.java | 23 - .../che/api/git/shared/ConfigRequest.java | 26 - .../git/shared/ConflictExceptionError.java | 56 - .../eclipse/che/api/git/shared/Constants.java | 24 - .../che/api/git/shared/DiffCommitFile.java | 68 - .../eclipse/che/api/git/shared/DiffType.java | 46 - .../che/api/git/shared/EditedRegion.java | 44 - .../che/api/git/shared/EditedRegionType.java | 19 - .../che/api/git/shared/FetchRequest.java | 75 - .../api/git/shared/FileChangedEventDto.java | 48 - .../che/api/git/shared/GitUrlVendorInfo.java | 114 - .../eclipse/che/api/git/shared/GitUser.java | 30 - .../eclipse/che/api/git/shared/IndexFile.java | 36 - .../org/eclipse/che/api/git/shared/Log.java | 21 - .../che/api/git/shared/LogResponse.java | 26 - .../che/api/git/shared/MergeRequest.java | 29 - .../che/api/git/shared/MergeResult.java | 76 - .../che/api/git/shared/MoveRequest.java | 32 - .../che/api/git/shared/ProviderInfo.java | 59 - .../che/api/git/shared/PullRequest.java | 71 - .../che/api/git/shared/PullResponse.java | 31 - .../che/api/git/shared/PushRequest.java | 76 - .../che/api/git/shared/PushResponse.java | 41 - .../che/api/git/shared/RebaseRequest.java | 56 - .../che/api/git/shared/RebaseResponse.java | 78 - .../eclipse/che/api/git/shared/Remote.java | 30 - .../che/api/git/shared/RemoteAddRequest.java | 42 - .../che/api/git/shared/RemoteReference.java | 34 - .../api/git/shared/RemoteUpdateRequest.java | 61 - .../eclipse/che/api/git/shared/RepoInfo.java | 22 - .../git/shared/RepositoryDeletedEventDto.java | 25 - .../shared/RepositoryInitializedEventDto.java | 25 - .../che/api/git/shared/ResetRequest.java | 73 - .../che/api/git/shared/RevertRequest.java | 35 - .../che/api/git/shared/RevertResult.java | 62 - .../eclipse/che/api/git/shared/Revision.java | 159 - .../eclipse/che/api/git/shared/RmRequest.java | 43 - .../git/shared/ShowFileContentResponse.java | 31 - .../eclipse/che/api/git/shared/Status.java | 82 - .../api/git/shared/StatusChangedEventDto.java | 46 - .../org/eclipse/che/api/git/shared/Tag.java | 27 - .../che/api/git/shared/TagCreateRequest.java | 42 - .../git/shared/event/GitCheckoutEvent.java | 46 - .../api/git/shared/event/GitCommitEvent.java | 48 - .../che/api/git/shared/event/GitEvent.java | 17 - .../event/GitRepositoryDeletedEvent.java | 35 - .../event/GitRepositoryInitializedEvent.java | 30 - wsagent/che-core-api-git/pom.xml | 239 - .../eclipse/che/api/git/BranchListWriter.java | 99 - .../che/api/git/CachedGitStatusProvider.java | 322 - .../che/api/git/CommitMessageWriter.java | 84 - .../java/org/eclipse/che/api/git/Config.java | 44 - .../che/api/git/CredentialsLoader.java | 87 - .../che/api/git/CredentialsProvider.java | 41 - .../org/eclipse/che/api/git/DiffPage.java | 15 - ...asicAuthenticationCredentialsProvider.java | 56 - .../che/api/git/GitChangesDetector.java | 207 - .../che/api/git/GitCheckoutDetector.java | 167 - .../che/api/git/GitConfigurationChecker.java | 134 - .../eclipse/che/api/git/GitConnection.java | 421 -- .../che/api/git/GitConnectionFactory.java | 67 - .../che/api/git/GitExceptionMapper.java | 67 - .../che/api/git/GitJsonRpcMessenger.java | 159 - .../org/eclipse/che/api/git/GitModule.java | 67 - .../che/api/git/GitProjectImporter.java | 384 - .../eclipse/che/api/git/GitProjectType.java | 45 - .../che/api/git/GitProjectTypeCleaner.java | 113 - .../org/eclipse/che/api/git/GitService.java | 616 -- .../che/api/git/GitStatusChangedDetector.java | 210 - .../che/api/git/GitStatusProvider.java | 121 - .../org/eclipse/che/api/git/GitUrlUtils.java | 32 - .../eclipse/che/api/git/GitUserResolver.java | 29 - .../che/api/git/GitValueProviderFactory.java | 78 - .../org/eclipse/che/api/git/InfoPage.java | 20 - .../che/api/git/LocalGitUserResolver.java | 74 - .../java/org/eclipse/che/api/git/LogPage.java | 82 - .../che/api/git/MergeResultWriter.java | 107 - .../org/eclipse/che/api/git/Reference.java | 58 - .../eclipse/che/api/git/ReferenceType.java | 18 - .../eclipse/che/api/git/RemoteListWriter.java | 91 - .../eclipse/che/api/git/StatusPageWriter.java | 72 - .../eclipse/che/api/git/TagListWriter.java | 89 - .../eclipse/che/api/git/UserCredential.java | 72 - .../GitCheckoutInProgressException.java | 42 - .../GitCommitInProgressException.java | 43 - .../git/exception/GitConflictException.java | 81 - .../che/api/git/exception/GitException.java | 51 - .../exception/GitInvalidRefNameException.java | 44 - .../GitInvalidRepositoryException.java | 43 - .../GitRefAlreadyExistsException.java | 44 - .../exception/GitRefNotFoundException.java | 44 - .../eclipse/che/api/git/params/AddParams.java | 65 - .../che/api/git/params/CheckoutParams.java | 108 - .../che/api/git/params/CloneParams.java | 142 - .../che/api/git/params/CommitParams.java | 84 - .../che/api/git/params/DiffParams.java | 118 - .../che/api/git/params/FetchParams.java | 108 - .../eclipse/che/api/git/params/LogParams.java | 175 - .../che/api/git/params/LsFilesParams.java | 112 - .../che/api/git/params/PullParams.java | 110 - .../che/api/git/params/PushParams.java | 108 - .../che/api/git/params/RemoteAddParams.java | 72 - .../api/git/params/RemoteUpdateParams.java | 114 - .../che/api/git/params/ResetParams.java | 73 - .../eclipse/che/api/git/params/RmParams.java | 57 - .../che/api/git/params/TagCreateParams.java | 78 - .../api/git/CachedGitStatusProviderTest.java | 251 - .../api/git/GitConfigurationCheckerTest.java | 123 - .../eclipse/che/api/git/GitUrlUtilsTest.java | 65 - .../che/api/git/LocalGitUserResolverTest.java | 69 - .../org/eclipse/che/git/impl/AddTest.java | 156 - .../che/git/impl/BranchCreateTest.java | 102 - .../che/git/impl/BranchDeleteTest.java | 153 - .../eclipse/che/git/impl/CheckoutTest.java | 284 - .../org/eclipse/che/git/impl/CloneTest.java | 96 - .../org/eclipse/che/git/impl/CommitTest.java | 229 - .../org/eclipse/che/git/impl/ConfigTest.java | 92 - .../org/eclipse/che/git/impl/DiffTest.java | 423 -- .../org/eclipse/che/git/impl/FetchTest.java | 149 - .../che/git/impl/GetCommitersTest.java | 69 - .../impl/GitConnectionFactoryProvider.java | 28 - .../org/eclipse/che/git/impl/GitTestUtil.java | 87 - .../org/eclipse/che/git/impl/InitTest.java | 60 - .../che/git/impl/IsInsideWorkTreeTest.java | 104 - .../org/eclipse/che/git/impl/LogTest.java | 342 - .../eclipse/che/git/impl/LsRemoteTest.java | 83 - .../org/eclipse/che/git/impl/MergeTest.java | 151 - .../org/eclipse/che/git/impl/PullTest.java | 204 - .../org/eclipse/che/git/impl/PushTest.java | 175 - .../eclipse/che/git/impl/RemoteAddTest.java | 111 - .../che/git/impl/RemoteDeleteTest.java | 64 - .../eclipse/che/git/impl/RemoteListTest.java | 73 - .../che/git/impl/RemoteUpdateTest.java | 160 - .../org/eclipse/che/git/impl/RemoveTest.java | 77 - .../org/eclipse/che/git/impl/ResetTest.java | 133 - .../org/eclipse/che/git/impl/RevertTest.java | 225 - .../che/git/impl/ShowFileContentTest.java | 102 - .../org/eclipse/che/git/impl/StatusTest.java | 371 - .../eclipse/che/git/impl/TagCreateTest.java | 57 - .../eclipse/che/git/impl/TagDeleteTest.java | 79 - .../org/eclipse/che/git/impl/TagListTest.java | 81 - .../pom.xml | 85 - .../generator/ClientDtoGenerator.java | 58 - .../generator/ClientJsonImpl.java | 117 - .../generator/ConversionGenerator.java | 100 - .../generator/DtoGenerator.java | 409 - .../languageserver/generator/EitherUtil.java | 109 - .../generator/FromJsonGenerator.java | 288 - .../languageserver/generator/JsonImpl.java | 102 - .../generator/ServerDtoGenerator.java | 91 - .../generator/ServerJsonImpl.java | 119 - .../generator/ToDtoGenerator.java | 237 - .../generator/ToJsonGenerator.java | 219 - .../maven/plugin/DtoGeneratorMojo.java | 75 - .../pom.xml | 47 - .../shared/ProjectLangugageKey.java | 62 - .../event/LanguageServerInitializeEvent.java | 47 - .../shared/model/ExtendedCompletionItem.java | 40 - .../shared/model/ExtendedCompletionList.java | 48 - .../model/ExtendedExecuteCommandParams.java | 27 - .../model/ExtendedInitializeResult.java | 64 - .../ExtendedPublishDiagnosticsParams.java | 48 - .../model/ExtendedTextDocumentEdit.java | 45 - .../shared/model/ExtendedTextEdit.java | 79 - .../shared/model/ExtendedWorkspaceEdit.java | 33 - .../model/ExtendedWorkspaceSymbolParams.java | 32 - .../shared/model/FileEditParams.java | 46 - .../shared/model/LanguageDescription.java | 112 - .../shared/model/LanguageRegex.java | 40 - .../shared/model/RenameResult.java | 37 - .../shared/model/SnippetParameters.java | 44 - .../shared/model/SnippetResult.java | 63 - .../shared/util/CharStreamEditor.java | 153 - .../shared/util/CharStreamIterator.java | 67 - .../shared/util/JsonDecision.java | 20 - .../shared/util/LinearRangeComparator.java | 30 - .../shared/util/PositionComparator.java | 27 - .../shared/util/RangeComparator.java | 42 - .../shared/util/StreamEditorTest.java | 90 - .../shared/util/StringStreamEditor.java | 34 - wsagent/che-core-api-languageserver/pom.xml | 205 - .../api/languageserver/CheLanguageClient.java | 87 - .../CheLanguageClientFactory.java | 18 - .../DefaultInstanceProvider.java | 55 - .../EmptyCommunicationProvider.java | 87 - .../ExtendedLanguageServer.java | 58 - .../che/api/languageserver/FindId.java | 59 - .../che/api/languageserver/FindServer.java | 70 - .../languageserver/GuiceConfigProvider.java | 36 - .../InitializeParamsProvider.java | 183 - .../LanguageServerAbstractFileWatcher.java | 101 - .../languageserver/LanguageServerConfig.java | 211 - .../LanguageServerConfigInitializer.java | 124 - .../LanguageServerConfigProvider.java | 29 - .../LanguageServerCreateFileWatcher.java | 34 - .../LanguageServerDeleteFileWatcher.java | 34 - .../LanguageServerException.java | 30 - .../LanguageServerInitializedEvent.java | 62 - .../LanguageServerInitializer.java | 236 - .../languageserver/LanguageServerModule.java | 58 - .../LanguageServerPathTransformer.java | 150 - .../languageserver/LanguageServerService.java | 113 - .../LanguageServerUpdateFileWatcher.java | 34 - .../languageserver/LanguageServiceUtils.java | 106 - .../api/languageserver/LsParamsCloner.java | 470 -- .../ProcessCommunicationProvider.java | 103 - ...shDiagnosticsParamsJsonRpcTransmitter.java | 87 - .../api/languageserver/RegistryContainer.java | 136 - .../ServerCapabilitiesAccumulator.java | 246 - .../ShowMessageJsonRpcTransmitter.java | 123 - .../SocketCommunicationProvider.java | 113 - .../languageserver/TextDocumentService.java | 1061 --- .../WorkspaceConfigProvider.java | 189 - .../api/languageserver/WorkspaceService.java | 166 - .../LanguageServerFileChangeConsumer.java | 61 - .../LanguageServerFileCreateConsumer.java | 62 - .../LanguageServerFileDeleteConsumer.java | 62 - .../service/FileContentAccess.java | 18 - .../languageserver/util/DynamicWrapper.java | 43 - .../api/languageserver/util/EitherUtil.java | 58 - .../che/api/languageserver/util/JsonUtil.java | 66 - .../api/languageserver/util/LSOperation.java | 48 - .../api/languageserver/util/LineReader.java | 67 - .../languageserver/util/OperationUtil.java | 120 - .../com.google.gson.TypeAdapterFactory | 1 - .../languageserver/ExtendedTextEditTest.java | 106 - .../che/api/languageserver/FindIdTest.java | 75 - .../api/languageserver/FindServerTest.java | 119 - ...LanguageServerAbstractFileWatcherTest.java | 106 - .../LanguageServerPathTransformerTest.java | 163 - .../che/api/languageserver/SnippetTest.java | 70 - .../languageserver/dto/DtoConversionTest.java | 253 - .../src/test/resources/logback-test.xml | 27 - .../src/test/resources/snippettest/File1.txt | 4 - wsagent/che-core-api-oauth/pom.xml | 91 - .../che/security/oauth/OAuthAgentModule.java | 28 - ...emoteOAuthAuthorizationHeaderProvider.java | 71 - .../src/test/resources/logback-test.xml | 26 - wsagent/che-core-api-project-shared/pom.xml | 140 - .../che/api/project/shared/Constants.java | 65 - .../che/api/project/shared/FileChange.java | 28 - .../project/shared/ImportProgressRecord.java | 42 - .../api/project/shared/NewProjectConfig.java | 47 - .../api/project/shared/RegisteredProject.java | 52 - .../api/project/shared/SearchOccurrence.java | 85 - .../shared/dto/AttributeDescriptor.java | 53 - .../api/project/shared/dto/AttributeDto.java | 49 - .../api/project/shared/dto/CopyOptions.java | 50 - .../project/shared/dto/EditorChangesDto.java | 63 - .../shared/dto/GeneratorDescription.java | 36 - .../shared/dto/ImportProgressRecordDto.java | 36 - .../api/project/shared/dto/ItemReference.java | 86 - .../api/project/shared/dto/MoveOptions.java | 50 - .../shared/dto/NewProjectConfigDto.java | 70 - .../shared/dto/ProjectImporterData.java | 37 - .../shared/dto/ProjectImporterDescriptor.java | 63 - .../shared/dto/ProjectSearchRequestDto.java | 37 - .../shared/dto/ProjectSearchResponseDto.java | 26 - .../project/shared/dto/ProjectTypeDto.java | 63 - .../api/project/shared/dto/ProjectUpdate.java | 97 - .../shared/dto/RegisteredProjectDto.java | 63 - .../shared/dto/SearchOccurrenceDto.java | 63 - .../project/shared/dto/SearchResultDto.java | 32 - .../api/project/shared/dto/ServerError.java | 30 - .../project/shared/dto/SourceEstimation.java | 45 - .../api/project/shared/dto/TreeElement.java | 31 - .../che/api/project/shared/dto/ValueDto.java | 33 - .../shared/dto/event/FileStateUpdateDto.java | 29 - .../dto/event/FileTrackingOperationDto.java | 37 - .../dto/event/FileWatcherEventType.java | 23 - .../shared/dto/event/GitCheckoutEventDto.java | 42 - .../shared/dto/event/PomModifiedEventDto.java | 29 - .../dto/event/ProjectTreeStateUpdateDto.java | 30 - .../ProjectTreeTrackingOperationDto.java | 32 - .../shared/dto/event/VfsWatchEvent.java | 35 - .../CreateBatchProjectsRequestDto.java | 31 - .../shared/dto/service/CreateRequestDto.java | 31 - .../shared/dto/service/CreateResponseDto.java | 22 - .../shared/dto/service/DeleteRequestDto.java | 21 - .../shared/dto/service/DeleteResponseDto.java | 22 - .../shared/dto/service/GetRequestDto.java | 21 - .../shared/dto/service/GetResponseDto.java | 22 - .../shared/dto/service/ImportRequestDto.java | 30 - .../shared/dto/service/ImportResponseDto.java | 22 - .../dto/service/RecognizeRequestDto.java | 21 - .../dto/service/RecognizeResponseDto.java | 23 - .../shared/dto/service/UpdateRequestDto.java | 37 - .../shared/dto/service/UpdateResponseDto.java | 22 - .../shared/dto/service/VerifyRequestDto.java | 25 - .../shared/dto/service/VerifyResponseDto.java | 22 - wsagent/che-core-api-project/pom.xml | 212 - .../api/editor/server/EditorApiModule.java | 25 - .../server/impl/EditorChangesTracker.java | 48 - .../editor/server/impl/EditorWorkingCopy.java | 165 - .../server/impl/EditorWorkingCopyManager.java | 321 - .../impl/EditorWorkingCopyUpdatedEvent.java | 40 - .../che/api/fs/server/FsApiModule.java | 27 - .../che/api/fs/server/FsDtoConverter.java | 27 - .../eclipse/che/api/fs/server/FsManager.java | 358 - .../che/api/fs/server/PathTransformer.java | 34 - .../che/api/fs/server/WsPathUtils.java | 132 - .../fs/server/impl/ExecutiveFsManager.java | 280 - .../fs/server/impl/FreeDiskSpaceChecker.java | 111 - .../FreeDiskSpaceCheckerCommunication.java | 53 - .../che/api/fs/server/impl/FsOperations.java | 254 - .../server/impl/RootAwarePathTransformer.java | 50 - .../fs/server/impl/SimpleFsDtoConverter.java | 108 - .../fs/server/impl/ValidatingFsManager.java | 308 - .../che/api/fs/server/impl/ZipArchiver.java | 129 - .../project/server/MutableProjectConfig.java | 219 - .../api/project/server/ProjectApiModule.java | 98 - .../api/project/server/ProjectImporter.java | 93 - .../server/ProjectImportersService.java | 61 - .../ProjectJsonRpcServiceConfigurator.java | 109 - .../api/project/server/ProjectManager.java | 359 - .../api/project/server/ProjectService.java | 658 -- .../project/server/ProjectTypeService.java | 81 - .../api/project/server/VcsStatusProvider.java | 50 - .../server/handlers/CreateProjectHandler.java | 27 - .../server/handlers/GetItemHandler.java | 18 - .../handlers/PostImportProjectHandler.java | 25 - .../server/handlers/ProjectHandler.java | 18 - .../server/handlers/ProjectInitHandler.java | 37 - .../impl/CreateBaseProjectTypeHandler.java | 83 - .../server/impl/ExecutiveProjectManager.java | 427 -- .../project/server/impl/FileItemParsed.java | 23 - .../project/server/impl/FileItemUtils.java | 131 - .../server/impl/InmemoryProjectRegistry.java | 120 - .../server/impl/NewProjectConfigImpl.java | 174 - .../OnWorkspaceStartProjectInitializer.java | 107 - .../impl/PersistingProjectRegistry.java | 218 - .../server/impl/ProjectConfigRegistry.java | 98 - .../server/impl/ProjectDtoConverter.java | 171 - .../server/impl/ProjectHandlerRegistry.java | 62 - .../server/impl/ProjectImportManager.java | 350 - .../server/impl/ProjectImporterRegistry.java | 60 - .../impl/ProjectJsonRpcServiceBackEnd.java | 345 - .../server/impl/ProjectServiceApi.java | 807 -- .../server/impl/ProjectServiceApiFactory.java | 19 - .../impl/ProjectServiceLinksInjector.java | 233 - .../impl/ProjectServiceVcsStatusInjector.java | 182 - .../server/impl/ProjectSynchronizer.java | 20 - .../server/impl/RegisteredProjectFactory.java | 24 - .../server/impl/RegisteredProjectImpl.java | 317 - .../server/impl/RootDirCreationHandler.java | 54 - .../server/impl/RootDirPathProvider.java | 54 - .../server/impl/RootDirRemovalHandler.java | 85 - .../impl/SynchronizingProjectManager.java | 254 - .../server/impl/ValidatingProjectManager.java | 313 - .../project/server/impl/WorkspaceKeeper.java | 31 - .../impl/WorkspaceProjectSynchronizer.java | 203 - .../impl/WorkspaceSyncCommunication.java | 48 - .../server/impl/ZipProjectImporter.java | 104 - .../BeforeProjectInitializedEvent.java | 43 - .../notification/PreProjectDeletedEvent.java | 38 - .../notification/ProjectCreatedEvent.java | 42 - .../notification/ProjectDeletedEvent.java | 38 - .../notification/ProjectInitializedEvent.java | 42 - .../ProjectItemModifiedEvent.java | 124 - .../notification/ProjectUpdatedEvent.java | 45 - .../server/type/AbstractAttribute.java | 59 - .../project/server/type/AttributeValue.java | 76 - .../project/server/type/BaseProjectType.java | 30 - .../che/api/project/server/type/Constant.java | 32 - .../type/InitBaseProjectTypeHandler.java | 63 - .../project/server/type/ProjectQualifier.java | 32 - .../type/ProjectTypeConstraintException.java | 27 - .../project/server/type/ProjectTypeDef.java | 165 - .../server/type/ProjectTypeRegistry.java | 303 - .../server/type/ProjectTypeResolution.java | 54 - .../server/type/ProjectTypeResolver.java | 27 - .../api/project/server/type/ProjectTypes.java | 191 - .../server/type/ProjectTypesFactory.java | 21 - .../server/type/ReadonlyValueProvider.java | 33 - .../server/type/SettableValueProvider.java | 22 - .../server/type/SimpleProjectQualifier.java | 72 - .../type/SimpleProjectTypeResolver.java | 79 - .../project/server/type/TransientMixin.java | 32 - .../project/server/type/ValueProvider.java | 38 - .../server/type/ValueProviderFactory.java | 28 - .../server/type/ValueStorageException.java | 36 - .../che/api/project/server/type/Variable.java | 93 - .../search/server/InvalidQueryException.java | 20 - .../che/api/search/server/OffsetData.java | 116 - .../server/QueryExecutionException.java | 24 - .../api/search/server/QueryExpression.java | 110 - .../api/search/server/SearchApiModule.java | 55 - .../che/api/search/server/SearchResult.java | 121 - .../che/api/search/server/Searcher.java | 50 - .../consumers/IndexedFileCreateConsumer.java | 34 - .../consumers/IndexedFileDeleteConsumer.java | 34 - .../consumers/IndexedFileUpdateConsumer.java | 34 - .../server/excludes/DotCheExcludeMatcher.java | 30 - .../excludes/DotNumberSignExcludeMatcher.java | 30 - .../excludes/HiddenItemPathMatcher.java | 35 - .../excludes/MediaTypesExcludeMatcher.java | 107 - .../search/server/impl/LuceneSearcher.java | 476 -- .../search/server/impl/SearchResultEntry.java | 67 - .../watcher/server/FileWatcherApiModule.java | 107 - .../watcher/server/FileWatcherManager.java | 129 - .../detectors/EditorFileOperationHandler.java | 92 - .../server/detectors/EditorFileTracker.java | 242 - .../detectors/FileTrackingOperationEvent.java | 43 - .../server/detectors/ProjectTreeTracker.java | 209 - .../watcher/server/impl/FileTreeWalker.java | 209 - .../server/impl/FileWatcherByPathMatcher.java | 209 - .../server/impl/FileWatcherByPathValue.java | 50 - .../server/impl/FileWatcherEventHandler.java | 136 - .../FileWatcherExcludePatternsRegistry.java | 99 - .../impl/FileWatcherIgnoreFileTracker.java | 363 - .../server/impl/FileWatcherOperation.java | 52 - .../server/impl/FileWatcherService.java | 325 - .../watcher/server/impl/FileWatcherUtils.java | 57 - .../server/impl/SimpleFileWatcherManager.java | 107 - .../src/main/resources/README.blank | 10 - .../che/api/RootDirPathProviderTest.java | 41 - .../server/impl/ExecutiveFsManagerTest.java | 536 -- .../api/fs/server/impl/FsOperationsTest.java | 714 -- .../ProjectServiceVcsStatusInjectorTest.java | 169 - .../impl/RootAwarePathTransformerTest.java | 99 - .../server/impl/ValidatingFsManagerTest.java | 551 -- .../ProjectServiceLinksInjectorTest.java | 162 - .../project/server/ProjectServiceTest.java | 257 - .../api/project/server/ProjectTypesTest.java | 109 - .../impl/SynchronizingProjectManagerTest.java | 334 - .../impl/ValidatingProjectManagerTest.java | 450 -- .../CreateBaseProjectTypeHandlerTest.java | 61 - .../project/server/type/ProjectTypeTest.java | 321 - .../search/MediaTypesExcludeMatcherTest.java | 83 - .../eclipse/che/api/search/SearcherTest.java | 520 -- .../server/impl/FSLuceneSearcherTest.java | 102 - .../server/impl/ConcurrentHandleTest.java | 110 - .../server/impl/FileTreeWalkerTest.java | 232 - .../impl/FileWatcherByPathMatcherTest.java | 61 - .../impl/FileWatcherByPathValueTest.java | 99 - .../impl/FileWatcherEventHandlerTest.java | 138 - .../server/impl/FileWatcherManagerTest.java | 92 - .../server/impl/FileWatcherOperationTest.java | 76 - .../server/impl/FileWatcherServiceTest.java | 255 - .../server/impl/FileWatcherUtilsTest.java | 80 - .../resources/che-templates/embed_type.json | 36 - .../src/test/resources/json_test/project.json | 26 - .../src/test/resources/logback-test.xml | 26 - .../server/batchNewProjectConfigs.json | 68 - wsagent/che-core-api-testing-shared/pom.xml | 53 - .../che/api/testing/shared/Constants.java | 29 - .../testing/shared/TestDetectionContext.java | 34 - .../testing/shared/TestDetectionResult.java | 34 - .../testing/shared/TestExecutionContext.java | 70 - .../api/testing/shared/TestLaunchResult.java | 36 - .../che/api/testing/shared/TestPosition.java | 60 - .../shared/common/TestResultStatus.java | 25 - .../testing/shared/common/TestResultType.java | 22 - .../testing/shared/dto/SimpleLocationDto.java | 52 - .../api/testing/shared/dto/TestResultDto.java | 125 - .../testing/shared/dto/TestResultRootDto.java | 124 - .../shared/dto/TestResultTraceDto.java | 52 - .../shared/dto/TestResultTraceFrameDto.java | 51 - .../shared/messages/TestingMessage.java | 30 - .../shared/messages/TestingMessageNames.java | 38 - wsagent/che-core-api-testing/pom.xml | 185 - .../api/testing/server/TestingRPCService.java | 109 - .../exceptions/TestFrameworkException.java | 31 - .../server/framework/LineSplitter.java | 77 - .../framework/TestFrameworkRegistry.java | 55 - .../TestMessagesOutputTransmitter.java | 123 - .../testing/server/framework/TestRunner.java | 58 - .../server/inject/TestGuiceModule.java | 29 - .../server/messages/ServerTestingMessage.java | 176 - .../messages/UncapturedOutputMessage.java | 28 - .../api/testing/server/LineSplitterTest.java | 93 - .../server/ServerTestingMessageTest.java | 30 - wsagent/che-core-git-impl-jgit/pom.xml | 166 - .../che/git/impl/jgit/JGitConfigImpl.java | 158 - .../che/git/impl/jgit/JGitConnection.java | 2352 ------ .../git/impl/jgit/JGitConnectionFactory.java | 110 - .../che/git/impl/jgit/JGitDiffPage.java | 390 - .../eclipse/che/git/impl/jgit/JGitModule.java | 28 - .../che/git/impl/jgit/JGitStatusImpl.java | 245 - .../impl/GitConnectionFactoryProvider.java | 44 - .../che/git/impl/jgit/JGitConnectionTest.java | 296 - .../src/test/resources/logback-test.xml | 37 - wsagent/che-core-ssh-key-ide/pom.xml | 124 - .../ssh/key/client/SshKeyExtension.java | 28 - .../ssh/key/client/SshKeyGenerationInfo.java | 80 - .../client/SshKeyLocalizationConstant.java | 81 - .../plugin/ssh/key/client/SshKeyManager.java | 115 - .../plugin/ssh/key/client/SshKeyUploader.java | 27 - .../key/client/SshKeyUploaderRegistry.java | 47 - .../plugin/ssh/key/client/SshResources.java | 21 - .../key/client/inject/SshKeyGinModule.java | 39 - .../ssh/key/client/manage/ShowSshKeyView.java | 31 - .../key/client/manage/ShowSshKeyViewImpl.java | 77 - .../client/manage/ShowSshKeyViewImpl.ui.xml | 36 - .../client/manage/SshKeyManagerPresenter.java | 341 - .../key/client/manage/SshKeyManagerView.java | 60 - .../client/manage/SshKeyManagerViewImpl.java | 200 - .../manage/SshKeyManagerViewImpl.ui.xml | 83 - .../client/upload/UploadSshKeyPresenter.java | 128 - .../key/client/upload/UploadSshKeyView.java | 97 - .../client/upload/UploadSshKeyViewImpl.java | 150 - .../client/upload/UploadSshKeyViewImpl.ui.xml | 59 - .../src/main/module.gwt.xml | 23 - .../SshKeyLocalizationConstant.properties | 42 - .../plugin/ssh/key/client/github-generate.svg | 19 - .../manage/SshKeyManagerPresenterTest.java | 632 -- wsagent/che-core-ssh-key-server/pom.xml | 95 - .../plugin/ssh/key/HttpSshServiceClient.java | 108 - .../eclipse/che/plugin/ssh/key/SshModule.java | 29 - .../che/plugin/ssh/key/SshServiceClient.java | 62 - .../plugin/ssh/key/script/SshKeyProvider.java | 27 - .../ssh/key/script/SshKeyProviderImpl.java | 75 - .../plugin/ssh/key/script/SshKeyUploader.java | 40 - .../che/plugin/ssh/key/script/SshScript.java | 135 - .../ssh/key/script/SshScriptProvider.java | 55 - .../plugin/ssh/key/script/UnixSshScript.java | 57 - .../ssh/key/script/WindowsSshScript.java | 82 - .../che/plugin/ssh/key/utils/UrlUtils.java | 54 - .../ssh/key/HttpSshServiceClientTest.java | 133 - .../ssh/key/script/SshScriptProviderTest.java | 65 - .../src/test/java/resources/logback-test.xml | 36 - .../ssh/key/script/SshScriptProviderTest.java | 66 - .../src/test/resources/logback-test.xml | 36 - .../pom.xml | 71 - .../activity/ActivityServletModule.java | 26 - .../activity/LastAccessTimeFilter.java | 59 - .../activity/WorkspaceActivityNotifier.java | 94 - .../activity/LastAccessTimeFilterTest.java | 72 - .../WorkspaceActivityNotifierTest.java | 66 - wsagent/che-wsagent-core/pom.xml | 242 - .../server/AgentHttpJsonRequestFactory.java | 56 - ...heWsAgentCorsAllowCredentialsProvider.java | 34 - .../CheWsAgentCorsAllowedOriginsProvider.java | 101 - .../che/wsagent/server/CheWsAgentModule.java | 50 - .../server/CheWsAgentServletModule.java | 46 - .../che/wsagent/server/WsAgentAuthModule.java | 40 - .../server/WsAgentAuthServletModule.java | 37 - .../che/wsagent/server/WsAgentModule.java | 63 - .../wsagent/server/WsAgentServletModule.java | 26 - .../wsagent/server/WsAgentURLProvider.java | 78 - .../server/appstate/AppStateManager.java | 115 - .../server/appstate/AppStateService.java | 91 - .../jsonrpc/WsAgentWebSocketEndpoint.java | 66 - ...WsAgentWebSocketEndpointConfiguration.java | 44 - ...SocketEndpointExecutorServiceProvider.java | 32 - .../che-machine-configuration.properties | 77 - .../src/main/webapp/WEB-INF/web.xml | 52 - .../server/appstate/AppStateManagerTest.java | 97 - .../server/appstate/AppStateServiceTest.java | 148 - .../src/test/resources/logback-test.xml | 27 - wsagent/pom.xml | 47 - wsagent/wsagent-local/pom.xml | 91 - .../che/ApiEndpointAccessibilityChecker.java | 90 - .../che/EnvironmentInitializationFilter.java | 52 - .../eclipse/che/MachinePublicKeyProvider.java | 51 - .../org/eclipse/che/MachineTokenProvider.java | 27 - .../eclipse/che/UriApiEndpointProvider.java | 37 - .../org/eclipse/che/WorkspaceIdProvider.java | 28 - .../EnvironmentInitializationFilterTest.java | 58 - .../src/test/resources/logback-test.xml | 26 - 6567 files changed, 289 insertions(+), 536705 deletions(-) delete mode 100644 agents/bootstrapper/pom.xml delete mode 100644 agents/bootstrapper/src/assembly/assembly.xml delete mode 100644 agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats delete mode 100644 agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats delete mode 100755 agents/che-core-api-agent/src/test/resources/run_launcher_bats_tests.sh delete mode 100644 agents/exec/che-exec-agent-client/pom.xml delete mode 100644 agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClient.java delete mode 100644 agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClientFactory.java delete mode 100644 agents/exec/che-exec-agent-shared/pom.xml delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/DtoWithPid.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionRequestDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionResponseDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ConnectedEventDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessDiedEventDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStartedEventDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdErrEventDto.java delete mode 100644 agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdOutEventDto.java delete mode 100644 agents/exec/installer/pom.xml delete mode 100644 agents/exec/installer/src/assembly/assembly.xml delete mode 100644 agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.json delete mode 100644 agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.script.sh delete mode 100644 agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.json delete mode 100644 agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.script.sh delete mode 100644 agents/exec/pom.xml delete mode 100644 agents/git-credentials/pom.xml delete mode 100644 agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.json delete mode 100644 agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.script.sh delete mode 100644 agents/go-agents/.gitignore delete mode 100644 agents/go-agents/Gopkg.lock delete mode 100644 agents/go-agents/Gopkg.toml delete mode 100644 agents/go-agents/README.md delete mode 100644 agents/go-agents/bootstrapper/booter/booter.go delete mode 100644 agents/go-agents/bootstrapper/booter/booter_test.go delete mode 100644 agents/go-agents/bootstrapper/booter/events.go delete mode 100644 agents/go-agents/bootstrapper/booter/installations.go delete mode 100644 agents/go-agents/bootstrapper/booter/model.go delete mode 100644 agents/go-agents/bootstrapper/cfg/cfg.go delete mode 100644 agents/go-agents/bootstrapper/main.go delete mode 100644 agents/go-agents/core/activity/activity.go delete mode 100644 agents/go-agents/core/activity/noop.go delete mode 100644 agents/go-agents/core/auth/auth.go delete mode 100644 agents/go-agents/core/auth/auth_test.go delete mode 100644 agents/go-agents/core/auth/default_cache.go delete mode 100644 agents/go-agents/core/auth/default_cache_test.go delete mode 100644 agents/go-agents/core/auth/sign_key.go delete mode 100644 agents/go-agents/core/common/error.go delete mode 100644 agents/go-agents/core/process/common.go delete mode 100644 agents/go-agents/core/process/events.go delete mode 100644 agents/go-agents/core/process/file_logger.go delete mode 100644 agents/go-agents/core/process/file_logger_test.go delete mode 100644 agents/go-agents/core/process/logs_distributor.go delete mode 100644 agents/go-agents/core/process/logs_distributor_test.go delete mode 100644 agents/go-agents/core/process/logs_reader.go delete mode 100644 agents/go-agents/core/process/logs_reader_test.go delete mode 100644 agents/go-agents/core/process/process.go delete mode 100644 agents/go-agents/core/process/process_builder.go delete mode 100644 agents/go-agents/core/process/process_cleaner.go delete mode 100644 agents/go-agents/core/process/process_cleaner_test.go delete mode 100644 agents/go-agents/core/process/process_test.go delete mode 100644 agents/go-agents/core/process/processtest/test_utils.go delete mode 100644 agents/go-agents/core/process/pumper.go delete mode 100644 agents/go-agents/core/rest/default_router.go delete mode 100644 agents/go-agents/core/rest/errors.go delete mode 100644 agents/go-agents/core/rest/restutil/util.go delete mode 100644 agents/go-agents/core/rest/route.go delete mode 100644 agents/go-agents/core/rest/router.go delete mode 100644 agents/go-agents/docs/events.md delete mode 100644 agents/go-agents/docs/notes.md delete mode 100644 agents/go-agents/docs/rest_api.md delete mode 100644 agents/go-agents/docs/ws_api.md delete mode 100644 agents/go-agents/exec-agent/exec/common.go delete mode 100644 agents/go-agents/exec-agent/exec/rest_service.go delete mode 100644 agents/go-agents/exec-agent/exec/rest_service_test.go delete mode 100644 agents/go-agents/exec-agent/exec/ws_service.go delete mode 100644 agents/go-agents/exec-agent/exec/ws_service_test.go delete mode 100644 agents/go-agents/exec-agent/main.go delete mode 100644 agents/go-agents/pom.xml delete mode 100644 agents/go-agents/terminal-agent/main.go delete mode 100644 agents/go-agents/terminal-agent/term/finalizer.go delete mode 100644 agents/go-agents/terminal-agent/term/pty.go delete mode 100644 agents/go-agents/terminal-agent/term/server.go delete mode 100644 agents/go-agents/terminal-agent/term/websocket.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.gitignore delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.travis.yml delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/LICENSE delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/README.md delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/claims.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/doc.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/errors.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/hmac.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/map_claims.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/none.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/parser.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/signing_method.go delete mode 100644 agents/go-agents/vendor/github.com/dgrijalva/jwt-go/token.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.gitignore delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.travis.yml delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.lock delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.toml delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/LICENSE delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/README.md delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/event/event.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/native_conn_recorder.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/recording_request_dispatcher.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/tunnel.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpcws/jsonrpc_impl.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/model.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/registry.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/route.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/transport_specific.go delete mode 100644 agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/tunnel.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/.gitignore delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/.travis.yml delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/AUTHORS delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/LICENSE delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/README.md delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/client.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/conn.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/doc.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/json.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/server.go delete mode 100644 agents/go-agents/vendor/github.com/gorilla/websocket/util.go delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/.travis.yml delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/LICENSE delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/README.md delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/path.go delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/router.go delete mode 100644 agents/go-agents/vendor/github.com/julienschmidt/httprouter/tree.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/.gitignore delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/License delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/README.md delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/doc.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ioctl.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ioctl_bsd.go delete mode 100755 agents/go-agents/vendor/github.com/kr/pty/mktypes.bash delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_darwin.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_dragonfly.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_freebsd.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_linux.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_openbsd.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/pty_unsupported.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/run.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/types.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/types_dragonfly.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/types_freebsd.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/types_openbsd.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/util.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_386.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_amd64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_arm.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_arm64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_386.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_arm.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_mipsx.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_386.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64le.go delete mode 100644 agents/go-agents/vendor/github.com/kr/pty/ztypes_s390x.go delete mode 100644 agents/ls-camel/pom.xml delete mode 100644 agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.json delete mode 100644 agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.script.sh delete mode 100644 agents/ls-clang/pom.xml delete mode 100644 agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.json delete mode 100644 agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.script.sh delete mode 100644 agents/ls-csharp/pom.xml delete mode 100644 agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.json delete mode 100644 agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.script.sh delete mode 100644 agents/ls-golang/pom.xml delete mode 100644 agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.json delete mode 100644 agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.script.sh delete mode 100644 agents/ls-java/pom.xml delete mode 100644 agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.json delete mode 100644 agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh delete mode 100644 agents/ls-json/pom.xml delete mode 100644 agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.json delete mode 100644 agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.script.sh delete mode 100644 agents/ls-php/pom.xml delete mode 100644 agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.json delete mode 100644 agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.script.sh delete mode 100644 agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.json delete mode 100644 agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.script.sh delete mode 100644 agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.json delete mode 100644 agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.script.sh delete mode 100644 agents/ls-python/pom.xml delete mode 100644 agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.json delete mode 100644 agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.script.sh delete mode 100644 agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.json delete mode 100644 agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.script.sh delete mode 100644 agents/ls-typescript/pom.xml delete mode 100644 agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.json delete mode 100644 agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.script.sh delete mode 100644 agents/ls-vue/pom.xml delete mode 100644 agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.json delete mode 100644 agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.script.sh delete mode 100644 agents/ls-yaml/pom.xml delete mode 100644 agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.json delete mode 100644 agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.script.sh delete mode 100644 agents/pom.xml delete mode 100644 agents/ssh/pom.xml delete mode 100644 agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.json delete mode 100644 agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.script.sh delete mode 100644 agents/terminal/pom.xml delete mode 100644 agents/terminal/src/assembly/assembly.xml delete mode 100644 agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.json delete mode 100644 agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.script.sh delete mode 100644 agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.json delete mode 100644 agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.script.sh delete mode 100644 agents/unison/pom.xml delete mode 100644 agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.json delete mode 100644 agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.script.sh delete mode 100644 assembly/assembly-ide-war/src/main/webapp/META-INF/context.xml rename assembly/{assembly-ide-war => assembly-root-war}/pom.xml (78%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/java/org/eclipse/che/ApiAccessRejectionFilter.java (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/java/org/eclipse/che/DashboardModule.java (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/java/org/eclipse/che/DashboardRedirectionFilter.java (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/java/org/eclipse/che/IDEController.java (100%) rename ide/che-ide-gwt-app/src/main/module.gwt.xml => assembly/assembly-root-war/src/main/webapp/META-INF/context.xml (75%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/webapp/WEB-INF/rewrite.config (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/webapp/WEB-INF/web.xml (96%) rename {ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public => assembly/assembly-root-war/src/main/webapp/_app}/IDE.html (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/webapp/_app/factory-contribute.svg (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/webapp/_app/factory-review.svg (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/main/webapp/_app/favicon.ico (100%) rename {ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public => assembly/assembly-root-war/src/main/webapp/_app}/loader.css (100%) rename {ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public => assembly/assembly-root-war/src/main/webapp/_app}/loader.html (100%) rename {ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public => assembly/assembly-root-war/src/main/webapp/_app}/loader.js (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/test/java/org/eclipse/che/ApiAccessRejectionFilterTest.java (100%) rename assembly/{assembly-ide-war => assembly-root-war}/src/test/java/org/eclipse/che/DashboardRedirectionFilterTest.java (100%) delete mode 100644 assembly/assembly-wsagent-server/pom.xml delete mode 100644 assembly/assembly-wsagent-server/src/assembly/LICENSE-mit.txt delete mode 100644 assembly/assembly-wsagent-server/src/assembly/assembly.xml delete mode 100644 assembly/assembly-wsagent-server/src/assembly/server.xml delete mode 100644 assembly/assembly-wsagent-server/src/assembly/setenv.sh delete mode 100644 assembly/assembly-wsagent-war/pom.xml delete mode 100644 assembly/assembly-wsagent-war/src/main/java/org/eclipse/che/wsagent/server/SwaggerServletModule.java delete mode 100644 assembly/assembly-wsagent-war/src/main/webapp/META-INF/context.xml delete mode 100644 core/che-core-dynamodule-maven-plugin/pom.xml delete mode 100644 core/che-core-dynamodule-maven-plugin/src/it/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoITest.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListByteCodeGenerator.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojo.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScanner.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/FindDynaModuleVisitor.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/AnotherCustomModule.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoTest.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/MyCustomModule.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScannerTest.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/stub/DynaModuleListGeneratorMojoProjectStub.java delete mode 100644 core/che-core-dynamodule-maven-plugin/src/test/projects/project/pom.xml delete mode 100644 core/che-core-gwt-maven-plugin/pom.xml delete mode 100644 core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojo.java delete mode 100644 core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/Utils.java delete mode 100644 core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojoTest.java delete mode 100644 core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectStub.java delete mode 100644 core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectWithoutExclusionsStub.java delete mode 100644 core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml delete mode 100644 core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/pom.xml delete mode 100644 core/che-core-gwt-maven-plugin/src/test/projects/project/classes/org/eclipse/che/ide/IDE.gwt.xml delete mode 100644 core/che-core-gwt-maven-plugin/src/test/projects/project/pom.xml delete mode 100644 cypress-tests/README.md delete mode 100644 cypress-tests/cypress.json delete mode 100644 cypress-tests/cypress/fixtures/workspace/che-7-preview.json delete mode 100644 cypress-tests/cypress/integration/WorkspaceCreationAndLanguageServerInitialization.spec.ts delete mode 100644 cypress-tests/cypress/inversifyJS/inversify.config.ts delete mode 100644 cypress-tests/cypress/inversifyJS/types.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/Dashboard.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/LoginPageMultiUser.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/LoginPageSingleUser.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/NewWorkspace.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/Workspaces.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/interfaces/ILoginPage.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts delete mode 100644 cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts delete mode 100644 cypress-tests/cypress/pageobjects/ide/Editor.ts delete mode 100644 cypress-tests/cypress/pageobjects/ide/Ide.ts delete mode 100644 cypress-tests/cypress/pageobjects/ide/ProjectTree.ts delete mode 100644 cypress-tests/cypress/plugins/index.js delete mode 100644 cypress-tests/cypress/support/commands.js delete mode 100644 cypress-tests/cypress/support/index.js delete mode 100644 cypress-tests/cypress/utils/ElementStateChecker.ts delete mode 100644 cypress-tests/cypress/utils/NameGenerator.ts delete mode 100644 cypress-tests/cypress/utils/workspace/TestWorkspace.ts delete mode 100644 cypress-tests/cypress/utils/workspace/TestWorkspaceUtil.ts delete mode 100644 cypress-tests/package-lock.json delete mode 100644 cypress-tests/package.json delete mode 100644 cypress-tests/tsconfig.json delete mode 100644 cypress-tests/webpack.config.js delete mode 100644 deploy/docker/Readme.md delete mode 100644 ide/README.md delete mode 100644 ide/che-core-dyna-provider-generator-maven-plugin/pom.xml delete mode 100644 ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/ClassModel.java delete mode 100644 ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderGenerator.java delete mode 100644 ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderMojo.java delete mode 100644 ide/che-core-dyna-provider-generator-maven-plugin/src/main/resources/org/eclipse/che/providers/DynaProvider.st delete mode 100644 ide/che-core-ide-api/pom.xml delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProviderImpl.java delete mode 100755 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionEvent.java delete mode 100755 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AbstractPerspectiveAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Action.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionGroup.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionSelectedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AppCloseActionEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/BaseAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/CustomComponentAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/DefaultActionGroup.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/IdeActions.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Presentation.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ProjectAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PromisableAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeListener.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Separator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ToggleAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Toggleable.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/AppContext.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/CurrentUser.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/StartUpAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/Credentials.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/OAuthServiceClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/BaseCommandGoal.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandAddedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandExecutor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoal.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoalRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandPage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandProducer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandRemovedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandType.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandTypeRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandUpdatedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandsLoadedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/AbstractExecAgentEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ConnectedEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentCommandManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentConsumer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentEventManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessDiedEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessFinishedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdErrEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdOutEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Anchor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Constraints.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Direction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObservable.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObserver.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRenderer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRendererFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointStorage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfiguration.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationPage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationType.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationsManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClientImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasBreakpointRenderer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasLocation.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AbstractEditorPresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AsyncEditorProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/DeletedFilesController.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorAgent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInitException.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInput.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorLocalizationConstants.java delete mode 100755 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEvent.java delete mode 100755 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEventHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorPartPresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithAutoSave.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithErrors.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/OpenEditorCallbackImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroup.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroupImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModel.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationsIterator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/GutterAnnotationRenderer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/HasAnnotationRendering.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/InlineAnnotationRenderer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ListTooltipFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/MinimapAnnotationRenderer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/PositionHolder.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/RegionIterator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/autosave/AutoSaveMode.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/ChangeInterceptorProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/CloseCStyleCommentChangeInterceptor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChange.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChangeInterceptor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AdditionalInfoCallback.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AutoCompleteResources.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistCallback.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistProcessor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistant.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/Completion.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposal.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposalExtension.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionReadyCallback.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionsSource.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/DefaultChainedCodeAssistProcessor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/HasCompletionInformation.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/AbstractTextEditorProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/DefaultTextEditorProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/EditorBuilder.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/AbstractDocument.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/Document.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentEventBus.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentHandle.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorageImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/ReadOnlyDocument.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/UseDocumentHandle.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/AutoSaveTextEditorConfiguration.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/DefaultTextEditorConfiguration.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/EditorUpdateAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/TextEditorConfiguration.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorSettingsChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateHandler.java delete mode 100755 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasBeforeSelectionChangeHandlers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasCursorActivityHandlers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasDocumentReadyHandlers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasGutterClickHandlers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasViewPortChangeHandlers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/doc/DocReadyWrapper.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/DefaultExtensionToMimeTypeMappings.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/ExtensionFileTypeIdentifier.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileNameFileTypeIdentifier.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileTypeIdentifier.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FirstLineFileTypeIdentifier.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/MultipleMethodFileIdentifier.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/formatter/ContentFormatter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutters.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/HasGutter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HasHotKeyItems.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HotKeyItem.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBinding.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBindingAction.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/Keymap.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/HasLinkedMode.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedMode.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModel.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelData.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelGroup.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/HasMinimap.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/Minimap.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/CharacterScanner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/ConstantPartitioner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DefaultPartitioner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPartitioner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMap.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMapImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionScanner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionerFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/StringCharacterScanner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/TokenScanner.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/position/PositionConverter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistAssistant.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistInvocationContext.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistProcessor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistantFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DefaultReconciler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegion.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegionQueue.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/Reconciler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerWithAutoSave.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilingStrategy.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/ParameterInfo.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelp.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelpProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureInfo.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadLocationException.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadPositionCategoryException.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/LinearRange.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Position.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Region.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/RegionImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextPosition.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextRange.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedPosition.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegion.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegionImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/annotation/Annotation.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/Token.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/TokenImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CanWrapLines.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/ContentInitializedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModel.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModelWithHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorResources.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidget.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidgetFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesTextOperations.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesUndoRedo.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasKeyBindings.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasNotificationPanel.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasReadOnlyProperty.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasTextMarkers.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/LineStyler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorOperations.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorPartView.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/UndoableEditor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/DependencyDescription.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/Extension.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionDescription.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionGinModule.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionsInitializedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/SDK.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryServiceClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ActionImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/AuthorImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonAttributesImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/FactoryImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/IdeImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppClosedImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppLoadedImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnProjectsLoadedImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/PoliciesImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileType.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileTypeRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/ClientServerEventService.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/FileWatcherExcludesOperation.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/Icon.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/IconRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/Constants.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/SubscriptionManagerClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/WorkspaceMasterJsonRpcInitializer.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBindingAgent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBuilder.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/SchemeImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/BaseMacro.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/Macro.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroProcessor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/Presenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/View.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/Notification.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationListener.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationObserver.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/ReadState.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotification.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotificationListener.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2Authenticator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorUrlProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/outputconsole/OutputConsole.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/AbstractPartPresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStack.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStackState.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorPartStack.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorTab.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Focusable.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartPresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStack.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackStateChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackType.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackUIResources.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackView.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Perspective.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveView.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PropertyListener.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/WorkspaceAgent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseActionDelegate.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BasePresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseView.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/MaximizePartEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.ui.xml delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/AbstractPreferencePagePresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencePagePresenter.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencesManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/MutableProjectConfig.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/NewProjectConfigImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/QueryExpression.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTemplateRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypeRegistry.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypesLoadedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/PreSelectedProjectTypeManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardMode.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardRegistrar.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/wizard/ImportWizardRegistrar.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/reference/FqnProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Container.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ExternalResourceDelta.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/File.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Folder.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ModificationTracker.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Project.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/RenamingSupport.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Resource.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceDelta.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceInterceptor.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceNameComparator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourcePathComparator.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchItemReference.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchOccurrenceImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchResult.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SyntheticFile.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/VirtualFile.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/Marker.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/MarkerChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/PresentableTextMarker.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/ClipboardManager.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CopyProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutResourceMarker.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/PasteProvider.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/Selection.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionAgent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedHandler.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ssh/SshServiceClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/AppStateServiceClient.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/StateComponent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Style.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Theme.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/ThemeAgent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsChangeMarkerRender.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsStatus.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRender.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRenderFactory.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsStatus.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizard.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizardPage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/Wizard.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/WizardPage.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WorkspaceReadyEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtil.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerFailedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerStartingEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineFailedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStartingEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStartingEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppingEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerRunningEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerStoppedEvent.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/EnvironmentImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineConfigImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ProjectConfigImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RecipeImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RuntimeImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerConfigImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/SourceStorageImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/VolumeImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WarningImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceConfigImpl.java delete mode 100644 ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceImpl.java delete mode 100644 ide/che-core-ide-api/src/main/module.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/agent/exec/Exec.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/auth/Auth.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/Core.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/model/Model.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/debug/Debug.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/factory/Factory.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/git/Git.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/machine/Machine.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/project/Project.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/ssh/Ssh.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/testing/Testing.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/user/User.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/workspace/Workspace.gwt.xml delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/codeassist/AutocompleteComponent.css delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/texteditor/Editor.css delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/arrow-bottom.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/close-icon.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/collapse-expand-icon.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/erase.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/maximize-part.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/partstack.css delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineError.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineWarning.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/wrap-text.svg delete mode 100644 ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/ui/style.css delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/AbstractPerspectiveActionTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/DefaultActionGroupTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/AnnotationIteratorTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/changeintercept/changeintercept/CloseCStyleCommentChangeInterceptorTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/macro/BaseMacroTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardPageTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardTest.java delete mode 100644 ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtilTest.java delete mode 100644 ide/che-core-ide-app/pom.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/Resources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/AddToFileWatcherExcludesAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CloseActiveEditorAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CollapseAllAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CompleteAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ConvertFolderToProjectAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CreateProjectAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DeleteResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadProjectAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadWsAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditorActions.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ExpandEditorAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FormatterAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FullTextSearchAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/GoIntoAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/HotKeysListAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ImportProjectAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/LinkWithEditorAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NavigateToFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NewXmlFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/OpenFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ProjectConfigurationAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedoAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RefreshPathAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RemoveFromFileWatcherExcludesAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RenameItemAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RunCommandAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAllAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowConsoleTreeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowHiddenFilesAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowPreferencesAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowReferenceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowToolbarAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SignatureHelpAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SoftWrapAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsParser.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsProcessor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UndoAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFolderAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/CollapseTreeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/ExpandTreeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/HidePartAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/MaximizePartAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/RestorePartAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/CommandsExplorerDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EditorDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EventLogsDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/FindResultDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/ProjectExplorerDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/TerminalDisplayingModeAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BasicIDEInitializedEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BootstrapModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/CurrentUserInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/DefaultIdeInitializationStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/ExtensionInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/FactoryIdeInitializationStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeBootstrap.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategyProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/IDE.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/clipboard/ClipboardModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandUtils.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/ActionMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/CommandExplorerContextMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/MoveCommandAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/RenameCommandAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/EditorMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/AbstractCommandEditorPage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/CommandEditorPage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/commandline/CommandLinePage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/previewurl/PreviewUrlPage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPage.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/AbstractPageWithTextEditor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/EditorInputImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCodeAssistProcessor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCompletionProposal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroEditorConfiguration.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandExecutorImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandsActionGroup.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroup.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroupFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentCommandManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentEventManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsTreeRenderer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/ExplorerMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/BuildGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommandGoalRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommonGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DebugGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DeployGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/GoalMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/RunGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/TestGoal.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandNameGenerator.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/ProjectCommandManagerDelegate.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/WorkspaceCommandManagerDelegate.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/AbstractCommandNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandFileNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandGoalNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/ExecutableCommandNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/NodeFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPalettePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/PaletteMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/ShowCommandsPaletteAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/ProducerMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandCreationGuide.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/OpenCommandsPaletteButton.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButton.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButtonsFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/AbstractMenuItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/CommandItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButton.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonItemsProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/GuideItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MachineItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MenuItemsFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ActivateProcessOutputEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/EmptyListWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/Process.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessItemRenderer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessOutputClosedEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeMessages.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooser.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomCommandType.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPagePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/AbstractOutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CPPOutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CSharpOutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandConsoleFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsole.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsolePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompositeOutputConsole.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompoundOutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/ConsoleGinModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/DefaultOutputConsole.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/JavaOutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputCustomizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/BrowserAddress.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/CurrentUserImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/AgentURLModifier.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/BrowserTabCloseHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ClientServerEventModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/CoreGinModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FileOpenCloseEventListener.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FontAwesomeInjector.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceNotifier.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceStatusBarAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ServerSubscriptionBroadcaster.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/UiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/WebSocketModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointRendererImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointStorageImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebugApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/Debugger.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerDescriptor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObservable.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObserver.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObservable.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObserver.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/BookmarkletParams.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeOffAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeScriptInjector.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeSetUpAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/GWTDevMode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/download/DownloadContainer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoRegistrar.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ClientServerEventServiceImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorFileStatusNotificationOperation.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorInputImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ResourceProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/autosave/AutoSaveModeImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/codeassist/AdditionalInformationWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/AbstractEditorMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileBaseNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFilePathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileRelativePathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectTypeMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPrefLocalizationConstant.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorProperties.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorBooleanPropertyWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorNumberPropertyWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidgetFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorStringPropertyWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPreferenceSectionFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/LanguageToolsPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/RulersPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TabsPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TypingPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/WhiteSpacesPropertiesSection.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeyMapsPreferencePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistAssistantImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidgetFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronization.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronizationImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryExtension.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryGinModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryServiceClientImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/JsIntervalSetter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/accept/AcceptFactoryHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/action/CreateFactoryAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/utils/FactoryProjectImporter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/OpenWelcomePageAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeProviderImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/HotKeyResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/DefaultIconsRegistrar.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/IconRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/PreviewImageAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/ExecAgentJsonRpcInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsAgentJsonRpcInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsMasterJsonRpcInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/keybinding/KeyBindingManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineFailNotifier.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/ProcessesOutputRestorer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooser.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectEldestParentPathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectPathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectRelativePathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/DevMachineHostNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroProcessorImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/ServerAddressMacroRegistrar.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNamespaceMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooser.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/ContextMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuBarItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/PartMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFilePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/AbstractNewResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFolderAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainerItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopup.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopupStack.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/DefaultOAuthAuthenticatorImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuth2AuthenticatorRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuthApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/FocusManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenterFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartsComparator.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchControllerFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartController.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartControllerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenuFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenuFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/TabItemWithMarks.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllExceptPinnedAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllTabsPaneAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseOtherAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ClosePaneAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorAbstractAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorSwitchAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/PinEditorTabAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ReopenClosedFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitHorizontallyAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitVerticallyAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchNextEditorAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchPreviousEditorAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/event/CloseNonPinnedEditorsEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/ClearRecentListAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileActionFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileList.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentList.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/DefaultNodeInterceptor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/EmptyTreePanel.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/NodeTypeComparator.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerTreeExpander.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/TreeResourceRevealer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileBaseNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileParentPathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFilePathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileRelativePathMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectNameMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectTypeMacro.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ChangeLocationWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ProjectConfigSynchronized.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspective.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/project/ProjectPerspective.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/TabItemFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItemFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButton.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesLocalizationConstants.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/StyleInjector.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/general/IdeGeneralPreferencesPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/general/IdeGeneralPreferencesView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/general/IdeGeneralPreferencesViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/general/IdeGeneralPreferencesViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/CommandNodeRenderStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/DisplayMachineOutputEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/HasPreviewSshClickHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/HasStopProcessHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/MachineNodeRenderStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/NewTerminalAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/OpenInTerminalAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/PreviewSshClickHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessDataAdapter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessTreeNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessTreeNodeRenderStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessTreeNodeSelectedEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessTreeRenderer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/ProcessesGinModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/StopProcessHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/TerminalNodeRenderStrategy.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/AddTabMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/AddTabMenuFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/CloseConsoleAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/ConsoleTreeContextMenu.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/ConsoleTreeContextMenuFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/DisplayMachineOutputAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/PreviewSSHAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/ReRunProcessAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/actions/StopProcessAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/ShowWorkspaceStatusAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/WorkspaceLoadingTracker.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/WorkspaceLoadingTrackerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/WorkspaceLoadingTrackerView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/WorkspaceLoadingTrackerViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/loading/WorkspaceLoadingTrackerViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/monitoring/MachineMonitors.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/monitoring/MonitorWidget.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/monitoring/MonitorWidget.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/panel/EnvironmentOutputEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/panel/ProcessesPanelPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/panel/ProcessesPanelView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/panel/ProcessesPanelViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/panel/ProcessesPanelViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/CellTableRuntimeInfoWidgetFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/ContextBasedRuntimeInfoProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/RuntimeInfo.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/RuntimeInfoGinModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/RuntimeInfoLocalization.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/RuntimeInfoProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/RuntimeInfoWidgetFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/processes/runtime/ShowRuntimeInfoAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ProjectApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ProjectServiceClient.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ProjectTreeNotificationsSubscriber.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ResolvingProjectStateHolder.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ResolvingProjectStateHolderRegistry.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/ResolvingProjectStateHolderRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/WorkspaceProjectsSyncer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/node/SyntheticNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/node/SyntheticNodeUpdateEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/node/icon/DockerfileIconProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/node/icon/FileIconProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/node/icon/NodeIconProvider.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/project/shared/NodesResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/AbstractImporter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/InitialProjectImporter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/ProjectImporterResource.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ImportProgressJsonRpcHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ImportProjectNotificationSubscriberFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ImportWizard.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ImportWizardFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ImportWizardRegistry.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImportOutputJsonRpcNotifier.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectNotificationSubscriber.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectResolver.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/mainpage/MainPagePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/mainpage/MainPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/mainpage/MainPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/mainpage/MainPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/presenter/ImportProjectWizardPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/presenter/ImportProjectWizardView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/presenter/ImportProjectWizardViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/presenter/ImportProjectWizardViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImportWizardRegistrar.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImporterPagePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImporterPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImporterPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImporterPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/BlankProjectWizardRegistrar.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/ProjectTemplateRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/ProjectTypeRegistryImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/PreSelectedProjectTypeManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/ProjectWizard.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/ProjectWizardFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/ProjectWizardRegistry.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/ProjectWizardResources.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/categoriespage/CategoriesPagePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/categoriespage/CategoriesPageView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/categoriespage/CategoriesPageViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/categoriespage/CategoriesPageViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/presenter/ProjectWizardPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/presenter/ProjectWizardView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/presenter/ProjectWizardViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projecttype/wizard/presenter/ProjectWizardViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/reference/ShowReferencePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/reference/ShowReferenceView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/reference/ShowReferenceViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/reference/ShowReferenceViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/DeleteResourceManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/ProjectTreeChangeHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/ProjectTreeStateNotificationOperation.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/ResourceApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/action/CopyResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/action/CutResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/action/PasteResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/action/RevealResourceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ClipboardManagerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ContainerImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/CopyPasteManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/FileImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/FolderImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/InMemoryResourceStore.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ProjectImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceDeltaImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceStore.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/reveal/RevealResourceEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/selector/SelectPathPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/selector/SelectPathView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/selector/SelectPathViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/selector/SelectPathViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/selector/SelectionPathHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/tree/ContainerNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/tree/FileNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/tree/ResourceNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/tree/SkipHiddenNodesInterceptor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/tree/SkipLeafsInterceptor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/FullTextSearchPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/FullTextSearchView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/FullTextSearchViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/FullTextSearchViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/factory/FindResultNodeFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FindResultPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FindResultView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FindResultViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FindResultViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FoundItemNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/presentation/FoundOccurrenceNode.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/FolderNodeInterceptor.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/SelectPathPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/SelectPathView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/SelectPathViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/SelectPathViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/selection/SelectionAgentImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/ssh/SshServiceClientImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateBackwardCompatibility.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateConstants.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateServiceClientImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateSyncWriter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/AppStateTracker.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/PersistenceApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/statepersistance/StateComponentRegistry.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/AddTerminalClickHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/CustomKeyEventTerminalHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/HasAddTerminalClickHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalFactory.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalGeometryJso.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalInitializePromiseHolder.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalInitializer.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalJso.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/TerminalViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/addons/FitAddonJso.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/options/TerminalOptionsJso.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/terminal/options/TerminalThemeJso.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/DarkTheme.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/LightTheme.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/ThemeAgentImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/ThemeApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/file/UploadFilePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/file/UploadFileView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/file/UploadFileViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/file/UploadFileViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/folder/UploadFolderFromZipPresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/folder/UploadFolderFromZipView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/folder/UploadFolderFromZipViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/upload/folder/UploadFolderFromZipViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/user/AskCredentialsDialogImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/user/AskCredentialsDialogImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/CurrentWorkspaceManager.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/EphemeralStateStatusBarItem.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/RestartingStateHolder.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StartWorkspaceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StartWorkspaceNotification.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StartWorkspaceNotification.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StartWsAgentNotification.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StartWsAgentNotification.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/StopWorkspaceAction.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceApiModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspacePresenter.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceServiceClient.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceStatusNotification.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceView.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceViewImpl.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceViewImpl.ui.xml delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/activity/ActivityTrackingExtension.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/InstallerLogHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/InstallerStatusEventHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/MachineStatusChangedEvent.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/MachineStatusEventHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/RuntimeLogHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/ServerStatusEventHandler.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/WorkspaceEventsModule.java delete mode 100644 ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/events/WorkspaceStatusEventHandler.java delete mode 100644 ide/che-core-ide-app/src/main/module.gwt.xml delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/Core.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/CoreLocalizationConstant.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/about/AboutLocalizationConstant.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/about.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/copy.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/cut.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/delete.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/evaluate.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/find-actions.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/find.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/format.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/fullscreen-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/import.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/importGroup.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/importProjectFromLocation.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/navigate-to-file.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/new-resource.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/newProject.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/paste.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/preferences.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/project-configuration.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/redo.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/refresh.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/rename.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/save.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/showHiddenFiles.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/undo.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/upload-file.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/actions/zip-folder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/blank.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/actions/ActionMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/editor/EditorMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/editor/styles.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/execute/ExecMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/ExplorerMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/add-command-button.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/duplicate-command-button.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/explorer-part.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/remove-command-button.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/explorer/styles.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/goal/GoalMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/magnifier.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/palette/PaletteMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/palette/styles.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/producer/ProducerMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/toolbar/ToolbarMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/toolbar/button.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/toolbar/processes/styles.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/type/CommandTypeMessages.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/command/type/styles.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/console/clear.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/debug/breakpoint.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/default.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/file.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/folder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/image-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/json.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/md.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/project.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/defaulticons/projectFolder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/editor/preferences/EditorPrefLocalizationConstant.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/factory/Factory.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/factory/cog-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/factory/execute.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/factory/export-config.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/factory/import-config.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/hotkeys/HotKeysCss.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/hotkeys/find-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/hotkeys/print_template.html delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/imageviewer/image-viewer-bg.png delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/imageviewer/imageViewer.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/console/clear-logs.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/cube.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/custom-command-type.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/edit-commands.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/machine-cube.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/machine.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/add-terminal.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/clear-outputs.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/line-wrap.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/output-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/re-run.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/scroll-to-bottom.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/stop.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/terminal-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/process/terminal-tree-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/project-perspective.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/machine/remote.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/menu/menu.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/menu/submenu.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/notification/fail.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/notification/notification.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/notification/progress.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/notification/success.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/notification/warning.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-bottom.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-full-editor.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-left-bottom.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-left-right-bottom.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-left.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/panel/panel-selector-right.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/che-logo.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/editor/recent/recent.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/events-part-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/output-part-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/perspectives/general/WorkBench.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/part/project-explorer-part-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/preferences/PreferencesLocalizationConstants.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/processes/runtime/TableResources.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/node/icon/dockerfile.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/properties/ProjectExplorerLocalizationConstant.properties delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/shared/file.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/shared/hiddenSimpleFolder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/shared/notValidProjectFolder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/shared/projectFolder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/project/shared/simpleFolder.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/projectimport/ImporterPage.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/projecttype/wizard/Wizard.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/projecttype/wizard/categoriespage/MainPage.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/resources/selector/pathSelector.css delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/run/debug.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/run/run.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/searchMatch.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/texteditor/multi-file-icon.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/workspace/recipe.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/ide/xml/xml.svg delete mode 100644 ide/che-core-ide-app/src/main/resources/org/eclipse/che/public/activity.js delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/ActionManagerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/ConvertFolderToProjectActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/DefaultGroupTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/DownloadWsActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/FullTextSearchActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/LinkWithEditorActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/RenameItemActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/RunCommandActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/ShowReferenceActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/StartUpActionsParserTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/common/CollapseTreeActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/actions/common/ExpandTreeActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/CommandEditorProviderTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/CommandEditorTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/name/NamePageTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcherTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/explorer/CommandsExplorerPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/palette/CommandsPalettePresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/palette/ShowCommandsPaletteActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/commands/button/AbstractMenuItemTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/commands/button/CommandItemTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonItemsProviderTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/commands/button/MachineItemTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/type/custom/CustomCommandTypeTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/command/type/custom/CustomPagePresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/console/BaseOutputCustomizerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/console/CPPOutputCustomizerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/console/CSharpOutputCustomizerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/console/CompoundOutputCustomizerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/console/JavaOutputCustomizerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/devmode/DevModeOffActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/devmode/DevModeSetUpActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/devmode/GWTDevModeTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/AbstractEditorMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileBaseNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentFilePathMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileRelativePathMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectTypeMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizerImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronizationImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/keybinding/KeyBindingManagerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/macro/WorkspaceNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/navigation/NavigateToFilePresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/newresource/AbstractNewResourceActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/newresource/NewFolderActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/notification/NotificationManagerImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/PartStackPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/PartStackViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/TestFocusManager.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/editor/EditorPartStackPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/AbstractExplorerMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileBaseNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileParentPathMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFilePathMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileRelativePathMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectNameMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectTypeMacroTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/synchronize/ChangeLocationWidgetTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/explorer/project/synchronize/ProjectConfigSynchronizedTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspectivePersistenceTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspectiveTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveManagerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/perspectives/project/ProjectPerspectiveTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidgetTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidgetTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/processes/NewTerminalActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/processes/runtime/ContextBasedRuntimeInfoProviderTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/project/ProjectServiceClientTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ImportWizardTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImportOutputJsonRpcNotifierTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/zip/ZipImporterPagePresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projecttype/BlankProjectWizardRegistrarTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projecttype/wizard/PreSelectedProjectTypeManagerImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projecttype/wizard/ProjectWizardTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/reference/ShowReferencePresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/search/FullTextSearchPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/search/presentation/FindResultPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/search/selectpath/SelectPathPresenterTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/selection/TestSelectionAgent.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/statepersistance/AppStateManagerTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/terminal/TerminalViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/upload/file/UploadFileViewImplTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/StopWorkspaceActionTest.java delete mode 100644 ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/workspace/WorkspacePresenterPersistenceTest.java delete mode 100644 ide/che-core-ide-generators/pom.xml delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/DtoFactoryVisitorRegistryGenerator.java delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/ExtensionManagerGenerator.java delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/ExtensionRegistryGenerator.java delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/GeneratorUtils.java delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/IDEInjectorGenerator.java delete mode 100644 ide/che-core-ide-generators/src/main/java/org/eclipse/che/util/IgnoreUnExistedResourcesReflectionConfigurationBuilder.java delete mode 100644 ide/che-core-ide-generators/src/test/java/org/eclipse/che/util/TestExtensionManagerGenerator.java delete mode 100644 ide/che-core-ide-generators/src/test/java/org/eclipse/che/util/TestGeneratorUtils.java delete mode 100644 ide/che-core-ide-generators/src/test/resources/logback-test.xml delete mode 100644 ide/che-core-ide-stacks/pom.xml delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-android.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-apache-camel.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-blank.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-ceylon.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-che.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-che7.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-cpp.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-dotnet.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-go.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-hadoop.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-java-mysql.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-java.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-node.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-php.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-python.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-ruby.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-spring-boot.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-theia.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks-images/type-zend.svg delete mode 100644 ide/che-core-ide-stacks/src/main/resources/stacks.json delete mode 100644 ide/che-core-ide-templates/pom.xml delete mode 100644 ide/che-core-ide-templates/src/main/resources/samples.json delete mode 100644 ide/che-core-ide-ui/pom.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/Constants.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/ElementWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/Resources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/ShiftableTextArea.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/SplitterFancyUtil.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/Styles.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/TextBox.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/UILocalizationConstant.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ButtonAlignment.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ButtonResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ConsoleButton.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ConsoleButtonFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ConsoleButtonImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ConsoleButtonImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/buttonLoader/ButtonLoaderResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/cellview/CellTableResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/cellview/CellTreeResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/cellview/DataGridResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/CancelCallback.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/DialogFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/askcredentials/AskCredentialsDialog.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialog.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogFooter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogFooter.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/choice/ChoiceDialogViewImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmCallback.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialog.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogFooter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogFooter.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogViewImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputCallback.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialog.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogFooter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogFooter.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputValidator.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialog.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogFooter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogFooter.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogViewImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/BaseListItem.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownList.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownList.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownListItem.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownListItemRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownListResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/DropdownMenu.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dropdown/StringItemRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/list/CategoriesList.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/list/Category.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/list/CategoryNodeElement.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/list/CategoryRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/menubutton/ActionHandler.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/menubutton/ItemsList.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/menubutton/ItemsProvider.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/menubutton/MenuButton.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/menubutton/MenuItem.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/SubPanel.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/SubPanelFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/WidgetToShow.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/actions/ClosePaneAction.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/actions/RemoveAllWidgetsInPaneAction.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/actions/SplitHorizontallyAction.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/actions/SplitVerticallyAction.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/Menu.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuItem.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuItemActionWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuItemActionWidget.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuItemWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuItemWidget.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/menu/MenuWidget.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/ActiveTabClosedHandler.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/tab/Tab.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/tab/TabItemFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/tab/TabWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/tab/TabWidget.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/popup/PopupKeyDownListener.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/popup/PopupResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/popup/PopupWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/radiobuttongroup/RadioButtonGroup.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/DefaultGoInto.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/GoInto.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/KeyboardNavigationHandler.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/NodeDescriptor.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/NodeLoader.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/NodeStorage.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/NodeUniqueKeyProvider.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/SelectionModel.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/SortDir.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/SpeedSearch.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/SpeedSearchRender.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/Tree.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/TreeStyles.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/TreeView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/UniqueKeyProvider.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/compare/NameComparator.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/converter/NodeConverter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/converter/impl/NodeNameConverter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/AbstractTreeNode.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/HasAction.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/HasAttributes.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/HasDataObject.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/MutableNode.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/Node.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/NodeInterceptor.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/TreeExpander.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/settings/HasSettings.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/settings/NodeSettings.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/settings/SettingsProvider.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/data/settings/impl/DummySettingsProvider.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/BeforeCollapseNodeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/BeforeExpandNodeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/BeforeLoadEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/BlurEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/CancellableEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/CollapseNodeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/ExpandNodeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/FocusEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/GoIntoStateEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/LoadEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/LoadExceptionEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/LoaderHandler.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/NodeAddedEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/PostLoadEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/SelectionChangedEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreAddEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreClearEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreDataChangeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreHandlers.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreRecordChangeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreRemoveEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreSortEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/StoreUpdateEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/event/internal/NativeTreeEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/handler/GroupingHandlerRegistration.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/AbstractPresentationNode.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/AbstractPresentationRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/DefaultPresentationRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/HasNewPresentation.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/HasPresentation.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/NewNodePresentation.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/NodePresentation.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/PresentationRenderer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/StyleConfigurator.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/TextAttribute.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/status/ComponentWithEmptyStatus.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/status/EmptyStatus.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/status/StatusText.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/status/StatusWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/switcher/Switcher.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ActionButton.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ActionPopupButton.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/CloseMenuHandler.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/MainToolbar.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/MenuLockLayer.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/PopupMenu.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/PresentationFactory.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ToolbarPresenter.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ToolbarResources.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ToolbarView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/ToolbarViewImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/Utils.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/tooltip/TooltipWidget.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/tooltip/TooltipWidgetImpl.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/tooltip/TooltipWidgetImpl.ui.xml delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/CompositeWindowView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/Window.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/WindowClientBundle.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/WindowManager.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/WindowView.java delete mode 100644 ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/event/WindowOpenedEvent.java delete mode 100644 ide/che-core-ide-ui/src/main/module.gwt.xml delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/css/font-awesome.min.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/FontAwesome.otf delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/fontawesome-webfont.eot delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/fontawesome-webfont.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/fontawesome-webfont.woff delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/public/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2 delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/Styles.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/button/button.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/buttonLoader/buttonLoader.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/buttonLoader/loader.png delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/cellview/cellTable.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/cellview/cellTree.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/cellview/dataGrid.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/constants.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/dropdown/expansionIcon.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/dropdown/styles.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/list/CategoriesList.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/list/arrowExpansionIcon.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/logo/che-logo.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/logo/water-mark-logo.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/menubutton/arrowIcon.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/menubutton/button.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/multisplitpanel/menu/multi-file-icon.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/multisplitpanel/menu/style.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/popup/popup.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/radiobuttongroup/radio-button-group.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/smartTree/TreeStyles.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/smartTree/iconCollapsed.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/smartTree/iconExpanded.svg delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/switcher/switcher.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/toolbar/popup-menu.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/toolbar/toolbar.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/window/CompositeWindowView.css delete mode 100644 ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/window/close-icon.svg delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/button/ConsoleButtonImplTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/BaseTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogFooterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogPresenterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/confirm/ConfirmDialogViewTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogFooterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogFooterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogPresenterTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/dialogs/message/MessageDialogViewTest.java delete mode 100644 ide/che-core-ide-ui/src/test/java/org/eclipse/che/ide/ui/tooltip/TooltipWidgetImplTest.java delete mode 100644 ide/che-core-orion-editor/pom.xml delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/Action.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/ContentAssistWidget.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/ContentAssistWidgetFactory.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/EditorInitializePromiseHolder.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/KeyMode.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/KeyModeInstances.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/KeymodeDisplayConstants.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionAnnotationSeverityProvider.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionBreakpointRuler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionContentTypeRegistrant.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionCursorModel.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionDocument.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorBuilder.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorExtension.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorInit.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorPresenter.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorWidget.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorWidget.ui.xml delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEventConstants.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionHoverHandler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionHoverRegistrant.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionLineStyler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionOccurrencesHandler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionOccurrencesRegistrant.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionResource.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionSettingsController.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionUndoRedo.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionVcsChangeMarkersRuler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/TemporaryKeyBindingsManager.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/WordDetectionUtil.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/events/HasScrollHandlers.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/events/ScrollEvent.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/events/ScrollHandler.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/incremental/find/IncrementalFindReportStatusObserver.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/inject/JavaHighlightingOrionPlugin.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/inject/OrionCodeEditWidgetProvider.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/inject/OrionEditorGinModule.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/inject/OrionEditorOptionsOverlayProvider.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/inject/OrionPlugin.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/AnnotationStylerOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/MarkedOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/ModelChangedEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAnnotationIteratorOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAnnotationModelOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAnnotationOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAnnotationTypeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAnnotationsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionAttributesOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionCodeEditWidgetOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionContentAssistOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionContentTypeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionEditorOptionsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionEditorOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionEditorViewOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionEventTargetOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionExtRulerOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionFindIteratorOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionFindOptionsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionHighlightingConfigurationOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionHoverContextOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionHoverOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionInputChangedEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyBindingModule.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyBindingOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyBindingsRelationOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyModeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyStrokeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionLinkedModeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionLinkedModelDataOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionLinkedModelGroupOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionLinkedModelOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionLinkedModelPositionOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionModelChangedEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionOccurrenceContextOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionOccurrenceOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionPixelPositionOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionProblemOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionRulerClickEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionSelectionEventOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionSelectionOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionServiceRegistrationOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionServiceRegistryOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionStyleOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextChangeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextModelOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextThemeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextViewOptionsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextViewOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextViewShowOptionsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionUndoStackOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionUndoStackSizeOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/StatusMessageReporterOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/UiUtilsOverlay.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/menu/EditorContextMenu.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/signature/SignatureWidget.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/signature/SignatureWidgetFactory.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/status/message/StatusMessage.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/status/message/StatusMessageObserver.java delete mode 100644 ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/status/message/StatusMessageReporter.java delete mode 100644 ide/che-core-orion-editor/src/main/module.gwt.xml delete mode 100644 ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/incremental-find-container.css delete mode 100644 ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/client/orion-codenvy-theme.css delete mode 100644 ide/che-core-orion-editor/src/main/resources/org/eclipse/che/ide/editor/orion/public/orion-codenvy-theme.css delete mode 100644 ide/che-ide-core/pom.xml delete mode 100644 ide/che-ide-full/pom.xml delete mode 100644 ide/che-ide-gwt-app/pom.xml delete mode 100644 ide/commons-gwt/pom.xml delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/WebWorker.gwt.xml delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/AbstractWorker.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/DedicatedWorkerEntryPoint.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/DedicatedWorkerGlobalScope.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/ErrorEvent.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/ErrorHandler.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/MessageEvent.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/MessageHandler.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/MessagePort.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/Worker.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/WorkerGlobalScope.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/WorkerLocation.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/messages/Message.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/messages/MessageFilter.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/messages/MessageImpl.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/client/messages/SerializationIndex.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/linker/DedicatedWorkerLinker.java delete mode 100644 ide/commons-gwt/src/main/java/com/google/gwt/webworker/linker/DedicatedWorkerTemplate.js delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/async/Delayer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/async/Task.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/async/ThrottledDelayer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/async/Throttler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/BiFunction.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/BiOperation.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/Function.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/FunctionException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/Operation.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/OperationException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/Promise.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/PromiseError.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/PromiseProvider.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/Thenable.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/callback/AsyncPromiseHelper.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/callback/CallbackPromiseHelper.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/Executor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/JsPromise.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/JsPromiseError.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/JsPromiseProvider.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/Promises.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/RejectFunction.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/api/promises/client/js/ResolveFunction.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/CommandLine.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/DelayedTask.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/FontAwesome.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/MimeType.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/QueryParameters.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/Array.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/ArrayIterator.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/Collections.gwt.xml delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/Jso.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/JsonObject.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/ListHelper.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/StringMap.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/js/JsoArray.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/collections/js/JsoStringMap.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/GwtXmlUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/ParsingResponseException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/exception/JobNotFoundException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/exception/ServerDisconnectedException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/exception/ServerException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/exception/UnauthorizedException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/commons/exception/UnmarshallerException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/ClientDtoFactoryVisitor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/DtoFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/DtoFactoryVisitor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/DtoGen.gwt.xml delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/DtoProvider.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/dto/JsonSerializable.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/filters/FuzzyMatches.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/filters/Match.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/filters/Matcher.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/json/JsonHelper.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ClientSideRequestProcessor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ClientSideTimeoutActionRunner.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ElementalJsonRpcComposer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ElementalJsonRpcMarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ElementalJsonRpcQualifier.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/ElementalJsonRpcUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcErrorUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcInitializer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/jsonrpc/WebSocketJsonRpcInitializer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/mvp/CompositeView.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/mvp/HasView.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/mvp/ShowableComponent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/mvp/UiComponent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/mvp/View.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/resource/Path.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/AsyncRequest.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/AsyncRequestCallback.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/AsyncRequestFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/AsyncRequestLoader.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/DtoUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/DtoUnmarshallerFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/HTTPHeader.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/HTTPMethod.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/HTTPStatus.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/LocationUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/Marshallable.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/RequestStatusHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/StringMapListUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/StringMapUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/StringUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/Unmarshallable.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/UrlBuilder.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/Assert.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/AssertionFailedException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/CoreException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/IStatus.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/OperationCanceledException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/Runtime.gwt.xml delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/runtime/Status.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/DialogBoxResources.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/ElementView.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/Popup.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/Tooltip.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/list/FilterableSimpleList.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/list/HasSelection.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/list/SimpleList.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomComboBox.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomListBox.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomListBoxResources.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/DownloadWorkspaceOutputEvent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoader.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.ui.xml delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/request/LoaderFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/request/MessageLoader.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/request/MessageLoaderResources.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/menu/AutoHideComponent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/menu/AutoHideController.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/menu/AutoHideView.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/menu/PositionController.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/BaseNodeRenderer.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/NodeDataAdapter.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/NodeRenderer.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/SelectionModel.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/Tree.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/TreeNodeElement.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/TreeNodeLabelRenamer.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/tree/TreeNodeMutator.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/zeroclipboard/ClipboardButtonBuilder.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/zeroclipboard/ClipboardButtonBuilderImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/zeroclipboard/ClipboardConstant.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/zeroclipboard/ClipboardResources.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/AbstractTrie.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/AnimationController.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/AnimationUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Arrays.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Base64.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Box.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Bytes.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/ClipboardUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/CssUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/ExceptionUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Function.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/HoverController.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/ImageResourceUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/ListenerManager.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/ListenerRegistrar.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/MathUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/NameUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/Pair.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/PathEncoder.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/PrefixIndex.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/RegExpUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/RelativeClientRect.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/RequestPromise.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/SortedList.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/StringUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/TextUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/TrieNode.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/UIUtil.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/UUID.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/UnicodeUtils.java delete mode 100755 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/browser/BrowserUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/browser/QuirksConstants.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/browser/UserAgent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/browser/UserAgentRuntimeProperties.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/browser/UserAgentStaticProperties.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/CaptureReleaser.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/DomUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/Elements.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/FontDimensionsCalculator.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/MouseCaptureListener.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/MouseEventCapture.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/MouseGestureListener.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/MouseMovePauseDetector.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/dom/ScrollbarSizeCalculator.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/AsyncRunner.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/BasicIncrementalScheduler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/DeferredCommandExecutor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/Executor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/IncrementalScheduler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/ScheduledCommandExecutor.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/executor/UserActivityManager.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/CharCodeWithModifiers.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/KeyCodeMap.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/KeyMapUtil.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/MackeyMapUtil.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/ModifierKeys.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/SignalEvent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/SignalEventImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/SignalEventUtils.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/input/SignalKeyLogic.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/loging/BrowserLogger.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/loging/DummyLogger.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/loging/Log.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/loging/LogConfig.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/loging/Logger.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/BrowserLocalStorageImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/BrowserLocalStorageProviderImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/DummyLocalStorageImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/DummyLocalStorageProviderImpl.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/LocalStorage.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/util/storage/LocalStorageProvider.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/Message.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/WebSocket.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/ConnectionClosedHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/ConnectionErrorHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/ConnectionOpenedHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/MessageReceivedEvent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/MessageReceivedHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/events/WebSocketClosedEvent.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/BasicWebSocketEndpoint.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/BasicWebSocketMessageTransmitter.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/DelayableWebSocketConnection.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/MessagesReSender.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/UrlResolver.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketActionManager.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketConnection.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketConnectionManager.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketConnectionSustainer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketDispatcher.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketEndpoint.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketFactory.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketInitializer.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketJsoWrapper.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/impl/WebSocketPropertyManager.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/rest/DtoUnmarshaller.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/rest/Pair.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/rest/Unmarshallable.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/ide/websocket/rest/exceptions/ServerException.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/providers/DynaObject.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/providers/DynaProvider.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/ModuleHolder.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/RequireJsLoader.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/Requirejs.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/RequirejsCallback.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/RequirejsErrorHandler.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/RequirejsModule.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/AssocitativeJsObject.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/BundlesConfigProperty.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/ConfigConfigProperty.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/ConfigItem.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/MapConfigProperty.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/MapItem.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/PathsConfigProperty.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/RequirejsConfig.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/ShimConfigProperty.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/requirejs/conf/ShimItem.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/security/oauth/JsOAuthWindow.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/security/oauth/OAuthCallback.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/security/oauth/OAuthStatus.java delete mode 100644 ide/commons-gwt/src/main/java/org/eclipse/che/security/oauth/SecurityTokenProvider.java delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/Requirejs.gwt.xml delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/api/promises/Promises.gwt.xml delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/Commons.gwt.xml delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/Util.gwt.xml delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/DialogBox.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/Popup.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/Tooltip.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/list/SimpleList.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/listbox/ListBox.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/listbox/arrow.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.properties delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/Loader.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/arrow.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/done.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/error.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/expansionIcon.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/initialization/loaderIcon.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/request/RequestLoader.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/request/progress.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/tree/FileTreeSection.css delete mode 100755 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/tree/Tree.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/tree/collapsedIcon.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/tree/expandedIcon.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/zeroclipboard/Clipboard.css delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/zeroclipboard/ClipboardConstant.properties delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/zeroclipboard/clipboard.svg delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/providers/Providers.gwt.xml delete mode 100644 ide/commons-gwt/src/main/resources/org/eclipse/che/security/OAuth.gwt.xml delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/client/promises/ExecutorPromiseMocker.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/client/promises/FunctionAnswer.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/client/promises/MockitoPrinter.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/client/promises/PromiseMocker.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/jsonrpc/JsonRpcErrorTransmitterTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/jsonrpc/WebSocketJsonRpcInitializerTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/resource/PathTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/ArraysTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/BytesTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/NameUtilsTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/RequestPromiseTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/TextUtilsTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/util/UUIDTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/BasicWebSocketEndpointTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/BasicWebSocketMessageTransmitterTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/MessagesReSenderTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/UrlResolverTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/WebSocketConnectionManagerTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/WebSocketConnectionSustainerTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/WebSocketDispatcherTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/WebSocketInitializerTest.java delete mode 100644 ide/commons-gwt/src/test/java/org/eclipse/che/ide/websocket/impl/WebSocketPropertyManagerTest.java delete mode 100644 ide/gwt-logger/pom.xml delete mode 100644 ide/gwt-logger/src/main/java/org/eclipse/che/ide/logger/slf4j/gwtbackend/GWTLoggerFactory.java delete mode 100644 ide/gwt-logger/src/main/java/org/eclipse/che/ide/logger/slf4j/gwtbackend/GwtLoggerSlf4jBackend.java delete mode 100644 ide/gwt-logger/src/main/module.gwt.xml delete mode 100644 ide/gwt-logger/src/main/super/org/slf4j/LoggerFactory.java delete mode 100644 ide/gwt-logger/src/main/super/org/slf4j/helpers/NamedLoggerBase.java delete mode 100644 ide/gwt-logger/src/main/super/org/slf4j/helpers/Util.java delete mode 100644 ide/pom.xml delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/pom.xml delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/Keycloak.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/KeycloakAsyncRequest.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/KeycloakAsyncRequestFactory.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/KeycloakProvider.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/KeycloakSecurityTokenProvider.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/inject/KeycloakAuthGinModule.java delete mode 100644 multiuser/keycloak/che-multiuser-keycloak-ide/src/main/module.gwt.xml delete mode 100644 multiuser/machine-auth/che-multiuser-machine-authentication-ide/pom.xml delete mode 100644 multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/java/org/eclipse/che/multiuser/machine/authentication/ide/MachineAsyncRequest.java delete mode 100644 multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/java/org/eclipse/che/multiuser/machine/authentication/ide/MachineAsyncRequestFactory.java delete mode 100644 multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/module.gwt.xml delete mode 100644 plugins/README.md delete mode 100644 plugins/plugin-camel/che-plugin-camel-server/pom.xml delete mode 100644 plugins/plugin-camel/che-plugin-camel-server/src/main/java/org/eclipse/che/plugin/camel/server/inject/CamelModule.java delete mode 100644 plugins/plugin-camel/che-plugin-camel-server/src/main/java/org/eclipse/che/plugin/camel/server/languageserver/CamelLanguageServerConfig.java delete mode 100644 plugins/plugin-camel/pom.xml delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/pom.xml delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonExtension.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLocalizationConstant.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonResources.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/action/CreateCeylonFileAction.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/inject/CeylonGinModule.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/project/CeylonProjectWizardRegistrar.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/json/highlighting.json delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/svg/ceylon.svg delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/pom.xml delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/inject/CeylonModule.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CeylonProjectType.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CreateCeylonProjectHandler.java delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.jar delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.properties delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/config delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/ide-config delete mode 100755 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb delete mode 100755 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb.bat delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/source/run.ceylon delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/pom.xml delete mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/src/main/java/org/eclipse/che/plugin/ceylon/shared/Constants.java delete mode 100644 plugins/plugin-ceylon/pom.xml delete mode 100644 plugins/plugin-clangd/che-plugin-clangd-lang-server/pom.xml delete mode 100644 plugins/plugin-clangd/che-plugin-clangd-lang-server/src/main/java/org/eclipse/plugin/clangd/inject/ClangModule.java delete mode 100644 plugins/plugin-clangd/che-plugin-clangd-lang-server/src/main/java/org/eclipse/plugin/clangd/languageserver/ClangDLanguageServerConfig.java delete mode 100644 plugins/plugin-clangd/pom.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/pom.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/ComposerExtension.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/ComposerJsonRpcHandler.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/ComposerLocalizationConstant.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/communication/ComposerOutputHandler.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/inject/ComposerGinModule.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/project/ComposerPagePresenter.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/project/ComposerPageView.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/project/ComposerPageViewImpl.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/project/ComposerPageViewImpl.ui.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/java/org/eclipse/che/plugin/composer/ide/project/ComposerProjectWizardRegistrar.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-ide/src/main/resources/org/eclipse/che/plugin/composer/ide/ComposerLocalizationConstant.properties delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/pom.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/ComposerModule.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/executor/ComposerCommandExecutor.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/executor/ComposerJsonRpcMessenger.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/executor/ComposerOutputImpl.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/projecttype/ComposerProjectGenerator.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/projecttype/ComposerProjectInitializer.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/projecttype/ComposerProjectType.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-server/src/main/java/org/eclipse/che/plugin/composer/server/projecttype/ComposerValueProviderFactory.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-shared/pom.xml delete mode 100644 plugins/plugin-composer/che-plugin-composer-shared/src/main/java/org/eclipse/che/plugin/composer/shared/Constants.java delete mode 100644 plugins/plugin-composer/che-plugin-composer-shared/src/main/java/org/eclipse/che/plugin/composer/shared/dto/ComposerOutput.java delete mode 100644 plugins/plugin-composer/pom.xml delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/pom.xml delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/CppExtension.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/CppLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/CppLocalizationConstant.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/CppResources.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/action/CreateCSourceFileAction.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/action/CreateCppSourceFileAction.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/action/CreateHeaderSourceFileAction.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/action/NewClikeResourceAction.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/inject/CppGinModule.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/project/CProjectWizardRegistrar.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/java/org/eclipse/che/plugin/cpp/ide/project/CppProjectWizardRegistrar.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/resources/org/eclipse/che/plugin/cpp/ide/CppLocalizationConstant.properties delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/resources/org/eclipse/che/plugin/cpp/ide/svg/c_file.svg delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/resources/org/eclipse/che/plugin/cpp/ide/svg/c_header_file.svg delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/resources/org/eclipse/che/plugin/cpp/ide/svg/category.svg delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-ide/src/main/resources/org/eclipse/che/plugin/cpp/ide/svg/cpp_file.svg delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/pom.xml delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/java/org/eclipse/che/plugin/cpp/generator/CProjectGenerator.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/java/org/eclipse/che/plugin/cpp/generator/CppProjectGenerator.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/java/org/eclipse/che/plugin/cpp/inject/CppModule.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/java/org/eclipse/che/plugin/cpp/projecttype/CProjectType.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/java/org/eclipse/che/plugin/cpp/projecttype/CppProjectType.java delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/resources/files/default_c_content delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-server/src/main/resources/files/default_cpp_content delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-shared/pom.xml delete mode 100644 plugins/plugin-cpp/che-plugin-cpp-lang-shared/src/main/java/org/eclipse/che/plugin/cpp/shared/Constants.java delete mode 100644 plugins/plugin-cpp/pom.xml delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/pom.xml delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/CSharpExtension.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/CSharpLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/CSharpLocalizationConstant.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/CSharpResources.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/action/CreateCSharpSourceFileAction.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/action/NewCSharplikeResourceAction.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/inject/CSharpGinModule.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/java/org/eclipse/che/plugin/csharp/ide/project/CSharpProjectWizardRegistrar.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/resources/org/eclipse/che/plugin/csharp/ide/svg/category.svg delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-ide/src/main/resources/org/eclipse/che/plugin/csharp/ide/svg/csharp_file.svg delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/src/main/java/org/eclipse/che/plugin/csharp/inject/CSharpModule.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/src/main/java/org/eclipse/che/plugin/csharp/languageserver/CSharpLanguageServerConfig.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/src/main/java/org/eclipse/che/plugin/csharp/projecttype/CSharpProjectType.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/src/main/java/org/eclipse/che/plugin/csharp/projecttype/CreateNetCoreProjectHandler.java delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-server/src/main/resources/project.json.default delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-shared/pom.xml delete mode 100644 plugins/plugin-csharp/che-plugin-csharp-lang-shared/src/main/java/org/eclipse/che/plugin/csharp/shared/Constants.java delete mode 100644 plugins/plugin-csharp/pom.xml delete mode 100644 plugins/plugin-dashboard/README.md delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/pom.xml delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardExtension.java delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.java delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/DashboardResources.java delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/java/org/eclipse/che/ide/ext/dashboard/client/RedirectToDashboardAction.java delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/Dashboard.css delete mode 100644 plugins/plugin-dashboard/che-plugin-ext-dashboard/src/main/resources/org/eclipse/che/ide/ext/dashboard/client/DashboardLocalizationConstant.properties delete mode 100644 plugins/plugin-dashboard/pom.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/pom.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/DebuggerExtension.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/DebuggerLocalizationConstant.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/DebuggerResources.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/AddWatchExpressionAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DebugAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DebuggerDisplayingModeAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DeleteAllBreakpointsAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DeleteBreakpointAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DisableBreakpointAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/DisconnectDebuggerAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/EditConfigurationsAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/EditDebugVariableAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/EnableBreakpointAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/EvaluateExpressionAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/RemoveWatchExpressionAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/ResumeExecutionAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/RunToCursorAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/ShowHideDebuggerPanelAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/StepIntoAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/StepOutAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/StepOverAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/actions/SuspendAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationActionFactory.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationTypeRegistry.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationsGroup.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationsManagerImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/EditConfigurationsResources.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/EditDebugConfigurationsPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/EditDebugConfigurationsView.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/EditDebugConfigurationsViewImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/EditDebugConfigurationsViewImpl.ui.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/configuration/dto/DebugConfigurationDto.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/AbstractDebugger.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/BreakpointItemRender.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerLocationHandler.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerLocationHandlerManager.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerToolbar.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerView.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerViewImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerViewImpl.ui.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerWatchToolBar.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/FileResourceLocationHandler.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/FrameItemRender.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointActionGroup.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointConfigurationAction.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointConfigurationPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointConfigurationView.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointConfigurationViewImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointConfigurationViewImpl.ui.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointContextMenu.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/breakpoint/BreakpointContextMenuFactory.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/DebuggerDialogFactory.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/changevalue/ChangeValuePresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/common/TextAreaDialogView.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/common/TextAreaDialogViewImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/common/TextAreaDialogViewImpl.ui.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/watch/expression/add/AddWatchExpressionPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/watch/expression/edit/EditWatchExpressionPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/expression/EvaluateExpressionPresenter.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/expression/EvaluateExpressionView.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/expression/EvaluateExpressionViewImpl.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/expression/EvaluateExpressionViewImpl.ui.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/AbstractDebuggerNode.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/DebuggerNodeFactory.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/VariableNode.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/WatchExpressionNode.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/comparator/DebugNodeTypeComparator.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/comparator/VariableNodeComparator.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/tree/node/key/DebugNodeUniqueKeyProvider.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/inject/DebuggerGinModule.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/DebuggerLocalizationConstant.properties delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/add-watch-expression-button.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/breakpoint.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/configuration/add-configuration-button.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/configuration/duplicate-configuration-button.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/configuration/editConfigurations.css delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/configuration/find-icon.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/configuration/remove-configuration-button.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/connect.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/debug-icon.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/debug.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/debug/Debug.css delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/debugger.css delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/disconnect.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/edit.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/evaluate.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/remove-watch-expression-button.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/remove.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/resume.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/runtocursor.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/separator.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/stepinto.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/stepout.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/stepover.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/main/resources/org/eclipse/che/plugin/debugger/ide/watch-expression-icon.svg delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/BaseTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/EvaluateExpressionTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/actions/DebugActionTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationActionTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationsGroupTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/configuration/DebugConfigurationsManagerImplTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerPresenterTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/java/org/eclipse/che/plugin/debugger/ide/debug/dialogs/changevalue/ChangeValuePresenterTest.java delete mode 100644 plugins/plugin-debugger/che-plugin-debugger-ide/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-debugger/pom.xml delete mode 100644 plugins/plugin-gdb/.gitignore delete mode 100644 plugins/plugin-gdb/README.md delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/pom.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/GdbDebugger.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/GdbExtension.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/GdbGinModule.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/GdbLocalizationConstant.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/GdbResources.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationPagePresenter.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationPageView.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationPageViewImpl.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationPageViewImpl.ui.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationType.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/resources/org/eclipse/che/plugin/gdb/ide/GdbLocalizationConstant.properties delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/main/resources/org/eclipse/che/plugin/gdb/ide/configuration/gdb-configuration-type.svg delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/test/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationPagePresenterTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/test/java/org/eclipse/che/plugin/gdb/ide/configuration/GdbConfigurationTypeTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-ide/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/pom.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/Gdb.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/GdbDebugger.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/GdbDebuggerFactory.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/GdbDebuggerModule.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/GdbProcess.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/exception/GdbException.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/exception/GdbParseException.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/exception/GdbTerminatedException.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbBacktrace.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbBreak.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbClear.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbContinue.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbDelete.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbDirectory.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbFile.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoArgs.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoBreak.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoLine.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoLocals.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoProgram.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbOutput.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbPType.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbPrint.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbRun.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbTargetRemote.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbVersion.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/ProcessInfo.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/GdbDebuggerTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/GdbTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbBacktraceTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbBreakTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbClearTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbDeleteTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbDirectoryTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbFileTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoArgsTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoBreakTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoLineTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoLocalsTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbInfoProgramTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbPTypeTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbPrintTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbRunTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbTargetRemoteTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/GdbVersionTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/parser/ProcessInfoTest.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/java/org/eclipse/che/plugin/gdb/server/util/GdbDebuggerUtils.java delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/GdbDebuggerTestsSuite.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/docker/assembly.xml delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/docker/entrypoint.sh delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/h.cpp delete mode 100755 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/hello delete mode 100644 plugins/plugin-gdb/che-plugin-gdb-server/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-gdb/pom.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/maven-eclipse.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/pom.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/BranchFilterByRemote.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/BranchSearcher.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/DateTimeFormatter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitAuthActionPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitChangeMarkerRendererFactory.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitEventSubscribable.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitEventsHandler.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitEventsSubscriber.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitExtension.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitLocalizationConstant.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitNotificationsSubscriber.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitResources.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitServiceClient.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitServiceClientImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/GitUtil.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/AddToIndexAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/CheckoutReferenceAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/CommitAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/CompareWithBranchAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/CompareWithLatestAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/CompareWithRevisionAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/DeleteRepositoryAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/FetchAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/GitAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/HistoryAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/InitRepositoryAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/NextDiffAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/PreviousDiffAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/PullAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/PushAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/RemoveFromIndexAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ResetFilesAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ResetToCommitAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/RevertCommitAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ShowBranchesAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ShowMergeAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ShowRemoteAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ShowStatusAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/StatusBarBranchPointer.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/ToggleGitPanelAction.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/add/AddToIndexPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/add/AddToIndexView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/add/AddToIndexViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/add/AddToIndexViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/branch/BranchPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/branch/BranchView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/branch/BranchViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/branch/BranchViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/checkout/CheckoutReferencePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/checkout/CheckoutReferenceView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/checkout/CheckoutReferenceViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/checkout/CheckoutReferenceViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/commit/CommitPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/commit/CommitView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/commit/CommitViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/commit/CommitViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/AlteredFiles.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/ComparePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/CompareView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/CompareViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/CompareViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/FileStatus.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/MutableAlteredFiles.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/branchlist/BranchListPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/branchlist/BranchListView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/branchlist/BranchListViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/branchlist/BranchListViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changeslist/ChangesListPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changeslist/ChangesListView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changeslist/ChangesListViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangedFileNode.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangedFolderNode.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangesPanelPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangesPanelView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangesPanelViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ChangesPanelViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/changespanel/ViewMode.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/revisionslist/RevisionListPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/revisionslist/RevisionListView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/revisionslist/RevisionListViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/revisionslist/RevisionListViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/selectablechangespanel/CheckBoxRender.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/selectablechangespanel/SelectableChangesPanelPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/selectablechangespanel/SelectableChangesPanelView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/selectablechangespanel/SelectableChangesPanelViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/compare/selectablechangespanel/SelectionCallBack.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/delete/DeleteRepositoryPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/fetch/FetchPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/fetch/FetchView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/fetch/FetchViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/fetch/FetchViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/importer/GitImportWizardRegistrar.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPagePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPageView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPageViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPageViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/init/InitRepositoryPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/inject/GitGinModule.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/MergePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/MergeView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/MergeViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/MergeViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/Reference.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/ReferenceTreeNodeDataAdapter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/merge/ReferenceTreeNodeRenderer.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputConsole.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputConsoleFactory.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputConsolePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputPartView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputPartViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/outputconsole/GitOutputPartViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/GitPanelPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/GitPanelView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/GitPanelViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/GitPanelViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/RepositoryNode.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/panel/RepositoryNodeFactory.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/plugins/EditorTabsColorizer.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/plugins/GitChangeMarkerManager.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/plugins/GitChangeMarkerRender.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/plugins/GitCheckoutNotifier.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/plugins/ProjectExplorerTreeColorizer.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/preference/CommitterPreferencePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/preference/CommitterPreferenceView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/preference/CommitterPreferenceViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/preference/CommitterPreferenceViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/pull/PullPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/pull/PullView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/pull/PullViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/pull/PullViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/push/PushToRemotePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/push/PushToRemoteView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/push/PushToRemoteViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/push/PushToRemoteViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/RemotePresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/RemoteView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/RemoteViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/RemoteViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/add/AddRemoteRepositoryPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/add/AddRemoteRepositoryView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/add/AddRemoteRepositoryViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remote/add/AddRemoteRepositoryViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remove/RemoveFromIndexPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remove/RemoveFromIndexView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remove/RemoveFromIndexViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/remove/RemoveFromIndexViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/commit/ResetToCommitPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/commit/ResetToCommitView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/commit/ResetToCommitViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/commit/ResetToCommitViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/files/ResetFilesPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/files/ResetFilesView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/files/ResetFilesViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/reset/files/ResetFilesViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/revert/RevertCommitPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/revert/RevertCommitView.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/revert/RevertCommitViewImpl.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/revert/RevertCommitViewImpl.ui.xml delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/status/StatusCommandPresenter.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/META-INF/NativeGitAskPassTemplate delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/META-INF/SshTemplate delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/GitLocalizationConstant.properties delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/branch/current.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/changeMarkers.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/branches.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/checkoutReference.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/clone.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/commit.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/delete-repo.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/fetch.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/git-output-icon.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/init.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/merge.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/pull.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/push.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/remote.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/remotes.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/controls/revert.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/git.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/diff_index.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/diff_prev_version.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/diff_working_dir.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/history.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/project_level.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/refresh.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/history/resource_level.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/added.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/copied.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/deleted.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/modified.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/renamed.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/icons/untracked.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPage.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/merge/Merge.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/panel/git-logo.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/panel/git.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/panel/gitPanel.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/panel/repository.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/push/arrow.svg delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/main/resources/org/eclipse/che/ide/ext/git/client/reset/commit/custom.css delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/BaseTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/BranchFilterByRemoteTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/add/AddToIndexPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/branch/BranchPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/checkout/CheckoutReferenceTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/commit/CommitPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/compare/AlteredFilesTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/fetch/FetchPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/history/HistoryPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/importer/page/GitImporterPagePresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/init/InitRepositoryPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/merge/MergePresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/patcher/JsOAuthWindowPatcher.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/patcher/JsoArrayPatcher.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/patcher/WindowPatcher.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/preference/CommitterPreferencePresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/remote/add/AddRemoteRepositoryPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/reset/files/ResetFilesPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/revert/commit/RevertCommitPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/java/org/eclipse/che/ide/ext/git/client/status/StatusCommandPresenterTest.java delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/resources/META-INF/gwt-test-utils.properties delete mode 100644 plugins/plugin-git/che-plugin-git-ext-git/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-git/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-ide/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubExtension.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubLocalizationConstant.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubResources.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubServiceClient.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubServiceClientImpl.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubSshKeyUploader.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/action/OpenOnGitHubAction.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/authenticator/GitHubAuthenticatorImpl.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/authenticator/GitHubAuthenticatorView.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/authenticator/GitHubAuthenticatorViewImpl.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/GitHubImportWizardRegistrar.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPagePresenter.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPageView.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPageViewImpl.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPageViewImpl.ui.xml delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/inject/GitHubGinModule.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/load/ProjectData.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/resources/org/eclipse/che/plugin/github/ide/GitHubLocalizationConstant.properties delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/main/resources/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPage.css delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/test/java/org/eclipse/che/plugin/github/ide/authenticator/GitHubAuthenticatorImplTest.java delete mode 100644 plugins/plugin-github/che-plugin-github-ide/src/test/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPagePresenterTest.java delete mode 100644 plugins/plugin-github/che-plugin-github-provider-github/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GitHubOAuthCredentialProvider.java delete mode 100644 plugins/plugin-github/che-plugin-github-provider-github/src/main/java/org/eclipse/che/ide/ext/git/server/github/GithubGitModule.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/GitHubContributionWorkflow.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/GitHubHostingService.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/GitHubTemplates.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/GithubStagesProvider.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/inject/GithubPullRequestGinModule.java delete mode 100644 plugins/plugin-github/che-plugin-github-pullrequest/src/main/module.gwt.xml delete mode 100644 plugins/plugin-github/che-plugin-github-server/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubDTOFactory.java delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubFactory.java delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubKeyUploader.java delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/GitHubProjectImporter.java delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/inject/GitHubModule.java delete mode 100644 plugins/plugin-github/che-plugin-github-server/src/main/java/org/eclipse/che/plugin/github/server/rest/GitHubService.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/maven-eclipse.xml delete mode 100644 plugins/plugin-github/che-plugin-github-shared/pom.xml delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/Collaborators.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubIssueComment.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubIssueCommentInput.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubKey.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubPullRequest.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubPullRequestCreationInput.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubPullRequestHead.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubPullRequestList.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubRepository.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubRepositoryList.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubUrlUtils.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/main/java/org/eclipse/che/plugin/github/shared/GitHubUser.java delete mode 100644 plugins/plugin-github/che-plugin-github-shared/src/test/java/org/eclipse/che/plugin/github/GitHUbUrlUtilsTest.java delete mode 100644 plugins/plugin-github/pom.xml delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/pom.xml delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/java/org/eclipse/che/plugin/golang/ide/GolangExtension.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/java/org/eclipse/che/plugin/golang/ide/GolangResources.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/java/org/eclipse/che/plugin/golang/ide/inject/GolangGinModule.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/java/org/eclipse/che/plugin/golang/ide/project/GolangProjectWizardRegistrar.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-ide/src/main/resources/org/eclipse/che/plugin/golang/ide/icons/go.svg delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-server/pom.xml delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-server/src/main/java/org/eclipse/che/plugin/golang/inject/GolangModule.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-server/src/main/java/org/eclipse/che/plugin/golang/languageserver/GolangLanguageServerConfig.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-server/src/main/java/org/eclipse/che/plugin/golang/projecttype/GolangProjectType.java delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-shared/pom.xml delete mode 100644 plugins/plugin-golang/che-plugin-golang-lang-shared/src/main/java/org/eclipse/che/plugin/golang/shared/Constants.java delete mode 100644 plugins/plugin-golang/pom.xml delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/pom.xml delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/GwtExtension.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/GwtGinModule.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/GwtLocalizationConstants.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/GwtResources.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandModel.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandPagePresenter.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandPageView.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandPageViewImpl.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandPageViewImpl.ui.xml delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandType.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/resources/org/eclipse/che/ide/ext/gwt/client/GwtLocalizationConstants.properties delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/main/resources/org/eclipse/che/ide/ext/gwt/client/images/gwt-command-type.svg delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/test/java/org/eclipse/che/ide/ext/gwt/client/command/GwtCommandTypeTest.java delete mode 100644 plugins/plugin-gwt/che-plugin-gwt-ext-gwt/src/test/java/org/eclipse/che/ide/ext/gwt/client/command/GwtPagePresenterTest.java delete mode 100644 plugins/plugin-gwt/pom.xml delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/pom.xml delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/AboutResources.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/BuildDetailsProvider.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/BuildInfo.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/HelpAboutExtension.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/HelpExtensionLocalizationConstant.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/RedirectToSupportAction.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/AboutLocalizationConstant.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/AboutPresenter.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/AboutView.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/AboutViewImpl.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/AboutViewImpl.ui.xml delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/ShowAboutAction.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/impl/FormattedBuildDetailsProvider.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsLocalizationConstant.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsPresenter.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsView.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsViewImpl.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsViewImpl.ui.xml delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/java/org/eclipse/che/ide/ext/help/client/inject/HelpAboutGinModule.java delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/About.css delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/HelpExtensionLocalizationConstant.properties delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/about/AboutLocalizationConstant.properties delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/about/info/BuildDetailsLocalizationConstant.properties delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/actions/about.svg delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/main/resources/org/eclipse/che/ide/ext/help/client/actions/support.svg delete mode 100644 plugins/plugin-help/che-plugin-help-ext-client/src/test/java/org/eclipse/che/ide/ext/help/client/about/impl/FormattedBuildDetailsProviderTest.java delete mode 100644 plugins/plugin-help/pom.xml delete mode 100644 plugins/plugin-java-debugger/.gitignore delete mode 100644 plugins/plugin-java-debugger/README.md delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/pom.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/JavaDebuggerExtension.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/JavaDebuggerLocalizationConstant.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/JavaDebuggerResources.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationPagePresenter.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationPageView.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationPageViewImpl.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationPageViewImpl.ui.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationType.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/debug/ExternalResourceLocationHandler.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/debug/JavaDebugger.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/java/org/eclipse/che/plugin/jdb/ide/inject/JavaRuntimeGinModule.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/resources/org/eclipse/che/plugin/jdb/ide/JavaDebuggerLocalizationConstant.properties delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/main/resources/org/eclipse/che/plugin/jdb/ide/configuration/java-debug-configuration-type.svg delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/test/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationPagePresenterTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/test/java/org/eclipse/che/plugin/jdb/ide/configuration/JavaDebugConfigurationTypeTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-ide/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/pom.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/BreakPointComparator.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/EventsCollector.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/EventsHandler.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/JavaDebugger.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/JavaDebuggerFactory.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/JavaDebuggerModule.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbArrayElement.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbField.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbFieldComparator.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbLocation.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbMethod.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbNullValue.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbStackFrame.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbType.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbValue.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/main/java/org/eclipse/che/plugin/jdb/server/model/JdbVariable.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/BreakpointConditionTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/BreakpointsByConditionTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/BreakpointsTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/EvaluateExpressionTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/GetValueTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/JavaDebuggerTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/StackFrameDumpTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/SuspendPolicyTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/ThreadDumpTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/util/JavaDebuggerTestUtils.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/util/JavaLanguageServerExtensionStub.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/java/org/eclipse/che/plugin/jdb/server/util/ProjectApiUtils.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/JavaDebuggerTestsSuite.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/docker/assembly.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/docker/entrypoint.sh delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/BreakpointsByConditionTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/BreakpointsTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/EvaluateExpressionTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/GetValueTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/HelloWorld.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/StackFrameDumpTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/SuspendPolicyTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/testclasses/ThreadDumpTest.java delete mode 100644 plugins/plugin-java-debugger/che-plugin-java-debugger-server/src/test/resources/workspace/test/.che/classpath delete mode 100644 plugins/plugin-java-debugger/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/CurrentClassFQN_Macro.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaCss.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaEditorExtension.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaExtension.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaLocalizationConstant.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaResources.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/JavaUtils.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/MavenResources.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/Resources.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/FileStructureAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/FindUsagesAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/GetEffectivePomAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/JavaEditorAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/MarkDirAsSourceAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/MarkDirectoryAsGroup.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/NewJavaSourceFileAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/NewPackageAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/OpenImplementationAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/OrganizeImportsAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/ProjectClasspathAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/ProposalAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/QuickDocumentationAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/QuickFixAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/ReimportMavenDependenciesAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/action/UnmarkDirAsSourceAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/ClasspathContainer.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandModel.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandPagePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandPageView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandPageViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandPageViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/mainclass/ClassNodeInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/mainclass/SelectNodePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/mainclass/SelectNodeView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/mainclass/SelectNodeViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/mainclass/SelectNodeViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/ClasspathMacro.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/MainClassMacro.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/OutputDirMacro.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/SourcepathMacro.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/diagnostics/PomDiagnosticsRequestor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/documentation/QuickDocPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/documentation/QuickDocumentation.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/formatter/JavaFormatterServiceClient.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/formatter/preferences/FormatterPreferencePagePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/formatter/preferences/FormatterPreferencePageView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/formatter/preferences/FormatterPreferencePageViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/formatter/preferences/FormatterPreferencePageViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/inject/FormatterGinModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/inject/JavaGinModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/inject/JavaLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/inject/factories/ProgressWidgetFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/inject/factories/PropertyWidgetFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/ElementSelectionDelegate.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructurePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructureTree.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructureView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructureView.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructureWindow.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/FileStructureWindow.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/NodeFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/filestructure/SymbolNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/openimplementation/ImplementationWidget.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/navigation/openimplementation/OpenImplementationPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/newsourcefile/JavaSourceFileType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/newsourcefile/NewJavaSourceFilePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/newsourcefile/NewJavaSourceFileView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/newsourcefile/NewJavaSourceFileViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/newsourcefile/NewJavaSourceFileViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/organizeimports/OrganizeImportsPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/organizeimports/OrganizeImportsView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/organizeimports/OrganizeImportsViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/organizeimports/OrganizeImportsViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressMessagesHandler.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressMonitorPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressMonitorView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressMonitorViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressMonitorViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/ProgressorJsonRpcHandler.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/background/BackgroundLoaderPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/background/BackgroundLoaderView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/background/BackgroundLoaderViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/background/BackgroundLoaderViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/progressor/background/ProgressMonitorAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ClasspathResolver.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathChangedEvent.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathResources.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/ProjectClasspathViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/node/NodeEntry.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/node/NodeWidget.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/node/NodeWidget.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/AbstractClasspathPagePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/ClasspathPagePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/libraries/LibEntryPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/libraries/LibEntryView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/libraries/LibEntryViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/libraries/LibEntryViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/sources/SourceEntryPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/sources/SourceEntryView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/sources/SourceEntryViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/pages/sources/SourceEntryViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/SelectNodePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/SelectNodeView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/SelectNodeViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/SelectNodeViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/interceptors/ClasspathNodeInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/interceptors/JarNodeInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/classpath/valueproviders/selectnode/interceptors/SourceFolderNodeInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/projecttree/JavaSourceFolderUtil.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/RefactorInfo.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/RefactoringActionDelegate.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/CutJavaSourceAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/MoveAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/MoveType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/RefactoredItemType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/MovePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/MoveView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/MoveViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/MoveViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/ProjectsAndPackagesModel.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/ChangePreview.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/PreviewNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/PreviewPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/PreviewView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/PreviewViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/PreviewViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/preview/StringStreamEditor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/JavaRefactoringRename.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/RenameRefactoringAction.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/EmptyOperation.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/Operation.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenamePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenameView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenameViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenameViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/reference/JavaFqnProvider.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/resource/ClassInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/resource/JavaSourceRenameValidator.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/resource/SourceFolderInterceptor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/resource/SourceFolderMarker.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/ElementNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/FindUsagesPresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/FindUsagesView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/FindUsagesViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/MatchNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/NodeFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/PackageNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/ProjectNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/search/UsagesNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/service/CustomNotificationReceiver.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/service/JavaLanguageExtensionServiceClient.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorWarningsOptions.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorWarningsView.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorWarningsViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorWarningsViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorsWarningsPreferenceManager.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/JavaCompilerPreferenceManager.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/compiler/JavaCompilerPreferencePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyNameManager.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyWidget.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyWidgetImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyWidgetImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/JavaNodeFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/JavaPackageConnector.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/LibraryNodeProvider.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/PackageNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/SourceFolderDecorator.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/TestFolderDecorator.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/library/EntryType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/library/JarFileNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/library/JarFolderNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/library/JarNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/tree/library/LibrariesNode.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/util/JavaUtil.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/util/SymbolIcons.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/module.gwt.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/JavaLocalizationConstant.properties delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/Semantic.css delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/class.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/default_field.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/default_method.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/interface.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/package.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/private_field.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/protected_field.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/public_field.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/taskmrk.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/images/template.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/add.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/correction_cast.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/correction_change.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/correction_delete_import.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/correction_rename.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/import.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/javadoc.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/jexception_obj.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/local.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/remove.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/internal/text/correction/proposals/remove_correction.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/java.css delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/maven.css delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/progressor/background/Loader.css delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/progressor/background/error.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/progressor/background/loaderIcon.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/project/classpath/PropertiesRenderer.css delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/project/classpath/remove-node-button.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/annotation_type.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/category/java.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/enum_type.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/externalLibraries.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/file-navigation.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/jarFileIcon.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/javaFile.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/jsfFile.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/jspFile.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/mark-error.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/mark-warning.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/maven-command-type.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/maven.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/openDeclaration.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/private_method.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/protected_method.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/publicMethod.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/quickDocumentation.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/searchMatch.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/sourceFolder.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/testFolder.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/ide/ext/java/client/svg/update-dependencies.svg delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/resources/org/eclipse/che/jdt/ls/extension/api/JdtlsExtension.gwt.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/JavaUtilsTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/action/OrganizeImportsActionTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/command/ClasspathContainerTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/command/JavaCommandPagePresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/ClasspathMacroTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/OutputDirMacroTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/command/valueproviders/SourcepathMacroTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/formatter/preferences/FormatterPreferencePagePresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/navigation/action/FileStructureActionTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/navigation/openimplementation/OpenImplementationPresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/refactoring/move/CutJavaSourceActionTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationPresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/similarnames/SimilarNamesConfigurationViewImplTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/resource/JavaSourceRenameValidatorTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/search/SnippetLoadingTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/settings/compiler/ErrorWarningsViewImplTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/settings/compiler/JavaCompilerPreferencePresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyNameManagerTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/settings/property/PropertyWidgetImplTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/META-INF/gwt-test-utils.properties delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/client/core/CreateJavaClassPresenter.txt delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser1.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser10.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser11.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser12.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser13.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser14.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser15.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser16.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser17.rsc delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser18.rsc delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser19.rsc delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser2.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser20.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser21.rsc delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser22.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser23.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser24.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser3.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser4.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser5.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser6.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser7.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser8.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/parser9.rscjson delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/org/eclipse/che/ide/ext/java/patchers/readableNames delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/projects/testproject/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/projects/testproject/src/main/java/com/codenvy/test/MyClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/projects/testproject/src/test/java/com/codenvy/testtest/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveArrayLength.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass1.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass3.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass4.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass5.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveClass6.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveConstructor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveExplicitSuperConstructorCall.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveExplicitThisConstructorCall.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveField.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveInnerClassAsParamater.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveInterface.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass1.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass3.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass4.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass5.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass6.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalClass7.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalConstructor.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalField.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalField2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalFieldDeclaration.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalMethod.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalMethod2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveLocalName.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveMessageSendOnBaseType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolvePartiallyQualifiedType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveQualifiedType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveTypeEmptySelection.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveTypeEmptySelection2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src/ResolveTypeInComment.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0001/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0002/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0003/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0005/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0006/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0007/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0008/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0009/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0010/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0011/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0012/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0013/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0014/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0015/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0016/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0017/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0018/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0019/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0020/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0021/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0024/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/resources/workspace/resolve/src2/test0025/Test.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/main/java/org/eclipse/che/plugin/java/server/inject/JavaModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/main/java/org/eclipse/che/plugin/java/server/inject/JdtGuiceModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/main/java/org/eclipse/che/plugin/java/server/projecttype/JavaProjectType.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/main/java/org/eclipse/che/plugin/java/server/projecttype/JavaValueProviderFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/main/java/org/eclipse/che/plugin/java/server/rest/JavaFormatterService.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/java/org/eclipse/che/plugin/java/server/projecttype/JavaValueProviderFactoryTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/FormatterTest/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test12/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test14/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test15/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test16/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test17/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test18/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test19/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test20/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test21/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test22/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test24/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test25/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test26/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test27/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test28/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test29/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test30/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test31/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test32/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test33/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test34/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test35/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test35/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test36/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test37/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test38/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test39/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test40/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test41/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test41/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test42/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test42/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test43/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test43/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test44/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test44/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test45/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test45/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test46/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test46/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test47/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test47/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test6/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/test7/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testAnnotation4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testDelegate01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testDelegate01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testDelegate02/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testDelegate02/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail35/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail41/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail42/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail43/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail44/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail45/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testFail9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testGenerics01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameMethodInInterface/testGenerics01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test12/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test13/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test14/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test15/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test16/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test17/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test18/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test19/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test20/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test21/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test22/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test23/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test6/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test7/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test8/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/test9/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testAnnotation1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testAnnotation1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testAnnotation2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testAnnotation2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testBug5821/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testBug5821/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate02/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate02/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate03/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testDelegate03/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumConst/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumField/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testEnumField/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testFail9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testGenerics4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testRenameNLSAccessor01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testRenameNLSAccessor01/in/messages.properties delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testRenameNLSAccessor01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testRenameNLSAccessor01/out/messages.properties delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameNonPrivateField/testStaticImport/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test0/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test0/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test1/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test1/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test2/in/fred/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test2/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test2/out/fred/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test2/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test3/in/fred/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test3/in/r/r/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test3/out/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test3/out/r/r/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/in/Textfile.txt delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/in/r/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/out/Textfile.txt delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/out/q/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test4/out/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test5/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test5/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test6/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test6/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test7/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test7/in/r/s/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test7/out/q/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test7/out/r/s/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test8/in/java/lang/reflect/Klass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/test8/out/nonjava/Klass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail0/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail1/in/r/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail10/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail10/in/r/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail3/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail4/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail5/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail6/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail7/in/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail7/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail8/in/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail8/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail9/in/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testFail9/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/in/my/MyA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/in/my/a/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/in/my/b/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/out/your/MyA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/out/your/a/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical01/out/your/b/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical02/in/your/Y.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical03/in/my/pack/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchical03/out/your/pack/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchicalDisabledImport/in/my/pack/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testHierarchicalDisabledImport/out/your/pack/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/in/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/in/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/in/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/out/srcPrg/q/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/out/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots1/out/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/in/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/in/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/in/srcTest/p/p/TestHelper.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/in/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/in/srcTest/tests/QualifiedTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/out/srcPrg/q/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/out/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/out/srcTest/p/p/TestHelper.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/out/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots2/out/srcTest/tests/QualifiedTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots3/in/srcPrg/p/p/ToQ.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots3/in/srcTest/p/p/Ref.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots3/out/srcPrg/q/ToQ.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots3/out/srcTest/p/p/Ref.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/in/srcPrg/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/in/srcPrg/p/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/in/srcTest/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/out/srcPrg/a/b/c/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/out/srcPrg/a/b/c/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots4/out/srcTest/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots5/in/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots5/in/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots5/out/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots5/out/srcTest/q/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots6/in/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots6/in/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots6/out/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots6/out/srcTest/cheese/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/in/srcPrj.other/pack/Namesake.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/in/srcPrj.ref/pack/Referer.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/in/srcPrj.ref/pack/man/StarImporter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/in/srcPrj/pack/DingsDa.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/out/srcPrj.other/pack/Namesake.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/out/srcPrj.ref/pack/Referer.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/out/srcPrj.ref/pack/man/StarImporter.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testImportFromMultiRoots7/out/srcPrj/com/packt/DingsDa.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testPackageRenameWithResource3/in/my/pack/Textfile.txt delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testPackageRenameWithResource3/out/my/Textfile.txt delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testReadOnly/in/r/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testReadOnly/out/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStatic1/in/s1/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStatic1/in/s1/j/l/S.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStatic1/out/s1/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStatic1/out/s1/java/lang/S.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/in/srcPrg/p/p/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/in/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/in/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/out/srcPrg/q/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/out/srcTest/p/p/ATest.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testStaticMultiRoots1/out/srcTest/tests/AllTests.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testToEmptyPack/in/r/p1/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePackage/testToEmptyPack/out/fred/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test0_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test0_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test10_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test10_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test11_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test11_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test12_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test12_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test13_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test13_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test14_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test14_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test15_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test15_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test16_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test16_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test17_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test17_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test18_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test18_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test19_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test19_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test1_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test1_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test20_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test20_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test21_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test21_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test22_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test22_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test23_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test23_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test24_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test24_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test25_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test25_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test26_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test26_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test27_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test27_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test28_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test28_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test29_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test29_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test2_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test2_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test30_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test30_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test31_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test31_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test32_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test32_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test33_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test33_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test34_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test34_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test35_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test35_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test36_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test36_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test3_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test3_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test4_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test4_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test5_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test5_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test6_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test6_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test7_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test7_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test8_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test8_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test9_in.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/canRename/A_test9_out.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail0.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail1.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail10.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail11.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail12.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail13.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail14.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail15.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail16.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail17.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail18.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail19.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail20.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail21.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail3.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail4.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail5.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail6.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail7.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail8.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/A_testFail9.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameParameters/cannotRename/a.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test6/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test7/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test8/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/test9/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testFail9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testUnicode01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateField/testUnicode01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test12/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test13/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test14/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test15/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test16/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test17/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test18/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test18/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test18/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test20/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test23/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test24/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test25/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test26/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/test27/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testAnon0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testAnon0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testDelegate01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testDelegate01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenamePrivateMethod/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test10/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test10/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test11/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test11/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test6/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test7/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test8/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/test9/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testDelegate01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testDelegate01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport1/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport1/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport2/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport2/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImport5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testStaticImportFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testUnicode01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameStaticMethod/testUnicode01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testLambda3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethod2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethodReference0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTests18/testMethodReference0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test0/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test1/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test10/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test11/in/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test11/out/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test11/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test12/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test13/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test14/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test15/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test16/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test17/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test18/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test19/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test2/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test20/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test21/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test22/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test23/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test24/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test25/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test26/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test27/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test28/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test29/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test29/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test29/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test3/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test30/in/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test30/out/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test30/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test31/in/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test31/out/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test31/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test32/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test33/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test34/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test35/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test35/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test36/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test37/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test38/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test39/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test4/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test40/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test41/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test41/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test42/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test42/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test43/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test43/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test44/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test44/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test45/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test45/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test46/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test46/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test46/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test46/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test47/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test47/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test48/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test48/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test49/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test49/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test5/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test50/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test50/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test51/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test51/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test51/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test51/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test52/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test52/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test53/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test53/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test54/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test54/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test55/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test55/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/in/default/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test56/out/default/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test57/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test57/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test58/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test58/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test59/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test59/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test6/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test60/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test60/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test61/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test61/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test62/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test62/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test63/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test63/in/anotherp/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test63/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test63/out/anotherp/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test64/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test64/in/p2/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test64/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test64/out/p2/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test65/out/NewC.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test66/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test66/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test7/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test8/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/test9/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation1/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation2/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testAnnotation3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum1/in/p2/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum1/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum1/out/p2/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum2/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum3/in/Enumbered.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum3/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum3/out/Enumbered.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testEnum5/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail00/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail02/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail03/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail04/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail20/in/AA.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail21/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail22/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail23/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail23/in/Bogus.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail24/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail25/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail26/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail27/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail31/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail31/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail32/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail35/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail37/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail4/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail41/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail42/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail43/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail44/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail45/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail46/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail47/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail48/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail49/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail5/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail5/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail50/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail51/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail52/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail53/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail54/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail55/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail56/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail57/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail58/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail59/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail6/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail6/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail60/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail61/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail62/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail63/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail64/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail65/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail66/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail67/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail68/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail69/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail70/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail71/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail72/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail73/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail74/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail75/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail76/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail77/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail78/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail79/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail8/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail80/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail81/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail82/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail83/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail84/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail85/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail86/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail87/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail88/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail89/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail90/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail91/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail92/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail93/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail94/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail95/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail96/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail96/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFail96/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testFailRegression1GCRKMQ/in/Blinky.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics1/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics2/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics3/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testGenerics4/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalInnerClass/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testIllegalTypeName9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testNoOp/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName1/in/build.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName1/out/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName1/out/build.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName2/in/Transient.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName2/in/mapping.hbm.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName2/out/TransientEquipment.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testQualifiedName2/out/mapping.hbm.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements00/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements00/out/SomeClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements01/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements02/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements03/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements03/out/SomeClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements04/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements04/in/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements04/out/SomeClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements04/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements05/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements05/in/test.html delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements05/out/SomeDifferentClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements05/out/test.html delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements06/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements06/in/SomeNearlyIdenticalClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements06/out/SomeNearlyIdenticalClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements06/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements07/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements07/out/SomeDiffClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements08/in/ISomeIf.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements08/out/ISomeIf2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements09/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements09/in/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements09/out/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements09/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements10/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements10/in/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements10/out/SomeClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements10/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements11/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements11/in/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements11/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements11/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements12/in/SomeFieldClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements12/out/SomeOtherFieldClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements13/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements13/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements14/in/SomeClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements14/out/SomeOtherClass2.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements15/in/SomeClass3.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements15/out/SomeOtherClass3.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements16/in/SomeClass4.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements16/out/SomeOtherClass4.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements17/in/SomeClass6.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements18/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements18/out/SomeOtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements19/in/ThreeHunkClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements20/in/OtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements20/in/OverriddenMethodClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements20/out/OtherClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements20/out/ThirdClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements21/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements21/in/SomeClassSecond.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements21/out/SomeClassSecond.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements21/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements22/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements22/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements23/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements23/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements24/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements24/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements25/in/ScrewUp.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements25/out/ScrewDown.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements26/in/ScrewUp.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements26/out/ScrewDown.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements27/in/ScrewUp.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements27/out/ScrewDown.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements28/in/ScrewUp.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements28/out/ScrewDown.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements29/in/ScrewUp.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements29/out/ScrewDown.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements30/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements30/out/SomeNewClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements31/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements31/out/SomeDiffClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements32/in/SomeClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements33/in/Why.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements33/out/WhyNot.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements34/in/Try.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testSimilarElements34/out/Bla.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testUnicode01/in/B.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testUnicode01/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testWrongArg1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testWrongArg2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testWrongArg3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameType/testWrongArg4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test12/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test13/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test14/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test15/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test6/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test7/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test8/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/test9/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameTypeParameter/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test10/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test11/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test12/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test13/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test14/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test15/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test16/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test16/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test17/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test18/in/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test18/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test18/out/C.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test19/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test20/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test21/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test22/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test23/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test24/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test25/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test26/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test27/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test28/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test29/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test30/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test31/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test32/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test33/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test34/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test35/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test35/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test36/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test37/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test38/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test39/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/test40/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testAnon0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testAnon0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate01/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate01/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate02/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate02/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate03/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testDelegate03/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnum3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testEnumFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail10/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail11/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail12/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail13/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail14/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail15/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail17/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail18/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail19/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail20/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail21/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail22/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail23/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail24/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail25/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail26/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail27/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail28/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail29/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail30/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail31/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail32/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail33/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail34/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail36/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail37/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail38/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail39/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail40/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail41/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail6/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail7/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail8/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testFail9/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics3/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics3/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics4/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics4/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics5/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testGenerics5/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testLocal0/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testLocal0/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testVarargs1/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testVarargs1/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testVarargs2/in/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/RenameVirtualMethodInClass/testVarargs2/out/A.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/multimoduleProject/subModule/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/multimoduleProject/subModule/src/main/java/com/codenvy/sub/ClassInSubModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/multimoduleProject/test/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/multimoduleProject/test/src/main/java/com/codenvy/test/MyClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/src/main/java/org/eclipse/che/test/GenerateLink.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/src/main/java/org/eclipse/che/test/MyClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/src/main/java/org/eclipse/che/test/TestClass.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/src/main/java/p1/X.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-server/src/test/resources/projects/test/src/main/java/zzz/Z.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/ClasspathEntryKind.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/Constants.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/ContentRoot.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/Change.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/HighlightedPosition.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/LinkedData.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/LinkedModeModel.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/LinkedPositionGroup.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/Problem.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/ReconcileResult.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/Region.java delete mode 100644 plugins/plugin-java/che-plugin-java-ext-lang-shared/src/main/java/org/eclipse/che/ide/ext/java/shared/dto/refactoring/ChangePreview.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/PlainJavaLocalizationConstant.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/inject/PlainJavaGinModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/service/ClasspathUpdaterServiceClient.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/service/ClasspathUpdaterServiceClientImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaPagePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaPageView.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaPageViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaPageViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaProjectWizardRegistrar.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/selector/SelectNodePresenter.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/selector/SelectNodeView.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/selector/SelectNodeViewImpl.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/selector/SelectNodeViewImpl.ui.xml delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/java/org/eclipse/che/plugin/java/plain/client/wizard/selector/SelectionDelegate.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/resources/org/eclipse/che/plugin/java/plain/client/PlainJavaLocalizationConstant.properties delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-ide/src/main/test/org/eclipse/che/plugin/java/plain/client/wizard/PlainJavaPagePresenterTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/ProjectsListener.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/generator/PlainJavaProjectGenerator.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/inject/PlainJavaProjectModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/inject/PlainJavaProjectSourceFolderWatcher.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/projecttype/PlainJavaInitHandler.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/projecttype/PlainJavaProjectType.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/projecttype/PlainJavaValueProviderFactory.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/java/org/eclipse/che/plugin/java/plain/server/rest/ClasspathUpdaterService.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/resources/org/eclipse/che/plugin/java/plain/server/generator/Main.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/resources/org/eclipse/che/plugin/java/plain/server/generator/classpath delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/main/resources/org/eclipse/che/plugin/java/plain/server/generator/project delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/test/java/org/eclipse/che/plugin/java/plain/server/projecttype/PlainJavaValueProviderFactoryTest.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-server/src/test/resources/projects/project/src/Main.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-plain/che-plugin-java-plain-shared/src/main/java/org/eclipse/che/plugin/java/plain/shared/PlainJavaProjectConstants.java delete mode 100644 plugins/plugin-java/che-plugin-java-plain/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-server/pom.xml delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/inject/JavaModule.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/ExecuteClientCommandJsonRpcTransmitter.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLSWrapper.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLanguageClient.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLanguageServer.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLanguageServerExtensionService.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLanguageServerJsonRpcMessenger.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaLanguageServerLauncher.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/JavaTextDocumentServiceWraper.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/NotifyJsonRpcTransmitter.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/ProcessorJsonRpcCommunication.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/ProjectClassPathChangedEvent.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/ProjectsListener.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/ProjectsSynchronizer.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/WorkspaceSynchronizer.java delete mode 100644 plugins/plugin-java/che-plugin-java-server/src/main/java/org/eclipse/che/plugin/java/languageserver/XMLParser.java delete mode 100644 plugins/plugin-java/pom.xml delete mode 100644 plugins/plugin-json/che-plugin-json-server/pom.xml delete mode 100644 plugins/plugin-json/che-plugin-json-server/src/main/java/org/eclipse/che/plugin/json/inject/JsonModule.java delete mode 100644 plugins/plugin-json/che-plugin-json-server/src/main/java/org/eclipse/che/plugin/json/languageserver/JsonExtension.java delete mode 100644 plugins/plugin-json/che-plugin-json-server/src/main/java/org/eclipse/che/plugin/json/languageserver/JsonLanguageServerConfig.java delete mode 100644 plugins/plugin-json/pom.xml delete mode 100644 plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/pom.xml delete mode 100644 plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/src/main/java/org/eclipse/che/plugin/keybinding/EclipseKeyBinding.java delete mode 100644 plugins/plugin-keybinding-eclipse/plugin-keybinding-eclipse-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-keybinding-eclipse/pom.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/pom.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/api/languageserver/util/EitherUtil.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/api/languageserver/util/JsonSerializable.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/api/languageserver/util/JsonUtil.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/DefaultHoverProviderInitializer.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/DefaultOccurrencesProviderInitializer.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageDescriptionInitializer.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageRegexesInitializer.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageServerExtension.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageServerLocalization.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/LanguageServerResources.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/DiagnosticAnnotation.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/DiagnosticCollector.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerAnnotationModel.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerAnnotationModelFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerCodeassistProcessorFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerEditorConfiguration.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerEditorConfigurationFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerEditorProvider.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerFormatter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerFormatterFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerReconcileStrategy.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/LanguageServerReconcileStrategyFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/PublishDiagnosticsProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/CompletionImageProvider.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/CompletionItemBasedCompletionProposal.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/DocumentVariableResolver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/LanguageServerCodeAssistProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/LatestCompletionResult.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Choice.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/DollarExpression.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Expression.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/ExpressionVisitor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Placeholder.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Snippet.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/SnippetParser.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/SnippetResolver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Text.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/Variable.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/VariableResolver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyTextEditAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/ApplyWorkspaceEditAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/LanguageServerQuickAssistProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/LanguageServerQuickAssistProcessorFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/quickassist/QuickassistActionEvent.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/signature/LanguageServerSignatureHelp.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/signature/LanguageServerSignatureHelpFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/signature/ParamterInfoImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/signature/SignatureHelpImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/signature/SignatureInfoImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/sync/FullTextDocumentSynchronize.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/sync/IncrementalTextDocumentSynchronize.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/sync/TextDocumentSynchronize.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/editor/sync/TextDocumentSynchronizeFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/highlighting/OccurrencesProvider.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/hover/HoverProvider.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/inject/LanguageServerGinModule.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/HasURI.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/LanguageServerFile.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/OpenLocationPresenter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/OpenLocationPresenterFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/OpenLocationView.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/location/OpenLocationViewImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/declaration/FindDefinitionAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/references/FindReferencesAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/symbol/GoToSymbolAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/symbol/SymbolEntry.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/symbol/SymbolKindHelper.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/workspace/FindSymbolAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/navigation/workspace/SymbolEntry.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenEntry.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenEntryGroup.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenModel.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenPresenter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenView.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenViewImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/QuickOpenViewImpl.ui.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/quickopen/Renderer.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/registry/LanguageServerRegistry.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/LSRenameAction.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenameDialog.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenameDialogFooter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenameInputBox.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenamePresenter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenameView.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/RenameViewImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/model/RenameChange.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/model/RenameFile.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/model/RenameFolder.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/model/RenameProject.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/node/ChangeNode.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/node/FileNode.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/node/FolderNode.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/node/ProjectNode.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/rename/node/RenameNodeFactory.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/ExecuteClientCommandProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/ExecuteClientCommandReceiver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/LanguageServerServiceClient.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/PublishDiagnosticsReceiver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/ServiceUtil.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/ShowMessageJsonRpcReceiver.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/TextDocumentServiceClient.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/service/WorkspaceServiceClient.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/util/DtoBuildHelper.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/util/OpenFileInEditorHelper.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/util/PromiseHelper.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/ShowMessageProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/ShowMessageRequestProcessor.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogFooter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogFooter.ui.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogPresenter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogView.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogViewImpl.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/java/org/eclipse/che/plugin/languageserver/ide/window/dialog/MessageDialogViewImpl.ui.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/api/languageserver/LanguageServer.gwt.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/LanguageServerLocalization.properties delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/QuickOpenList.css delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/languageserver.css delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/category.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/class.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/enum_type.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/field.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/generic_file.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/interface.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/local.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/method.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/package.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/property.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/template.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/text.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/codeassist/value.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/file.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/find.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/import.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/mark-error.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/mark-warning.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/che/plugin/languageserver/ide/svg/taskmrk.svg delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/lsp4j/Lsp4j.gwt.xml delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/lsp4j/jsonrpc/messages/Either.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/main/resources/org/eclipse/lsp4j/jsonrpc/messages/Either3.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/ide/editor/orion/client/WordDetectionUtilTest.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/CompletionItemBasedCompletionProposalTest.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/DocumentVariableResolverTest.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/ExpressionPrinter.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/SnippetParsingTest.java delete mode 100644 plugins/plugin-languageserver/che-plugin-languageserver-ide/src/test/java/org/eclipse/che/plugin/languageserver/ide/editor/codeassist/snippet/SnippetResolverTest.java delete mode 100644 plugins/plugin-languageserver/pom.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/pom.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/MachineModule.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjector.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/WorkspaceSshKeys.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/main/java/org/eclipse/che/ide/ext/machine/server/ssh/WorkspaceStatusSubscriber.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/test/java/org/eclipse/che/ide/ext/machine/server/ssh/KeysInjectorTest.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ext-server/src/test/java/org/eclipse/che/ide/ext/machine/server/ssh/WorkspaceSshKeysTest.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/pom.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/SshExtension.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/SshLocalizationConstant.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/SshResources.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/inject/SshGinModule.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/ShowSshKeyView.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/ShowSshKeyViewImpl.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/ShowSshKeyViewImpl.ui.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/SshKeyManagerPresenter.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/SshKeyManagerView.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/SshKeyManagerViewImpl.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/manage/SshKeyManagerViewImpl.ui.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/upload/UploadSshKeyPresenter.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/upload/UploadSshKeyView.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/upload/UploadSshKeyViewImpl.java delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/upload/UploadSshKeyViewImpl.ui.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/module.gwt.xml delete mode 100644 plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/resources/org/eclipse/che/ide/ext/ssh/client/SshLocalizationConstant.properties delete mode 100644 plugins/plugin-machine/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/main/java/org/eclipse/che/plugin/maven/generator/archetype/ArchetypeGenerator.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/main/java/org/eclipse/che/plugin/maven/generator/archetype/ArchetypeOutputImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/main/java/org/eclipse/che/plugin/maven/generator/archetype/MavenArchetypeImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/main/java/org/eclipse/che/plugin/maven/generator/archetype/MavenArchetypeJsonRpcMessenger.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/test/java/org/eclipse/che/plugin/maven/generator/archetype/ArchetypeGeneratorTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-generator-archetype/src/test/resources/test.log delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/MavenArchetype.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/MavenExtension.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/MavenLocalizationConstant.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/MavenResources.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/actions/MavenActionsConstants.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandModel.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandPagePresenter.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandPageView.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandPageViewImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandPageViewImpl.ui.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/command/MavenCommandType.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/ResolveDependencyPresenter.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/ResolveDependencyView.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/ResolveDependencyViewImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/ResolveDependencyViewImpl.ui.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/BackgroundLoaderPresenter.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/BackgroundLoaderView.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/BackgroundLoaderViewImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/BackgroundLoaderViewImpl.ui.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/DependencyResolverAction.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/inject/MavenGinModule.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/preference/MavenPreferencePresenter.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/preference/MavenPreferenceView.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/preference/MavenPreferenceViewImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/preference/MavenPreferenceViewImpl.ui.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/resource/MavenProjectInterceptor.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/resource/MavenSourceFolderInterceptor.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/resource/PomInterceptor.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/wizard/MavenPagePresenter.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/wizard/MavenPageView.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/wizard/MavenPageViewImpl.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/wizard/MavenPageViewImpl.ui.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/java/org/eclipse/che/plugin/maven/client/wizard/MavenProjectWizardRegistrar.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/Maven.css delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/MavenLocalizationConstant.properties delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/command/maven-command-type.svg delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/Loader.css delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/error.svg delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/loaderIcon.svg delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/main/resources/org/eclipse/che/plugin/maven/client/maven.svg delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/test/java/org/eclipse/che/plugin/maven/client/command/MavenCommandTypeTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/test/java/org/eclipse/che/plugin/maven/client/command/MavenPagePresenterTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/test/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/ResolveDependencyPresenterTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/test/java/org/eclipse/che/plugin/maven/client/comunnication/progressor/background/DependencyResolverActionTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-ide/src/test/java/org/eclipse/che/plugin/maven/client/wizard/MavenPagePresenterTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/inject/MavenModule.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenProjectType.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenTargetExcludeMatcher.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenValueProvider.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenValueProviderFactory.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/handler/ArchetypeGenerationStrategy.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/handler/GeneratorStrategy.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/handler/MavenProjectGenerator.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/handler/MavenProjectInitHandler.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/handler/SimpleGeneratorStrategy.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-shared/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-shared/src/main/java/org/eclipse/che/plugin/maven/shared/MavenArchetype.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-shared/src/main/java/org/eclipse/che/plugin/maven/shared/MavenAttributes.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-shared/src/main/java/org/eclipse/che/plugin/maven/shared/dto/ArchetypeOutput.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-shared/src/main/java/org/eclipse/che/plugin/maven/shared/dto/MavenArchetypeDto.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Activation.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/ActivationFile.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/ActivationOS.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/ActivationProperty.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Build.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/BuildBase.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Dependencies.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Dependency.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/DependencyManagement.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Exclusion.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/MavenArtifact.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/MavenUtils.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Model.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Parent.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Plugin.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Profile.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Repository.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/RepositoryPolicy.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Resource.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/java/org/eclipse/che/ide/maven/tools/MavenUtilTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/java/org/eclipse/che/ide/maven/tools/ModelTest.java delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/module1/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/module2/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/modulesX/module3/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/modulesX/module4/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/modulesX/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/multi-module/pom.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/no-packaging.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/test-artifactId.xml delete mode 100644 plugins/plugin-maven/che-plugin-maven-tools/src/test/resources/test-pom.xml delete mode 100644 plugins/plugin-maven/pom.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/pom.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebugger.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebuggerExtension.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebuggerGinModule.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebuggerLocalizationConstant.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebuggerResources.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationPagePresenter.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationPageView.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationPageViewImpl.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationPageViewImpl.ui.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationType.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/resources/org/eclipse/che/plugin/nodejsdbg/ide/NodeJsDebuggerLocalizationConstant.properties delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/main/resources/org/eclipse/che/plugin/nodejsdbg/ide/configuration/nodejs-debugger-configuration-type.svg delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/test/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationPagePresenterTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/test/java/org/eclipse/che/plugin/nodejsdbg/ide/configuration/NodeJsDebuggerConfigurationTypeTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-ide/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/pom.xml delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsDebugProcess.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsDebugger.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsDebuggerFactory.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsDebuggerModule.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsOutput.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsProcessObservable.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsProcessObserver.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/OutputReader.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/command/NodeJsDebugCommand.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/command/NodeJsDebugCommandImpl.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/command/NodeJsDebugCommandsLibrary.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/exception/NodeJsDebuggerException.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/exception/NodeJsDebuggerParseException.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/exception/NodeJsDebuggerTerminatedException.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsBackTraceParser.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsBreakpointsParser.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsOutputParser.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsScriptsParser.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/main/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsStepParser.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/java/org/eclipse/che/plugin/nodejsdbg/server/NodeJsDebuggerTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsBackTraceParserTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsBreakpointsParserTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsScriptsParserTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/java/org/eclipse/che/plugin/nodejsdbg/server/parser/NodeJsStepParserTest.java delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/resources/app.js delete mode 100644 plugins/plugin-nodejs-debugger/che-plugin-nodejs-debugger-server/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-nodejs-debugger/pom.xml delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/pom.xml delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/java/org/eclipse/che/plugin/nodejs/ide/NodeJsExtension.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/java/org/eclipse/che/plugin/nodejs/ide/NodeJsResources.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/java/org/eclipse/che/plugin/nodejs/ide/inject/NodeJsGinModule.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/java/org/eclipse/che/plugin/nodejs/ide/project/NodeJsProjectWizardRegistrar.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-ide/src/main/resources/org/eclipse/che/plugin/nodejs/ide/icons/js.svg delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-server/pom.xml delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-server/src/main/java/org/eclipse/che/plugin/nodejs/generator/NodeJsProjectGenerator.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-server/src/main/java/org/eclipse/che/plugin/nodejs/inject/NodeJsModule.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-server/src/main/java/org/eclipse/che/plugin/nodejs/projecttype/NodeJsProjectType.java delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-server/src/main/resources/files/default_node_content delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/pom.xml delete mode 100644 plugins/plugin-nodejs/che-plugin-nodejs-lang-shared/src/main/java/org/eclipse/che/plugin/nodejs/shared/Constants.java delete mode 100644 plugins/plugin-nodejs/pom.xml delete mode 100644 plugins/plugin-orion/README.md delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/pom.xml delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/CompareConfig.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/CompareFactory.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/CompareFactoryImpl.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/CompareInitializer.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/FileOptions.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/OrionCompareExtension.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/OrionCompareModule.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/jso/CompareConfigJs.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/jso/FileOptionsJs.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/java/org/eclipse/che/ide/orion/compare/jso/GitCompareOverlay.java delete mode 100644 plugins/plugin-orion/che-plugin-orion-compare/src/main/module.gwt.xml delete mode 100644 plugins/plugin-orion/pom.xml delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/pom.xml delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/PhpExtension.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/PhpLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/PhpLocalizationConstant.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/PhpResources.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/action/CreatePhpSourceFileAction.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/action/NewPhplikeResourceAction.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/inject/PhpGinModule.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/java/org/eclipse/che/plugin/php/ide/project/PhpProjectWizardRegistrar.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/resources/org/eclipse/che/plugin/php/ide/svg/category.svg delete mode 100644 plugins/plugin-php/che-plugin-php-lang-ide/src/main/resources/org/eclipse/che/plugin/php/ide/svg/php_file.svg delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/pom.xml delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/src/main/java/org/eclipse/che/plugin/php/inject/PhpModule.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/src/main/java/org/eclipse/che/plugin/php/languageserver/PhpLanguageServerConfig.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/src/main/java/org/eclipse/che/plugin/php/projecttype/PhpProjectGenerator.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/src/main/java/org/eclipse/che/plugin/php/projecttype/PhpProjectType.java delete mode 100644 plugins/plugin-php/che-plugin-php-lang-server/src/main/resources/files/default_php_content delete mode 100644 plugins/plugin-php/che-plugin-php-lang-shared/pom.xml delete mode 100644 plugins/plugin-php/che-plugin-php-lang-shared/src/main/java/org/eclipse/che/plugin/php/shared/Constants.java delete mode 100644 plugins/plugin-php/pom.xml delete mode 100644 plugins/plugin-product-info/pom.xml delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/CheProductExtension.java delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/CheProductInfoDataProvider.java delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/LocalizationConstant.java delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/RedirectToIssueTrackerAction.java delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/RedirectToPublicChatAction.java delete mode 100644 plugins/plugin-product-info/src/main/java/org/eclipse/che/plugin/product/info/client/inject/ProductInfoGinModule.java delete mode 100644 plugins/plugin-product-info/src/main/module.gwt.xml delete mode 100644 plugins/plugin-product-info/src/main/resources/org/eclipse/che/plugin/product/info/client/LocalizationConstant.properties delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/pom.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributeMessages.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributeResources.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionExtension.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/ContributionMixinProvider.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/actions/ContributePartDisplayingModeAction.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/commit/CommitPresenter.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/commit/CommitView.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/commit/CommitViewImpl.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/commit/CommitViewImpl.ui.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/commit/CommitViewUiBinder.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/paste/PasteAwareTextBox.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/paste/PasteEvent.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/dialogs/paste/PasteHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/ContextInvalidatedEvent.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/ContextInvalidatedHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/ContextPropertyChangeEvent.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/ContextPropertyChangeHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/CurrentContextChangedEvent.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/CurrentContextChangedHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/StepEvent.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/events/StepHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/inject/PullRequestGinModule.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/ContributePartPresenter.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/ContributePartView.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/ContributePartViewImpl.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/ContributePartViewImpl.ui.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/ContributePartViewUiBinder.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/StagesProvider.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/parts/contribute/TextChangedHandler.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/preference/ContributePreferencePresenter.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/preference/ContributePreferenceView.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/preference/ContributePreferenceViewImpl.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/preference/ContributePreferenceViewImpl.ui.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AddForkRemoteStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AddForkRemoteStepFactory.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AddHttpForkRemoteStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AddReviewFactoryLinkStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AddSshForkRemoteStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/AuthorizeCodenvyOnVCSHostStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/CheckBranchToPush.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/CommitWorkingTreeStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/CreateForkStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/DefineExecutionConfiguration.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/DefineForkRemoteUrlProtocolStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/DefineWorkBranchStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/DetectPullRequestStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/DetermineUpstreamRepositoryStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/GenerateReviewFactoryStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/InitializeWorkflowContextStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/IssuePullRequestStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/PushBranchOnForkStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/PushBranchOnOriginStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/PushBranchStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/PushBranchStepFactory.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/UpdatePullRequestStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/WaitForkOnRemoteStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/steps/WaitForkOnRemoteStepFactory.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/utils/FactoryHelper.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/BranchUpToDateException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/GitVcsService.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/VcsService.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/VcsServiceProvider.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/HostingServiceTemplates.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/NoCommitsInPullRequestException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/NoHistoryInCommonException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/NoPullRequestException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/NoUserForkException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/NoVcsHostingServiceImplementationException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/PullRequestAlreadyExistsException.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/ServiceUtil.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/VcsHostingService.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/vcs/hosting/VcsHostingServiceProvider.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/ChainExecutor.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/Context.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/ContributionWorkflow.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/Step.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/StepsChain.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/SyntheticStep.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/WorkflowExecutor.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/java/org/eclipse/che/plugin/pullrequest/client/workflow/WorkflowStatus.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/resources/org/eclipse/che/plugin/pullrequest/client/Contribute.css delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/resources/org/eclipse/che/plugin/pullrequest/client/ContributeMessages.properties delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/resources/org/eclipse/che/plugin/pullrequest/client/images/icon.svg delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-ide/src/main/resources/org/eclipse/che/plugin/pullrequest/client/images/refresh.svg delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/pom.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/src/main/java/org/eclipse/che/plugin/pullrequest/server/ContributionProjectType.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/src/main/java/org/eclipse/che/plugin/pullrequest/server/ContributionProjectTypeCleaner.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-server/src/main/java/org/eclipse/che/plugin/pullrequest/server/ContributionProjectTypeModule.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/pom.xml delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/ContributionProjectTypeConstants.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/dto/Configuration.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/dto/HostUser.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/dto/IssueComment.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/dto/PullRequest.java delete mode 100644 plugins/plugin-pullrequest-parent/che-plugin-pullrequest-shared/src/main/java/org/eclipse/che/plugin/pullrequest/shared/dto/Repository.java delete mode 100644 plugins/plugin-pullrequest-parent/pom.xml delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/pom.xml delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/PythonExtension.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/PythonLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/PythonLocalizationConstant.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/PythonResources.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/action/CreatePythonFileAction.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/inject/PythonGinModule.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/java/org/eclipse/che/plugin/python/ide/project/PythonProjectWizardRegistrar.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/resources/org/eclipse/che/plugin/python/ide/PythonLocalizationConstant.properties delete mode 100644 plugins/plugin-python/che-plugin-python-lang-ide/src/main/resources/org/eclipse/che/plugin/python/ide/svg/python.svg delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/pom.xml delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/src/main/java/org/eclipse/che/plugin/python/generator/PythonProjectGenerator.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/src/main/java/org/eclipse/che/plugin/python/inject/PythonModule.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/src/main/java/org/eclipse/che/plugin/python/languageserver/PythonLanguageSeverConfig.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/src/main/java/org/eclipse/che/plugin/python/projecttype/PythonProjectType.java delete mode 100644 plugins/plugin-python/che-plugin-python-lang-server/src/main/resources/files/default_python_content delete mode 100644 plugins/plugin-python/che-plugin-python-lang-shared/pom.xml delete mode 100644 plugins/plugin-python/che-plugin-python-lang-shared/src/main/java/org/eclipse/che/plugin/python/shared/ProjectAttributes.java delete mode 100644 plugins/plugin-python/pom.xml delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/pom.xml delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/java/org/eclipse/che/ide/ext/plugins/client/GwtCheCommandType.java delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/java/org/eclipse/che/ide/ext/plugins/client/GwtCheExtension.java delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/java/org/eclipse/che/ide/ext/plugins/client/PluginsGinModule.java delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/java/org/eclipse/che/ide/ext/plugins/client/PluginsResources.java delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-ext-plugins/src/main/resources/org/eclipse/che/ide/ext/plugins/client/images/gwt-che-command-type.svg delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-tools/pom.xml delete mode 100644 plugins/plugin-sdk/che-plugin-sdk-tools/src/main/java/org/eclipse/che/ide/sdk/tools/InstallExtension.java delete mode 100644 plugins/plugin-sdk/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-base/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-base/src/main/java/org/eclipse/che/plugin/java/testing/AbstractJavaTestRunner.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-base/src/main/java/org/eclipse/che/plugin/java/testing/ClasspathUtil.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-classpath/src/main/java/org/eclipse/che/plugin/java/testing/ProjectClasspathProvider.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-classpath/src/test/java/org/eclipse/che/plugin/java/testing/ProjectClasspathProviderTest.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/JUnitTestFileExtension.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/JUnitTestLocalizationConstant.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/JUnitTestResources.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/action/AbstractJUnitTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/action/DebugJUnitTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/action/JUnitTestActionGroup.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/action/RunJUnitTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/java/org/eclipse/che/plugin/testing/junit/ide/inject/JUnitGinModule.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/resources/org/eclipse/che/plugin/testing/junit/ide/JUnitTestLocalizationConstant.properties delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-ide/src/main/resources/org/eclipse/che/plugin/testing/junit/ide/svg/test.svg delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/TestingMessageHelper.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/CheJUnitCoreRunner.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/CheJUnitLauncher.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/JUnit4TestReference.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/TestRunnerUtil.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/listeners/CheJUnitTestListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-runtime/src/main/java/org/eclipse/che/junit/junit4/listeners/JUnitExecutionListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/src/main/java/org/eclipse/che/plugin/testing/junit/server/inject/JunitGuiceModule.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/che-plugin-testing-junit-server/src/main/java/org/eclipse/che/plugin/testing/junit/server/junit4/JUnit4TestRunner.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-junit/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/TestNgLocalizationConstant.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/TestNgResources.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/TestNgTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/TestNgTestFileExtension.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/action/AbstractTestNgTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/action/DebugTestNgTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/action/RunTestNgTestAction.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/java/org/eclipse/che/plugin/testing/testng/ide/inject/TestNgGinModule.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/resources/org/eclipse/che/plugin/testing/testng/ide/TestNgLocalizationConstant.properties delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-ide/src/main/resources/org/eclipse/che/plugin/testing/testng/ide/svg/test.svg delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/CheTestNG.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/CheTestNGLauncher.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/CheTestNGListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/TestResultWrapper.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/TestingMessageHelper.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/listeners/CheConfigurationListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/listeners/CheInvokedMethodListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/listeners/CheSuiteListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/main/java/org/testng/listeners/CheTestListener.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-runtime/src/test/java/org/testng/che/tests/ListeneterTest.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/pom.xml delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/src/main/java/org/eclipse/che/plugin/testing/testng/server/TestNGRunner.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/src/main/java/org/eclipse/che/plugin/testing/testng/server/TestNGSuiteParser.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/src/main/java/org/eclipse/che/plugin/testing/testng/server/TestNGSuiteUtil.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/che-plugin-testing-testng-server/src/main/java/org/eclipse/che/plugin/testing/testng/server/inject/TestNGGuiceModule.java delete mode 100644 plugins/plugin-testing-java/plugin-testing-testng/pom.xml delete mode 100644 plugins/plugin-testing-java/pom.xml delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/pom.xml delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPTestFileExtension.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitGinModule.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestLocalizationConstant.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestResources.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/action/PHPRunScriptTestAction.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/action/PHPUnitTestActionGroup.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/resources/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestLocalizationConstant.properties delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/resources/org/eclipse/che/plugin/testing/phpunit/ide/svg/test.svg delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/src/main/resources/org/eclipse/che/plugin/testing/phpunit/ide/svg/test_all.svg delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/pom.xml delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/PHPUnitMessageParser.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/PHPUnitTestEngine.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/PHPUnitTestResultsProvider.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/PHPUnitTestRunner.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/inject/PHPUnitGuiceModule.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/AbstractPHPUnitElement.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/AbstractPHPUnitTestEvent.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/AbstractPHPUnitTestResult.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTestCase.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTestException.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTestRoot.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTestSuite.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTestWarning.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/java/org/eclipse/che/plugin/testing/phpunit/server/model/PHPUnitTraceFrame.java delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-server/src/main/resources/phpunit-printer/ZendPHPUnitLogger.php delete mode 100644 plugins/plugin-testing-php/plugin-testing-phpunit/pom.xml delete mode 100644 plugins/plugin-testing-php/pom.xml delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/pom.xml delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/TestLocalizationConstant.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/TestResources.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/TestServiceClient.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/TestingExtension.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/action/DebugTestAction.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/action/RunDebugTestAbstractAction.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/action/RunTestAction.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/action/TestAction.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/detector/TestDetector.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/detector/TestFileExtension.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/handler/TestingHandler.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/inject/TestingGinModule.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/BaseTestMessage.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/BaseTestSuiteMessage.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/BuildTreeEnded.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/ClientTestingMessage.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/Message.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/RootPresentationMessage.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/SuiteTreeEnded.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/SuiteTreeNode.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/SuiteTreeStarted.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestCount.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestFailed.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestFinished.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestIgnored.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestReporterAttached.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestStarted.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestStdErr.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestStdOut.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestSuiteFinished.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestSuiteStarted.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/TestingMessageVisitor.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/messages/UncapturedOutputMessage.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/AbstractTestingEventsProcessor.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/GeneralTestingEventsProcessor.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/PresentationUtil.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/Printable.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/Printer.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestLocator.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestRootState.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestState.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestStateEventsListener.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestSuiteStack.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/TestingEventsProcessor.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/BaseStartEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestFailedEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestFinishedEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestIgnoredEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestNodeEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestOutputEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestStartedEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestSuiteFinishedEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/event/TestSuiteStartedEvent.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/AbstractTestStateInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/CompaundTestFailedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/NotRunInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/SuiteFinishedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/SuiteInProgressInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TerminatedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestComparisionFailedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestErrorInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestFailedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestIgnoredInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestInProgressInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestPassedInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestStateDescription.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/model/info/TestStateInfo.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/PrinterOutputConsole.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/TestResultPresenter.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/TestResultView.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/TestResultViewImpl.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/navigation/factory/TestResultNodeFactory.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/navigation/nodes/TestRootNode.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/view/navigation/nodes/TestStateNode.java delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/TestLocalizationConstant.properties delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/show_all_tests_icon.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/show_failures_only_icon.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_all.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_class_fail.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_in_progress.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_method_fail.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_result_failure.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_result_skipped.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_result_success.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_result_trace_frame.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_result_warning.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_results.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_results_fail.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/svg/test_results_pass.svg delete mode 100644 plugins/plugin-testing/che-plugin-testing-ide/src/main/resources/org/eclipse/che/plugin/testing/ide/view/TestResultViewImpl.ui.xml delete mode 100644 plugins/plugin-testing/pom.xml delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/pom.xml delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/src/main/java/org/eclipse/che/plugin/web/inject/WebModule.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/src/main/java/org/eclipse/che/plugin/web/typescript/TypeScriptLanguageServerConfig.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/src/main/java/org/eclipse/che/plugin/web/typescript/TypeScriptProjectType.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/src/main/java/org/eclipse/che/plugin/web/vue/VueLanguageServerConfig.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-server/src/main/java/org/eclipse/che/plugin/web/vue/VueProjectType.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-shared/pom.xml delete mode 100644 plugins/plugin-web/che-plugin-web-ext-shared/src/main/java/org/eclipse/che/plugin/web/shared/Constants.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/pom.xml delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/JsonLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/TypeScriptLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/VueLanguageDescriptionProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/WebExtension.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/WebExtensionResource.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/WebLocalizationConstant.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/css/NewCssFileAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/css/NewLessFileAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/NewHtmlFileAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/PreviewHTMLAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/AutoEditStrategyFactory.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/DefaultCodeAssistProcessor.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/HTMLCodeAssistProcessor.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/HTMLEditorConfigurationProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/HtmlEditorConfiguration.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/html/editor/HtmlEditorProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/inject/WebModule.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/NewJavaScriptFileAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/editor/DefaultCodeAssistProcessor.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/editor/JsCodeAssistProcessor.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/editor/JsEditorConfiguration.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/editor/JsEditorConfigurationProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/js/editor/JsEditorProvider.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/typescript/TSProjectWizardRegistrar.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/vue/NewVueFileAction.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/java/org/eclipse/che/plugin/web/client/vue/VueProjectWizardRegistrar.java delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/WebLocalizationConstant.properties delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/category/js.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/css.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/es6.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/html.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/js.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/jsx.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/less.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/php.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/ts.svg delete mode 100644 plugins/plugin-web/che-plugin-web-ext-web/src/main/resources/org/eclipse/che/plugin/web/client/vue.svg delete mode 100644 plugins/plugin-web/pom.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/pom.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/YamlDescriptionProvider.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/YamlExtension.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/YamlLocalizationConstant.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/YamlServiceClient.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/YamlServiceClientImpl.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/inject/YamlGinModule.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/preferences/YamlExtensionManagerPresenter.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/preferences/YamlExtensionManagerView.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/preferences/YamlExtensionManagerViewImpl.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/java/org/eclipse/che/plugin/yaml/ide/preferences/YamlExtensionManagerViewImpl.ui.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-ide/src/main/resources/org/eclipse/che/plugin/yaml/ide/YamlLocalizationConstant.properties delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-server/pom.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-server/src/main/java/org/eclipse/che/plugin/yaml/server/inject/YamlModule.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-server/src/main/java/org/eclipse/che/plugin/yaml/server/languageserver/YamlLanguageServerConfig.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-server/src/main/java/org/eclipse/che/plugin/yaml/server/languageserver/YamlSchemaAssociations.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-server/src/main/java/org/eclipse/che/plugin/yaml/server/languageserver/YamlService.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-shared/pom.xml delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-shared/src/main/java/org/eclipse/che/plugin/yaml/shared/PreferenceHelper.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-shared/src/main/java/org/eclipse/che/plugin/yaml/shared/YamlDTO.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-shared/src/main/java/org/eclipse/che/plugin/yaml/shared/YamlDTOImpl.java delete mode 100644 plugins/plugin-yaml/che-plugin-yaml-shared/src/main/java/org/eclipse/che/plugin/yaml/shared/YamlPreference.java delete mode 100644 plugins/plugin-yaml/pom.xml delete mode 100644 plugins/plugin-zend-debugger/README.md delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/pom.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/ZendDbgExtension.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/ZendDbgGinModule.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/ZendDbgLocalizationConstant.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/ZendDbgResources.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/ZendDebugger.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationPagePresenter.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationPageView.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationPageViewImpl.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationPageViewImpl.ui.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationType.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/module.gwt.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/resources/org/eclipse/che/plugin/zdb/ide/ZendDbgLocalizationConstant.properties delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/main/resources/org/eclipse/che/plugin/zdb/ide/configuration/zend-dbg-configuration-type.svg delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/test/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationPagePresenterTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/test/java/org/eclipse/che/plugin/zdb/ide/configuration/ZendDbgConfigurationTypeTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-ide/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/pom.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/ZendDbgFactory.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/ZendDbgLocationHandler.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/ZendDbgModule.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/ZendDebugger.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/AbstractDbgMessage.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/IDbgMessage.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/ZendDbgClientMessages.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/ZendDbgConnection.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/ZendDbgEngineMessages.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/ZendDbgSettings.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/exceptions/ZendDbgTimeoutException.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/IDbgDataFacet.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/IDbgDataType.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/IDbgExpression.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/ZendDbgExpression.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/ZendDbgExpressionEvaluator.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/expressions/ZendDbgExpressionResult.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/utils/ZendDbgConnectionUtils.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/utils/ZendDbgFileUtils.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/utils/ZendDbgVariableUtils.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/variables/IDbgVariable.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/variables/ZendDbgVariable.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/variables/ZendDbgVariables.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/java/org/eclipse/che/plugin/zdb/server/AbstractZendDbgSessionTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/java/org/eclipse/che/plugin/zdb/server/ZendDbgAvailabilityTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/java/org/eclipse/che/plugin/zdb/server/ZendDbgConfigurationTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/java/org/eclipse/che/plugin/zdb/server/ZendDbgSessionTest.java delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/resources/findbugs-exclude.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/resources/logback-test.xml delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/resources/php/classes.php delete mode 100644 plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/test/resources/php/hello.php delete mode 100644 plugins/plugin-zend-debugger/pom.xml delete mode 100644 plugins/pom.xml create mode 100644 selenium/che-selenium-core/src/main/java/org/eclipse/che/selenium/core/client/GitHubKey.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/AbstractDebugConfig.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/CppDebugConfig.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/DebugPanel.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/JavaDebugConfig.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/NodeJsDebugConfig.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/PhpDebugConfig.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/plugins/JavaTestRunnerPluginConsole.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/upload/AbstractUploadDialogPage.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/upload/UploadDirectoryDialogPage.java delete mode 100644 selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/upload/UploadFileDialogPage.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/assistant/CheckFindActionFeatureInCheTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/assistant/CheckOpenedDialogThroughFindActionTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/assistant/KeyBindingsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/assistant/OrganizeImportsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateStackTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportProjectFromZipTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/StacksListTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/AddOrImportProjectFormTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsMachineActionsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsMachinesRamTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsSingleMachineTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/BreakpointReorderingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/ChangeVariableWithEvaluatingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/CheckBreakPointStateTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/ConditionalBreakpointsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/CppProjectDebuggingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/DebugExternalClassTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/DebuggerUtils.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/DebuggerWatchExpressionTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/InnerClassAndLambdaDebuggingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/MultimoduleProjectDebuggingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/NodeJsDebugTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/PhpProjectDebuggingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/RunToCursorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/StepIntoStepOverStepReturnWithChangeVariableTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/debugger/ThreadDumpTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/CheckReplaceFeatureInEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/CheckRestoringSplitEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/CheckSearchFeatureInEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/CheckWorkingWithTabByUsingTabListTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/CheckWorkingWithTabsByUsingContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/ContextMenuEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/SplitEditorFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/AutocompleteFeaturesInEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/AutocompleteJSFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/AutocompleteProposalJavaDocTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/AutocompleteWithInheritTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/CheckAutocompleteFeaturesInTheTestFolderTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/EditorMemberActiveLineForOpenedTabTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/EditorValidationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/FormatterTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/InheritClassTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/JavaDocPopupLinkTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/JavaDocPopupTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/OpenDeclarationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/QuickFixAndCodeAssistantFeaturesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/editor/autocomplete/ShowHintsCommandTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithMultiModuleTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerClickCreatePolicyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithPerUserCreatePolicyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithSincePolicyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithSparseCheckoutTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckFactoryWithUntilPolicyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckOpenFileFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckRunCommandFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckSkipRootFolderTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckWelcomePanelOnCodenvyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CreateFactoryFromUiWithKeepDirTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CreateNamedFactoryFromDashboardTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/CheckDeletingProjectByApiTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/CheckFileWatcherExcludeFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/EditFilesWithTabsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/RefactoringFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/RemoveFilesWithActiveTabs.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/filewatcher/UpdateFilesWithoutIDETest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/AddFilesToIndexTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/AmendCommitTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/AuthorizeOnGithubFromPreferencesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/BranchTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CheckoutReferenceTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CheckoutToRemoteBranchTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CheckoutToRemoteBranchWhichAlreadyHasLinkedLocalBranchTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CommitFilesByMultiSelectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CommitFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/CreateAndDeleteLocalBranchTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/FetchAndMergeRemoteBranchIntoLocalTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitChangeMarkersTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitColorsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitCompareTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPanelTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullConflictTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitResetTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/ImportWizardFormTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/InitializeAndDeleteLocalRepositoryTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/OpenOnGitHubTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/PullRequestPluginTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/PullRequestPluginWithForkTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/PushingChangesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/RevertCommitTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/SetGitCommitterTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/gwt/CheckSimpleGwtAppTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/AutocompleteCommandsEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/CheckBasicFunctionalityInCommandsExplorerTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/CheckIntelligenceCommandFromToolbarTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/CommandsEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/CommandsPaletteTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/MacrosCommandsEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/intelligencecommand/PreviewUrlIntoCommandsEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/ApacheCamelFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/ClangFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/GolangFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/JsonFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/TypeScriptEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/YamlFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/csharp/CSharpClassRenamingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/csharp/CSharpFileAdvancedOperationsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/csharp/CSharpFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/php/PhpAssistantFeaturesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/php/PhpFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/python/PythonAssistantFeaturesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/languageserver/python/PythonFileEditingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/mavenplugin/CheckGeneratingMavenArchetypeTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/mavenplugin/CheckMavenPluginTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/mavenplugin/GenerateEffectivePomTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/CheckCreatingProjectInEmptyWsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/CheckMacrosFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/CheckRestoringWorkspaceAfterStoppingWsAgentProcessTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/ConvertToMavenProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/ConvertToProjectFromConfigurationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/DialogAboutTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FileStructureBaseOperationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FileStructureByKeyboardTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FileStructureCodeEditorTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FileStructureNodesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FindTextFeatureTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/FindUsagesBaseOperationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/ImplementationBaseOperationsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/MachinesAsynchronousStartTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/NavigateToFileTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/OpenInTerminalTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/ResolveDependencyAfterRecreateProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/ServerRuntimeInfoTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/TerminalTypingTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithSplitPanelTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithTerminalTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0087Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0091Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0093Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0097Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0114Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0115Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0119Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0120Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0121Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/opendeclaration/Eclipse0122Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/plainjava/ConfigureClasspathBaseTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/plainjava/ConfigureSomeSourceFoldersTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/plainjava/PlainJavaProjectConfigureClasspathTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/plainjava/RunPlainJavaProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/preferences/CheckErrorsWarningsTabTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/preferences/ContributeTabTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckAutoSaveForFileWhichAlreadyExistTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckCollapseAllNodesProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckCopyCutFeaturesForFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckDisplayingArtifactIdTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckErrorMessageWhenCreationDuplicateFolderOrFileTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckHiddenFolderAndFileCreatedFromCommandTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckOnValidAndInvalidClassNameTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckOnValidAndInvalidPackageNameTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckRecentFilesAndRevealResourceTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckRefreshProjectTreeTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckShowHideHiddenFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CheckTreeStructureAfterCloseTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/ClosingSeveralOpenFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewFoldersTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewJavaFilesFromContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewJavaFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewNotJavaFilesFromContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewNotJavaFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewPackageFromContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateNewPackagesWithHelpCreationJavaClassTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateProjectInSelectedFolderTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/CreateProjectsForArtikPluginTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeleteFilesFromContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeleteFilesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeletePackageFromContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeletePackageTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeletePackageWithOpenedFilesTabTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DeleteProjectsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/DownloadProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/FileNotExistIntoEditorAfterDeleteTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/FileOpenedAfterCreationTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/JustCreatedFileNotExistIntoEditorAfterDeleteTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/NavigationByKeyboardTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/OpenFileWithHelpContextMenuTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/PreviewHtmlFileTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/RenameJustCreatedNotJavaFileTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/RenameProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/RenamedAlreadyCreatedNotJavaFileTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/ShowFileReferenceTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/UploadIntoProjectTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/dependencies/OpenExternalLibraryFileAfterRefreshTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/dependencies/TransitiveDependencyTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/projectexplorer/dependencies/UpdateListOfLibraryTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/fields/FailNotPrivateFieldTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/fields/FailPrivateFieldTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/fields/RenameNotPrivateFieldTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/fields/RenamePrivateFieldSmokeTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/fields/RenamePrivateFieldTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/methods/RenameMethodInInterfaceTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/methods/RenamePrivateMethodTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/methods/RenameStaticMethodsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/methods/RenameVirtualMethodsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/move/CodeAssistAfterMoveItemTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/move/FailMoveItemTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/move/MoveItemsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/move/MoveJavaClassToSubpackageTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/move/MoveJavaFileInNewSourceFolderTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/packages/RenamePackageSmokeTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/packages/RenamePackageSpringTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/packages/RenamePackageTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/parameters/FailParametersTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/parameters/RenameParametersTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/preview/CheckTreeInRefactorPanelTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/preview/PreviewRefactoringTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/GenericsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/IllegalTypeNameTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/RenameTypeTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/TestAnnotationsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/TestEnumerationsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/refactor/types/TestFailTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/CompileCommand.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginJunit4CheckRunSuitesAndScopesTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginJunit4Test.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/testrunner/JavaTestPluginTestNgTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/CheckStopStartWsTest.java delete mode 100644 selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/WorkspaceFromOfficialUbuntuImageStartTest.java delete mode 100644 wsagent/agent/pom.xml delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.0/org.eclipse.che.ws-agent.json delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.0/org.eclipse.che.ws-agent.script.sh delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.1/org.eclipse.che.ws-agent.json delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.1/org.eclipse.che.ws-agent.script.sh delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.2/org.eclipse.che.ws-agent.json delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.2/org.eclipse.che.ws-agent.script.sh delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.3/org.eclipse.che.ws-agent.json delete mode 100644 wsagent/agent/src/main/resources/installers/1.0.3/org.eclipse.che.ws-agent.script.sh delete mode 100644 wsagent/che-core-api-debug-shared/pom.xml delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/BreakpointConfigurationDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/BreakpointDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebugSessionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/DebuggerInfoDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/FieldDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/LocationDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/MethodDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/SimpleValueDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/StackFrameDumpDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/ThreadStateDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/VariableDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/VariablePathDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/ActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/ResumeActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/StartActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/StepIntoActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/StepOutActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/StepOverActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/action/SuspendActionDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/event/BreakpointActivatedEventDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/event/DebuggerEventDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/event/DisconnectEventDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/dto/event/SuspendEventDto.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/Breakpoint.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/BreakpointConfiguration.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebugSession.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/DebuggerInfo.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/Field.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/Location.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/Method.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/MutableVariable.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/SimpleValue.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/StackFrameDump.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/SuspendPolicy.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/ThreadState.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/ThreadStatus.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/Variable.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/VariablePath.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/WatchExpression.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/Action.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/ResumeAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/StartAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/StepIntoAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/StepOutAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/StepOverAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/action/SuspendAction.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/event/BreakpointActivatedEvent.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/event/DebuggerEvent.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/event/DisconnectEvent.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/event/SuspendEvent.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/BreakpointConfigurationImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/BreakpointImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebugSessionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/DebuggerInfoImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/FieldImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/LocationImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/MethodImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/MutableVariableImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/SimpleValueImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/StackFrameDumpImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/ThreadStateImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/VariableImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/VariablePathImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/WatchExpressionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/ActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/ResumeActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/StartActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/StepIntoActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/StepOutActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/StepOverActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/action/SuspendActionImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/event/BreakpointActivatedEventImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/event/DebuggerEventImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/event/DisconnectEventImpl.java delete mode 100644 wsagent/che-core-api-debug-shared/src/main/java/org/eclipse/che/api/debug/shared/model/impl/event/SuspendEventImpl.java delete mode 100644 wsagent/che-core-api-debug/pom.xml delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/Debugger.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerActionProvider.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerFactory.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerJsonRpcMessenger.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerManager.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerMessage.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerModule.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DebuggerService.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/DtoConverter.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/exceptions/DebuggerException.java delete mode 100644 wsagent/che-core-api-debug/src/main/java/org/eclipse/che/api/debugger/server/exceptions/DebuggerNotFoundException.java delete mode 100644 wsagent/che-core-api-git-shared/pom.xml delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/AddRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Branch.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/BranchCreateRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/BranchListMode.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/CheckoutRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/CloneRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/CommitRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Commiters.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/ConfigRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/ConflictExceptionError.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Constants.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/DiffCommitFile.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/DiffType.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/EditedRegion.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/EditedRegionType.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/FetchRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/FileChangedEventDto.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/GitUrlVendorInfo.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/GitUser.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/IndexFile.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Log.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/LogResponse.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/MergeRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/MergeResult.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/MoveRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/ProviderInfo.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/PullRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/PullResponse.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/PushRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/PushResponse.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RebaseRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RebaseResponse.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Remote.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RemoteAddRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RemoteReference.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RemoteUpdateRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RepoInfo.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RepositoryDeletedEventDto.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RepositoryInitializedEventDto.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/ResetRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RevertRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RevertResult.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Revision.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/RmRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/ShowFileContentResponse.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Status.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/StatusChangedEventDto.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/Tag.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/TagCreateRequest.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/event/GitCheckoutEvent.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/event/GitCommitEvent.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/event/GitEvent.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/event/GitRepositoryDeletedEvent.java delete mode 100644 wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/event/GitRepositoryInitializedEvent.java delete mode 100644 wsagent/che-core-api-git/pom.xml delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/BranchListWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/CachedGitStatusProvider.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/CommitMessageWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/Config.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/CredentialsLoader.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/CredentialsProvider.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/DiffPage.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitBasicAuthenticationCredentialsProvider.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitChangesDetector.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitCheckoutDetector.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConfigurationChecker.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnectionFactory.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitExceptionMapper.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitJsonRpcMessenger.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitModule.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitProjectImporter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitProjectType.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitProjectTypeCleaner.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitService.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitStatusChangedDetector.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitStatusProvider.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitUrlUtils.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitUserResolver.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitValueProviderFactory.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/InfoPage.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/LocalGitUserResolver.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/LogPage.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/MergeResultWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/Reference.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/ReferenceType.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/RemoteListWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/StatusPageWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/TagListWriter.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/UserCredential.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitCheckoutInProgressException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitCommitInProgressException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitConflictException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitInvalidRefNameException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitInvalidRepositoryException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitRefAlreadyExistsException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/exception/GitRefNotFoundException.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/AddParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/CheckoutParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/CloneParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/CommitParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/DiffParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/FetchParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/LogParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/LsFilesParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/PullParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/PushParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/RemoteAddParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/RemoteUpdateParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/ResetParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/RmParams.java delete mode 100644 wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/params/TagCreateParams.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/api/git/CachedGitStatusProviderTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/api/git/GitConfigurationCheckerTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/api/git/GitUrlUtilsTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/api/git/LocalGitUserResolverTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/AddTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/BranchCreateTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/BranchDeleteTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/CheckoutTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/CloneTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/CommitTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/ConfigTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/DiffTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/FetchTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/GetCommitersTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/GitConnectionFactoryProvider.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/GitTestUtil.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/InitTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/IsInsideWorkTreeTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/LogTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/LsRemoteTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/MergeTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/PullTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/PushTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RemoteAddTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RemoteDeleteTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RemoteListTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RemoteUpdateTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RemoveTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/ResetTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/RevertTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/ShowFileContentTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/StatusTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/TagCreateTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/TagDeleteTest.java delete mode 100644 wsagent/che-core-api-git/src/test/java/org/eclipse/che/git/impl/TagListTest.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/pom.xml delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ClientDtoGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ClientJsonImpl.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ConversionGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/DtoGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/EitherUtil.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/FromJsonGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/JsonImpl.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ServerDtoGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ServerJsonImpl.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ToDtoGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/generator/ToJsonGenerator.java delete mode 100644 wsagent/che-core-api-languageserver-maven-plugin/src/main/java/org/eclipse/che/api/languageserver/maven/plugin/DtoGeneratorMojo.java delete mode 100644 wsagent/che-core-api-languageserver-shared/pom.xml delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/ProjectLangugageKey.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/event/LanguageServerInitializeEvent.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedCompletionItem.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedCompletionList.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedExecuteCommandParams.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedInitializeResult.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedPublishDiagnosticsParams.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedTextDocumentEdit.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedTextEdit.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedWorkspaceEdit.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/ExtendedWorkspaceSymbolParams.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/FileEditParams.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/LanguageDescription.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/LanguageRegex.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/RenameResult.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/SnippetParameters.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/model/SnippetResult.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/CharStreamEditor.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/CharStreamIterator.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/JsonDecision.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/LinearRangeComparator.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/PositionComparator.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/main/java/org/eclipse/che/api/languageserver/shared/util/RangeComparator.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/test/java/org/eclipse/che/api/languageserver/shared/util/StreamEditorTest.java delete mode 100644 wsagent/che-core-api-languageserver-shared/src/test/java/org/eclipse/che/api/languageserver/shared/util/StringStreamEditor.java delete mode 100644 wsagent/che-core-api-languageserver/pom.xml delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/CheLanguageClient.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/CheLanguageClientFactory.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/DefaultInstanceProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/EmptyCommunicationProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/ExtendedLanguageServer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/FindId.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/FindServer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/GuiceConfigProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/InitializeParamsProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerAbstractFileWatcher.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerConfig.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerConfigInitializer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerConfigProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerCreateFileWatcher.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerDeleteFileWatcher.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerException.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerInitializedEvent.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerInitializer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerModule.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerPathTransformer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerService.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServerUpdateFileWatcher.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LanguageServiceUtils.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/LsParamsCloner.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/ProcessCommunicationProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/PublishDiagnosticsParamsJsonRpcTransmitter.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/RegistryContainer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/ServerCapabilitiesAccumulator.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/ShowMessageJsonRpcTransmitter.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/SocketCommunicationProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/TextDocumentService.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/WorkspaceConfigProvider.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/WorkspaceService.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/consumers/LanguageServerFileChangeConsumer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/consumers/LanguageServerFileCreateConsumer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/consumers/LanguageServerFileDeleteConsumer.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/service/FileContentAccess.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/DynamicWrapper.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/EitherUtil.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/JsonUtil.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/LSOperation.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/LineReader.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/java/org/eclipse/che/api/languageserver/util/OperationUtil.java delete mode 100644 wsagent/che-core-api-languageserver/src/main/resources/META-INF/services/com.google.gson.TypeAdapterFactory delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/ExtendedTextEditTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/FindIdTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/FindServerTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/LanguageServerAbstractFileWatcherTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/LanguageServerPathTransformerTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/SnippetTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/java/org/eclipse/che/api/languageserver/dto/DtoConversionTest.java delete mode 100644 wsagent/che-core-api-languageserver/src/test/resources/logback-test.xml delete mode 100644 wsagent/che-core-api-languageserver/src/test/resources/snippettest/File1.txt delete mode 100644 wsagent/che-core-api-oauth/pom.xml delete mode 100644 wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/OAuthAgentModule.java delete mode 100644 wsagent/che-core-api-oauth/src/main/java/org/eclipse/che/security/oauth/oauth1/RemoteOAuthAuthorizationHeaderProvider.java delete mode 100644 wsagent/che-core-api-oauth/src/test/resources/logback-test.xml delete mode 100644 wsagent/che-core-api-project-shared/pom.xml delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/FileChange.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/ImportProgressRecord.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/NewProjectConfig.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/RegisteredProject.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/SearchOccurrence.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/EditorChangesDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ImportProgressRecordDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/NewProjectConfigDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectSearchRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectSearchResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/RegisteredProjectDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SearchOccurrenceDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SearchResultDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ServerError.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileStateUpdateDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileTrackingOperationDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileWatcherEventType.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/GitCheckoutEventDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/PomModifiedEventDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/ProjectTreeStateUpdateDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/ProjectTreeTrackingOperationDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/CreateBatchProjectsRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/CreateRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/CreateResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/DeleteRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/DeleteResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/GetRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/GetResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/ImportRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/ImportResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/RecognizeRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/RecognizeResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/UpdateRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/UpdateResponseDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/VerifyRequestDto.java delete mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/service/VerifyResponseDto.java delete mode 100644 wsagent/che-core-api-project/pom.xml delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/editor/server/EditorApiModule.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/editor/server/impl/EditorChangesTracker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/editor/server/impl/EditorWorkingCopy.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/editor/server/impl/EditorWorkingCopyManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/editor/server/impl/EditorWorkingCopyUpdatedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/FsApiModule.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/FsDtoConverter.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/FsManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/PathTransformer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/WsPathUtils.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/ExecutiveFsManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/FreeDiskSpaceChecker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/FreeDiskSpaceCheckerCommunication.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/FsOperations.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/RootAwarePathTransformer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/SimpleFsDtoConverter.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/ValidatingFsManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/fs/server/impl/ZipArchiver.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/MutableProjectConfig.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectApiModule.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectImporter.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectImportersService.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectJsonRpcServiceConfigurator.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectService.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypeService.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/VcsStatusProvider.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/handlers/CreateProjectHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/handlers/GetItemHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/handlers/PostImportProjectHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/handlers/ProjectHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/handlers/ProjectInitHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/CreateBaseProjectTypeHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ExecutiveProjectManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/FileItemParsed.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/FileItemUtils.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/InmemoryProjectRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/NewProjectConfigImpl.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/OnWorkspaceStartProjectInitializer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/PersistingProjectRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectConfigRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectDtoConverter.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectHandlerRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectImportManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectImporterRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectJsonRpcServiceBackEnd.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectServiceApi.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectServiceApiFactory.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectServiceLinksInjector.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectServiceVcsStatusInjector.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectSynchronizer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/RegisteredProjectFactory.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/RegisteredProjectImpl.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/RootDirCreationHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/RootDirPathProvider.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/RootDirRemovalHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/SynchronizingProjectManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ValidatingProjectManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/WorkspaceKeeper.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/WorkspaceProjectSynchronizer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/WorkspaceSyncCommunication.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ZipProjectImporter.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/BeforeProjectInitializedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/PreProjectDeletedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/ProjectCreatedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/ProjectDeletedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/ProjectInitializedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/ProjectItemModifiedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/notification/ProjectUpdatedEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/AbstractAttribute.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/AttributeValue.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/BaseProjectType.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/Constant.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/InitBaseProjectTypeHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectQualifier.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypeConstraintException.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypeDef.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypeRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypeResolution.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypeResolver.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypes.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ProjectTypesFactory.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ReadonlyValueProvider.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/SettableValueProvider.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/SimpleProjectQualifier.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/SimpleProjectTypeResolver.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/TransientMixin.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ValueProvider.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ValueProviderFactory.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/ValueStorageException.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/type/Variable.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/InvalidQueryException.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/OffsetData.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/QueryExecutionException.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/QueryExpression.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/SearchApiModule.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/SearchResult.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/Searcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/consumers/IndexedFileCreateConsumer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/consumers/IndexedFileDeleteConsumer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/consumers/IndexedFileUpdateConsumer.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/excludes/DotCheExcludeMatcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/excludes/DotNumberSignExcludeMatcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/excludes/HiddenItemPathMatcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/excludes/MediaTypesExcludeMatcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/impl/LuceneSearcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/search/server/impl/SearchResultEntry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/FileWatcherApiModule.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/FileWatcherManager.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/detectors/EditorFileOperationHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/detectors/EditorFileTracker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/detectors/FileTrackingOperationEvent.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/detectors/ProjectTreeTracker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileTreeWalker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherByPathMatcher.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherByPathValue.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherEventHandler.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherExcludePatternsRegistry.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherIgnoreFileTracker.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherOperation.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherService.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherUtils.java delete mode 100644 wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/SimpleFileWatcherManager.java delete mode 100644 wsagent/che-core-api-project/src/main/resources/README.blank delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/RootDirPathProviderTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/fs/server/impl/ExecutiveFsManagerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/fs/server/impl/FsOperationsTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/fs/server/impl/ProjectServiceVcsStatusInjectorTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/fs/server/impl/RootAwarePathTransformerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/fs/server/impl/ValidatingFsManagerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/ProjectServiceLinksInjectorTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/ProjectServiceTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/ProjectTypesTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/impl/SynchronizingProjectManagerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/impl/ValidatingProjectManagerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/impl/handlers/CreateBaseProjectTypeHandlerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/type/ProjectTypeTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/search/MediaTypesExcludeMatcherTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/search/SearcherTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/search/server/impl/FSLuceneSearcherTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/ConcurrentHandleTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileTreeWalkerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherByPathMatcherTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherByPathValueTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherEventHandlerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherManagerTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherOperationTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherServiceTest.java delete mode 100644 wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/watcher/server/impl/FileWatcherUtilsTest.java delete mode 100644 wsagent/che-core-api-project/src/test/resources/che-templates/embed_type.json delete mode 100644 wsagent/che-core-api-project/src/test/resources/json_test/project.json delete mode 100644 wsagent/che-core-api-project/src/test/resources/logback-test.xml delete mode 100644 wsagent/che-core-api-project/src/test/resources/org/eclipse/che/api/project/server/batchNewProjectConfigs.json delete mode 100644 wsagent/che-core-api-testing-shared/pom.xml delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/Constants.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/TestDetectionContext.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/TestDetectionResult.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/TestExecutionContext.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/TestLaunchResult.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/TestPosition.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/common/TestResultStatus.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/common/TestResultType.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/SimpleLocationDto.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/TestResultDto.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/TestResultRootDto.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/TestResultTraceDto.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/TestResultTraceFrameDto.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/messages/TestingMessage.java delete mode 100644 wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/messages/TestingMessageNames.java delete mode 100644 wsagent/che-core-api-testing/pom.xml delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/TestingRPCService.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/exceptions/TestFrameworkException.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/framework/LineSplitter.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/framework/TestFrameworkRegistry.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/framework/TestMessagesOutputTransmitter.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/framework/TestRunner.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/inject/TestGuiceModule.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/messages/ServerTestingMessage.java delete mode 100644 wsagent/che-core-api-testing/src/main/java/org/eclipse/che/api/testing/server/messages/UncapturedOutputMessage.java delete mode 100644 wsagent/che-core-api-testing/src/test/java/org/eclipse/che/api/testing/server/LineSplitterTest.java delete mode 100644 wsagent/che-core-api-testing/src/test/java/org/eclipse/che/api/testing/server/ServerTestingMessageTest.java delete mode 100644 wsagent/che-core-git-impl-jgit/pom.xml delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitConfigImpl.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitConnection.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitConnectionFactory.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitDiffPage.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitModule.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/main/java/org/eclipse/che/git/impl/jgit/JGitStatusImpl.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/test/java/org/eclipse/che/git/impl/GitConnectionFactoryProvider.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/test/java/org/eclipse/che/git/impl/jgit/JGitConnectionTest.java delete mode 100644 wsagent/che-core-git-impl-jgit/src/test/resources/logback-test.xml delete mode 100644 wsagent/che-core-ssh-key-ide/pom.xml delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyExtension.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyGenerationInfo.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyLocalizationConstant.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyManager.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyUploader.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshKeyUploaderRegistry.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/SshResources.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/inject/SshKeyGinModule.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/ShowSshKeyView.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/ShowSshKeyViewImpl.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/ShowSshKeyViewImpl.ui.xml delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/SshKeyManagerPresenter.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/SshKeyManagerView.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/SshKeyManagerViewImpl.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/manage/SshKeyManagerViewImpl.ui.xml delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/upload/UploadSshKeyPresenter.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/upload/UploadSshKeyView.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/upload/UploadSshKeyViewImpl.java delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/java/org/eclipse/che/plugin/ssh/key/client/upload/UploadSshKeyViewImpl.ui.xml delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/module.gwt.xml delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/resources/org/eclipse/che/plugin/ssh/key/client/SshKeyLocalizationConstant.properties delete mode 100644 wsagent/che-core-ssh-key-ide/src/main/resources/org/eclipse/che/plugin/ssh/key/client/github-generate.svg delete mode 100644 wsagent/che-core-ssh-key-ide/src/test/java/org/eclipse/che/plugin/ssh/key/client/manage/SshKeyManagerPresenterTest.java delete mode 100644 wsagent/che-core-ssh-key-server/pom.xml delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/HttpSshServiceClient.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/SshModule.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/SshServiceClient.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshKeyProvider.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshKeyProviderImpl.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshKeyUploader.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshScript.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshScriptProvider.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/UnixSshScript.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/WindowsSshScript.java delete mode 100644 wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/utils/UrlUtils.java delete mode 100644 wsagent/che-core-ssh-key-server/src/test/java/org/eclipse/che/plugin/ssh/key/HttpSshServiceClientTest.java delete mode 100644 wsagent/che-core-ssh-key-server/src/test/java/org/eclipse/che/plugin/ssh/key/script/SshScriptProviderTest.java delete mode 100644 wsagent/che-core-ssh-key-server/src/test/java/resources/logback-test.xml delete mode 100644 wsagent/che-core-ssh-key-server/src/test/org/eclipse/che/plugin/ssh/key/script/SshScriptProviderTest.java delete mode 100644 wsagent/che-core-ssh-key-server/src/test/resources/logback-test.xml delete mode 100644 wsagent/che-core-workspace-activity-server/pom.xml delete mode 100644 wsagent/che-core-workspace-activity-server/src/main/java/org/eclipse/che/workspace/activity/ActivityServletModule.java delete mode 100644 wsagent/che-core-workspace-activity-server/src/main/java/org/eclipse/che/workspace/activity/LastAccessTimeFilter.java delete mode 100644 wsagent/che-core-workspace-activity-server/src/main/java/org/eclipse/che/workspace/activity/WorkspaceActivityNotifier.java delete mode 100644 wsagent/che-core-workspace-activity-server/src/main/test/java/org/eclipse/che/workspace/activity/LastAccessTimeFilterTest.java delete mode 100644 wsagent/che-core-workspace-activity-server/src/main/test/java/org/eclipse/che/workspace/activity/WorkspaceActivityNotifierTest.java delete mode 100644 wsagent/che-wsagent-core/pom.xml delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/AgentHttpJsonRequestFactory.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/CheWsAgentCorsAllowCredentialsProvider.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/CheWsAgentCorsAllowedOriginsProvider.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/CheWsAgentModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/CheWsAgentServletModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentAuthModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentAuthServletModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentServletModule.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/WsAgentURLProvider.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/appstate/AppStateManager.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/appstate/AppStateService.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/jsonrpc/WsAgentWebSocketEndpoint.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/jsonrpc/WsAgentWebSocketEndpointConfiguration.java delete mode 100644 wsagent/che-wsagent-core/src/main/java/org/eclipse/che/wsagent/server/jsonrpc/WsAgentWebSocketEndpointExecutorServiceProvider.java delete mode 100644 wsagent/che-wsagent-core/src/main/webapp/WEB-INF/classes/codenvy/che-machine-configuration.properties delete mode 100644 wsagent/che-wsagent-core/src/main/webapp/WEB-INF/web.xml delete mode 100644 wsagent/che-wsagent-core/src/test/java/org/eclipse/che/wsagent/server/appstate/AppStateManagerTest.java delete mode 100644 wsagent/che-wsagent-core/src/test/java/org/eclipse/che/wsagent/server/appstate/AppStateServiceTest.java delete mode 100644 wsagent/che-wsagent-core/src/test/resources/logback-test.xml delete mode 100644 wsagent/pom.xml delete mode 100644 wsagent/wsagent-local/pom.xml delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/ApiEndpointAccessibilityChecker.java delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/EnvironmentInitializationFilter.java delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/MachinePublicKeyProvider.java delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/MachineTokenProvider.java delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/UriApiEndpointProvider.java delete mode 100644 wsagent/wsagent-local/src/main/java/org/eclipse/che/WorkspaceIdProvider.java delete mode 100644 wsagent/wsagent-local/src/test/java/org/eclipse/che/EnvironmentInitializationFilterTest.java delete mode 100644 wsagent/wsagent-local/src/test/resources/logback-test.xml diff --git a/agents/bootstrapper/pom.xml b/agents/bootstrapper/pom.xml deleted file mode 100644 index b8be6de1ca4..00000000000 --- a/agents/bootstrapper/pom.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - bootstrapper - Agents :: Bootstrapper - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-sources - compile - - run - - - - - - - - - - - - - - - - - - - - - com.soebes.maven.plugins - iterator-maven-plugin - 0.5.0 - - - compile-go-agents - compile - - iterator - - - - - linux_arm5 - - linux - arm - 5 - - - - linux_arm6 - - linux - arm - 6 - - - - linux_arm7 - - linux - arm - 7 - - - - linux_amd64 - - linux - amd64 - - - - linux_i386 - - linux - 386 - - - - - - - org.codehaus.mojo - exec-maven-plugin - - exec - - go - ${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents/bootstrapper - - build - -a - -installsuffix - cgo - -o - ${project.build.directory}/${item}/bootstrapper - - - 0 - ${project.build.directory}/go-workspace - ${go.target.os} - ${go.target.architecture} - ${go.target.arm.version} - - - - - - - - assembly - package - - iterator - - - - linux_arm5 - linux_arm6 - linux_arm7 - linux_amd64 - linux_i386 - - - - - maven-assembly-plugin - - single - - posix - - ${basedir}/src/assembly/assembly.xml - - - - - - - - - - - diff --git a/agents/bootstrapper/src/assembly/assembly.xml b/agents/bootstrapper/src/assembly/assembly.xml deleted file mode 100644 index 7953eed060e..00000000000 --- a/agents/bootstrapper/src/assembly/assembly.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - ${item} - true - bootstrapper - - zip - tar.gz - - - - ${project.build.directory}/${item} - - bootstrapper - - 0755 - - - - diff --git a/agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats b/agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats deleted file mode 100644 index 25e37ae9dcd..00000000000 --- a/agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bats -# Copyright (c) 2012-2019 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Mario -# -# How to run this script: -# cd -# export CHE_BASE_DIR=$(pwd) -# export LAUNCHER_SCRIPT_TO_TEST=wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh -# export BATS_TEST_SCRIPT=agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats -# export DOCKER_IMAGE=rhche/centos_jdk8 -# docker run -ti --rm -e CHE_BASE_DIR -e LAUNCHER_SCRIPT_TO_TEST -e DOCKER_IMAGE \ -# -v ${CHE_BASE_DIR}/${BATS_TEST_SCRIPT}:/scripts/launcher_tests.bats \ -# -v ${CHE_BASE_DIR}/dockerfiles:/dockerfiles \ -# -v /var/run/docker.sock:/var/run/docker.sock \ -# eclipse/che-bats bats /scripts/launcher_tests.bats -# - -load '/bats-support/load.bash' -load '/bats-assert/load.bash' -. /dockerfiles/cli/tests/test_base.sh - -CONTAINER_NAME="test" - -script_host_path=${CHE_BASE_DIR}/${LAUNCHER_SCRIPT_TO_TEST} - -root_msg="I am root" -not_root_msg="I am a not root" -sudoer_msg="I am a sudoer" -not_sudoer_msg="I am a not a sudoer" -test_snippet="source <(grep -iE -A3 'is_current_user_root\(\)|is_current_user_sudoer\(\)|set_sudo_command\(\)' /launch.sh | grep -v -- "^--$"); is_current_user_root && echo -n '${root_msg} ' || echo -n '${not_root_msg} '; is_current_user_sudoer && echo '${sudoer_msg}' || echo -n '${not_sudoer_msg} '; set_sudo_command; echo SUDO=\${SUDO}" -user="100000" - -# Kill running che server instance if there is any to be able to run tests -setup() { - kill_running_named_container ${CONTAINER_NAME} - remove_named_container ${CONTAINER_NAME} - docker run --security-opt no-new-privileges --user=${user} --name="${CONTAINER_NAME}" -d -v ${script_host_path}:/launch.sh "${DOCKER_IMAGE}" -} - -teardown() { - kill_running_named_container "${CONTAINER_NAME}" - remove_named_container ${CONTAINER_NAME} -} - -@test "should deduce that's not a sudoer nor root when ${LAUNCHER_SCRIPT_TO_TEST} is run as an arbitrary user" { - #GIVEN - expected_msg="${not_root_msg} ${not_sudoer_msg} SUDO=" - - #WHEN - run docker exec --user=${user} "${CONTAINER_NAME}" bash -c "${test_snippet}" - - #THEN - assert_success - assert_output ${expected_msg} -} - diff --git a/agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats b/agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats deleted file mode 100644 index 4570ab9ab81..00000000000 --- a/agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bats -# Copyright (c) 2012-2019 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Mario -# -# How to run this script: -# cd -# export CHE_BASE_DIR=$(pwd) -# export LAUNCHER_SCRIPT_TO_TEST=wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh -# export BATS_TEST_SCRIPT=agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats -# export DOCKER_IMAGE=eclipse/centos_jdk8 -# docker run -ti --rm -e CHE_BASE_DIR -e LAUNCHER_SCRIPT_TO_TEST -e DOCKER_IMAGE \ -# -v ${CHE_BASE_DIR}/${BATS_TEST_SCRIPT}:/scripts/launcher_tests.bats \ -# -v ${CHE_BASE_DIR}/dockerfiles:/dockerfiles \ -# -v /var/run/docker.sock:/var/run/docker.sock \ -# eclipse/che-bats bats /scripts/launcher_tests.bats -# - -load '/bats-support/load.bash' -load '/bats-assert/load.bash' -. /dockerfiles/cli/tests/test_base.sh - -CONTAINER_NAME="batssshscripttest" - -script_host_path=${CHE_BASE_DIR}/${LAUNCHER_SCRIPT_TO_TEST} -root_msg="I am root" -not_root_msg="I am a not root" -sudoer_msg="I am a sudoer" -not_sudoer_msg="I am a not a sudoer" -#test_snippet="source <(grep -iE -A3 'is_current_user_root\(\)|is_current_user_sudoer\(\)' /launch.sh | grep -v -- "^--$"); is_current_user_root && echo -n '${root_msg} ' || echo -n '${not_root_msg} '; is_current_user_sudoer && echo '${sudoer_msg}' || echo '${not_sudoer_msg}'" -test_snippet="source <(grep -iE -A3 'is_current_user_root\(\)|is_current_user_sudoer\(\)|set_sudo_command\(\)' /launch.sh | grep -v -- "^--$"); is_current_user_root && echo -n '${root_msg} ' || echo -n '${not_root_msg} '; is_current_user_sudoer && echo -n '${sudoer_msg} ' || echo '${not_sudoer_msg}'; set_sudo_command; echo SUDO=\${SUDO}" - -# Kill running che server instance if there is any to be able to run tests -setup() { - kill_running_named_container ${CONTAINER_NAME} - remove_named_container ${CONTAINER_NAME} - docker run --name="${CONTAINER_NAME}" -d -v ${script_host_path}:/launch.sh "${DOCKER_IMAGE}" -} - -teardown() { - kill_running_named_container "${CONTAINER_NAME}" - remove_named_container ${CONTAINER_NAME} -} - -@test "should deduce that's root and sudoer when ${LAUNCHER_SCRIPT_TO_TEST} is run as root" { - #GIVEN - user="root" - expected_msg="${root_msg} ${sudoer_msg} SUDO=" - - #WHEN - run docker exec --user=${user} "${CONTAINER_NAME}" bash -c "${test_snippet}" - - #THEN - assert_success -# assert_output --partial ${expected_msg} - assert_output ${expected_msg} -} - -@test "should deduce that's not root but sudoer when ${LAUNCHER_SCRIPT_TO_TEST} is run as user with UID 1000" { - #GIVEN - user="1000" - expected_msg="${not_root_msg} ${sudoer_msg} SUDO=sudo -E" - - #WHEN - run docker exec --user=${user} "${CONTAINER_NAME}" bash -c "${test_snippet}" - - #THEN - assert_success -# assert_output --partial ${expected_msg} - assert_output ${expected_msg} -} diff --git a/agents/che-core-api-agent/src/test/resources/run_launcher_bats_tests.sh b/agents/che-core-api-agent/src/test/resources/run_launcher_bats_tests.sh deleted file mode 100755 index 053235a12d8..00000000000 --- a/agents/che-core-api-agent/src/test/resources/run_launcher_bats_tests.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012-2019 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -#images=(bitnami/che-codeigniter:3.1.3-r6 bitnami/che-express:4.15.3-r2 bitnami/che-java-play:1.3.12-r3 bitnami/che-laravel:5.4.23-r1 bitnami/che-rails:5.1.2-r0 bitnami/che-swift:3.1.1-r0 bitnami/che-symfony:3.3.2-r0 eclipse/centos_jdk8 eclipse/cpp_gcc eclipse/debian_jdk8 eclipse/debian_jre eclipse/dotnet_core eclipse/hadoop-dev eclipse/kotlin eclipse/node eclipse/php eclipse/php:5.6 eclipse/php:gae eclipse/selenium eclipse/ubuntu_android eclipse/ubuntu_go eclipse/ubuntu_jdk8 eclipse/ubuntu_jre eclipse/ubuntu_python:2.7 eclipse/ubuntu_python:gae_python2.7 eclipse/ubuntu_python:latest eclipse/ubuntu_rails kaloyanraev/che-zendserver registry.centos.org/che-stacks/centos-go registry.centos.org/che-stacks/centos-nodejs registry.centos.org/che-stacks/spring-boot registry.centos.org/che-stacks/vertx registry.centos.org/che-stacks/wildfly-swarm tomitribe/ubuntu_tomee_173_jdk8 registry.centos.org/che-stacks/centos-git) -#arbitrary_images=(rhche/centos_jdk8 rhche/vertx rhche/ubuntu_jdk8 rhche/centos-nodejs rhche/spring-boot rhche/wildfly-swarm) -images=(eclipse/centos_jdk8) -arbitrary_images=(rhche/centos_jdk8) - -run_bats_test() { - export CHE_BASE_DIR=$(pwd) - export BATS_TEST_SCRIPT=${1} - export LAUNCHER_SCRIPT_TO_TEST=${2} - export DOCKER_IMAGE=${3} - docker run -ti --rm -e CHE_BASE_DIR -e LAUNCHER_SCRIPT_TO_TEST -e DOCKER_IMAGE \ - -v ${CHE_BASE_DIR}/${BATS_TEST_SCRIPT}:/scripts/launcher_tests.bats \ - -v ${CHE_BASE_DIR}/dockerfiles:/dockerfiles \ - -v /var/run/docker.sock:/var/run/docker.sock \ - eclipse/che-bats bats /scripts/launcher_tests.bats -} - -for image in "${images[@]}"; do - launcher_script_to_test="wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh" - bats_test_script="agents/che-core-api-agent/src/test/resources/agents-launchers-tests.bats" - echo "RUNNING LAUNCHER BATS TESTS FOR IMAGE ${image}" - run_bats_test "${bats_test_script}" "${launcher_script_to_test}" "${image}" -done - -for arbitrary_image in "${arbitrary_images[@]}"; do - launcher_script_to_test="wsagent/agent/src/main/resources/org.eclipse.che.ws-agent.script.sh" - bats_test_script="agents/che-core-api-agent/src/test/resources/agents-launchers-tests-arbitraryuser.bats" - echo "RUNNING LAUNCHER BATS TESTS FOR IMAGE ${arbitrary_image}" - run_bats_test "${bats_test_script}" "${launcher_script_to_test}" "${arbitrary_image}" -done diff --git a/agents/exec/che-exec-agent-client/pom.xml b/agents/exec/che-exec-agent-client/pom.xml deleted file mode 100644 index ae4a610660e..00000000000 --- a/agents/exec/che-exec-agent-client/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - exec-agent-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - che-exec-agent-client - jar - Agent :: Exec :: Client - - - com.google.inject.extensions - guice-assistedinject - - - javax.inject - javax.inject - - - org.eclipse.che - che-exec-agent-shared - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-dto - - - org.eclipse.che.core - che-core-api-workspace - - - diff --git a/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClient.java b/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClient.java deleted file mode 100644 index 74ae2a185a0..00000000000 --- a/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClient.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.client; - -import static org.eclipse.che.dto.server.DtoFactory.newDto; - -import com.google.inject.assistedinject.Assisted; -import java.io.IOException; -import javax.inject.Inject; -import org.eclipse.che.agent.exec.shared.dto.GetProcessResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessKillResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessStartRequestDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessStartResponseDto; -import org.eclipse.che.api.core.ApiException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.rest.HttpJsonRequestFactory; -import org.eclipse.che.api.workspace.server.token.MachineTokenException; -import org.eclipse.che.api.workspace.server.token.MachineTokenProvider; - -/** - * Helps to interact with exec agent via REST. - * - * @author Max Shaposhnik (mshaposh@redhat.com) - */ -public class ExecAgentClient { - - private final HttpJsonRequestFactory requestFactory; - private final MachineTokenProvider machineTokenProvider; - private final String serverEndpoint; - - @Inject - public ExecAgentClient( - HttpJsonRequestFactory requestFactory, - MachineTokenProvider machineTokenProvider, - @Assisted String serverEndpoint) { - this.requestFactory = requestFactory; - this.machineTokenProvider = machineTokenProvider; - this.serverEndpoint = serverEndpoint; - } - - /** - * Starts a process within a given command. - * - * @param workspaceId workspace to run command - * @param command command to execute - * @param name command name - * @param type command type - * @return start process response DTO - * @throws ServerException when submit of the process is failed - */ - public ProcessStartResponseDto startProcess( - String workspaceId, String command, String name, String type) throws ServerException { - ProcessStartRequestDto commandDto = - newDto(ProcessStartRequestDto.class).withCommandLine(command).withName(name).withType(type); - try { - return requestFactory - .fromUrl(serverEndpoint) - .addQueryParam("token", machineTokenProvider.getToken(workspaceId)) - .setAuthorizationHeader("none") // to prevent sending KC token - .usePostMethod() - .setBody(commandDto) - .request() - .asDto(ProcessStartResponseDto.class); - } catch (IOException | ApiException | MachineTokenException e) { - throw new ServerException(e); - } - } - - /** - * Gets information about started process. - * - * @param workspaceId workspace to get process - * @param pid pid of started process - * @return process response DTO - * @throws ServerException when get of the process is failed - */ - public GetProcessResponseDto getProcess(String workspaceId, int pid) throws ServerException { - try { - return requestFactory - .fromUrl(serverEndpoint + "/" + pid) - .addQueryParam("token", machineTokenProvider.getToken(workspaceId)) - .setAuthorizationHeader("none") // to prevent sending KC token - .useGetMethod() - .request() - .asDto(GetProcessResponseDto.class); - } catch (IOException | ApiException | MachineTokenException e) { - throw new ServerException(e); - } - } - - /** - * Kills started process. - * - * @param workspaceId workspace kill process - * @param pid pid of started process - * @return kill process response DTO - * @throws ServerException when kill of the process is failed - */ - public ProcessKillResponseDto killProcess(String workspaceId, int pid) throws ServerException { - try { - return requestFactory - .fromUrl(serverEndpoint + "/" + pid) - .useDeleteMethod() - .addQueryParam("token", machineTokenProvider.getToken(workspaceId)) - .setAuthorizationHeader("none") // to prevent sending KC token - .request() - .asDto(ProcessKillResponseDto.class); - } catch (IOException | ApiException | MachineTokenException e) { - throw new ServerException(e); - } - } -} diff --git a/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClientFactory.java b/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClientFactory.java deleted file mode 100644 index 414005c75cf..00000000000 --- a/agents/exec/che-exec-agent-client/src/main/java/org/eclipse/che/agent/exec/client/ExecAgentClientFactory.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.client; - -/** - * Creates instances of {@link ExecAgentClient} with given exec server endpoint. - * - * @author Max Shaposhnik (mshaposh@redhat.com) - */ -public interface ExecAgentClientFactory { - - ExecAgentClient create(String serverEndpoint); -} diff --git a/agents/exec/che-exec-agent-shared/pom.xml b/agents/exec/che-exec-agent-shared/pom.xml deleted file mode 100644 index b8d873cf3b5..00000000000 --- a/agents/exec/che-exec-agent-shared/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - 4.0.0 - - exec-agent-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - che-exec-agent-shared - jar - Agent :: Exec :: Shared - - ${project.build.directory}/generated-sources/dto/ - - - - com.google.code.gson - gson - - - org.eclipse.che.core - che-core-api-dto - - - - - - 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.agent.exec.shared.dto - - ${dto-generator-out-directory} - org.eclipse.che.agent.exec.shared.dto.server.DtoServerImpls - server - - - - - - org.eclipse.che - che-exec-agent-shared - ${project.version} - - - - - - diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/DtoWithPid.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/DtoWithPid.java deleted file mode 100644 index 6880b3964c1..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/DtoWithPid.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -public interface DtoWithPid { - int getPid(); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsRequestDto.java deleted file mode 100644 index bf5692a9263..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsRequestDto.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface GetProcessLogsRequestDto extends DtoWithPid { - GetProcessLogsRequestDto withPid(int pid); - - String getFrom(); - - GetProcessLogsRequestDto withFrom(String from); - - String getTill(); - - GetProcessLogsRequestDto withTill(String till); - - String getFormat(); - - GetProcessLogsRequestDto withFormat(String format); - - int getLimit(); - - GetProcessLogsRequestDto withLimit(int limit); - - int getSkip(); - - GetProcessLogsRequestDto withSkip(int limit); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsResponseDto.java deleted file mode 100644 index 37166408016..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessLogsResponseDto.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -/** @author Dmitry Kuleshov */ -@DTO -public interface GetProcessLogsResponseDto { - String getKind(); - - GetProcessLogsResponseDto withKind(String kind); - - String getTime(); - - GetProcessLogsResponseDto withTime(String time); - - String getText(); - - GetProcessLogsResponseDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessRequestDto.java deleted file mode 100644 index e63cdaeacf6..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessRequestDto.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface GetProcessRequestDto extends DtoWithPid { - GetProcessRequestDto withPid(int pid); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessResponseDto.java deleted file mode 100644 index 28630e23d14..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessResponseDto.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface GetProcessResponseDto extends DtoWithPid { - GetProcessResponseDto withPid(int pid); - - String getName(); - - GetProcessResponseDto withName(String name); - - String getCommandLine(); - - GetProcessResponseDto withCommandLine(String commandLine); - - String getType(); - - GetProcessResponseDto withType(String type); - - boolean isAlive(); - - GetProcessResponseDto withAlive(boolean alive); - - int getNativePid(); - - GetProcessResponseDto withNativePid(int nativePid); - - int getExitCode(); - - GetProcessResponseDto withExitCode(int exitCode); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesRequestDto.java deleted file mode 100644 index 08daf094a54..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesRequestDto.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface GetProcessesRequestDto { - boolean isAll(); - - GetProcessesRequestDto withAll(boolean all); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesResponseDto.java deleted file mode 100644 index dd59e2553f8..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/GetProcessesResponseDto.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface GetProcessesResponseDto extends DtoWithPid { - GetProcessesResponseDto withPid(int pid); - - String getName(); - - GetProcessesResponseDto withName(String name); - - String getCommandLine(); - - GetProcessesResponseDto withCommandLine(String commandLine); - - String getType(); - - GetProcessesResponseDto withType(String type); - - boolean isAlive(); - - GetProcessesResponseDto withAlive(boolean alive); - - int getNativePid(); - - GetProcessesResponseDto withNativePid(int nativePid); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillRequestDto.java deleted file mode 100644 index a9333009140..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillRequestDto.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessKillRequestDto extends DtoWithPid { - ProcessKillRequestDto withPid(int pid); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillResponseDto.java deleted file mode 100644 index 1ed414f802b..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessKillResponseDto.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessKillResponseDto extends DtoWithPid { - ProcessKillResponseDto withPid(int pid); - - String getText(); - - ProcessKillResponseDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartRequestDto.java deleted file mode 100644 index 71e0a3223e6..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartRequestDto.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessStartRequestDto { - String getName(); - - ProcessStartRequestDto withName(String name); - - String getCommandLine(); - - ProcessStartRequestDto withCommandLine(String commandLine); - - String getType(); - - ProcessStartRequestDto withType(String type); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartResponseDto.java deleted file mode 100644 index 43d71d15ef5..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessStartResponseDto.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessStartResponseDto extends DtoWithPid { - ProcessStartResponseDto withPid(int pid); - - String getName(); - - ProcessStartResponseDto withName(String name); - - String getCommandLine(); - - ProcessStartResponseDto withCommandLine(String commandLine); - - String getType(); - - ProcessStartResponseDto withType(String type); - - boolean getAlive(); - - ProcessStartResponseDto withAlive(boolean alive); - - int getNativePid(); - - ProcessStartResponseDto withNativePid(int nativePid); - - int getExitCode(); - - ProcessStartResponseDto withExitCode(int exitCode); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeRequestDto.java deleted file mode 100644 index 88988455380..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeRequestDto.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessSubscribeRequestDto extends DtoWithPid { - ProcessSubscribeRequestDto withPid(int pid); - - String getEventTypes(); - - ProcessSubscribeRequestDto withEventTypes(String eventTypes); - - String getAfter(); - - ProcessSubscribeRequestDto withAfter(String after); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeResponseDto.java deleted file mode 100644 index 88736cf0e63..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessSubscribeResponseDto.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessSubscribeResponseDto extends DtoWithPid { - ProcessSubscribeResponseDto withPid(int pid); - - String getEventTypes(); - - ProcessSubscribeResponseDto withEventTypes(String eventTypes); - - String getText(); - - ProcessSubscribeResponseDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeRequestDto.java deleted file mode 100644 index 677e3ad52bf..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeRequestDto.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessUnSubscribeRequestDto extends DtoWithPid { - ProcessUnSubscribeRequestDto withPid(int pid); - - String getEventTypes(); - - ProcessUnSubscribeRequestDto withEventTypes(String eventTypes); - - String getAfter(); - - ProcessUnSubscribeRequestDto withAfter(String after); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeResponseDto.java deleted file mode 100644 index 04d5d932176..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/ProcessUnSubscribeResponseDto.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessUnSubscribeResponseDto extends DtoWithPid { - ProcessUnSubscribeResponseDto withPid(int pid); - - String getText(); - - ProcessUnSubscribeResponseDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionRequestDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionRequestDto.java deleted file mode 100644 index 443adf6281f..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionRequestDto.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface UpdateSubscriptionRequestDto extends DtoWithPid { - UpdateSubscriptionRequestDto withPid(int pid); - - String getEventTypes(); - - UpdateSubscriptionRequestDto withEventTypes(String eventTypes); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionResponseDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionResponseDto.java deleted file mode 100644 index f1cb8ecebf4..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/UpdateSubscriptionResponseDto.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface UpdateSubscriptionResponseDto extends DtoWithPid { - UpdateSubscriptionResponseDto withPid(int pid); - - String getEventTypes(); - - UpdateSubscriptionResponseDto withEventTypes(String eventTypes); - - String getText(); - - UpdateSubscriptionResponseDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ConnectedEventDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ConnectedEventDto.java deleted file mode 100644 index b356029ef2c..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ConnectedEventDto.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto.event; - -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ConnectedEventDto { - String getTime(); - - ConnectedEventDto withTime(String time); - - String getChannel(); - - ConnectedEventDto withChannel(String channel); - - String getText(); - - ConnectedEventDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessDiedEventDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessDiedEventDto.java deleted file mode 100644 index f3b1e229edc..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessDiedEventDto.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto.event; - -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessDiedEventDto extends DtoWithPid { - ProcessDiedEventDto withPid(int pid); - - String getTime(); - - ProcessDiedEventDto withTime(String time); - - int getNativePid(); - - ProcessDiedEventDto withNativePid(int nativePid); - - String getName(); - - ProcessDiedEventDto withName(String name); - - String getCommandLine(); - - ProcessDiedEventDto withCommandLine(String commandLine); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStartedEventDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStartedEventDto.java deleted file mode 100644 index 43400bacde9..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStartedEventDto.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto.event; - -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessStartedEventDto extends DtoWithPid { - ProcessStartedEventDto withPid(int pid); - - String getTime(); - - ProcessStartedEventDto withTime(String time); - - int getNativePid(); - - ProcessStartedEventDto withNativePid(int nativePid); - - String getName(); - - ProcessStartedEventDto withName(String name); - - String getCommandLine(); - - ProcessStartedEventDto withCommandLine(String commandLine); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdErrEventDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdErrEventDto.java deleted file mode 100644 index 4e46dc9b724..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdErrEventDto.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto.event; - -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessStdErrEventDto extends DtoWithPid { - ProcessStdErrEventDto withPid(int pid); - - String getTime(); - - ProcessStdErrEventDto withTime(String time); - - String getText(); - - ProcessStdErrEventDto withText(String text); -} diff --git a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdOutEventDto.java b/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdOutEventDto.java deleted file mode 100644 index c13643cb047..00000000000 --- a/agents/exec/che-exec-agent-shared/src/main/java/org/eclipse/che/agent/exec/shared/dto/event/ProcessStdOutEventDto.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.agent.exec.shared.dto.event; - -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.dto.shared.DTO; - -@DTO -public interface ProcessStdOutEventDto extends DtoWithPid { - ProcessStdOutEventDto withPid(int pid); - - String getTime(); - - ProcessStdOutEventDto withTime(String time); - - String getText(); - - ProcessStdOutEventDto withText(String text); -} diff --git a/agents/exec/installer/pom.xml b/agents/exec/installer/pom.xml deleted file mode 100644 index 717c283bc51..00000000000 --- a/agents/exec/installer/pom.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - 4.0.0 - - exec-agent-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - exec-agent - Agent :: Exec - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-sources - compile - - run - - - - - - - - - - - - - - - - - - - - - com.soebes.maven.plugins - iterator-maven-plugin - 0.5.0 - - - compile-go-agents - compile - - iterator - - - - - linux_arm5 - - linux - arm - 5 - - - - linux_arm6 - - linux - arm - 6 - - - - linux_arm7 - - linux - arm - 7 - - - - linux_amd64 - - linux - amd64 - - - - linux_i386 - - linux - 386 - - - - - - - org.codehaus.mojo - exec-maven-plugin - - exec - - go - ${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents/exec-agent - - build - -a - -installsuffix - cgo - -o - ${project.build.directory}/${item}/che-exec-agent - - - 0 - ${project.build.directory}/go-workspace - ${go.target.os} - ${go.target.architecture} - ${go.target.arm.version} - - - - - - - - assembly - package - - iterator - - - - linux_arm5 - linux_arm6 - linux_arm7 - linux_amd64 - linux_i386 - - - - - maven-assembly-plugin - - single - - posix - - ${basedir}/src/assembly/assembly.xml - - - - - - - - - - - diff --git a/agents/exec/installer/src/assembly/assembly.xml b/agents/exec/installer/src/assembly/assembly.xml deleted file mode 100644 index 935f83cb2cd..00000000000 --- a/agents/exec/installer/src/assembly/assembly.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - ${item} - true - exec-agent - - zip - tar.gz - - - - ${project.build.directory}/${item} - - che-exec-agent - - 0755 - - - - diff --git a/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.json b/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.json deleted file mode 100644 index 2f6acaf1087..00000000000 --- a/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "id": "org.eclipse.che.exec", - "version": "1.0.0", - "name": "Exec", - "description": "Agent for command execution", - "dependencies": [], - "properties": {}, - "servers": { - "exec-agent/http": { - "port": "4412/tcp", - "protocol": "http", - "path" : "/process", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - }, - "exec-agent/ws": { - "port": "4412/tcp", - "protocol": "ws", - "path": "/connect", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - } - } -} diff --git a/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.script.sh b/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.script.sh deleted file mode 100644 index 3de2ac19a30..00000000000 --- a/agents/exec/installer/src/main/resources/installers/1.0.0/org.eclipse.che.exec.script.sh +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -CURL_INSTALLED=false -WGET_INSTALLED=false -command -v curl >/dev/null 2>&1 && CURL_INSTALLED=true -command -v wget >/dev/null 2>&1 && WGET_INSTALLED=true - -# no curl, no wget, install curl -if [ ${CURL_INSTALLED} = false ] && [ ${WGET_INSTALLED} = false ]; then - PACKAGES=${PACKAGES}" curl"; - CURL_INSTALLED=true -fi - -CHE_DIR=$HOME/che -LOCAL_AGENT_BINARIES_URI='/mnt/che/exec-agent/exec-agent-${PREFIX}.tar.gz' -DOWNLOAD_AGENT_BINARIES_URI='${WORKSPACE_MASTER_URI}/agent-binaries/${PREFIX}/exec/exec-agent-${PREFIX}.tar.gz' -TARGET_AGENT_BINARIES_URI='file://${CHE_DIR}/exec-agent-${PREFIX}.tar.gz' - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi -MACHINE_TYPE=$(uname -m) -SHELL_INTERPRETER="/bin/sh" - -mkdir -p ${CHE_DIR} -${SUDO} mkdir -p /projects -if is_current_user_sudoer; then - ${SUDO} sh -c "chown $(id -u -n) /projects" -fi - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -# Centos 6.6, 6.7, 6.8 -############ -elif echo ${LINUX_TYPE} | grep -qi "CentOS"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ - -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - -command -v pidof >/dev/null 2>&1 && { - pidof exec-agent >/dev/null 2>&1 && exit -} || { - ps -fC exec-agent >/dev/null 2>&1 && exit -} - - -######################## -### Install Exec agent ### -######################## -if echo ${MACHINE_TYPE} | grep -qi "x86_64"; then - PREFIX=linux_amd64 -elif echo ${MACHINE_TYPE} | grep -qi "arm5"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm6"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm7"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "armv7l"; then - PREFIX=linux_arm7 -else - >&2 echo "Unrecognized Machine Type" - >&2 uname -a - exit 1 -fi - -# Compute URI of workspace master -WORKSPACE_MASTER_URI=$(echo $CHE_API | cut -d / -f 1-3) - -## Evaluate variables now that prefix is defined -eval "LOCAL_AGENT_BINARIES_URI=${LOCAL_AGENT_BINARIES_URI}" -eval "DOWNLOAD_AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI}" -eval "TARGET_AGENT_BINARIES_URI=${TARGET_AGENT_BINARIES_URI}" - -LOCAL_AGENT_PATH= -if [ -f "${LOCAL_AGENT_BINARIES_URI}" ]; then - AGENT_BINARIES_URI="file://${LOCAL_AGENT_BINARIES_URI}" - LOCAL_AGENT_PATH=${LOCAL_AGENT_BINARIES_URI} -elif [ -f $(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") ]; then - AGENT_BINARIES_URI="file://"$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") - LOCAL_AGENT_PATH=$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") -else - AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI} -fi - -# If file is already on the filesystem, use it -if [ ! -z ${LOCAL_AGENT_PATH} ]; then - tar zxf ${LOCAL_AGENT_PATH} -C ${CHE_DIR} -else - echo "Exec Agent binary is downloaded remotely" - # Use curl - if [ ${CURL_INSTALLED} = true ]; then - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--cacert /tmp/che/secret/ca.crt" - fi - - if curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g'); then - curl ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') -s $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - curl ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') -s $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - curl -s $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') | tar xzf - -C ${CHE_DIR} - else - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--ca-certificate /tmp/che/secret/ca.crt" - fi - - # replace https by http as wget may not be able to handle ssl - AGENT_BINARIES_URI=$(echo ${AGENT_BINARIES_URI} | sed 's/https/http/g') - - # use wget - WGET_SPIDER="wget --spider" - if wget 2>&1 | grep -q BusyBox; then - WGET_SPIDER="wget -s" - fi - LOCAL_DOWNLOAD=$(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') - if ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') >/dev/null; then - wget ${CA_ARG} -qO ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - wget ${CA_ARG} -qO- ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - tar xzf ${LOCAL_DOWNLOAD} -C ${CHE_DIR} - fi -fi - - - -if [ -f /bin/bash ]; then - SHELL_INTERPRETER="/bin/bash" -fi - -##################################################### -### exec-agent run command will be added here ### -##################################################### -$HOME/che/exec-agent/che-exec-agent -addr :4412 -cmd ${SHELL_INTERPRETER} -logs-dir $HOME/che/exec-agent/logs diff --git a/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.json b/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.json deleted file mode 100644 index 78973645cd8..00000000000 --- a/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "id": "org.eclipse.che.exec", - "version": "1.0.1", - "name": "Exec", - "description": "Agent for command execution", - "dependencies": [], - "properties": {}, - "servers": { - "exec-agent/http": { - "port": "4412/tcp", - "protocol": "http", - "path" : "/process", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - }, - "exec-agent/ws": { - "port": "4412/tcp", - "protocol": "ws", - "path": "/connect", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - } - } -} diff --git a/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.script.sh b/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.script.sh deleted file mode 100644 index 46f5226d09b..00000000000 --- a/agents/exec/installer/src/main/resources/installers/1.0.1/org.eclipse.che.exec.script.sh +++ /dev/null @@ -1,251 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -CURL_INSTALLED=false -WGET_INSTALLED=false -command -v curl >/dev/null 2>&1 && CURL_INSTALLED=true -command -v wget >/dev/null 2>&1 && WGET_INSTALLED=true - -# no curl, no wget, install curl -if [ ${CURL_INSTALLED} = false ] && [ ${WGET_INSTALLED} = false ]; then - PACKAGES=${PACKAGES}" curl"; - CURL_INSTALLED=true -fi - -CHE_DIR=$HOME/che -LOCAL_AGENT_BINARIES_URI='/mnt/che/exec-agent/exec-agent-${PREFIX}.tar.gz' -DOWNLOAD_AGENT_BINARIES_URI='${WORKSPACE_MASTER_URI}/agent-binaries/${PREFIX}/exec/exec-agent-${PREFIX}.tar.gz' -TARGET_AGENT_BINARIES_URI='file://${CHE_DIR}/exec-agent-${PREFIX}.tar.gz' - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi -MACHINE_TYPE=$(uname -m) -SHELL_INTERPRETER="/bin/sh" - -mkdir -p ${CHE_DIR} -${SUDO} mkdir -p /projects -if is_current_user_sudoer; then - ${SUDO} sh -c "chown $(id -u -n) /projects" -fi - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -# Centos 6.6, 6.7, 6.8 -############ -elif echo ${LINUX_TYPE} | grep -qi "CentOS"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ - -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################## -### Install Exec agent ### -######################## -if echo ${MACHINE_TYPE} | grep -qi "x86_64"; then - PREFIX=linux_amd64 -elif echo ${MACHINE_TYPE} | grep -qi "arm5"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm6"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm7"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "armv7l"; then - PREFIX=linux_arm7 -else - >&2 echo "Unrecognized Machine Type" - >&2 uname -a - exit 1 -fi - -# Compute URI of workspace master -WORKSPACE_MASTER_URI=$(echo $CHE_API | cut -d / -f 1-3) - -## Evaluate variables now that prefix is defined -eval "LOCAL_AGENT_BINARIES_URI=${LOCAL_AGENT_BINARIES_URI}" -eval "DOWNLOAD_AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI}" -eval "TARGET_AGENT_BINARIES_URI=${TARGET_AGENT_BINARIES_URI}" - -LOCAL_AGENT_PATH= -if [ -f "${LOCAL_AGENT_BINARIES_URI}" ]; then - AGENT_BINARIES_URI="file://${LOCAL_AGENT_BINARIES_URI}" - LOCAL_AGENT_PATH=${LOCAL_AGENT_BINARIES_URI} -elif [ -f $(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") ]; then - AGENT_BINARIES_URI="file://"$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") - LOCAL_AGENT_PATH=$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") -else - AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI} -fi - -# If file is already on the filesystem, use it -if [ ! -z ${LOCAL_AGENT_PATH} ]; then - tar zxf ${LOCAL_AGENT_PATH} -C ${CHE_DIR} -else - echo "Exec Agent binary is downloaded remotely" - # Use curl - if [ ${CURL_INSTALLED} = true ]; then - - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--cacert /tmp/che/secret/ca.crt" - fi - - if curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g'); then - curl -sSf ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - curl -sSf ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - else - # both of test curl commands failed. - # perform them without --silent option to propagate errors - echo "Trying: curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g')" - curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - echo "Trying: curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g')" - curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - curl -sSf $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') | tar xzf - -C ${CHE_DIR} - else - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--ca-certificate /tmp/che/secret/ca.crt" - fi - - # replace https by http as wget may not be able to handle ssl - AGENT_BINARIES_URI=$(echo ${AGENT_BINARIES_URI} | sed 's/https/http/g') - - # use wget - WGET_SPIDER="wget --spider" - if wget 2>&1 | grep -q BusyBox; then - WGET_SPIDER="wget -s" - fi - LOCAL_DOWNLOAD=$(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') - if ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') >/dev/null; then - wget ${CA_ARG} -qO ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - wget ${CA_ARG} -qO- ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - tar xzf ${LOCAL_DOWNLOAD} -C ${CHE_DIR} - fi -fi - - - -if [ -f /bin/bash ]; then - SHELL_INTERPRETER="/bin/bash" -fi - -EXEC_AGENT_PORT=${CHE_SERVER_EXEC_AGENT_HTTP_PORT:-4412} - - -LOGS_DIR='' -## Checks whether workspace logs root exists if it does override exec-agent logs directory otherwise default folder would be used -if [ -d "${CHE_WORKSPACE_LOGS_ROOT__DIR}" ]; then - LOGS_DIR=$CHE_WORKSPACE_LOGS_ROOT__DIR/exec-agent -else - LOGS_DIR=$HOME/che/exec-agent/logs -fi - -$HOME/che/exec-agent/che-exec-agent -addr :${EXEC_AGENT_PORT} -cmd ${SHELL_INTERPRETER} -logs-dir $LOGS_DIR diff --git a/agents/exec/pom.xml b/agents/exec/pom.xml deleted file mode 100644 index 12d7a038b1a..00000000000 --- a/agents/exec/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - exec-agent-parent - pom - Agent :: Exec :: Parent - - che-exec-agent-shared - che-exec-agent-client - installer - - diff --git a/agents/git-credentials/pom.xml b/agents/git-credentials/pom.xml deleted file mode 100644 index b2dc811fe27..00000000000 --- a/agents/git-credentials/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - git-credentials-agent - Git Credentials Agent - diff --git a/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.json b/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.json deleted file mode 100644 index fd3cbc49473..00000000000 --- a/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "org.eclipse.che.git-credentials", - "version": "1.0.0", - "name": "Git credentials", - "description": "Agent fetches SSH keys, Git username and email from CHE user preferences, and injects to console Git" -} diff --git a/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.script.sh b/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.script.sh deleted file mode 100644 index e00a71e97f5..00000000000 --- a/agents/git-credentials/src/main/resources/installers/1.0.0/org.eclipse.che.git.script.sh +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -SCRIPT_FILE=~/.ssh/git.sh -mkdir -p ~/.ssh - -token=$(if [ "$CHE_MACHINE_TOKEN" != "dummy_token" ]; then echo "$CHE_MACHINE_TOKEN"; fi) -che_host=$(cat /etc/hosts | grep che-host | awk '{print $1;}') -api_url=$(if [ "$CHE_API" != "http://che-host:8080/api" ]; then echo "$CHE_API"; else echo "$che_host:8080/api"; fi) - -CURL_INSTALLED=false -WGET_INSTALLED=false -command -v curl >/dev/null 2>&1 && CURL_INSTALLED=true -command -v wget >/dev/null 2>&1 && WGET_INSTALLED=true - -# no curl, no wget, install curl -if [ ${CURL_INSTALLED} = false ] && [ ${WGET_INSTALLED} = false ]; then - PACKAGES=${PACKAGES}" curl"; - CURL_INSTALLED=true -fi - -request=$(if ${CURL_INSTALLED}; then echo 'curl -s'; else echo 'wget -qO-'; fi) - -echo 'host=$(echo $(if [ "$1" = "-p" ]; then echo "$3" ; else echo "$1"; fi) | sed -e "s/git@//")' > ${SCRIPT_FILE} -echo 'token='"$token" >> ${SCRIPT_FILE} -echo 'api_url='"$api_url" >> ${SCRIPT_FILE} -echo 'request="'${request}'"' >> ${SCRIPT_FILE} -# Ssh key request may return key with decoded '=' symbol, so need to replace '\u003d' to '='. -# TODO remove the replacement after https://github.com/eclipse/che/issues/5253 will be fixed. -echo 'ssh_key=$(${request} "$api_url/ssh/vcs/find?name=$host$(if [ -n "$token" ]; then echo "&token=$token"; fi)"| grep -Po '\''"privateKey":.*?[^\\\\]",'\''| sed -e "s/\"privateKey\":\"//" | sed -e "s/\\\\\u003d/=/g")' >> ${SCRIPT_FILE} -echo 'if [ -n "$ssh_key" ]' >> ${SCRIPT_FILE} -echo 'then' >> ${SCRIPT_FILE} -echo ' key_file=$(mktemp)' >> ${SCRIPT_FILE} -echo ' echo "$ssh_key" > "$key_file"' >> ${SCRIPT_FILE} -echo ' ssh -i "$key_file" "$@"' >> ${SCRIPT_FILE} -echo ' rm "$key_file"' >> ${SCRIPT_FILE} -echo 'else' >> ${SCRIPT_FILE} -echo ' ssh "$@"' >> ${SCRIPT_FILE} -echo 'fi' >> ${SCRIPT_FILE} - -chmod +x ${SCRIPT_FILE} - -user_name="$(${request} "$api_url/preferences$(if [ -n "$token" ]; then echo "?token=$token"; fi)" | grep -Po '"git.committer.name":.*?[^\\]",' | sed -e "s/\"git.committer.name\":\"//" | sed -e "s/\",//")" -user_email="$(${request} "$api_url/preferences$(if [ -n "$token" ]; then echo "?token=$token"; fi)" | grep -Po '"git.committer.email":.*?[^\\]",' | sed -e "s/\"git.committer.email\":\"//" | sed -e "s/\",//")" -git config --global user.name \""$user_name"\" -git config --global user.email \""$user_email"\" - -if [ -z "$(cat ~/.bashrc | grep GIT_SSH)" ] -then - printf '\n export GIT_SSH='"$SCRIPT_FILE" >> ~/.bashrc -fi diff --git a/agents/go-agents/.gitignore b/agents/go-agents/.gitignore deleted file mode 100644 index 959febc73a3..00000000000 --- a/agents/go-agents/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -exec-agent/exec-agent -exec-agent/logs -terminal-agent/terminal-agent -bootstrapper/bootstrapper diff --git a/agents/go-agents/Gopkg.lock b/agents/go-agents/Gopkg.lock deleted file mode 100644 index 38f34ba042f..00000000000 --- a/agents/go-agents/Gopkg.lock +++ /dev/null @@ -1,61 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:217f778e19b8d206112c21d21a7cc72ca3cb493b67631680a2324bc50335d432" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "dbeaa9332f19a944acb5736b4456cfcc02140e29" - version = "v3.1.0" - -[[projects]] - digest = "1:1f62c7f600ff6eb10f38bd414dd112b244ebadfd611bb50bedad3424743b66a9" - name = "github.com/eclipse/che-go-jsonrpc" - packages = [ - ".", - "event", - "jsonrpctest", - "jsonrpcws", - ] - pruneopts = "UT" - revision = "87cdb8da2597bc22a91f8dcff72999ac8fe5cd8c" - version = "0.2.0" - -[[projects]] - digest = "1:b1888d094847a5198b91d76a299e45c2c8debe9f9b9eb9a6e7b1dc7ec2a27513" - name = "github.com/gorilla/websocket" - packages = ["."] - pruneopts = "UT" - revision = "361d4c0ffd78338ebe0a9e6320cdbe115d7dc026" - -[[projects]] - digest = "1:96ffeb0c3df79ef8ec60b22cd18d9a2d12747166caec50578eccf9ffb19ac1c7" - name = "github.com/julienschmidt/httprouter" - packages = ["."] - pruneopts = "UT" - revision = "4563b0ba73e4db6c6423b60a26f3cadd2e9a1ec9" - -[[projects]] - digest = "1:094e04c4742b596bce4455eb535d4e4365016b44016db76f8593211406d77299" - name = "github.com/kr/pty" - packages = ["."] - pruneopts = "UT" - revision = "fa756f09eeb418bf1cc6268c66ceaad9bb98f598" - version = "v1.1.2" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/dgrijalva/jwt-go", - "github.com/eclipse/che-go-jsonrpc", - "github.com/eclipse/che-go-jsonrpc/event", - "github.com/eclipse/che-go-jsonrpc/jsonrpctest", - "github.com/eclipse/che-go-jsonrpc/jsonrpcws", - "github.com/gorilla/websocket", - "github.com/julienschmidt/httprouter", - "github.com/kr/pty", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/agents/go-agents/Gopkg.toml b/agents/go-agents/Gopkg.toml deleted file mode 100644 index c797a8e8297..00000000000 --- a/agents/go-agents/Gopkg.toml +++ /dev/null @@ -1,24 +0,0 @@ -[[constraint]] - name = "github.com/eclipse/che-go-jsonrpc" - version = "=0.2.0" - -[[constraint]] - name = "github.com/dgrijalva/jwt-go" - version = "=3.1.0" - -[[constraint]] - name = "github.com/gorilla/websocket" - revision = "361d4c0ffd78338ebe0a9e6320cdbe115d7dc026" - -[[constraint]] - name = "github.com/kr/pty" - version = "=1.1.2" - -[[constraint]] - name = "github.com/julienschmidt/httprouter" - revision = "4563b0ba73e4db6c6423b60a26f3cadd2e9a1ec9" - - -[prune] - go-tests = true - unused-packages = true diff --git a/agents/go-agents/README.md b/agents/go-agents/README.md deleted file mode 100644 index 99b6063cf69..00000000000 --- a/agents/go-agents/README.md +++ /dev/null @@ -1,59 +0,0 @@ -Summary ---- -Golang based server for executing commands and streaming process output logs, -also websocket-terminal. - - -Requirements --- -- golang 1.6+ - - -Docs ---- -- jsonrpc2.0 based [Websocket API](docs/ws_api.md) -- jsonrpc2.0 based [Events](docs/events.md) -- [REST API](docs/rest_api.md) - -Development ---- - -##### Link the sources to standard go workspace - -```bash -export CHE_PATH=~/code/che -mkdir $GOPATH/src/github.com/eclipse/che/agents -p -ln -s $CHE_PATH/agents/go-agents $GOPATH/src/github.com/eclipse/che/agents/go-agents -``` - -That's it, `$GOPATH/src/github.com/eclipse/che/agents/go-agents` project is ready. - -##### Building linked project - -```bash -cd $GOPATH/src/github.com/eclipse/che/agents/go-agents && go build ./... -``` - -#### Building exec agent executable - -```bash -cd $GOPATH/src/github.com/eclipse/che/agents/go-agents/exec-agent && go build -``` - -#### Building terminal agent executable - -```bash -cd $GOPATH/src/github.com/eclipse/che/agents/go-agents/terminal-agent && go build -``` - -##### Running linked project tests - -```bash -cd $GOPATH/src/github.com/eclipse/che/agents/go-agents && go test ./... -``` - -##### Formatting linked project sources - -```bash -cd $GOPATH/src/github.com/eclipse/che/agents/go-agents && go fmt ./... -``` diff --git a/agents/go-agents/bootstrapper/booter/booter.go b/agents/go-agents/bootstrapper/booter/booter.go deleted file mode 100644 index a560d894e8b..00000000000 --- a/agents/go-agents/bootstrapper/booter/booter.go +++ /dev/null @@ -1,335 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package booter (short for bootstrapper) provides facilities for -// executing installations and streaming statuses/logs related to installation process. -// Statuses and logs are defined by bootstrapper spec -// see https://github.com/eclipse/che/issues/4096#issuecomment-283067971 -package booter - -import ( - "errors" - "log" - "sync" - "time" - - "github.com/eclipse/che-go-jsonrpc/event" - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che/agents/go-agents/core/process" -) - -const ( - installerCmdType = "installer" -) - -var ( - installers []Installer - runtimeID RuntimeID - machineName string - installerTimeout time.Duration - checkPeriod time.Duration - logsEndpointReconnectPeriod time.Duration - - bus = event.NewBus() -) - -// Connector encloses implementation specific jsonrpc connection establishment. -type Connector interface { - Connect() (*jsonrpc.Tunnel, error) -} - -// Init sets initializes bootstrapper configuration. -func Init(id RuntimeID, mName string, instTimeoutSec, checkPeriodSec, logsEndpointReconnectPeriodSec int) { - runtimeID = id - machineName = mName - installerTimeout = time.Second * time.Duration(instTimeoutSec) - checkPeriod = time.Second * time.Duration(checkPeriodSec) - logsEndpointReconnectPeriod = time.Second * time.Duration(logsEndpointReconnectPeriodSec) -} - -// AddAll adds batch of installers to the installation sequence. -func AddAll(newInstallers []Installer) { - installers = append(installers, newInstallers...) -} - -// PushLogs sets given tunnel as consumer of installer logs. -// Connector is used to reconnect to jsonrpc endpoint if -// established connection behind given tunnel was lost. -func PushLogs(tun *jsonrpc.Tunnel, connector Connector) { - bus.Sub(&tunnelBroadcaster{ - tunnel: tun, - connector: connector, - reconnectPeriod: logsEndpointReconnectPeriod, - reconnectOnce: &sync.Once{}, - }, InstallerLogEventType) -} - -// PushStatuses sets given tunnel as consumer of installer/bootstrapper statuses. -func PushStatuses(tun *jsonrpc.Tunnel) { - bus.SubAny(&tunnelBroadcaster{tunnel: tun}, InstallerStatusChangedEventType, StatusChangedEventType) -} - -// Start starts installation. -// If there is at least one installer which defines server, this func -// will hold until all the processes which started the server die. -// If there is no installer which provides server, this func exits after -// all the installation are completed. -// In both cases if any error occurs during installation, -// start exits returning that error. -// If any different from nil error value returned, bootstrapping should be considered as failed. -func Start() error { - if len(installers) == 0 { - return errors.New("No installers added, nothing to start") - } - - printPlan() - - log.Print("Starting installations") - pubStarting() - for _, installer := range installers { - pubStartingInstallation(installer.ID) - - log.Printf("Installing '%s'", installer.ID) - if err := installOne(installer); err != nil { - log.Printf("Installation of '%s' failed", installer.ID) - pubInstallationFailed(installer.ID, err.Error()) - pubBootstrappingFailed(err.Error()) - closeConsumers() - killProcesses() - return err - } - - log.Printf("Installation of '%s' successfully finished", installer.ID) - pubInstallationCompleted(installer) - } - log.Printf("All installations successfully finished") - pubBootstrappingDone() - - err := waitStartedProcessesDie() - closeConsumers() - return err -} - -func installOne(installer Installer) error { - var inst installation - if installer.HasServers() { - inst = &serverInst{installer, checkPeriod, installerTimeout} - } else { - inst = &scriptInst{installer, installerTimeout} - } - return inst.execute() -} - -func broadcastLogs(installer string, event process.Event) { - if outEvent, ok := event.(*process.OutputEvent); ok { - var stream string - if event.Type() == process.StderrEventType { - stream = StderrStream - } else { - stream = StdoutStream - } - bus.Pub(&InstallerLogEvent{ - Stream: stream, - Text: outEvent.Text, - Installer: installer, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) - } -} - -func closeConsumers() { - for _, candidates := range bus.Clear() { - for _, candidate := range candidates { - if broadcaster, ok := candidate.(*tunnelBroadcaster); ok { - broadcaster.Close() - } - } - } -} - -func killProcesses() { - for _, p := range aliveStartedProcesses() { - if err := process.Kill(p.Pid); err != nil { - log.Print(err) - } - } -} - -func pubBootstrappingFailed(err string) { - bus.Pub(&StatusChangedEvent{ - Status: StatusFailed, - Error: err, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -func pubBootstrappingDone() { - bus.Pub(&StatusChangedEvent{ - Status: StatusDone, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -func pubStarting() { - bus.Pub(&StatusChangedEvent{ - Status: StatusStarting, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -func pubStartingInstallation(installer string) { - bus.Pub(&InstallerStatusChangedEvent{ - Status: InstallerStatusStarting, - Installer: installer, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -func pubInstallationFailed(installer string, err string) { - bus.Pub(&InstallerStatusChangedEvent{ - Status: InstallerStatusFailed, - Installer: installer, - Error: err, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -func pubInstallationCompleted(installer Installer) { - var status string - if installer.HasServers() { - status = InstallerStatusRunning - } else { - status = InstallerStatusDone - } - bus.Pub(&InstallerStatusChangedEvent{ - Status: status, - Installer: installer.ID, - MachineEvent: MachineEvent{ - MachineName: machineName, - RuntimeID: runtimeID, - Time: time.Now(), - }, - }) -} - -// Wait until all the started processes by bootstrapper die. -// If all the installers do not provide servers - this method exits. -// Otherwise, if there is an installer which starts server, this func -// will hold until the processes which started servers are all dead. -func waitStartedProcessesDie() error { - processes := aliveStartedProcesses() - if len(processes) == 0 { - return nil - } - - wg := sync.WaitGroup{} - wg.Add(len(processes)) - - now := time.Now() - for _, p := range processes { - subscriber := process.Subscriber{ - ID: "wait-" + p.Name, - Mask: process.StatusBit, - Consumer: process.EventConsumerFunc(func(e process.Event) { - if e.Type() == process.DiedEventType { - wg.Done() - } - }), - } - if err := process.RestoreSubscriber(p.Pid, subscriber, now); err != nil { - log.Printf("Trying to wait process. Error restoring subscriber %s", err) - wg.Done() - } - } - - wg.Wait() - return nil -} - -func aliveStartedProcesses() []process.MachineProcess { - allProcesses := process.GetProcesses(false) - result := make([]process.MachineProcess, 0, len(allProcesses)) - for _, p := range allProcesses { - if p.Type == installerCmdType { - result = append(result, p) - } - } - return result -} - -type tunnelBroadcaster struct { - tunnel *jsonrpc.Tunnel - connector Connector - reconnectPeriod time.Duration - reconnectOnce *sync.Once -} - -func (tb *tunnelBroadcaster) Accept(e event.E) { - if err := tb.tunnel.Notify(e.Type(), e); err != nil { - log.Printf("Trying to send event of type '%s' to closed tunnel '%s'", e.Type(), tb.tunnel.ID()) - if tb.connector != nil && tb.reconnectPeriod > 0 { - // if multiple accepts are on this point - tb.reconnectOnce.Do(func() { tb.goReconnect() }) - } - } -} - -func (tb *tunnelBroadcaster) IsDone() bool { - return tb.tunnel.IsClosed() -} - -func (tb *tunnelBroadcaster) Close() { tb.tunnel.Close() } - -func (tb *tunnelBroadcaster) goReconnect() { - go func() { - time.Sleep(tb.reconnectPeriod) - - if tunnel, err := tb.connector.Connect(); err != nil { - log.Printf("Reconnect to logs endpoint failed, next attempt in %ds", logsEndpointReconnectPeriod/time.Second) - tb.goReconnect() - } else { - log.Printf("Successfully reconnected to logs endpoint") - PushLogs(tunnel, tb.connector) - } - }() -} - -func printPlan() { - log.Print("Planning to install") - for _, installer := range installers { - log.Printf("- %s:%s - %s", installer.ID, installer.Version, installer.Description) - } -} diff --git a/agents/go-agents/bootstrapper/booter/booter_test.go b/agents/go-agents/bootstrapper/booter/booter_test.go deleted file mode 100644 index 6579b8dd162..00000000000 --- a/agents/go-agents/bootstrapper/booter/booter_test.go +++ /dev/null @@ -1,269 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package booter - -import ( - "encoding/json" - "testing" - "time" - "sync" - - "github.com/eclipse/che-go-jsonrpc/event" - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che-go-jsonrpc/jsonrpctest" -) - -var ( - testRuntimeID = RuntimeID{ - Workspace: "my-workspace", - Environment: "my-env", - OwnerId: "id", - } - testMachineName = "my-machine" - - print10numbersInst = Installer{ - ID: "test-installer-1", - Description: "Installer for testing", - Version: "1.0", - Script: "printf \"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\"", - } - echoTestInst = Installer{ - ID: "test-installer-2", - Description: "Installer for testing", - Version: "1.0", - Script: "echo test", - } - print3numbersAndFailInst = Installer{ - ID: "test-installer-3", - Description: "Installer for testing", - Version: "1.0", - Script: "printf \"1\n\" && sleep 1 && printf \"error\" >&2 && exit 1", - } -) - -func TestBootstrap(t *testing.T) { - // configuring bootstrapper - runtimeID = testRuntimeID - machineName = testMachineName - installerTimeout = time.Second * 2 - installers = []Installer{print10numbersInst, echoTestInst} - - // configuring jsonrpc endpoint - tunnel, cr, rr := jsonrpctest.NewTmpTunnel(2 * time.Second) - defer tunnel.Close() - defer rr.Close() - PushStatuses(tunnel) - PushLogs(tunnel, nil) - - startAndWaitInstallations(t) - - expectedEvents := []event.E{ - &StatusChangedEvent{Status: StatusStarting}, - - &InstallerStatusChangedEvent{Status: InstallerStatusStarting, Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "1", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "2", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "3", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "4", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "5", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "6", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "7", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "8", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "9", Installer: print10numbersInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "10", Installer: print10numbersInst.ID}, - &InstallerStatusChangedEvent{Status: InstallerStatusDone, Installer: print10numbersInst.ID}, - - &InstallerStatusChangedEvent{Status: InstallerStatusStarting, Installer: echoTestInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "test", Installer: echoTestInst.ID}, - &InstallerStatusChangedEvent{Status: InstallerStatusDone, Installer: echoTestInst.ID}, - - &StatusChangedEvent{Status: StatusDone}, - } - - requests, err := cr.GetAllRequests() - if err != nil { - t.Fatal(err) - } - checkEvents(t, requests, expectedEvents...) -} - -func TestBootstrapWhenItFails(t *testing.T) { - // configuring bootstrapper - runtimeID = testRuntimeID - machineName = testMachineName - installerTimeout = time.Second * 2 - installers = []Installer{print3numbersAndFailInst} - - // configuring jsonrpc endpoint - tunnel, cr, rr := jsonrpctest.NewTmpTunnel(2 * time.Second) - defer tunnel.Close() - defer rr.Close() - PushStatuses(tunnel) - PushLogs(tunnel, nil) - - startAndWaitInstallations(t) - - expectedEvents := []event.E{ - &StatusChangedEvent{Status: StatusStarting}, - - &InstallerStatusChangedEvent{Status: InstallerStatusStarting, Installer: print3numbersAndFailInst.ID}, - &InstallerLogEvent{Stream: StdoutStream, Text: "1", Installer: print3numbersAndFailInst.ID}, - &InstallerLogEvent{Stream: StderrStream, Text: "error", Installer: print3numbersAndFailInst.ID}, - - &InstallerStatusChangedEvent{Status: InstallerStatusFailed, Installer: print3numbersAndFailInst.ID, Error: "error"}, - - &StatusChangedEvent{Status: InstallerStatusFailed, Error: "error"}, - } - - requests, err := cr.GetAllRequests() - if err != nil { - t.Fatal(err) - } - checkEvents(t, requests, expectedEvents...) -} - -func TestReconnect(t *testing.T) { - // create tunnel & close it immediately - closedTunnel := jsonrpc.NewManagedTunnel(jsonrpctest.NewConnRecorder()) - closedTunnel.Close() - - connector := newTestConnector() - defer connector.doClose() - - tb := tunnelBroadcaster{ - tunnel: closedTunnel, - connector: connector, - reconnectPeriod: time.Microsecond, - reconnectOnce: &sync.Once{}, - } - // force broadcaster to reconnect - tb.Accept(&InstallerLogEvent{Text: "test"}) - - // publish log events until stop is not published - stopPublishing := make(chan bool) - go func() { - for { - select { - case <-stopPublishing: - return - default: - bus.Pub(&InstallerLogEvent{Text: "test"}) - } - } - }() - - err := connector.connRec.WaitUntil(jsonrpctest.WriteCalledAtLeast(1)) - stopPublishing <- true - if err != nil { - t.Fatal("Didn't reconnect in time") - } -} - -func startAndWaitInstallations(t *testing.T) { - complete := make(chan bool, 1) - go func() { - Start() - complete <- true - }() - select { - case <-time.After(time.Second * 2): - t.Fatalf("Installation timeout is reached") - case <-complete: - } -} - -func checkEvents(t *testing.T, requests []*jsonrpc.Request, expectedEvents ...event.E) { - if len(requests) != len(expectedEvents) { - t.Logf("Expected evens len is '%d' while published '%d'", len(expectedEvents), len(requests)) - t.Logf("Received events:") - for _, req := range requests { - t.Log(req.Method) - } - t.FailNow() - } - for i := range requests { - request := requests[i] - expectedEvent := expectedEvents[i] - if request.Method != expectedEvent.Type() { - t.Fatalf("Even type '%s' != '%s'", requests[i].Method, expectedEvents[i].Type()) - } - - switch expectedEvent.Type() { - case StatusChangedEventType: - actual := &StatusChangedEvent{} - json.Unmarshal(request.Params, actual) - checkStatusEvent(t, actual, expectedEvent.(*StatusChangedEvent)) - case InstallerStatusChangedEventType: - actual := &InstallerStatusChangedEvent{} - json.Unmarshal(request.Params, actual) - checkInstallerStatusEvent(t, actual, expectedEvent.(*InstallerStatusChangedEvent)) - case InstallerLogEventType: - actual := &InstallerLogEvent{} - json.Unmarshal(request.Params, actual) - checkLogEvent(t, actual, expectedEvent.(*InstallerLogEvent)) - } - } -} - -func checkStatusEvent(t *testing.T, actual, expected *StatusChangedEvent) { - if expected.Status != actual.Status { - t.Fatalf("Expected bootstrapper status '%s' but got '%s'", expected.Status, actual.Status) - } -} - -func checkInstallerStatusEvent(t *testing.T, actual, expected *InstallerStatusChangedEvent) { - if expected.Status != actual.Status { - t.Fatalf("Expected installer status '%s' but got '%s'", expected.Status, actual.Status) - } - if expected.Installer != actual.Installer { - t.Fatalf("Expected installer id '%s' but got '%s'", expected.Installer, actual.Installer) - } -} - -func checkLogEvent(t *testing.T, actual, expected *InstallerLogEvent) { - if expected.Text != actual.Text { - t.Fatalf("Expected log text to be '%s' but got '%s'", expected.Text, actual.Text) - } - if expected.Stream != actual.Stream { - t.Fatalf( - "Expected stream '%s' for log message '%s' but got '%s'", - expected.Stream, - expected.Text, - actual.Stream, - ) - } - if expected.Installer != actual.Installer { - t.Fatalf("Expected installer id '%s' but got '%s'", expected.Installer, actual.Installer) - } -} - -func newTestConnector() *testConnector { - c := &testConnector{} - c.tunnel, c.connRec, c.reqRec = jsonrpctest.NewTmpTunnel(2 * time.Second) - return c -} - -type testConnector struct { - connRec *jsonrpctest.ConnRecorder - reqRec *jsonrpctest.ReqRecorder - tunnel *jsonrpc.Tunnel -} - -func (c *testConnector) Connect() (*jsonrpc.Tunnel, error) { - return c.tunnel, nil -} - -func (c *testConnector) doClose() { - c.tunnel.Close() - c.reqRec.Close() -} diff --git a/agents/go-agents/bootstrapper/booter/events.go b/agents/go-agents/bootstrapper/booter/events.go deleted file mode 100644 index b88845f01a5..00000000000 --- a/agents/go-agents/bootstrapper/booter/events.go +++ /dev/null @@ -1,146 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package booter - -import ( - "time" -) - -const ( - // StatusChangedEventType defines type of StatusChangedEvent. - StatusChangedEventType = "bootstrapper/statusChanged" - - // InstallerStatusChangedEventType defines type of InstallerStatusChangedEvent. - InstallerStatusChangedEventType = "installer/statusChanged" - - // InstallerLogEventType defines type of InstallerLogEvent. - InstallerLogEventType = "installer/log" -) - -// Bootstrapper statuses. -const ( - // StatusStarting indicates an event which published before - // any other bootstrapper event. It notifies clients that bootstrapper - // is ready and soon will start installations. - StatusStarting = "STARTING" - - // StatusDone published after all the installations successfully finished. - // The opposite event would be of type StatusFailed. - StatusDone = "DONE" - - // StatusFailed published if any error occurs during the installation. - // The opposite event would be of type StatusDone. - StatusFailed = "FAILED" -) - -// Installer statuses. -const ( - // InstallerStatusStarting published each time when bootstrapper starts the installer. - InstallerStatusStarting = "STARTING" - - // InstallerStatusDone published each time when installation successfully finishes - // for the installer which does not define server. - InstallerStatusDone = "DONE" - - // InstallerStatusRunning published each time installation successfully finished - // for the installer which defines server and server becomes available. - InstallerStatusRunning = "RUNNING" - - // InstallerStatusFailed published each time installation failed. - // Installation failed when: - // - if installer defines server, but after period server is not available on port - // - if installer does not define server and installation script exit code is different from 0. - InstallerStatusFailed = "FAILED" -) - -const ( - // StderrStream value of InstallerLogEvent.Stream if log line is from process STDERR. - StderrStream = "STDERR" - - // StdoutStream value of InstallerLogEvent.Stream if log line is from process STDOUT. - StdoutStream = "STDOUT" -) - -// RuntimeID is an identifier of running workspace. -// Included to all the bootstrapper events. -type RuntimeID struct { - // Workspace is an identifier of the workspace e.g. "workspace123456". - Workspace string `json:"workspaceId"` - - // Environment is a name of environment e.g. "default". - Environment string `json:"envName"` - - // OwnerId is an identifier of user who is runtime owner. - OwnerId string `json:"ownerId"` -} - -// MachineEvent is a base event for bootstrapper events. -type MachineEvent struct { - - // MachineName is a name of machine which this bootstrapper is deployed into. - MachineName string `json:"machineName"` - - // RuntimeID indicated workspace runtime. - RuntimeID RuntimeID `json:"runtimeId"` - - // Time when this event occurred. - Time time.Time `json:"time"` -} - -// StatusChangedEvent published each time bootstrapper status changed. -type StatusChangedEvent struct { - MachineEvent - - // Status is current status of bootstrapper. - Status string `json:"status"` - - // Error error message, can be present only if status is FAILED. - Error string `json:"error,omitempty"` -} - -// Type returns StatusChangedEventType. -func (e *StatusChangedEvent) Type() string { return StatusChangedEventType } - -// InstallerStatusChangedEvent published for each installer when its status changed. -type InstallerStatusChangedEvent struct { - MachineEvent - - // Status is current status of installer. - Status string `json:"status"` - - // Installer is identifier of installer like "org.eclipse.che.ws-agent" - Installer string `json:"installer"` - - // Error error message, can be present only if status is FAILED. - Error string `json:"error,omitempty"` -} - -// Type returns InstallerStatusChangedEventType. -func (e *InstallerStatusChangedEvent) Type() string { return InstallerStatusChangedEventType } - -// InstallerLogEvent published each time installer writes to stderr/stdout. -type InstallerLogEvent struct { - MachineEvent - - // Text is written by installation line of text. - Text string `json:"text"` - - // Installer is identifier of installer like "org.eclipse.che.ws-agent" - Installer string `json:"installer"` - - // Stream defines whether it is STDERR or STDOUT - Stream string `json:"stream"` -} - -// Type returns InstallerLogEventType. -func (e *InstallerLogEvent) Type() string { return InstallerLogEventType } diff --git a/agents/go-agents/bootstrapper/booter/installations.go b/agents/go-agents/bootstrapper/booter/installations.go deleted file mode 100644 index 8c0df4a5e27..00000000000 --- a/agents/go-agents/bootstrapper/booter/installations.go +++ /dev/null @@ -1,171 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package booter - -import ( - "fmt" - "net" - "strings" - "time" - - "github.com/eclipse/che/agents/go-agents/core/process" -) - -// Process of getting certain installer software/servers installed. -type installation interface { - - // Executes the installation in implementation specific way. - execute() error -} - -// Script installation executes script defined by installer. -// Installation is considered successful only if script exit code is 0. -type scriptInst struct { - installer Installer - timeout time.Duration -} - -func (sci *scriptInst) execute() error { - diedC, err := executeScript(sci.installer) - if err != nil { - return fmt.Errorf("Scrip execution failed. Error: %s", err) - } - select { - case died := <-diedC: - if died.ExitCode != 0 { - return fmt.Errorf( - "Exit code for '%s' installation is '%d' while expected to be 0", - sci.installer.ID, - died.ExitCode, - ) - } - case <-time.After(sci.timeout): - return fmt.Errorf("Timeout reached before installation of '%s' completed", sci.installer.ID) - } - return nil -} - -// Server installation executes script defined by installer and -// wait all the defined servers to become available. -type serverInst struct { - installer Installer - period time.Duration - timeout time.Duration -} - -func (svi *serverInst) execute() error { - diedC, err := executeScript(svi.installer) - if err != nil { - return fmt.Errorf("Scrip execution failed Error: %s", err) - } - checker := &dialChecker{svi.period, make(chan bool, 1)} - select { - case <-checker.availableC(svi.installer.Servers): - return nil - case <-time.After(svi.timeout): - checker.stop() - return fmt.Errorf("Timeout reached before installation of '%s' finished", svi.installer.ID) - case died := <-diedC: - checker.stop() - if died.ExitCode != 0 { - return fmt.Errorf("Installation '%s' failed, script exit code is %d", svi.installer.ID, died.ExitCode) - } - if !checker.available(svi.installer.Servers) { - return fmt.Errorf("Process of installation '%s' exit code is 0 but servers are not available", svi.installer.ID) - } - return nil - } -} - -func executeScript(installer Installer) (chan *process.DiedEvent, error) { - diedC := make(chan *process.DiedEvent, 1) - subscriber := func(event process.Event) { - broadcastLogs(installer.ID, event) - if event.Type() == process.DiedEventType { - diedC <- event.(*process.DiedEvent) - } - } - pb := process.NewBuilder() - pb.CmdName(installer.ID) - pb.CmdLine(installer.Script) - pb.CmdType(installerCmdType) - pb.SubscribeDefault(installer.ID, process.EventConsumerFunc(subscriber)) - if _, err := pb.Start(); err != nil { - return nil, err - } - return diedC, nil -} - -// dialChecker performs a servers availability check -type dialChecker struct { - // period defines period between checks - period time.Duration - // stopped channel for interrupting servers checks - stopped chan bool -} - -func (cc *dialChecker) availableC(servers map[string]Server) chan bool { - ticker := time.NewTicker(cc.period) - state := make(chan bool, 1) - go func() { - for { - select { - case <-ticker.C: - if cc.available(servers) { - state <- true - ticker.Stop() - return - } - case <-cc.stopped: - close(state) - ticker.Stop() - return - } - } - }() - return state -} - -func (cc *dialChecker) available(servers map[string]Server) bool { - for _, server := range servers { - if tryConn(server) != nil { - return false - } - } - return true -} - -func (cc *dialChecker) stop() { - close(cc.stopped) -} - -// tryConn tries to connect to specified server over tcp/udp -func tryConn(server Server) error { - // port format should be '4411/tcp' or '4111' - split := strings.Split(server.Port, "/") - var protocol string - if len(split) == 1 { - protocol = "tcp" - } else if len(split) == 2 { - protocol = split[1] - } else { - return fmt.Errorf("Port format is not supported %s", server.Port) - } - port := split[0] - addr := "127.0.0.1:" + port - conn, err := net.Dial(protocol, addr) - if err != nil { - return fmt.Errorf("Failed establish connection to "+addr, err) - } - return conn.Close() -} diff --git a/agents/go-agents/bootstrapper/booter/model.go b/agents/go-agents/bootstrapper/booter/model.go deleted file mode 100644 index 5fd69fb2c22..00000000000 --- a/agents/go-agents/bootstrapper/booter/model.go +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package booter - -// Installer defines installation configuration which usually -// brings something new to the machine e.g. starts server or installs tools like 'curl'. -type Installer struct { - - // ID the identifier of the installer e.g. 'org.eclipse.che.exec'. - ID string `json:"id"` - - // Description the description of the installer. - Description string `json:"description"` - - // Version the version of the installer. - Version string `json:"version"` - - // Script is content of installation script. - Script string `json:"script"` - - // Servers map of ref -> server. - Servers map[string]Server `json:"servers"` -} - -// HasServers returns true if installer has at least one server. -func (installer Installer) HasServers() bool { return len(installer.Servers) != 0 } - -// Server represents set of configuration that can be -type Server struct { - - // Server port in form 'port/protocol' or 'port' if protocol is tcp. - Port string `json:"port"` - - // Protocol the protocol for configuring preview url of the server e.g. 'http'. - Protocol string `json:"protocol"` -} diff --git a/agents/go-agents/bootstrapper/cfg/cfg.go b/agents/go-agents/bootstrapper/cfg/cfg.go deleted file mode 100644 index 60079daf933..00000000000 --- a/agents/go-agents/bootstrapper/cfg/cfg.go +++ /dev/null @@ -1,230 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package cfg - -import ( - "encoding/json" - "flag" - "io/ioutil" - "log" - "os" - "strconv" - "strings" - - "github.com/eclipse/che/agents/go-agents/bootstrapper/booter" -) - -var ( - // FilePath path to config file. - FilePath string - - // PushStatusesEndpoint where to push statuses. - PushStatusesEndpoint string - - // PushLogsEndpoint where to push logs. - PushLogsEndpoint string - - // AuthEnabled whether authentication is needed - AuthEnabled bool - - // Token to access wsmaster API - Token string - - // RuntimeID the id of workspace runtime this machine belongs to. - RuntimeID booter.RuntimeID - runtimeIDRaw string - - // MachineName is the name of this machine. - MachineName string - - // InstallerTimeoutSec how much time(seconds) is given for one installation to complete. - InstallerTimeoutSec int - - // CheckServersPeriodSec how much time(seconds) is between servers checks for one installer. - CheckServersPeriodSec int - - // LogsEndpointReconnectPeriodSec how much time(seconds) is between logs endpoint reconnect attempts. - LogsEndpointReconnectPeriodSec int - - // SelfSignedCertificateFilePath path to certificate file that should be used while connection establishing - SelfSignedCertificateFilePath string -) - -func init() { - curDir, err := os.Getwd() - if err != nil { - log.Fatal(err) - } - flag.StringVar( - &FilePath, - "file", - curDir+string(os.PathSeparator)+"config.json", - "Path to configuration file on filesystem", - ) - flag.StringVar( - &PushStatusesEndpoint, - "push-endpoint", - "", - "WebSocket endpoint where to push statuses", - ) - flag.StringVar( - &PushLogsEndpoint, - "push-logs-endpoint", - "", - "WebSocket endpoint where to push logs", - ) - // auth configuration - defaultAuthEnabled := false - authEnabledEnv := os.Getenv("CHE_AUTH_ENABLED") - b, e := strconv.ParseBool(authEnabledEnv) - if e == nil { - defaultAuthEnabled = b - } - flag.BoolVar( - &AuthEnabled, - "enable-auth", - defaultAuthEnabled, - "whether authenticate requests on workspace master before allowing them to proceed."+ - "By default the value from 'CHE_AUTH_ENABLED' environment variable is used or `false` if it is missing", - ) - flag.StringVar( - &runtimeIDRaw, - "runtime-id", - "", - "The identifier of the runtime in format 'workspace:environment:ownerId'", - ) - flag.StringVar( - &MachineName, - "machine-name", - "", - "The name of the machine in which this bootstrapper is running", - ) - flag.IntVar( - &InstallerTimeoutSec, - "installer-timeout", - 120, // 2m - `Time(in seconds) given for one installer to complete its installation. - If installation is not finished in time it will be interrupted`, - ) - flag.IntVar( - &CheckServersPeriodSec, - "server-check-period", - 3, - `Time(in seconds) between servers availability checks. - Once servers for one installer available - checks stopped`, - ) - flag.IntVar( - &LogsEndpointReconnectPeriodSec, - "logs-endpoint-reconnect-period", - 10, - `Time(in seconds) between attempts to reconnect to push-logs-endpoint. - Bootstrapper tries to reconnect to push-logs-endpoint when previously established connection lost`, - ) - flag.StringVar( - &SelfSignedCertificateFilePath, - "cacert", - "", - "Path to Certificate that should be used while connection establishing", - ) -} - -// Parse parses configuration. -func Parse() { - flag.Parse() - - // push-endpoint - if len(PushStatusesEndpoint) == 0 { - log.Fatal("Push endpoint required(set it with -push-endpoint argument)") - } - if !strings.HasPrefix(PushStatusesEndpoint, "ws") { - log.Fatal("Push endpoint protocol must be either ws or wss") - } - - // push-logs-endpoint - if len(PushLogsEndpoint) != 0 && !strings.HasPrefix(PushLogsEndpoint, "ws") { - log.Fatal("Push logs endpoint protocol must be either ws or wss") - } - - // auth-enabled - fetch CHE_MACHINE_TOKEN - if AuthEnabled { - Token = os.Getenv("CHE_MACHINE_TOKEN") - } - - // runtime-id - if len(runtimeIDRaw) == 0 { - log.Fatal("Runtime ID required(set it with -runtime-id argument)") - } - parts := strings.Split(runtimeIDRaw, ":") - if len(parts) != 3 { - log.Fatalf("Expected runtime id to be in format 'workspace:env:ownerId'") - } - RuntimeID = booter.RuntimeID{Workspace: parts[0], Environment: parts[1], OwnerId: parts[2]} - - // machine-name - if len(MachineName) == 0 { - log.Fatal("Machine name required(set it with -machine-name argument)") - } - - if InstallerTimeoutSec <= 0 { - log.Fatal("Installer timeout must be > 0") - } - if CheckServersPeriodSec <= 0 { - log.Fatal("Servers check period must be > 0") - } -} - -// Print prints configuration. -func Print() { - log.Print("Bootstrapper configuration") - log.Printf(" Push endpoint: %s", PushStatusesEndpoint) - log.Printf(" Push logs endpoint: %s", PushLogsEndpoint) - log.Printf(" Auth enabled: %t", AuthEnabled) - if (SelfSignedCertificateFilePath != "") { - log.Printf(" Self signed certificate %s", SelfSignedCertificateFilePath) - } - log.Print(" Runtime ID:") - log.Printf(" Workspace: %s", RuntimeID.Workspace) - log.Printf(" Environment: %s", RuntimeID.Environment) - log.Printf(" OwnerId: %s", RuntimeID.OwnerId) - log.Printf(" Machine name: %s", MachineName) - log.Printf(" Installer timeout: %dseconds", InstallerTimeoutSec) - log.Printf(" Check servers period: %dseconds", CheckServersPeriodSec) - log.Printf(" Push logs endpoint reconnect period: %dseconds", LogsEndpointReconnectPeriodSec) -} - -// ReadInstallersConfig reads content of file by path cfg.FilePath, -// parses its content as array of installers and returns it. -// If any error occurs during read, log.Fatal is called. -func ReadInstallersConfig() []booter.Installer { - f, err := os.Open(FilePath) - if err != nil { - log.Fatal(err) - } - - defer func() { - if err := f.Close(); err != nil { - log.Printf("Can't close installers config source, cause: %s", err) - } - }() - - raw, err := ioutil.ReadAll(f) - if err != nil { - log.Fatal(err) - } - - installers := make([]booter.Installer, 0) - if err := json.Unmarshal(raw, &installers); err != nil { - log.Fatal(err) - } - return installers -} diff --git a/agents/go-agents/bootstrapper/main.go b/agents/go-agents/bootstrapper/main.go deleted file mode 100644 index b0520091991..00000000000 --- a/agents/go-agents/bootstrapper/main.go +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package main - -import ( - "log" - "os" - - "crypto/tls" - "crypto/x509" - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che-go-jsonrpc/jsonrpcws" - "github.com/eclipse/che/agents/go-agents/bootstrapper/booter" - "github.com/eclipse/che/agents/go-agents/bootstrapper/cfg" - "github.com/eclipse/che/agents/go-agents/core/process" - "io/ioutil" -) - -func main() { - log.SetOutput(os.Stdout) - - cfg.Parse() - cfg.Print() - - if cfg.SelfSignedCertificateFilePath != "" { - configureCertPool(cfg.SelfSignedCertificateFilePath) - } - - process.SetShellInterpreter("/bin/sh") - - booter.Init( - cfg.RuntimeID, - cfg.MachineName, - cfg.InstallerTimeoutSec, - cfg.CheckServersPeriodSec, - cfg.LogsEndpointReconnectPeriodSec, - ) - booter.AddAll(cfg.ReadInstallersConfig()) - - // push statuses - statusTun := connectOrFail(cfg.PushStatusesEndpoint, cfg.Token) - booter.PushStatuses(statusTun) - - // push logs - if len(cfg.PushLogsEndpoint) != 0 { - connector := &wsDialConnector{ - endpoint: cfg.PushLogsEndpoint, - token: cfg.Token, - } - if cfg.PushLogsEndpoint == cfg.PushStatusesEndpoint { - booter.PushLogs(statusTun, connector) - } else { - booter.PushLogs(connectOrFail(cfg.PushLogsEndpoint, cfg.Token), connector) - } - } - - if err := booter.Start(); err != nil { - log.Fatal(err) - } -} - -func configureCertPool(customCertificateFilePath string) { - // Get the SystemCertPool, continue with an empty pool on error - rootCAs, _ := x509.SystemCertPool() - if rootCAs == nil { - rootCAs = x509.NewCertPool() - } - - // Read in the cert file - certs, err := ioutil.ReadFile(customCertificateFilePath) - if err != nil { - log.Fatalf("Failed to read custom certificate %q. Error: %v", customCertificateFilePath, err) - } - - // Append our cert to the system pool - if ok := rootCAs.AppendCertsFromPEM(certs); !ok { - log.Fatalf("Failed to append %q to RootCAs: %v", customCertificateFilePath, err) - } - - // Trust the augmented cert pool in our client - jsonrpcws.DefaultDialer.TLSClientConfig = &tls.Config{ - RootCAs: rootCAs, - } -} - -func connectOrFail(endpoint string, token string) *jsonrpc.Tunnel { - tunnel, err := connect(endpoint, token) - if err != nil { - log.Fatalf("Couldn't connect to endpoint '%s', due to error '%s'", endpoint, err) - } - return tunnel -} - -func connect(endpoint string, token string) (*jsonrpc.Tunnel, error) { - conn, err := jsonrpcws.Dial(endpoint, token) - if err != nil { - return nil, err - } - return jsonrpc.NewManagedTunnel(conn), nil -} - -type wsDialConnector struct { - endpoint string - token string -} - -func (c *wsDialConnector) Connect() (*jsonrpc.Tunnel, error) { return connect(c.endpoint, c.token) } diff --git a/agents/go-agents/core/activity/activity.go b/agents/go-agents/core/activity/activity.go deleted file mode 100644 index 3be67ad2258..00000000000 --- a/agents/go-agents/core/activity/activity.go +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package activity - -import ( - "log" - "net/http" - "time" -) - -// time in seconds to wait, after last sent activity request, before next requests can be sent -const threshold int64 = 60 - -var ( - // Tracker provides workspace activity notification client - Tracker WorkspaceActivityTracker = &NoOpActivityTracker{} -) - -// WorkspaceActivityTracker provides workspace activity notification API -type WorkspaceActivityTracker interface { - Notify() - StartTracking() -} - -// Default impl of WorkspaceActivityTracker -type tracker struct { - WorkspaceActivityTracker - - active bool - lastUpdateTime int64 - activityAPI string -} - -// NewTracker creates default implementation of activity tracker -func NewTracker(wsID string, apiEndpoint string) WorkspaceActivityTracker { - return &tracker{ - activityAPI: apiEndpoint + "/activity/" + wsID, - } -} - -// Notify ensures that workspace master knows about recent activity of a workspace -func (tr *tracker) Notify() { - t := time.Now().Unix() - if t < (tr.lastUpdateTime + threshold) { - tr.active = true - } else { - go tr.makeActivityRequest() - tr.lastUpdateTime = t - } -} - -// StartTracking runs scheduler that continiously notifies workspace master -// if workspace activity was submitted with function Notify. -// Since it is synchronious function it should be started at separate thread. -func (tr *tracker) StartTracking() { - ticker := time.NewTicker(time.Minute) - defer ticker.Stop() - for range ticker.C { - if tr.active { - go tr.makeActivityRequest() - tr.active = false - } - } -} - -func (tr *tracker) makeActivityRequest() { - req, err := http.NewRequest(http.MethodPut, tr.activityAPI, nil) - if err != nil { - panic(err) - } - client := &http.Client{} - _, err = client.Do(req) - - if err != nil { - log.Printf("Failed to notify user activity: %s\n", err) - } -} diff --git a/agents/go-agents/core/activity/noop.go b/agents/go-agents/core/activity/noop.go deleted file mode 100644 index 732eab09ab9..00000000000 --- a/agents/go-agents/core/activity/noop.go +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package activity - -// NoOpActivityTracker does nothing -type NoOpActivityTracker struct { - WorkspaceActivityTracker -} - -// Notify does nothing -func (tr *NoOpActivityTracker) Notify() {} - -// StartTracking does nothing -func (tr *NoOpActivityTracker) StartTracking() {} diff --git a/agents/go-agents/core/auth/auth.go b/agents/go-agents/core/auth/auth.go deleted file mode 100644 index ecfaf0369ee..00000000000 --- a/agents/go-agents/core/auth/auth.go +++ /dev/null @@ -1,187 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package auth provides simple way of authentication of http requests on workspace master -package auth - -import ( - "errors" - "net/http" - "regexp" - - "fmt" - "github.com/dgrijalva/jwt-go" - "os" - "strings" -) - -const ( - TokenKind = "machine_token" - WorkspaceIdEnv = "CHE_WORKSPACE_ID" - BearerPrefix = "bearer " -) - -var ( - WorkspaceId = os.Getenv(WorkspaceIdEnv) - KeyProvider SignKeyProvider = &EnvSignKeyProvider{} -) - -// TokenCache represents authentication tokens cache -type TokenCache interface { - // Put adds token into the cache. - Put(token string) - // Expire removes provided token from the cache. - Expire(token string) - // Contains returns true if token is present in the cache and false otherwise. - Contains(token string) bool -} - -// UnauthorizedHandler handles request when authentication failed -type UnauthorizedHandler func(w http.ResponseWriter, r *http.Request, err error) - -type handler struct { - delegate http.Handler - apiEndpoint string - unauthorizedHandler UnauthorizedHandler - ignoreMapping *regexp.Regexp -} - -type cachingHandler struct { - delegate http.Handler - apiEndpoint string - cache TokenCache - unauthorizedHandler UnauthorizedHandler - ignoreMapping *regexp.Regexp -} - -type JWTClaims struct { - *jwt.StandardClaims - UserId string `json:"uid,omitempty"` - UserName string `json:"uname,omitempty"` - WorkspaceId string `json:"wsid,omitempty"` -} - -// NewHandler creates HTTP handler that authenticates http calls that don't match provided non authenticated path pattern on workspace master. -// Checks on workspace master if provided by request token is valid and calls ServerHTTP on delegate. -// Otherwise if UnauthorizedHandler is configured calls ServerHTTP on it. -// If it is not configured returns 401 with appropriate error message. -func NewHandler(delegate http.Handler, apiEndpoint string, unauthorizedHandler UnauthorizedHandler, ignoreMapping *regexp.Regexp) http.Handler { - if unauthorizedHandler == nil { - unauthorizedHandler = defaultUnauthorizedHandler - } - return &handler{ - delegate: delegate, - apiEndpoint: apiEndpoint, - unauthorizedHandler: unauthorizedHandler, - ignoreMapping: ignoreMapping, - } -} - -// NewCachingHandler creates HTTP handler that authenticates http calls that don't match provided non authenticated path pattern on workspace master. -// Checks on workspace master if provided by request token is valid and calls ServerHTTP on delegate. -// Otherwise if UnauthorizedHandler is configured calls ServerHTTP on it. -// If it is not configured returns 401 with appropriate error message. -// This implementation caches the results of authentication to speedup request handling. -func NewCachingHandler(delegate http.Handler, apiEndpoint string, unauthorizedHandler UnauthorizedHandler, cache TokenCache, ignoreMapping *regexp.Regexp) http.Handler { - if cache == nil { - panic("TokenCache argument of NewCachingHandler required") - } - if unauthorizedHandler == nil { - unauthorizedHandler = defaultUnauthorizedHandler - } - return &cachingHandler{ - delegate: delegate, - apiEndpoint: apiEndpoint, - cache: cache, - unauthorizedHandler: unauthorizedHandler, - ignoreMapping: ignoreMapping, - } -} - -func (handler handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - // check whether to protect this URL - if handler.ignoreMapping.MatchString(req.URL.Path) { - handler.delegate.ServeHTTP(w, req) - return - } - token := req.URL.Query().Get("token") - if token == "" { - header := req.Header.Get("Authorization") - if header != "" && strings.HasPrefix(strings.ToLower(header), BearerPrefix) { - token = header[len(BearerPrefix):] - } - } - if err := authenticate(token); err == nil { - handler.delegate.ServeHTTP(w, req) - } else { - handler.unauthorizedHandler(w, req, err) - } -} - -func (handler cachingHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - // check whether to protect this URL - if handler.ignoreMapping.MatchString(req.URL.Path) { - handler.delegate.ServeHTTP(w, req) - return - } - token := req.URL.Query().Get("token") - if token == "" { - header := req.Header.Get("Authorization") - if header != "" && strings.HasPrefix(strings.ToLower(header), BearerPrefix) { - token = header[len(BearerPrefix):] - } - } - if handler.cache.Contains(token) { - handler.delegate.ServeHTTP(w, req) - } else if err := authenticate(token); err == nil { - handler.cache.Put(token) - handler.delegate.ServeHTTP(w, req) - } else { - handler.unauthorizedHandler(w, req, err) - } -} - -func authenticate(token string) error { - if token == "" { - return errors.New("Authentication failed because: missing authentication token in 'Authorization' header or 'token' query param") - } - - claims := &JWTClaims{} - jwt, err := jwt.ParseWithClaims(token, claims, rsaKeyFunc) - if err != nil { - return errors.New("Authentication failed. " + err.Error()) - } - - kind := jwt.Header["kind"].(string) - if TokenKind != kind || WorkspaceId != claims.WorkspaceId { - // signature is ok, but the token kind or workspace identifier is invalid - return fmt.Errorf("Authentication failed, due to kind: '%v' or workspace id: '%v' is wrong", kind, WorkspaceId) - } - return nil -} - -// Supplies RSA public key for verification of given token, -// when token 'alg' header is different or any problem occurs while retrieving key then error will be returned -func rsaKeyFunc(token *jwt.Token) (interface{}, error) { - if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok { - return nil, fmt.Errorf("token with unsupported signing method '%v' provided", token.Header["alg"]) - } - key, err := KeyProvider.GetKey() - if err != nil { - return nil, err - } - return key, nil -} - -func defaultUnauthorizedHandler(w http.ResponseWriter, r *http.Request, err error) { - http.Error(w, err.Error(), http.StatusUnauthorized) -} diff --git a/agents/go-agents/core/auth/auth_test.go b/agents/go-agents/core/auth/auth_test.go deleted file mode 100644 index 431bb2fa53c..00000000000 --- a/agents/go-agents/core/auth/auth_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package auth - -import ( - "crypto/x509" - "encoding/base64" - "strings" - "testing" -) - -const ( - Token = "eyJraW5kIjoibWFjaGluZV90b2tlbiIsImFsZyI6IlJTNTEyIn0.eyJ3c2lkIjoid29ya3NwYWNla3JoOTl4amVuZWs3amN5ZSIsInVpZCI6InRlc3RfdXNlcjMxIiwidW5hbWUiOiJ0ZXN0X3VzZXIiLCJqdGkiOiI4MzEyLTIxMy0xd2UzMSJ9.TX3ZyWgIyFmOPe8yHQWGXNOwmuAxp1lIZEdzXAmhf6nnUKLHV5QLV2qNI1iuDta0fLXtB_Wwf6Mpqkx8J1ighNhgUfbro7OujIlAezx3sEBHI-Ntzb1JHsbr_xKxrzhEVT7NuvkJuB1RlFEpZmRt0Sf86UOoKZSsYypuCOA1vZU" - EncodedPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC85cPsQ8FLvvI6NY5DGiq2YIdAlq2MkNcGgrQggQqTwTyQ7MgPYO7o4BYc5BjOljQ93g/vzyN9Ku9YahHjQTT9X3IdZSk7+UINvKF/3gPjprHYQ2t1PswNNCViqwEN1nktvbugJjI3FYnr5eiBxkV+7wwggxEILGfKL67I+HnA0QIDAQAB" - TestWorkspaceId = "workspacekrh99xjenek7jcye" - TokenWithDifferentSigAlg = "eyJraW5kIjoibWFjaGluZV90b2tlbiIsImFsZyI6IkVTNTEyIn0.eyJ3c2lkIjoid29ya3NwYWNla3JoOTl4amVuZWs3amN5ZSIsInVpZCI6InRlc3RfdXNlcjMxIiwidW5hbWUiOiJ0ZXN0X3VzZXIiLCJqdGkiOiI4MzEyLTIxMy0xd2UzMSJ9.ATHOy78MXfi9e2MzS_GENXwI7wddmdeEzcMKQfKCgw78n-_YoI0vWowNS-AOMiJKeBtNlgTMRnsY_H1lsK8QxRZMOFg-KaRwAQkZTJBB1D107KPNbI-FYBORhMu0PNV2-j9_DwIUiv_lek9bmE02ibY28VzPOhl-V9iTYWecsgzAsC0ACzyRbZaZIkRShlN7" -) - -type ConstSignKeyProvider struct{} - -func (enk ConstSignKeyProvider) GetKey() (interface{}, error) { - bytes, _ := base64.StdEncoding.DecodeString(EncodedPublicKey) - key, _ := x509.ParsePKIXPublicKey(bytes) - return key, nil -} - -func TestAuthenticateWithValidRSAToken(t *testing.T) { - WorkspaceId = TestWorkspaceId - KeyProvider = &ConstSignKeyProvider{} - if err := authenticate(Token); err != nil { - t.Fatal(err) - } -} - -func TestAuthenticationFailedWhenNoWorkspaceIdInEnv(t *testing.T) { - WorkspaceId = "" - KeyProvider = &ConstSignKeyProvider{} - err := authenticate(Token) - if err == nil { - t.Fatal("Expecting error when no workspace id in an environment") - } - expectedError := "Authentication failed, due to kind: 'machine_token' or workspace id: '' is wrong" - if err.Error() != expectedError { - t.Fatalf("Expecting error message: '%v'", expectedError) - } -} - -func TestAuthenticationFailedWhenFailedToGetKey(t *testing.T) { - WorkspaceId = TestWorkspaceId - KeyProvider = &EnvSignKeyProvider{} - err := authenticate(Token) - if err == nil { - t.Fatal("Expecting error when no signature key in environment") - } - errorPrefix := "Authentication failed. Failed to parse public key cause:" - if !strings.HasPrefix(err.Error(), errorPrefix) { - t.Fatalf("Expecting error prefix: '%v'", errorPrefix) - } -} - -func TestAuthenticationFailedWhenEmptyTokenProvided(t *testing.T) { - WorkspaceId = TestWorkspaceId - KeyProvider = &ConstSignKeyProvider{} - err := authenticate("") - if err == nil { - t.Fatal("Expecting error when no empty token provided") - } - expectedError := "Authentication failed because: missing authentication token in 'Authorization' header or 'token' query param" - if err.Error() != expectedError { - t.Fatalf("Expecting error message: '%v'", expectedError) - } -} - -func TestAuthenticationFailedWhenTokenWithInvalidSignatureProvided(t *testing.T) { - WorkspaceId = TestWorkspaceId - KeyProvider = &ConstSignKeyProvider{} - err := authenticate("invalid_token") - if err == nil { - t.Fatal("Expecting error when no signature key in environment") - } - errorPrefix := "Authentication failed." - if !strings.HasPrefix(err.Error(), errorPrefix) { - t.Fatalf("Expecting error prefix: '%v'", errorPrefix) - } -} - -func TestAuthenticationFailedWhenTokenSignedWithDifferentAlgorithmProvided(t *testing.T) { - WorkspaceId = TestWorkspaceId - KeyProvider = &ConstSignKeyProvider{} - err := authenticate(TokenWithDifferentSigAlg) - if err == nil { - t.Fatal("Expecting error when token with different signature algorithm provided") - } - expectedError := "Authentication failed. token with unsupported signing method 'ES512' provided" - if err.Error() != expectedError { - t.Fatalf("Expecting error message: '%v'", expectedError) - } -} diff --git a/agents/go-agents/core/auth/default_cache.go b/agents/go-agents/core/auth/default_cache.go deleted file mode 100644 index 2aaf9cb14a2..00000000000 --- a/agents/go-agents/core/auth/default_cache.go +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package auth - -import ( - "sync" - "time" -) - -const ( - // DefaultTokensExpirationTimeoutInMinutes provides default value for expiration timeout of token cache - // in default implementation of token cache - DefaultTokensExpirationTimeoutInMinutes = 10 -) - -// DefaultTokenCache represents default authentication tokens cache. -type DefaultTokenCache struct { - sync.RWMutex - tokens map[string]time.Time - ticker *time.Ticker - expireTimeout time.Duration -} - -// NewCache creates TokenCache. -func NewCache(expireDuration time.Duration, period time.Duration) *DefaultTokenCache { - cache := &DefaultTokenCache{ - tokens: make(map[string]time.Time), - expireTimeout: expireDuration, - } - if period > 0 { - go cache.expirePeriodically(period) - } - return cache -} - -// Put adds token into the cache. -func (cache *DefaultTokenCache) Put(token string) { - cache.Lock() - defer cache.Unlock() - cache.tokens[token] = time.Now().Add(cache.expireTimeout) -} - -// Expire removes provided token from the cache. -func (cache *DefaultTokenCache) Expire(token string) { - cache.Lock() - defer cache.Unlock() - delete(cache.tokens, token) -} - -// Contains returns true if token is present in the cache and false otherwise. -func (cache *DefaultTokenCache) Contains(token string) bool { - cache.RLock() - defer cache.RUnlock() - _, ok := cache.tokens[token] - return ok -} - -func (cache *DefaultTokenCache) expirePeriodically(period time.Duration) { - cache.ticker = time.NewTicker(period) - for range cache.ticker.C { - cache.expireAllBefore(time.Now()) - } -} - -func (cache *DefaultTokenCache) expireAllBefore(expirationPoint time.Time) { - cache.Lock() - defer cache.Unlock() - for token, expTime := range cache.tokens { - if expTime.Before(expirationPoint) { - delete(cache.tokens, token) - } - } -} diff --git a/agents/go-agents/core/auth/default_cache_test.go b/agents/go-agents/core/auth/default_cache_test.go deleted file mode 100644 index 3efff5258b5..00000000000 --- a/agents/go-agents/core/auth/default_cache_test.go +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package auth - -import ( - "testing" - "time" -) - -func TestTokenCache(t *testing.T) { - cache := &DefaultTokenCache{ - tokens: make(map[string]time.Time), - expireTimeout: 0, - } - - token := "my-token" - - cache.Put(token) - if !cache.Contains(token) { - t.Fatalf("Cache must contain token %s", token) - } - - cache.Expire(token) - if cache.Contains(token) { - t.Fatalf("Cache must not contain token %s", token) - } -} - -func TestExpiresTokensCreatedBeforeGivenPointOfTime(t *testing.T) { - cache := &DefaultTokenCache{ - tokens: make(map[string]time.Time), - expireTimeout: 0, - } - - cache.Put("token1") - afterToken1Put := time.Now() - cache.Put("token2") - - cache.expireAllBefore(afterToken1Put) - - if cache.Contains("token1") { - t.Fatal("Cache must not contain token1") - } - if !cache.Contains("token2") { - t.Fatal("Cache must contain token2") - } -} diff --git a/agents/go-agents/core/auth/sign_key.go b/agents/go-agents/core/auth/sign_key.go deleted file mode 100644 index 11a4c145bf1..00000000000 --- a/agents/go-agents/core/auth/sign_key.go +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package auth - -import ( - "crypto/x509" - "encoding/base64" - "errors" - "os" -) - -const SignatureKeyEnv = "CHE_MACHINE_AUTH_SIGNATURE__PUBLIC__KEY" - -// SignKeyProvider provides signature key -type SignKeyProvider interface { - GetKey() (interface{}, error) -} - -// EnvSignKeyProvider provides public key retrieved from environment -type EnvSignKeyProvider struct { - PublicKey interface{} -} - -func (enk EnvSignKeyProvider) GetKey() (interface{}, error) { - if enk.PublicKey == nil { - // Key may contain symbols that are unacceptable for environment variables values, so it must be encoded in base64 - bytes, err := base64.StdEncoding.DecodeString(os.Getenv(SignatureKeyEnv)) - if err != nil { - return nil, errors.New("Failed to encode public key cause: " + err.Error()) - } - key, err := x509.ParsePKIXPublicKey(bytes) - if err != nil { - return nil, errors.New("Failed to parse public key cause: " + err.Error()) - } - enk.PublicKey = key - } - return enk.PublicKey, nil -} diff --git a/agents/go-agents/core/common/error.go b/agents/go-agents/core/common/error.go deleted file mode 100644 index c3a0c5f7c90..00000000000 --- a/agents/go-agents/core/common/error.go +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package common - -import "log" - -// LogError logs error if it is not nil. -// Useful in situations when error is not processed in any case but its logging is needed. -func LogError(err error) { - if err != nil { - log.Println(err) - } -} diff --git a/agents/go-agents/core/process/common.go b/agents/go-agents/core/process/common.go deleted file mode 100644 index 12f62ebaa18..00000000000 --- a/agents/go-agents/core/process/common.go +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package process provides common utilities for native process execution -package process - -import ( - "time" -) - -// LogKind represents kind of source of log line - stdout or stderr. -type LogKind int - -const ( - // StdoutKind match logs produced by stdout of a process. - StdoutKind LogKind = iota - // StderrKind match logs produced by stderr of a process. - StderrKind -) - -// DateTimeFormat is used for serialization/deserialization of dates in agents. -// Single date format keeps API consistent -var DateTimeFormat = time.RFC3339Nano - -// LogMessage represents single log entry with timestamp and source of log. -type LogMessage struct { - Kind LogKind `json:"kind"` - Time time.Time `json:"time"` - Text string `json:"text"` -} - -// ParseTime parses string into Time. -// If time string is empty, then time provided as an argument is returned. -// If time string is invalid, then appropriate error is returned. -// If time string is valid then parsed time is returned. -func ParseTime(timeStr string, defTime time.Time) (time.Time, error) { - if timeStr == "" { - return defTime, nil - } - return time.Parse(DateTimeFormat, timeStr) -} - -func (k LogKind) String() string { - if k == StdoutKind { - return "STDOUT" - } - return "STDERR" -} diff --git a/agents/go-agents/core/process/events.go b/agents/go-agents/core/process/events.go deleted file mode 100644 index c8e05d79195..00000000000 --- a/agents/go-agents/core/process/events.go +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "time" -) - -// Types of process events. -const ( - StartedEventType = "process_started" - DiedEventType = "process_died" - StdoutEventType = "process_stdout" - StderrEventType = "process_stderr" -) - -// Event is a common interface for all the process events. -type Event interface { - Type() string -} - -// EventConsumer is a process events client. -type EventConsumer interface { - Accept(event Event) -} - -// EventConsumerFunc is a function which is also consumer, -// allows to use anonymous functions as process event consumers. -type EventConsumerFunc func(event Event) - -func (f EventConsumerFunc) Accept(event Event) { f(event) } - -// StartedEvent published once when process is started. -type StartedEvent struct { - Time time.Time `json:"time"` - Pid uint64 `json:"pid"` - NativePid int `json:"nativePid"` - Name string `json:"name"` - CommandLine string `json:"commandLine"` -} - -// Type returns StartedEventType. -func (se *StartedEvent) Type() string { return StartedEventType } - -func newStartedEvent(mp MachineProcess) *StartedEvent { - return &StartedEvent{ - Time: time.Now(), - Pid: mp.Pid, - NativePid: mp.NativePid, - Name: mp.Name, - CommandLine: mp.CommandLine, - } -} - -// DiedEvent published once after process death. -type DiedEvent struct { - Time time.Time `json:"time"` - Pid uint64 `json:"pid"` - NativePid int `json:"nativePid"` - Name string `json:"name"` - CommandLine string `json:"commandLine"` - ExitCode int `json:"exitCode"` -} - -// Type returns DiedEventType. -func (de *DiedEvent) Type() string { return DiedEventType } - -func newDiedEvent(mp MachineProcess) *DiedEvent { - return &DiedEvent{ - Time: time.Now(), - Pid: mp.Pid, - NativePid: mp.NativePid, - Name: mp.Name, - CommandLine: mp.CommandLine, - ExitCode: mp.ExitCode, - } -} - -// OutputEvent is published each time when process writes to stdout or stderr. -type OutputEvent struct { - Time time.Time `json:"time"` - Pid uint64 `json:"pid"` - Text string `json:"text"` - - _type string -} - -// Type returns one of StdoutEventType, StderrEventType. -func (se *OutputEvent) Type() string { return se._type } - -func newStderrEvent(pid uint64, text string, when time.Time) Event { - return &OutputEvent{ - Time: when, - Pid: pid, - Text: text, - _type: StderrEventType, - } -} - -func newStdoutEvent(pid uint64, text string, when time.Time) Event { - return &OutputEvent{ - Time: when, - Pid: pid, - Text: text, - _type: StdoutEventType, - } -} diff --git a/agents/go-agents/core/process/file_logger.go b/agents/go-agents/core/process/file_logger.go deleted file mode 100644 index 64b8ab4d197..00000000000 --- a/agents/go-agents/core/process/file_logger.go +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "bytes" - "encoding/json" - "log" - "os" - "sync" - "time" -) - -const ( - flushThreshold = 8192 -) - -// FileLogger provides possibility to write process logs into a file -type FileLogger struct { - sync.RWMutex - filename string - buffer *bytes.Buffer - encoder *json.Encoder -} - -// NewLogger creates FileLogger instance by provided log file path -func NewLogger(filename string) (*FileLogger, error) { - fl := &FileLogger{filename: filename} - fl.buffer = &bytes.Buffer{} - fl.encoder = json.NewEncoder(fl.buffer) - - // Trying to create logs file - file, err := os.Create(filename) - if err != nil { - return nil, err - } - defer closeFile(file) - - return fl, nil -} - -// Flush writes buffered data into file -func (fl *FileLogger) Flush() { - fl.Lock() - fl.doFlush() - fl.Unlock() -} - -// OnStdout writes log message and marks it as stdout message -func (fl *FileLogger) OnStdout(line string, time time.Time) { - fl.writeLine(&LogMessage{StdoutKind, time, line}) -} - -// OnStderr writes log message and marks it as stdout message -func (fl *FileLogger) OnStderr(line string, time time.Time) { - fl.writeLine(&LogMessage{StderrKind, time, line}) -} - -// Close writes buffered data into file and closes it -func (fl *FileLogger) Close() { - fl.Flush() -} - -func (fl *FileLogger) writeLine(message *LogMessage) { - fl.Lock() - err := fl.encoder.Encode(message) - if err != nil { - log.Printf("Error appears on writing data to logs buffer. %s \n", err.Error()) - } - if flushThreshold < fl.buffer.Len() { - fl.doFlush() - } - fl.Unlock() -} - -func (fl *FileLogger) doFlush() { - if fl.buffer.Len() > 0 { - f, err := os.OpenFile(fl.filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666) - if err != nil { - log.Printf("Couldn't open file '%s' for flushing the buffer. %s \n", fl.filename, err.Error()) - } else { - defer closeFile(f) - _, err = fl.buffer.WriteTo(f) - if err != nil { - log.Printf("Error appears on flushing data to file '%s'. %s \n", fl.filename, err.Error()) - } - } - } -} - -func closeFile(file *os.File) { - if err := file.Close(); err != nil { - log.Printf("Can't close file %s. Error: %s", file.Name(), err) - } -} diff --git a/agents/go-agents/core/process/file_logger_test.go b/agents/go-agents/core/process/file_logger_test.go deleted file mode 100644 index ef94707eb2b..00000000000 --- a/agents/go-agents/core/process/file_logger_test.go +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process_test - -import ( - "encoding/json" - "io/ioutil" - "log" - "os" - "testing" - "time" - - "github.com/eclipse/che/agents/go-agents/core/process" -) - -func TestFileLoggerCreatesFileWhenFileDoesNotExist(t *testing.T) { - filename := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeFile(filename) - - if _, err := os.Stat(filename); err == nil { - t.Fatalf("File '%s' already exists", filename) - } - - if _, err := process.NewLogger(filename); err != nil { - t.Fatal(err) - } - - if _, err := os.Stat(filename); os.IsNotExist(err) { - t.Fatalf("Expected file '%s' was created, but it wasn't", filename) - } -} - -func TestFileLoggerTruncatesFileIfFileExistsOnCreate(t *testing.T) { - filename := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeFile(filename) - - if _, err := os.Create(filename); err != nil { - t.Fatal(err) - } - if err := ioutil.WriteFile(filename, []byte("file-content"), 0666); err != nil { - t.Fatal(err) - } - - if _, err := process.NewLogger(filename); err != nil { - t.Fatal(err) - } - - content, err := ioutil.ReadFile(filename) - if err != nil { - t.Fatal(err) - } - if len(content) != 0 { - t.Errorf("Expected file '%s' content is empty", filename) - } -} - -func TestLogsAreFlushedOnClose(t *testing.T) { - filename := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeFile(filename) - - fl, err := process.NewLogger(filename) - if err != nil { - t.Fatal(err) - } - - // Write something to the log - now := time.Now() - fl.OnStdout("stdout", now) - fl.OnStderr("stderr", now) - fl.Close() - - // Read file content - f, err := os.Open(filename) - if err != nil { - t.Fatal(err) - } - - // Read log messages - stdout := process.LogMessage{} - stderr := process.LogMessage{} - decoder := json.NewDecoder(f) - if err := decoder.Decode(&stdout); err != nil { - t.Fatal(err) - } - if err := decoder.Decode(&stderr); err != nil { - t.Fatal(err) - } - - // Check logs are okay - expectedStdout := process.LogMessage{ - Kind: process.StdoutKind, - Time: now, - Text: "stdout", - } - expectedStderr := process.LogMessage{ - Kind: process.StderrKind, - Time: now, - Text: "stderr", - } - failIfDifferent(t, expectedStdout, stdout) - failIfDifferent(t, expectedStderr, stderr) -} - -func removeFile(path string) { - if err := os.Remove(path); err != nil { - log.Printf("Can't remove file %s. Error: %s", path, err) - } -} diff --git a/agents/go-agents/core/process/logs_distributor.go b/agents/go-agents/core/process/logs_distributor.go deleted file mode 100644 index 3f07a733d65..00000000000 --- a/agents/go-agents/core/process/logs_distributor.go +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "errors" - "fmt" - "os" -) - -const ( - // DefaultMaxDirsCount defines max number of directories with logs on one level of FS - DefaultMaxDirsCount = 16 -) - -// LogsDistributor distributes the logs between different directories -type LogsDistributor interface { - - // The implementor must guarantee that returned file name - // is always the same for the same pid. - // Returns an error if it is impossible to create hierarchy of - // logs file parent folders, otherwise returns file path - DirForPid(baseDir string, pid uint64) (string, error) -} - -// DefaultLogsDistributor is default implementation of LogsDistributor -type DefaultLogsDistributor struct { - MaxDirsCount uint -} - -// NewLogsDistributor creates LogsDistributor instance -func NewLogsDistributor() LogsDistributor { - return &DefaultLogsDistributor{ - MaxDirsCount: DefaultMaxDirsCount, - } -} - -// DirForPid finds directory that should hold logs data of certain PID -func (ld *DefaultLogsDistributor) DirForPid(baseDir string, pid uint64) (string, error) { - // directories from 1 to maxDirsCount inclusive - subDirName := (pid % uint64(ld.MaxDirsCount)) - - // {baseLogsDir}/{subDirName} - pidLogsDir := fmt.Sprintf("%s%c%d", baseDir, os.PathSeparator, subDirName) - - // Create subdirectory - if info, err := os.Stat(pidLogsDir); os.IsNotExist(err) { - if err = os.MkdirAll(pidLogsDir, os.ModePerm); err != nil { - return "", err - } - } else if err != nil { - return "", err - } else if !info.IsDir() { - m := fmt.Sprintf("Couldn't create a directory '%s', the name is taken by file", pidLogsDir) - return "", errors.New(m) - } - return pidLogsDir, nil -} diff --git a/agents/go-agents/core/process/logs_distributor_test.go b/agents/go-agents/core/process/logs_distributor_test.go deleted file mode 100644 index c6e62d7fe9a..00000000000 --- a/agents/go-agents/core/process/logs_distributor_test.go +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process_test - -import ( - "fmt" - "io/ioutil" - "log" - "os" - "testing" - - "github.com/eclipse/che/agents/go-agents/core/process" -) - -func TestLogsDistributorCreatesSubdirectories(t *testing.T) { - baseDir := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeAll(baseDir) - - distributor := process.DefaultLogsDistributor{ - MaxDirsCount: 4, - } - - dir, err := distributor.DirForPid(baseDir, 1) - if err != nil { - t.Fatal(err) - } - - if _, err := os.Stat(dir); os.IsNotExist(err) { - t.Fatal("Expected that logs file subdirectory was created") - } else if err != nil { - t.Fatal(err) - } -} - -func TestLogsDistribution(t *testing.T) { - baseDir := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeAll(baseDir) - - distributor := process.DefaultLogsDistributor{ - MaxDirsCount: 4, - } - - // Those files should be evenly distributed in 4 directories - for pid := 1; pid <= 16; pid++ { - dir, err := distributor.DirForPid(baseDir, uint64(pid)) - if err != nil { - t.Fatal(err) - } - filename := fmt.Sprintf("%s%cpid-%d", dir, os.PathSeparator, pid) - if _, err := os.Create(filename); err != nil { - t.Fatal(err) - } - } - - for i := 0; i < 4; i++ { - dir := fmt.Sprintf("%s%c%d", baseDir, os.PathSeparator, i) - fi, err := ioutil.ReadDir(dir) - if err != nil { - t.Fatal(err) - } - if len(fi) != 4 { - t.Fatalf("Expected directory '%s' to contain 4 files", dir) - } - } -} - -func removeAll(path string) { - if err := os.RemoveAll(path); err != nil { - log.Printf("Can't remove folder %s. Error: %s", path, err) - } -} diff --git a/agents/go-agents/core/process/logs_reader.go b/agents/go-agents/core/process/logs_reader.go deleted file mode 100644 index a2e19f36c4f..00000000000 --- a/agents/go-agents/core/process/logs_reader.go +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "bufio" - "encoding/json" - "io" - "os" - "time" -) - -// LogsReader allows to read logs from file written by DefaultFileLogger -type LogsReader struct { - filename string - readFrom *time.Time - readTill *time.Time -} - -// NewLogsReader creates new LogsReader instance -func NewLogsReader(filename string) *LogsReader { - return &LogsReader{filename: filename} -} - -// From skips all the logs before the given time. -// If the log message appeared at the given time, it won't be skipped. -func (lr *LogsReader) From(time time.Time) *LogsReader { - lr.readFrom = &time - return lr -} - -// Till reads logs which appeared before and right at a given time -func (lr *LogsReader) Till(time time.Time) *LogsReader { - lr.readTill = &time - return lr -} - -// ReadLogs reads logs between [from, till] inclusive. -// Returns an error if logs file is missing, or -// decoding of file content failed. -// If no logs matched time frame, an empty slice will be returned. -func (lr *LogsReader) ReadLogs() ([]*LogMessage, error) { - // Open logs file for reading logs - logsFile, err := os.Open(lr.filename) - if err != nil { - return nil, err - } - defer closeFile(logsFile) - - from := time.Time{} - if lr.readFrom != nil { - from = *lr.readFrom - } - till := time.Now() - if lr.readTill != nil { - till = *lr.readTill - } - - // Read logs - logs := []*LogMessage{} - decoder := json.NewDecoder(bufio.NewReader(logsFile)) - for { - message := &LogMessage{} - err = decoder.Decode(message) - if err != nil { - if err == io.EOF { - break - } - return nil, err - } - if message.Time.Before(from) { - continue - } - if message.Time.After(till) { - break - } - logs = append(logs, message) - } - return logs, nil -} diff --git a/agents/go-agents/core/process/logs_reader_test.go b/agents/go-agents/core/process/logs_reader_test.go deleted file mode 100644 index 7af41551b6b..00000000000 --- a/agents/go-agents/core/process/logs_reader_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process_test - -import ( - "os" - "testing" - "time" - - "github.com/eclipse/che/agents/go-agents/core/process" -) - -func TestReadLogs(t *testing.T) { - filename := os.TempDir() + string(os.PathSeparator) + randomName(10) - defer removeFile(filename) - - fl, err := process.NewLogger(filename) - if err != nil { - t.Fatal(err) - } - - // Write something to the log - now := time.Now() - fl.OnStdout("line1", now.Add(time.Second)) - fl.OnStdout("line2", now.Add(time.Second*2)) - fl.OnStdout("line3", now.Add(time.Second*3)) - fl.OnStderr("line4", now.Add(time.Second*4)) - fl.OnStderr("line5", now.Add(time.Second*5)) - fl.Close() - - // Read logs [2, 4] - logs, err := - process.NewLogsReader(filename). - From(now.Add(time.Second * 2)). - Till(now.Add(time.Second * 4)). - ReadLogs() - if err != nil { - t.Fatal(err) - } - - // Check everything is okay - expected := []process.LogMessage{ - {Kind: process.StdoutKind, Time: now.Add(time.Second * 2), Text: "line2"}, - {Kind: process.StdoutKind, Time: now.Add(time.Second * 3), Text: "line3"}, - {Kind: process.StderrKind, Time: now.Add(time.Second * 4), Text: "line4"}, - } - for i := 0; i < len(logs); i++ { - failIfDifferent(t, *logs[i], expected[i]) - } -} - -func failIfDifferent(t *testing.T, expected process.LogMessage, actual process.LogMessage) { - if expected.Kind != actual.Kind || expected.Text != actual.Text || expected.Time.Unix() != actual.Time.Unix() { - t.Fatalf("Expected: '%v' Found '%v'", expected, actual) - } -} diff --git a/agents/go-agents/core/process/process.go b/agents/go-agents/core/process/process.go deleted file mode 100644 index b310f09c127..00000000000 --- a/agents/go-agents/core/process/process.go +++ /dev/null @@ -1,584 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "errors" - "fmt" - "log" - "os" - "os/exec" - "runtime" - "sync" - "sync/atomic" - "syscall" - "time" -) - -const ( - // StdoutBit is set when subscriber is interested in stdout logs - StdoutBit = 1 << iota - // StderrBit is set when subscriber is interested in stdout logs - StderrBit = 1 << iota - // StatusBit is set when subscriber is interested in a process events - StatusBit = 1 << iota - // DefaultMask is set by default and identifies receiving of both logs and events of a process - DefaultMask = StderrBit | StdoutBit | StatusBit - - // DefaultShellInterpreter is default shell that executes commands - // unless another one is configured - DefaultShellInterpreter = "/bin/bash" -) - -var ( - prevPid uint64 - - // the directory under which all the logs are written - logsDir string - - // in memory storage of alive & dead processes - processes = &processesMap{items: make(map[uint64]*MachineProcess)} - - // used by process to point to the file for a process with given pid - logsDistributor LogsDistributor = NewLogsDistributor() - - // shell that executes commands - shellInterpreter = DefaultShellInterpreter -) - -// SetLogsDir sets the path to the directory to write logs to. -func SetLogsDir(dir string) { - logsDir = dir -} - -// WipeLogs removes logs dir and all the files and directories under it. -func WipeLogs() error { - return os.RemoveAll(logsDir) -} - -// SetLogsDistributor changes the default strategy of logs distribution to a given one. -func SetLogsDistributor(ld LogsDistributor) { - if ld != nil { - logsDistributor = ld - } -} - -// SetShellInterpreter changes the default -// shell interpreter which is '/bin/bash' to the given one. -func SetShellInterpreter(si string) { - if si != "" { - shellInterpreter = si - } -} - -// Command represents command that is used in command execution API. -type Command struct { - Name string `json:"name"` - CommandLine string `json:"commandLine"` - Type string `json:"type"` -} - -// MachineProcess defines machine process model. -type MachineProcess struct { - // The virtual id of the process, it is guaranteed that pid - // is always unique, while NativePid may occur twice or more(when including dead processes). - Pid uint64 `json:"pid"` - - // The name of the process, it is equal to the Command.Name which this process created from. - // It doesn't have to be unique, at least machine agent doesn't need such constraint, - // as pid is used for identifying process. - Name string `json:"name"` - - // The command line executed by this process. - // It is equal to the Command.CommandLine which this process created from. - CommandLine string `json:"commandLine"` - - // The type of the command line, this field is rather useful meta - // information than something used for functioning. It is equal - // to the Command.Type which this process created from. - Type string `json:"type"` - - // Whether this process is alive or dead. - Alive bool `json:"alive"` - - // The native(OS) pid, it is unique per alive processes, - // but those which are not alive, may have the same NativePid. - NativePid int `json:"nativePid"` - - // The exit code of the process. - // The value is set after the process died, the value is -1 while the process is alive. - ExitCode int `json:"exitCode"` - - // Process log filename. - logfileName string - - // Command executed by this process. - // If process is not alive then the command value is set to nil. - command *exec.Cmd - - // Stdout/stderr pumper. - // If process is not alive then the pumper value is set to nil. - pumper *LogsPumper - - // Process subscribers, all the outgoing events are go through those subscribers. - // If process is not alive then the subscribers value is set to nil. - subs []*Subscriber - - // Process file logger. - // The value is set only if process logs directory is configured. - fileLogger *FileLogger - - // Process mutex should be used to sync process data - // or block on process related operations such as events publications. - mutex *sync.RWMutex - - // The time when the process died. - deathTime time.Time - - // Called once before any of process events is published - // and after process is started. - beforeEventsHook func(process MachineProcess) -} - -// Subscriber receives process events. -type Subscriber struct { - ID string - Mask uint64 - Consumer EventConsumer -} - -// NoProcessError is returned when requested process doesn't exist. -type NoProcessError struct { - error - Pid uint64 -} - -// NotAliveError is returned when process that is target of an action is not alive anymore. -type NotAliveError struct { - error - Pid uint64 -} - -// Lockable map for storing processes. -type processesMap struct { - sync.RWMutex - items map[uint64]*MachineProcess -} - -// Start starts MachineProcess. -func Start(newProcess MachineProcess) (MachineProcess, error) { - - var cmd *exec.Cmd - if runtime.GOOS == "linux" { // also can be specified to FreeBSD - // wrap command to be able to kill child processes see https://github.com/golang/go/issues/8854 - cmd = exec.Command("setsid", shellInterpreter, "-c", newProcess.CommandLine) - } else { - cmd = exec.Command(shellInterpreter, "-c", newProcess.CommandLine) - } - - // getting stdout pipe - stdout, err := cmd.StdoutPipe() - if err != nil { - return newProcess, err - } - - // getting stderr pipe - stderr, err := cmd.StderrPipe() - if err != nil { - return newProcess, err - } - - // starting a new process - err = cmd.Start() - if err != nil { - return newProcess, err - } - - // increment current pid & assign it to the value - pid := atomic.AddUint64(&prevPid, 1) - - // set shared data - newProcess.Pid = pid - newProcess.Alive = true - newProcess.NativePid = cmd.Process.Pid - newProcess.ExitCode = -1 - - // create an internal copy of the new process - internalProcess := newProcess - - pumper := NewPumper(stdout, stderr) - fileLogger, err := newFileLogger(pid) - if err != nil { - return newProcess, err - } - - // set internal data - internalProcess.command = cmd - internalProcess.pumper = pumper - internalProcess.mutex = &sync.RWMutex{} - if fileLogger != nil { - internalProcess.fileLogger = fileLogger - internalProcess.logfileName = fileLogger.filename - } - - // register logs consumers - if fileLogger != nil { - pumper.AddConsumer(fileLogger) - } - pumper.AddConsumer(&internalProcess) - - // save(publish) process instance - processes.Lock() - processes.items[pid] = &internalProcess - processes.Unlock() - - if newProcess.beforeEventsHook != nil { - newProcess.beforeEventsHook(newProcess) - } - - // before pumping is started publish process_started event - startPublished := make(chan bool) - go func() { - internalProcess.notifySubs(newStartedEvent(newProcess), StatusBit) - startPublished <- true - }() - - // start pumping after start event is published 'pumper.Pump' is blocking - go func() { - <-startPublished - pumper.Pump() - }() - - return newProcess, nil -} - -// Get retrieves process by pid. -// If process doesn't exist then error of type NoProcessError is returned. -func Get(pid uint64) (MachineProcess, error) { - p, ok := directGet(pid) - if !ok { - return MachineProcess{}, noProcess(pid) - } - p.mutex.RLock() - defer p.mutex.RUnlock() - return *p, nil - -} - -// GetProcesses retrieves list of processes. -// If parameter all is true then returns all processes, -// otherwise returns only live processes. -func GetProcesses(all bool) []MachineProcess { - processes.RLock() - defer processes.RUnlock() - - pArr := make([]MachineProcess, 0, len(processes.items)) - for _, p := range processes.items { - if all { - pArr = append(pArr, *p) - } else { - p.mutex.RLock() - if p.Alive { - pArr = append(pArr, *p) - } - p.mutex.RUnlock() - } - } - return pArr -} - -// Kill kills process by given pid. -// Returns an error when any error occurs during process kill. -// If process doesn't exist error of type NoProcessError is returned. -func Kill(pid uint64) error { - p, ok := directGet(pid) - if !ok { - return noProcess(pid) - } - if !p.Alive { - return notAlive(pid) - } - // workaround for killing child processes see https://github.com/golang/go/issues/8854 - return syscall.Kill(-p.NativePid, syscall.SIGKILL) -} - -// ReadLogs reads process logs between [from, till] inclusive. -// Returns an error if any error occurs during logs reading. -// If process doesn't exist error of type NoProcessError is returned. -func ReadLogs(pid uint64, from time.Time, till time.Time) ([]*LogMessage, error) { - p, ok := directGet(pid) - if !ok { - return nil, noProcess(pid) - } - - p.mutex.RLock() - reader, err := newLogsReader(p, from, till) - p.mutex.RUnlock() - - if err != nil { - return nil, err - } - return reader.ReadLogs() -} - -// ReadAllLogs reads all process logs. -// Returns an error if any error occurs during logs reading. -// If process doesn't exist error of type NoProcessError is returned. -func ReadAllLogs(pid uint64) ([]*LogMessage, error) { - return ReadLogs(pid, time.Time{}, time.Now()) -} - -// RemoveSubscriber unsubscribes subscriber with given id from process events. -// If process doesn't exist then error of type NoProcessError is returned. -func RemoveSubscriber(pid uint64, id string) error { - p, ok := directGet(pid) - if !ok { - return noProcess(pid) - } - - p.mutex.Lock() - defer p.mutex.Unlock() - - if !p.Alive { - return notAlive(pid) - } - for idx, sub := range p.subs { - if sub.ID == id { - p.subs = append(p.subs[0:idx], p.subs[idx+1:]...) - break - } - } - return nil -} - -// AddSubscriber subscribes provided subscriber to the process output. -// An error of type NoProcessError is returned when process -// with given pid doesn't exist, a regular error is returned -// if the process is dead or subscriber with such id already subscribed -// to the process output. -func AddSubscriber(pid uint64, subscriber Subscriber) error { - p, ok := directGet(pid) - if !ok { - return noProcess(pid) - } - p.mutex.Lock() - defer p.mutex.Unlock() - if !p.Alive && p.NativePid != 0 { - return errors.New("Can't subscribe to the events of dead process") - } - for _, sub := range p.subs { - if sub.ID == subscriber.ID { - return errors.New("Already subscribed") - } - } - p.subs = append(p.subs, &subscriber) - return nil -} - -// RestoreSubscriber adds a new process subscriber by reading all the logs between -// given 'after' and now and publishing them to the channel. -// Returns an error of type NoProcessError if process with given id doesn't exist, -// returns a regular error if process is alive an subscriber with such id -// already subscribed. -func RestoreSubscriber(pid uint64, subscriber Subscriber, after time.Time) error { - p, ok := directGet(pid) - if !ok { - return noProcess(pid) - } - p.mutex.Lock() - defer p.mutex.Unlock() - - // Read logs between after and now - var logs []*LogMessage - reader, err := newLogsReader(p, after, time.Now()) - if err == nil { - if logs, err = reader.ReadLogs(); err != nil { - return err - } - } - - // If process is dead there is no need to subscribe to it - // as it is impossible to get it alive again, but it is still - // may be useful for client to get missed logs, that's why this - // function doesn't throw any errors in the case of dead process - if p.Alive { - for _, sub := range p.subs { - if sub.ID == subscriber.ID { - return errors.New("Already subscribed") - } - } - p.subs = append(p.subs, &subscriber) - } - - // Publish all the logs between (after, now] - for i := 0; i < len(logs); i++ { - message := logs[i] - if message.Time.After(after) { - if message.Kind == StdoutKind { - subscriber.Consumer.Accept(newStdoutEvent(p.Pid, message.Text, message.Time)) - } else { - subscriber.Consumer.Accept(newStderrEvent(p.Pid, message.Text, message.Time)) - } - } - } - - // Publish died event after logs are published and process is dead - if !p.Alive { - subscriber.Consumer.Accept(newDiedEvent(*p)) - } - - return nil -} - -// UpdateSubscriber updates subscriber with given id. -// An error of type NoProcessError is returned when process -// with given pid doesn't exist, a regular error is returned -// if the process is dead. -func UpdateSubscriber(pid uint64, id string, newMask uint64) error { - p, ok := directGet(pid) - if !ok { - return noProcess(pid) - } - if !p.Alive { - return notAlive(pid) - } - p.mutex.Lock() - defer p.mutex.Unlock() - for _, sub := range p.subs { - if sub.ID == id { - sub.Mask = newMask - return nil - } - } - return fmt.Errorf("No subscriber with id '%s'", id) -} - -// OnStdout notifies subscribers about new output in stdout. -func (process *MachineProcess) OnStdout(line string, time time.Time) { - process.notifySubs(newStdoutEvent(process.Pid, line, time), StdoutBit) -} - -// OnStderr notifies subscribers about new output in stderr. -func (process *MachineProcess) OnStderr(line string, time time.Time) { - process.notifySubs(newStderrEvent(process.Pid, line, time), StderrBit) -} - -// Close cleanups process resources and notifies subscribers about process death. -func (process *MachineProcess) Close() { - // Cleanup command resources - exitCode := 0 - if err := process.command.Wait(); err != nil { - if exiterr, ok := err.(*exec.ExitError); ok { - status := exiterr.Sys().(syscall.WaitStatus) - exitCode = status.ExitStatus() - } else { - log.Printf("Error occurs on process cleanup. %s", err) - } - } - // Cleanup machine process resources before dead event is sent - process.mutex.Lock() - process.Alive = false - process.deathTime = time.Now() - process.command = nil - process.pumper = nil - process.fileLogger = nil - process.ExitCode = exitCode - process.mutex.Unlock() - - process.notifySubs(newDiedEvent(*process), StatusBit) - - process.mutex.Lock() - process.subs = nil - process.mutex.Unlock() -} - -func (process *MachineProcess) notifySubs(event Event, typeBit uint64) { - process.mutex.RLock() - subs := process.subs - for _, subscriber := range subs { - // Check whether subscriber needs such kind of event and then try to notify it - if subscriber.Mask&typeBit == typeBit && !tryAccept(subscriber.Consumer, event) { - // Impossible to write to the channel, remove the channel from the subscribers list. - // It may happen when writing to the closed channel - defer RemoveSubscriber(process.Pid, subscriber.ID) - } - } - process.mutex.RUnlock() -} - -// Writes to a channel and returns true if write is successful, -// otherwise if write to the channel failed e.g. channel is closed then returns false. -func tryAccept(consumer EventConsumer, event Event) (ok bool) { - defer func() { - if r := recover(); r != nil { - ok = false - } - }() - consumer.Accept(event) - return true -} - -func directGet(pid uint64) (*MachineProcess, bool) { - processes.RLock() - defer processes.RUnlock() - item, ok := processes.items[pid] - return item, ok -} - -// Creates a new logs reader for given process. -func newLogsReader(p *MachineProcess, from time.Time, till time.Time) (*LogsReader, error) { - if p.logfileName == "" { - return nil, fmt.Errorf("Logs file for process '%d' is missing", p.Pid) - } - if p.Alive { - p.fileLogger.Flush() - } - return NewLogsReader(p.logfileName).From(from).Till(till), nil -} - -// Creates a new file logger for given pid. -func newFileLogger(pid uint64) (*FileLogger, error) { - if logsDir == "" { - return nil, nil - } - - // Figure out the place for logs file - dir, err := logsDistributor.DirForPid(logsDir, pid) - if err != nil { - return nil, err - } - - // TODO extract file process name generation to the strategy interface(consider LogsDistributor) - filename := fmt.Sprintf("%s%cpid-%d", dir, os.PathSeparator, pid) - fileLogger, err := NewLogger(filename) - if err != nil { - return nil, err - } - return fileLogger, nil -} - -// Returns an error indicating that process with given pid doesn't exist. -func noProcess(pid uint64) *NoProcessError { - return &NoProcessError{ - error: fmt.Errorf("Process with id '%d' does not exist", pid), - Pid: pid, - } -} - -// Returns an error indicating that process with given pid is not alive -func notAlive(pid uint64) *NotAliveError { - return &NotAliveError{ - error: fmt.Errorf("Process with id '%d' is not alive", pid), - Pid: pid, - } -} diff --git a/agents/go-agents/core/process/process_builder.go b/agents/go-agents/core/process/process_builder.go deleted file mode 100644 index bf5489ea121..00000000000 --- a/agents/go-agents/core/process/process_builder.go +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -//Builder simplifies creation of MachineProcess. -type Builder struct { - command Command - beforeEventsHook func(p MachineProcess) - subscribers []*Subscriber -} - -// NewBuilder creates new instance of ProcessBuilder. -func NewBuilder() *Builder { - return &Builder{} -} - -// Cmd sets command of process. -func (pb *Builder) Cmd(command Command) *Builder { - pb.command = command - return pb -} - -// CmdLine sets command line of process. -func (pb *Builder) CmdLine(cmdLine string) *Builder { - pb.command.CommandLine = cmdLine - return pb -} - -// CmdType sets type of command that creates a process. -func (pb *Builder) CmdType(cmdType string) *Builder { - pb.command.Type = cmdType - return pb -} - -// CmdName sets name of command that creates a process. -func (pb *Builder) CmdName(cmdName string) *Builder { - pb.command.Name = cmdName - return pb -} - -// BeforeEventsHook sets the hook which will be called once before -// process subscribers notified with any of the process events, -// and after process is started. -func (pb *Builder) BeforeEventsHook(hook func(p MachineProcess)) *Builder { - pb.beforeEventsHook = hook - return pb -} - -//Subscribe subscribes to the process events. -func (pb *Builder) Subscribe(id string, mask uint64, consumer EventConsumer) *Builder { - pb.subscribers = append(pb.subscribers, &Subscriber{ - ID: id, - Mask: mask, - Consumer: consumer, - }) - return pb -} - -//SubscribeDefault subscribes to the process events using process.DefaultMask. -func (pb *Builder) SubscribeDefault(id string, consumer EventConsumer) *Builder { - return pb.Subscribe(id, DefaultMask, consumer) -} - -// Build creates MachineProcess from this builder. -func (pb *Builder) Build() MachineProcess { - p := MachineProcess{ - Name: pb.command.Name, - CommandLine: pb.command.CommandLine, - Type: pb.command.Type, - beforeEventsHook: pb.beforeEventsHook, - subs: pb.subscribers, - } - return p -} - -// Start creates MachineProcess from this builder and starts this process. -func (pb *Builder) Start() (MachineProcess, error) { - return Start(pb.Build()) -} diff --git a/agents/go-agents/core/process/process_cleaner.go b/agents/go-agents/core/process/process_cleaner.go deleted file mode 100644 index f33794c9a81..00000000000 --- a/agents/go-agents/core/process/process_cleaner.go +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "log" - "os" - "time" -) - -// Cleaner cleanups processes that died -type Cleaner struct { - CleanupPeriod time.Duration - CleanupThreshold time.Duration -} - -// NewCleaner create new instance of Cleaner -func NewCleaner(period int, threshold int) *Cleaner { - return &Cleaner{ - time.Duration(period) * time.Minute, - time.Duration(threshold) * time.Minute, - } -} - -// CleanPeriodically schedules cleanups of processes that exited -// more than CleanupThreshold time before cleanup. -// This function is synchronous. -func (pc *Cleaner) CleanPeriodically() { - ticker := time.NewTicker(pc.CleanupPeriod) - defer ticker.Stop() - for range ticker.C { - pc.CleanOnce() - } -} - -// CleanOnce cleanups processes that died before Time.Now() minus CleanupThreshold. -// -// process1.deathTime = 2 -// process2.deathTime = 5 -// -// death bound now -// v v -// timeline -> 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 -> -// ^ ^ -// process1 process2 -// -// the method execution will remove the process1. -func (pc *Cleaner) CleanOnce() { - deathBound := time.Now().Add(-pc.CleanupThreshold) - processes.Lock() - for _, mp := range processes.items { - mp.mutex.RLock() - if !mp.Alive && mp.deathTime.Before(deathBound) { - delete(processes.items, mp.Pid) - if err := os.Remove(mp.logfileName); err != nil { - if !os.IsNotExist(err) { - log.Printf("Couldn't remove process logs file, '%s'", mp.logfileName) - } - } - } - mp.mutex.RUnlock() - } - processes.Unlock() -} diff --git a/agents/go-agents/core/process/process_cleaner_test.go b/agents/go-agents/core/process/process_cleaner_test.go deleted file mode 100644 index 2af7523ab72..00000000000 --- a/agents/go-agents/core/process/process_cleaner_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "sync" - "testing" - "time" -) - -func TestCleanWithZeroThreshold(t *testing.T) { - p1 := &MachineProcess{Pid: 1, mutex: &sync.RWMutex{}, Alive: false, deathTime: time.Now().Add(-time.Hour)} - p2 := &MachineProcess{Pid: 2, mutex: &sync.RWMutex{}, Alive: false, deathTime: time.Now()} - p3 := &MachineProcess{Pid: 3, mutex: &sync.RWMutex{}, Alive: true} - - processes.Lock() - processes.items[1] = p1 - processes.items[2] = p2 - processes.items[3] = p3 - processes.Unlock() - - NewCleaner(0, 0).CleanOnce() - - processMustNotExist(p1.Pid, t) - processMustNotExist(p2.Pid, t) - processMustExist(p3.Pid, t) -} - -func TestCleansOnlyExpiredProcesses(t *testing.T) { - p1 := &MachineProcess{Pid: 1, Alive: false, mutex: &sync.RWMutex{}, deathTime: time.Now().Add(-time.Hour)} - p2 := &MachineProcess{Pid: 2, Alive: false, mutex: &sync.RWMutex{}, deathTime: time.Now().Add(-time.Minute * 45)} - p3 := &MachineProcess{Pid: 3, Alive: false, mutex: &sync.RWMutex{}, deathTime: time.Now().Add(-time.Minute * 15)} - p4 := &MachineProcess{Pid: 4, Alive: true, mutex: &sync.RWMutex{}} - - processes.Lock() - processes.items[1] = p1 - processes.items[2] = p2 - processes.items[3] = p3 - processes.items[4] = p4 - processes.Unlock() - - // cleanup immediately - (&Cleaner{CleanupPeriod: 0, CleanupThreshold: time.Minute * 30}).CleanOnce() - - processMustNotExist(p1.Pid, t) - processMustNotExist(p2.Pid, t) - processMustExist(p3.Pid, t) - processMustExist(p4.Pid, t) -} - -func processMustNotExist(pid uint64, t *testing.T) { - _, err := Get(pid) - if err == nil { - t.Fatalf("Process with id '%d' must not exist", pid) - } - if _, ok := err.(*NoProcessError); !ok { - t.Fatalf("The error must be of type NoProcessError, error message: %s", err.Error()) - } -} - -func processMustExist(pid uint64, t *testing.T) { - if _, err := Get(pid); err != nil { - t.Fatalf("Process with pid '%d' must exist, but error occurred '%s'", pid, err.Error()) - } -} diff --git a/agents/go-agents/core/process/process_test.go b/agents/go-agents/core/process/process_test.go deleted file mode 100644 index 58fd512231e..00000000000 --- a/agents/go-agents/core/process/process_test.go +++ /dev/null @@ -1,340 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process_test - -import ( - "log" - "math/rand" - "os" - "strings" - "testing" - "time" - - "fmt" - "github.com/eclipse/che/agents/go-agents/core/process" - "github.com/eclipse/che/agents/go-agents/core/process/processtest" -) - -const ( - testCmd = "printf \"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\"" -) - -var alphabet = []byte("abcdefgh123456789") - -func TestOneLineOutput(t *testing.T) { - defer wipeLogs() - // create and start a process - p := startAndWaitTestProcessWritingLogsToTmpDir("echo test", t) - - logs, _ := process.ReadAllLogs(p.Pid) - - if len(logs) != 1 { - t.Fatalf("Expected logs size to be 1, but got %d", len(logs)) - } - - if logs[0].Text != "test" { - t.Fatalf("Expected to get 'test' output but got %s", logs[0].Text) - } -} - -func TestEmptyLinesOutput(t *testing.T) { - p := startAndWaitTestProcessWritingLogsToTmpDir("printf \"\n\n\n\n\n\"", t) - defer process.WipeLogs() - - logs, _ := process.ReadAllLogs(p.Pid) - - if len(logs) != 5 { - t.Fatalf("Expected logs to be 5 sized, but the size is '%d'", len(logs)) - } - - for _, value := range logs { - if value.Text != "" { - t.Fatal("Expected all the logs to be empty files") - } - } -} - -func TestAddSubscriber(t *testing.T) { - outputLines := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} - - // create and start a process - pb := process.NewBuilder() - pb.CmdName("test") - pb.CmdType("test") - pb.CmdLine("printf \"" + strings.Join(outputLines, "\n") + "\"") - - // add a new subscriber - eventsChan := make(chan process.Event) - pb.SubscribeDefault("test", &channelEventConsumer{eventsChan}) - - // start a new process - if _, err := pb.Start(); err != nil { - t.Fatal(err) - } - - // read all the process output events - done := make(chan bool) - var received []string - go func() { - event := <-eventsChan - for event.Type() != process.DiedEventType { - if event.Type() == process.StdoutEventType { - out := event.(*process.OutputEvent) - received = append(received, out.Text) - } - event = <-eventsChan - } - done <- true - }() - - // wait until process is done - <-done - - if len(outputLines) != len(received) { - t.Fatalf("Expected the same size but got %d != %d", len(outputLines), len(received)) - } - - for idx, value := range outputLines { - if value != received[idx] { - t.Fatalf("Expected %s but got %s", value, received[idx]) - } - } -} - -func TestRestoreSubscriberForDeadProcess(t *testing.T) { - beforeStart := time.Now() - p := startAndWaitTestProcessWritingLogsToTmpDir("echo test", t) - defer process.WipeLogs() - - // Read all the data from channel - channel := make(chan process.Event) - done := make(chan bool) - var received []process.Event - go func() { - statusReceived := false - timeoutReached := false - for !statusReceived && !timeoutReached { - select { - case v := <-channel: - received = append(received, v) - if v.Type() == process.DiedEventType { - statusReceived = true - } - case <-time.After(time.Second): - timeoutReached = true - } - } - done <- true - }() - - _ = process.RestoreSubscriber(p.Pid, process.Subscriber{ - ID: "test", - Mask: process.DefaultMask, - Consumer: &channelEventConsumer{channel: channel}, - }, beforeStart) - - <-done - - if len(received) != 2 { - t.Fatalf("Expected to recieve 2 events but got %d", len(received)) - } - e1Type := received[0].Type() - e1Text := received[0].(*process.OutputEvent).Text - if received[0].Type() != process.StdoutEventType || e1Text != "test" { - t.Fatalf("Expected to receieve output event with text 'test', but got '%s' event with text %s", - e1Type, - e1Text) - } - if received[1].Type() != process.DiedEventType { - t.Fatal("Expected to get 'process_died' event") - } -} - -func TestMachineProcessIsNotAliveAfterItIsDead(t *testing.T) { - p := startAndWaitTestProcess(testCmd, t) - if p.Alive { - t.Fatal("Process should not be alive") - } -} - -func TestItIsNotPossibleToAddSubscriberToDeadProcess(t *testing.T) { - p := startAndWaitTestProcess(testCmd, t) - if err := process.AddSubscriber(p.Pid, process.Subscriber{}); err == nil { - t.Fatal("Should not be able to add subscriber") - } -} - -func TestReadProcessLogs(t *testing.T) { - p := startAndWaitTestProcessWritingLogsToTmpDir(testCmd, t) - defer wipeLogs() - logs, err := process.ReadLogs(p.Pid, time.Time{}, time.Now()) - if err != nil { - t.Fatal(err) - } - expected := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} - - for idx := range expected { - if process.StdoutKind != logs[idx].Kind { - t.Fatalf("Expected log message kind to be '%s', while got '%s'", process.StdoutKind, logs[idx].Kind) - } - if expected[idx] != logs[idx].Text { - t.Fatalf("Expected log message to be '%s', but got '%s'", expected[idx], logs[idx].Text) - } - } -} - -func TestLogsAreNotWrittenIfLogsDirIsNotSet(t *testing.T) { - p := doStartAndWaitTestProcess(testCmd, "", processtest.NewEventsCaptor(process.DiedEventType), t) - - _, err := process.ReadAllLogs(p.Pid) - if err == nil { - t.Fatal("Error must be returned in the case when the process doesn't write logs") - } - - expected := fmt.Sprintf("Logs file for process '%d' is missing", p.Pid) - if err.Error() != expected { - t.Fatalf("Expected to get '%s' error but got '%s'", err.Error(), expected) - } -} - -func TestAllProcessLifeCycleEventsArePublished(t *testing.T) { - eventsCaptor := processtest.NewEventsCaptor(process.DiedEventType) - doStartAndWaitTestProcess("printf \"first_line\nsecond_line\"", "", eventsCaptor, t) - - expected := []string{ - process.StartedEventType, - process.StdoutEventType, - process.StdoutEventType, - process.DiedEventType, - } - checkEventsOrder(t, eventsCaptor.Events(), expected...) -} - -func TestProcessExitCodeIs0IfFinishedOk(t *testing.T) { - captor := processtest.NewEventsCaptor(process.DiedEventType) - p := doStartAndWaitTestProcess("echo test", "", captor, t) - - if p.ExitCode != 0 { - t.Fatalf("Expected process exit code to be 0, but it is %d", p.ExitCode) - } - - events := captor.Events() - if diedEvent, ok := events[len(events)-1].(*process.DiedEvent); !ok { - t.Fatalf("Expected last captured event to be process died event, but it is %s", diedEvent.Type()) - } else if diedEvent.ExitCode != 0 { - t.Fatalf("Expected process died event exit code to be 0, but it is %d", diedEvent.ExitCode) - } -} - -func TestProcessExitCodeIsNot0IfFinishedNotOk(t *testing.T) { - captor := processtest.NewEventsCaptor(process.DiedEventType) - // starting non-existing command(hopefully) - p := doStartAndWaitTestProcess("test-process-cmd-"+randomName(10), "", captor, t) - - if p.ExitCode <= 0 { - t.Fatalf("Expected process exit code to be > 0, but it is %d", p.ExitCode) - } - - events := captor.Events() - if diedEvent, ok := events[len(events)-1].(*process.DiedEvent); !ok { - t.Fatalf("Expected last captured event to be process died event, but it is %s", diedEvent.Type()) - } else if diedEvent.ExitCode <= 0 { - t.Fatalf("Expected process died event exit code to be > 0, but it is %d", diedEvent.ExitCode) - } -} - -func checkEventsOrder(t *testing.T, events []process.Event, types ...string) { - if len(types) != len(events) { - t.Fatalf("Expected receive %d events while received %d", len(types), len(events)) - } - for idx := range types { - failIfEventTypeIsDifferent(t, events[idx], types[idx]) - } -} - -func failIfEventTypeIsDifferent(t *testing.T, event process.Event, expectedType string) { - if event.Type() != expectedType { - t.Fatalf("Expected event type to be '%s' but it is '%s'", expectedType, event.Type()) - } -} - -func startAndWaitTestProcess(cmd string, t *testing.T) process.MachineProcess { - p := doStartAndWaitTestProcess(cmd, "", processtest.NewEventsCaptor(process.DiedEventType), t) - return p -} - -func startAndWaitTestProcessWritingLogsToTmpDir(cmd string, t *testing.T) process.MachineProcess { - p := doStartAndWaitTestProcess(cmd, tmpFile(), processtest.NewEventsCaptor(process.DiedEventType), t) - return p -} - -func doStartAndWaitTestProcess(cmd string, logsDir string, eventsCaptor *processtest.EventsCaptor, t *testing.T) process.MachineProcess { - process.SetLogsDir(logsDir) - - eventsCaptor.Capture() - - pb := process.NewBuilder() - pb.CmdName("test") - pb.CmdType("test") - pb.CmdLine(cmd) - pb.SubscribeDefault("events-captor", eventsCaptor) - - p, err := pb.Start() - if err != nil { - eventsCaptor.Wait(0) - t.Fatal(err) - } - - // wait process for a little while - if ok := <-eventsCaptor.Wait(time.Second * 2); !ok { - t.Log("The process doesn't finish its execution in 2 seconds. Trying to kill it") - if err := process.Kill(p.Pid); err != nil { - t.Logf("Failed to kill process, native pid = %d", p.NativePid) - } - t.FailNow() - } - - // check process state after it is finished - result, err := process.Get(p.Pid) - if err != nil { - t.Fatal(err) - } - - return result -} - -func tmpFile() string { - return os.TempDir() + string(os.PathSeparator) + randomName(10) -} - -func wipeLogs() { - if err := process.WipeLogs(); err != nil { - log.Printf("Could not wipe process logs dir. %s", err.Error()) - } -} - -func randomName(length int) string { - rand.Seed(time.Now().UnixNano()) - bytes := make([]byte, length) - for i := 0; i < length; i++ { - bytes[i] = alphabet[rand.Intn(len(alphabet))] - } - return string(bytes) -} - -// A consumer that redirects all the incoming events to the channel. -type channelEventConsumer struct { - channel chan process.Event -} - -func (c *channelEventConsumer) Accept(e process.Event) { c.channel <- e } diff --git a/agents/go-agents/core/process/processtest/test_utils.go b/agents/go-agents/core/process/processtest/test_utils.go deleted file mode 100644 index 55b5d5d6cc1..00000000000 --- a/agents/go-agents/core/process/processtest/test_utils.go +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package processtest provides utils for process testing. -package processtest - -import ( - "sync" - "time" - - "github.com/eclipse/che/agents/go-agents/core/process" -) - -// NewEventsCaptor create a new instance of events captor -func NewEventsCaptor(deathEventType string) *EventsCaptor { - return &EventsCaptor{DeathEventType: deathEventType} -} - -// EventsCaptor helps to Capture process events and wait for them. -type EventsCaptor struct { - sync.Mutex - - // Result events. - events []process.Event - - // Events channel. Close of this channel considered as immediate interruption, - // to hold until execution completes use captor.Wait(timeout) channel. - eventsChan chan process.Event - - // Channel used as internal approach to interrupt capturing. - interruptChan chan bool - - // Captor sends true if finishes reaching DeathEventType - // and false if interrupted while waiting for event of DeathEventType. - done chan bool - - // The last event after which events capturing stopped. - DeathEventType string -} - -func (ec *EventsCaptor) addEvent(e process.Event) { - ec.Lock() - defer ec.Unlock() - ec.events = append(ec.events, e) -} - -// Events returns all the captured events. -func (ec *EventsCaptor) Events() []process.Event { - ec.Lock() - defer ec.Unlock() - cp := make([]process.Event, len(ec.events)) - copy(cp, ec.events) - return cp -} - -// Capture starts capturing events, until one of the -// following conditions is met: -// - event of type EventsCaptor.deathEventType received. -// In this case capturing is successful done <- true -// - events channel closed. -// In this case capturing is interrupted done <- false -func (ec *EventsCaptor) Capture() { - ec.eventsChan = make(chan process.Event) - ec.interruptChan = make(chan bool, 1) - ec.done = make(chan bool) - - go func() { - for { - select { - case event, ok := <-ec.eventsChan: - if ok { - ec.addEvent(event) - if event.Type() == ec.DeathEventType { - // death event reached - capturing is done - ec.done <- true - return - } - } else { - // events channel closed interrupt immediately - ec.done <- false - return - } - case <-ec.interruptChan: - close(ec.eventsChan) - } - } - }() -} - -// Waits a timeout and if deadTypeEvent isn't reached interrupts captor. -// Returns done channel if the value received from the channel is true -// then the captor finished capturing successfully catching deathEventType, -// otherwise it was interrupted. -func (ec *EventsCaptor) Wait(timeout time.Duration) chan bool { - go func() { - <-time.NewTimer(timeout).C - ec.interruptChan <- true - }() - return ec.done -} - -// Interrupts capturing immediately, returns done channel. -func (ec *EventsCaptor) Stop() chan bool { - return ec.Wait(0) -} - -// Accept notifies the captor about incoming event. -func (ec *EventsCaptor) Accept(e process.Event) { ec.eventsChan <- e } diff --git a/agents/go-agents/core/process/pumper.go b/agents/go-agents/core/process/pumper.go deleted file mode 100644 index 42d5a7f8cd7..00000000000 --- a/agents/go-agents/core/process/pumper.go +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package process - -import ( - "bufio" - "io" - "log" - "sync" - "time" -) - -type acceptLine func(line string) - -// LogsConsumer is LogPumper client and consumes a message read by pumper -type LogsConsumer interface { - - // called on each line pumped from process stdout - OnStdout(line string, time time.Time) - - // called on each line pumped from process stderr - OnStderr(line string, time time.Time) - - // called when pumping is finished either by normal return or by error - Close() -} - -// LogsPumper pumps lines from the stdout and stderr into LogsConsumers -type LogsPumper struct { - stdout io.Reader - stderr io.Reader - clients []LogsConsumer - waitGroup sync.WaitGroup -} - -// NewPumper creates new instance of LogsPumper from provided -// stdout and stderr readers -func NewPumper(stdout io.Reader, stderr io.Reader) *LogsPumper { - return &LogsPumper{ - stdout: stdout, - stderr: stderr, - } -} - -// AddConsumer adds provided LogsConsumer into logs consumers list of the pumper -func (pumper *LogsPumper) AddConsumer(consumer LogsConsumer) { - pumper.clients = append(pumper.clients, consumer) -} - -// Pump starts 'pumping' logs from the stdout and stderr. -// The method execution is synchronous and waits for -// both stderr and stdout to complete closing all the clients after -func (pumper *LogsPumper) Pump() { - pumper.waitGroup.Add(2) - - // reading from stdout & stderr - go pump(pumper.stdout, pumper.notifyStdout, &pumper.waitGroup) - go pump(pumper.stderr, pumper.notifyStderr, &pumper.waitGroup) - - // cleanup after pumping is complete - pumper.waitGroup.Wait() - pumper.notifyClose() -} - -func pump(r io.Reader, lineConsumer acceptLine, wg *sync.WaitGroup) { - defer wg.Done() - br := bufio.NewReader(r) - for { - line, err := br.ReadBytes('\n') - - if err != nil { - if err != io.EOF { - log.Println("Error pumping: " + err.Error()) - } else if len(line) != 0 { - lineConsumer(string(line)) - } - return - } - - lineConsumer(string(line[:len(line)-1])) - } -} - -func (pumper *LogsPumper) notifyStdout(line string) { - t := time.Now() - for _, client := range pumper.clients { - client.OnStdout(line, t) - } -} - -func (pumper *LogsPumper) notifyStderr(line string) { - t := time.Now() - for _, client := range pumper.clients { - client.OnStderr(line, t) - } -} - -func (pumper *LogsPumper) notifyClose() { - for _, client := range pumper.clients { - client.Close() - } -} diff --git a/agents/go-agents/core/rest/default_router.go b/agents/go-agents/core/rest/default_router.go deleted file mode 100644 index f9648224802..00000000000 --- a/agents/go-agents/core/rest/default_router.go +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package rest - -import ( - "net/http" - "regexp" - - "fmt" - - "github.com/julienschmidt/httprouter" -) - -// DefaultRouter is router backed by github.com/julienschmidt/httprouter http router -type DefaultRouter struct { - router *httprouter.Router -} - -type basePathChoppingRouter struct { - DefaultRouter - reg *regexp.Regexp -} - -// NewDefaultRouter creates new instance of default implementation of router. -// basePath is path that should be cut from origin HTTP path and then matched to restRoutes. -func NewDefaultRouter(basePath string, restRoutes []RoutesGroup) Router { - var jrouter = httprouter.New() - - // base path chopping is not needed - if basePath == "" { - defaultRouter := &DefaultRouter{ - router: jrouter, - } - defaultRouter.addRoutes(restRoutes) - return defaultRouter - } - - // base path chopping is needed - reg, err := regexp.Compile(basePath) - if err != nil { - panic(fmt.Errorf("Base path '%s' is not a regexp. Error: %s", basePath, err)) - } - defaultRouter := &basePathChoppingRouter{ - DefaultRouter: DefaultRouter{router: jrouter}, - reg: reg, - } - defaultRouter.addRoutes(restRoutes) - return defaultRouter -} - -func (router *DefaultRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) { - router.router.ServeHTTP(w, r) -} - -func (router *DefaultRouter) addRoutes(restRoutes []RoutesGroup) { - for _, routesGroup := range restRoutes { - for _, route := range routesGroup.Items { - router.router.Handle( - route.Method, - route.Path, - toHandle(route.HandleFunc), - ) - } - } -} - -func (router *basePathChoppingRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // if reg is prefix of request path remove the prefix - if idx := router.reg.FindStringSubmatchIndex(r.URL.Path); len(idx) != 0 && idx[0] == 0 { - r.URL.Path = r.URL.Path[idx[1]:] - r.RequestURI = r.RequestURI[idx[1]:] - } - router.router.ServeHTTP(w, r) -} - -func toHandle(f HTTPRouteHandlerFunc) httprouter.Handle { - return func(w http.ResponseWriter, r *http.Request, p httprouter.Params) { - if err := f(w, r, routerParamsAdapter{params: p}); err != nil { - WriteError(w, err) - } - } -} - -// Implementation of route.Params -type routerParamsAdapter struct { - params httprouter.Params -} - -func (pa routerParamsAdapter) Get(param string) string { - return pa.params.ByName(param) -} diff --git a/agents/go-agents/core/rest/errors.go b/agents/go-agents/core/rest/errors.go deleted file mode 100644 index 93d2ff1b612..00000000000 --- a/agents/go-agents/core/rest/errors.go +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package rest - -import ( - "net/http" -) - -// APIError represents http error -type APIError struct { - error - Code int -} - -// BadRequest represents http error with 400 code -func BadRequest(err error) error { - return APIError{err, http.StatusBadRequest} -} - -// NotFound represents http error with code 404 -func NotFound(err error) error { - return APIError{err, http.StatusNotFound} -} - -// Conflict represents http error with 409 code -func Conflict(err error) error { - return APIError{err, http.StatusConflict} -} - -// Forbidden represents http error with 403 code -func Forbidden(err error) error { - return APIError{err, http.StatusForbidden} -} - -// Unauthorized represents http error with 401 code -func Unauthorized(err error) error { - return APIError{err, http.StatusUnauthorized} -} - -// ServerError represents http error with 500 code -func ServerError(err error) error { - return APIError{err, http.StatusInternalServerError} -} diff --git a/agents/go-agents/core/rest/restutil/util.go b/agents/go-agents/core/rest/restutil/util.go deleted file mode 100644 index 11dc26a6013..00000000000 --- a/agents/go-agents/core/rest/restutil/util.go +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package restutil - -import ( - "encoding/json" - "net/http" - "strconv" - - "github.com/eclipse/che/agents/go-agents/core/rest" -) - -// WriteJSON writes body as json to the response writer -func WriteJSON(w http.ResponseWriter, body interface{}) error { - w.Header().Set("Content-Type", "application/json") - return json.NewEncoder(w).Encode(body) -} - -// ReadJSON reads JSON body from the request -func ReadJSON(r *http.Request, v interface{}) error { - return json.NewDecoder(r.Body).Decode(v) -} - -// IntQueryParam converts value of query parameter into int. -// If query parameter is not found or can't be converted into int defaultValue is returned. -func IntQueryParam(r *http.Request, name string, defaultValue int) int { - qp := r.URL.Query().Get(name) - if qp == "" { - return defaultValue - } - v, err := strconv.Atoi(qp) - if err != nil { - return defaultValue - } - if v < 0 { - return defaultValue - } - return v -} - -// OKRespondingFunc responds 200 to the requests for a server liveness checks -func OKRespondingFunc(w http.ResponseWriter, r *http.Request, _ rest.Params) error { - w.WriteHeader(http.StatusOK) - return nil -} diff --git a/agents/go-agents/core/rest/route.go b/agents/go-agents/core/rest/route.go deleted file mode 100644 index be9b2a0aa1b..00000000000 --- a/agents/go-agents/core/rest/route.go +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package rest - -import ( - "fmt" - "net/http" - "strings" -) - -const ( - maxNameLen = 40 - maxMethodLen = len("DELETE") -) - -// HTTPRouteHandlerFunc is a handler for http routes -// vars variable contain only path parameters if any specified for given route -type HTTPRouteHandlerFunc func(w http.ResponseWriter, r *http.Request, params Params) error - -// Params is an interface for getting mapped path parameters by their names -type Params interface { - - // Gets path parameter by it's name e.g. - // for url template `/process/:id` and actual value `/process/123` - // this method will return string '123' - Get(name string) string -} - -// Route describes route for http requests -type Route struct { - - // Http method e.g. 'GET' - Method string - - // The name of the http route, used in logs - // this name is unique for all the application http routes - // example: 'StartProcess' - Name string - - // The path of the http route which this route is mapped to - // example: '/process' - Path string - - // The function used for handling http request - HandleFunc HTTPRouteHandlerFunc -} - -// RoutesGroup represents named group of http routes, those groups -// should be defined by separate apis, and then combined together -type RoutesGroup struct { - - // The name of this group e.g.: 'ProcessRoutes' - Name string - - // The http routes of this group - Items []Route -} - -func (r *Route) String() string { - name := r.Name + " " + strings.Repeat(".", maxNameLen-len(r.Name)) - method := r.Method + strings.Repeat(" ", maxMethodLen-len(r.Method)) - return fmt.Sprintf("%s %s %s", name, method, r.Path) -} - -// WriteError writes error into response -func WriteError(w http.ResponseWriter, err error) { - if apiErr, ok := err.(APIError); ok { - http.Error(w, apiErr.Error(), apiErr.Code) - } else { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} diff --git a/agents/go-agents/core/rest/router.go b/agents/go-agents/core/rest/router.go deleted file mode 100644 index 29a293d53d0..00000000000 --- a/agents/go-agents/core/rest/router.go +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package rest - -import ( - "log" - "net/http" -) - -// Router provides http requests routing capabilities -type Router interface { - http.Handler -} - -// PrintRoutes prints description of routes in provided slice of groups -func PrintRoutes(restRoutes []RoutesGroup) { - log.Print("⇩ Registered HTTPRoutes:\n\n") - for _, routesGroup := range restRoutes { - log.Printf("%s:\n", routesGroup.Name) - for _, route := range routesGroup.Items { - log.Printf("✓ %s\n", &route) - } - log.Println() - } -} diff --git a/agents/go-agents/docs/events.md b/agents/go-agents/docs/events.md deleted file mode 100644 index 169af59900a..00000000000 --- a/agents/go-agents/docs/events.md +++ /dev/null @@ -1,100 +0,0 @@ -Events -=== -Messages sent via websocket connections to clients - -Channel Events ---- - -#### Connected - -The first event in the channel, published when client successfully connected to the exec-agent. - -```json -{ - "jsonrpc": "2.0", - "method": "connected", - "params": { - "time": "2016-09-24T16:40:05.098478609+03:00", - "channel": "tunnel-1", - "tunnel": "tunnel-1", - "text": "Hello!" - } -} -``` - -Process Events ---- - -#### Process started - -Published when process is successfully started. -This is the first event from all the events produced by process, -it appears only once for one process - -```json -{ - "jsonrpc": "2.0", - "method": "process_started", - "params": { - "time": "2016-09-24T16:40:55.930743249+03:00", - "pid": 1, - "nativePid": 22164, - "name": "print", - "commandLine": "printf \"\n1\n2\n3\"" - } -} -``` - -#### STDOUT event - -Published when process writes to stdout. -One stdout event describes one output line - -```json -{ - "jsonrpc": "2.0", - "method": "process_stdout", - "params": { - "time": "2016-09-24T16:40:55.933255297+03:00", - "pid": 1, - "text": "Starting server..." - } -} -``` - -#### STDERR event - -Published when process writes to stderr. -One stderr event describes one output line - -```json -{ - "jsonrpc": "2.0", - "method": "process_stderr", - "params": { - "time": "2016-09-24T16:40:55.933255297+03:00", - "pid": 1, - "text": "sh: ifconfig: command not found" - } -} -``` - -#### Process died - -Published when process is done, or killed. This is the last event from the process, -it appears only once for one process - -```json -{ - "jsonrpc": "2.0", - "method": "process_died", - "params": { - "time": "2016-09-24T16:40:55.93354086+03:00", - "pid": 1, - "nativePid": 22164, - "name": "print", - "commandLine": "printf \"\n1\n2\n3\"", - "exitCode" : 0 - } -} -``` diff --git a/agents/go-agents/docs/notes.md b/agents/go-agents/docs/notes.md deleted file mode 100644 index 906e8ee2bc3..00000000000 --- a/agents/go-agents/docs/notes.md +++ /dev/null @@ -1,10 +0,0 @@ -##### Websocket messages order - -The order is respected -``` -Message fragments MUST be delivered to the recipient in the order sent by the sender. -``` -Helpful Sources -* https://tools.ietf.org/html/rfc6455 (search the sentence above) -* http://stackoverflow.com/questions/11804721/can-websocket-messages-arrive-out-of-order -* http://stackoverflow.com/questions/14287224/processing-websockets-messages-in-order-of-receiving diff --git a/agents/go-agents/docs/rest_api.md b/agents/go-agents/docs/rest_api.md deleted file mode 100644 index db844191be6..00000000000 --- a/agents/go-agents/docs/rest_api.md +++ /dev/null @@ -1,238 +0,0 @@ -REST API -=== - -Process API ---- - -### Start a new process - -#### Request - -_POST /process_ - -- `channel`(optional) - the id of the channel which should be subscribed to the process events -- `types`(optional) - comma separated types works only in couple with specified `channel`, defines -the events which will be sent by the process to the `channel`. Several values may be specified, -e.g. `channel=channel-1&types=stderr,stdout`. By default channel will be subscribed to -all the existing types(listed below). Possible type values: - - `stderr` - output from the process stderr - - `stdout` - output from the process stdout - - `process_status` - the process status events(_started, died_) - - -```json -{ - "name" : "build", - "commandLine" : "mvn clean install", - "type" : "maven" -} -``` - -#### Response - -```json -{ - "pid": 1, - "name": "build", - "commandLine": "mvn clean install", - "type" : "maven", - "alive": true, - "nativePid": 9186, - "exitCode" : -1 -} -``` -- `200` if successfully started -- `400` if incoming data is not valid e.g. name is empty -- `404` if specified `channel` doesn't exist -- `500` if any other error occurs - - -### Get a process - -#### Request - -_GET /process/{pid}_ - -- `pid` - the id of the process to get - -#### Response - -```json -{ - "pid": 1, - "name": "build", - "commandLine": "mvn clean install", - "type" : "maven", - "alive": false, - "nativePid": 9186, - "exitCode" : 0 -} -``` - -- `200` if response contains requested process -- `400` if `pid` is not valid, unsigned int required -- `404` if there is no such process -- `500` if any other error occurs - -### Kill a process - -#### Request - -_DELETE /process/{pid}_ - -- `pid` - the id of the process to kill - -#### Response - -```json -{ - "pid": 1, - "name": "build", - "commandLine": "mvn clean install", - "type" : "maven", - "alive": true, - "nativePid": 9186, - "exitCode" : -1 -} -``` -- `200` if successfully killed -- `400` if `pid` is not valid, unsigned int required -- `404` if there is no such process -- `500` if any other error occurs - - -### Get process logs - -#### Request - -_GET /process/{pid}/logs_ - -- `pid` - the id of the process to get logs -- `from`(optional) - time to get logs from e.g. _2016-07-12T01:48:04.097980475+03:00_ the format is _RFC3339Nano_ -don't forget to encode this query parameter -- `till`(optional) - time to get logs till e.g. _2016-07-12T01:49:04.097980475+03:00_ the format is _RFC3339Nano_ -don't forget to encode this query parameter -- `format`(optional) - the format of the response, default is `json`, possible values are: `text`, `json` -- `limit`(optional) - the limit of logs in result, the default value is _50_, logs are limited from the -latest to the earliest -- `skip` (optional) - the logs to skip, default value is `0` - -#### Response - -The result logs of the process with the command line `printf "Hello\nWorld\n"` - -Text: -```text -[STDOUT] 2016-07-04 08:37:56.315082296 +0300 EEST Hello -[STDOUT] 2016-07-04 08:37:56.315128242 +0300 EEST World -``` - -Json: -```json -[ - { - "Kind" : "STDOUT", - "Time" : "2016-07-16T19:51:32.313368463+03:00", - "Text" : "Hello" - }, - { - "Kind" : "STDOUT", - "Time" : "2016-07-16T19:51:32.313603625+03:00", - "Text" : "World" - } -] -``` - -- `200` if logs are successfully fetched -- `400` if `from` or `till` format is invalid -- `404` if there is no such process -- `500` if any other error occurs - -### Get processes - -#### Request - -_GET /process_ - -- `all`(optional) - if `true` then all the processes including _dead_ ones will be returned(respecting paging ofc), -otherwise only _alive_ processes will be returnedg - -#### Response - -The result of the request _GET /process?all=true_ -```json -[ - { - "pid": 1, - "name": "build", - "commandLine": "mvn clean install", - "type" : "maven", - "alive": true, - "nativePid": 9186, - "exitCode" : -1 - }, - { - "pid": 2, - "name": "build", - "commandLine": "printf \"Hello World\"", - "alive": false, - "nativePid": 9588, - "exitCode" : 0 - } -] -``` -- `200` if processes are successfully retrieved -- `500` if any error occurs - -### Subscribe to the process events - -#### Request - -_POST /process/{pid}/events/{channel}_ - -- `pid` - the id of the process to subscribe to -- `channel` - the id of the websocket channel which is subscriber -- `types`(optional) - the types of the events separated by comma e.g. `?types=stderr,stdout` -- `after`(optional) - process logs which appeared after given time will -be republished to the channel. This method may be useful in the reconnect process - -#### Response - -- `200` if successfully subscribed -- `400` if any of the parameters is not valid -- `404` if there is no such process or channel -- `500` if any other error occurs - -### Unsubscribe from the process events - -#### Request - -_DELETE /process/{pid}/events/{channel}_ - -- `pid` - the id of the process to unsubscribe from -- `channel` - the id of the websocket channel which currenly subscribed -to the process events - -#### Response - -- `200` if successfully unsubsribed -- `400` if any of the parameters is not valid -- `404` if there is no such process or channel -- `500` if any other error occurs - -### Update the process events subscriber - -#### Request - -_PUT /process/{pid}/events/{channel}_ - -- `pid` - the id of the process -- `channel` - the id of the websocket channel which is subscriber -- `types` - the types of the events separated with comma e.g. `?types=stderr,stdout` - -#### Response - -- `200` if successfully updated -- `400` if any of the parameters is not valid -- `404` if there is no such process or channel -- `500` if any other error occurs diff --git a/agents/go-agents/docs/ws_api.md b/agents/go-agents/docs/ws_api.md deleted file mode 100644 index 2cdfbcbfb37..00000000000 --- a/agents/go-agents/docs/ws_api.md +++ /dev/null @@ -1,567 +0,0 @@ -Websocket API ---- -[JSON RPC 2.0](http://www.jsonrpc.org/specification) protocol is used for client-server -communication, but: -- `params` is always json object(never array) -- server to client notifications are treated as [Events](events.md) - -the apis described below include some of the following fields: -```json -{ - "jsonrpc" : "2.0", - "method": "...", - "id": "...", - "params": { }, - "error" : { }, - "result" : { } -} -``` - these fields are part of the protocol so they are not documented. - -## Process API - - -### Start process - -##### Request - -- __name__ - the name of the command -- __commandLine__ - command line to execute -- __type__(optional) - command type -- __eventTypes__(optional) - comma separated types of events which will be - received by this channel. By default all the process events will be received. -Possible values are: `stderr`, `stdout`, `process_status` - -```json -{ - "method": "process.start", - "id": "id1234567", - "params": { - "name": "print", - "commandLine": "printf \"1\n2\n3\"", - "type": "test" - } -} -``` - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "result": { - "pid": 1, - "name": "print", - "commandLine": "printf \"1\n2\n3\"", - "type": "test", - "alive": true, - "nativePid": 19920 - } -} -``` - -#### Errors - -- when either `name` or `commandLine` is missing, e.g: - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "error": { - "code": -32602, - "message": "Command line required" - } -} -``` - -### Kill process - -##### Request - -- __pid__ - the id of the process to kill - -```json -{ - "method": "process.kill", - "id": "id1234567", - "params": { - "pid": 2 - } -} -``` - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "result": { - "pid": 2, - "text": "Successfully killed" - } -} -``` - -##### Errors - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - -- when process with given id is not alive - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "error": { - "code": 102, - "message": "Process with id '2' is not alive" - } -} -``` - -### Subscribe to process events - -##### Request - -- __pid__ - the id of the process to subscribe to -- __eventTypes__(optional) - comma separated types of events which will be -received by this channel. By default all the process events will be received, -not supported even types are ignored. Possible values are: `stdout`, `stderr`, `process_status`. -- __after__(optional) - process logs which appeared after given time will -be republished to the channel. This parameter may be useful when reconnecting to the exec-agent - -```json -{ - "method": "process.subscribe", - "id": "0x12345", - "params": { - "pid": 2, - "eventTypes": "stdout,stderr", - "after" : "2016-07-26T09:36:44.920890113+03:00" - } -} -``` - - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "result": { - "pid": 2, - "eventTypes": "stdout,stderr", - "text": "Successfully subscribed" - } -} -``` - -##### Errors - -- when there is no a single valid event type provided - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": -32602, - "message": "Required at least 1 valid event type" - } -} -``` - -- when `after` is not in valid format - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": -32602, - "message": "Bad format of 'after', parsing time \"2016-07-26\" as \"2006-01-02T15:04:05.999999999Z07:00\": cannot parse \"\" as \"T\"" - } -} -``` - -- when this channel is already subscribed on process events - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": -32603, - "message": "Already subscribed" - } -} -``` - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - -- when process with given id is not alive - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 102, - "message": "Process with id '2' is not alive" - } -} -``` - - - -### Unsubscribe from process events - -##### Request - -- __pid__ - the id of the process to unsubscribe from - -```json -{ - "method": "process.unsubscribe", - "id": "0x12345", - "params": { - "pid": 2 - } -} -``` - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "result": { - "pid": 2, - "text": "Successfully unsubscribed" - } -} -``` - -##### Errors - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - -- when process with given id is not alive - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 102, - "message": "Process with id '2' is not alive" - } -} -``` - - - -### Update process subscriber - -##### Request - -- __pid__ - the id of the process which subscriber should be updated -- __eventTypes__ - comma separated types of events which will be -received by this channel. Not supported even types are ignored. -Possible values are: `stdout`, `stderr`, `process_status`. - -```json -{ - "method": "process.updateSubscriber", - "id": "0x12345", - "params": { - "pid": 2, - "eventTypes": "process_status" - } -} -``` - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "result": { - "pid": 2, - "eventTypes": "process_status", - "text": "Subscriber successfully updated" - } -} -``` - -##### Errors - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - -- when process with given id is not alive - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 102, - "message": "Process with id '2' is not alive" - } -} -``` - -- when this channel is not subscribed on process events - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 100, - "message": "No subscriber with id 'tunnel-1'" - } -} -``` - - -### Get process logs - -##### Request - -- __pid__ - the id of the process to get logs -- __from__(optional) - time to get logs from e.g. _2016-07-12T01:48:04.097980475+03:00_ the format is _RFC3339Nano_ -- __till__(optional) - time to get logs till e.g. _2016-07-12T01:49:04.097980475+03:00_ the format is _RFC3339Nano_ -- __limit__(optional) - the limit of logs in result, the default value is _50_, logs are limited from the -latest to the earliest -- __skip__ (optional) - the logs to skip, default value is `0` - -```json -{ - "method": "process.getLogs", - "id": "0x12345", - "params": { - "pid": 3, - "limit": 5, - "skip": 5 - } -} -``` - -##### Response - -For the command `printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10`, the result will look like - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "result": [ - { - "kind": "STDOUT", - "time": "2016-09-24T17:18:30.757623274+03:00", - "text": "1" - }, - { - "kind": "STDOUT", - "time": "2016-09-24T17:18:30.757701555+03:00", - "text": "2" - }, - { - "kind": "STDOUT", - "time": "2016-09-24T17:18:30.757721423+03:00", - "text": "3" - }, - { - "kind": "STDOUT", - "time": "2016-09-24T17:18:30.757841518+03:00", - "text": "4" - }, - { - "kind": "STDOUT", - "time": "2016-09-24T17:18:30.757851622+03:00", - "text": "5" - } - ] -} -``` - -##### Errors - - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - -- when one of the time parameters is invalid, e.g: - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": -32602, - "message": "Bad format of 'till', parsing time \"date\" as \"2006-01-02T15:04:05.999999999Z07:00\": cannot parse \"date\" as \"2006\"" - } -} -``` - - - -### Get process - -##### Request - -- __pid__ - the id of the process to get - -```json -{ - "method": "process.getProcess", - "id": "0x12345", - "params": { - "pid": 3 - } -} -``` - -##### Response - -When everything is okay - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "result": { - "pid": 1, - "name": "print", - "commandLine": "printf \n1\n2\n3\"", - "type": "test", - "alive": false, - "nativePid": 13158, - "exitCode": 0 - } -} -``` - -##### Errors - - -- when there is no such process - -```json -{ - "jsonrpc": "2.0", - "id": "0x12345", - "error": { - "code": 101, - "message": "Process with id '2' does not exist" - } -} -``` - - -### Get processes - -##### Request - -- __all__(optional) - if `true` then all the processes including _dead_ ones will be returned, -otherwise only _alive_ processes will be returned - -```json -{ - "method": "process.getProcesses", - "id": "id1234567", - "params": { - "all": true - } -} -``` - -##### Response - -```json -{ - "jsonrpc": "2.0", - "id": "id1234567", - "result": [ - { - "pid": 1, - "name": "print", - "commandLine": "printf \"1\n2\n3\"", - "type": "test", - "alive": false, - "nativePid": 13553, - "exitCode": 0 - }, - { - "pid": 2, - "name": "print2", - "commandLine": "printf \"\n3\n2\n1\"", - "type": "test2", - "alive": false, - "nativePid": 13561, - "exitCode": 0 - } - ] -} -``` diff --git a/agents/go-agents/exec-agent/exec/common.go b/agents/go-agents/exec-agent/exec/common.go deleted file mode 100644 index 17a617da267..00000000000 --- a/agents/go-agents/exec-agent/exec/common.go +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package exec - -import ( - "errors" - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che/agents/go-agents/core/process" - "strconv" - "strings" -) - -const ( - // DefaultLogsPerPageLimit is default limit of logs per page on process output fetching - DefaultLogsPerPageLimit = 50 -) - -func maskFromTypes(types string) uint64 { - var mask uint64 - for _, t := range strings.Split(types, ",") { - switch strings.ToLower(strings.TrimSpace(t)) { - case "stderr": - mask |= process.StderrBit - case "stdout": - mask |= process.StdoutBit - case "process_status": - mask |= process.StatusBit - } - } - return mask -} - -func parseTypes(types string) uint64 { - var mask uint64 = process.DefaultMask - if types != "" { - mask = maskFromTypes(types) - } - return mask -} - -// Checks whether pid is valid and converts it to the uint64 -func parsePid(strPid string) (uint64, error) { - intPid, err := strconv.Atoi(strPid) - if err != nil { - return 0, errors.New("Pid value must be unsigned integer") - } - if intPid <= 0 { - return 0, errors.New("Pid value must be unsigned integer") - } - return uint64(intPid), nil -} - -// Checks whether command is valid -func checkCommand(command *process.Command) error { - if command.Name == "" { - return errors.New("Command name required") - } - if command.CommandLine == "" { - return errors.New("Command line required") - } - return nil -} - -type rpcProcessEventConsumer struct { - tunnel *jsonrpc.Tunnel -} - -// TODO rework process to use events.Bus -func (rpcConsumer *rpcProcessEventConsumer) Accept(e process.Event) { - if err := rpcConsumer.tunnel.Notify(e.Type(), e); err != nil { - // process lib will remove each subscriber which panics - panic(err) - } -} diff --git a/agents/go-agents/exec-agent/exec/rest_service.go b/agents/go-agents/exec-agent/exec/rest_service.go deleted file mode 100644 index c5e039ef19b..00000000000 --- a/agents/go-agents/exec-agent/exec/rest_service.go +++ /dev/null @@ -1,220 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package exec - -import ( - "errors" - "fmt" - "io" - "log" - "math" - "net/http" - "strconv" - "strings" - "time" - - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che/agents/go-agents/core/process" - "github.com/eclipse/che/agents/go-agents/core/rest" - "github.com/eclipse/che/agents/go-agents/core/rest/restutil" -) - -// HTTPRoutes provides all routes that should be handled by the process API -var HTTPRoutes = rest.RoutesGroup{ - Name: "Process Routes", - Items: []rest.Route{ - { - Method: "POST", - Name: "Start Process", - Path: "/process", - HandleFunc: startProcessHF, - }, - { - Method: "GET", - Name: "Get Process", - Path: "/process/:pid", - HandleFunc: getProcessHF, - }, - { - Method: "DELETE", - Name: "Kill Process", - Path: "/process/:pid", - HandleFunc: killProcessHF, - }, - { - Method: "GET", - Name: "Get Process Logs", - Path: "/process/:pid/logs", - HandleFunc: getProcessLogsHF, - }, - { - Method: "GET", - Name: "Get Processes", - Path: "/process", - HandleFunc: getProcessesHF, - }, - }, -} - -func startProcessHF(w http.ResponseWriter, r *http.Request, _ rest.Params) error { - command := process.Command{} - if err := restutil.ReadJSON(r, &command); err != nil { - return err - } - if err := checkCommand(&command); err != nil { - return rest.BadRequest(err) - } - - pb := process.NewBuilder().Cmd(command) - - // If channel is provided then check whether it is ready to be - // first process subscriber and use it if it is - channelID := r.URL.Query().Get("channel") - if channelID != "" { - channel, ok := jsonrpc.Get(channelID) - if !ok { - m := fmt.Sprintf("Tunnel with id '%s' doesn't exist. Process won't be started", channelID) - return rest.NotFound(errors.New(m)) - } - eventsConsumer := &rpcProcessEventConsumer{channel} - pb.Subscribe(channelID, parseTypes(r.URL.Query().Get("types")), eventsConsumer) - } - - proc, err := pb.Start() - if err != nil { - return err - } - return restutil.WriteJSON(w, proc) -} - -func getProcessHF(w http.ResponseWriter, r *http.Request, p rest.Params) error { - pid, err := parsePid(p.Get("pid")) - if err != nil { - return rest.BadRequest(err) - } - - proc, err := process.Get(pid) - if err != nil { - return asHTTPError(err) - } - return restutil.WriteJSON(w, proc) -} - -func killProcessHF(w http.ResponseWriter, r *http.Request, p rest.Params) error { - pid, err := parsePid(p.Get("pid")) - if err != nil { - return rest.BadRequest(err) - } - if err := process.Kill(pid); err != nil { - return asHTTPError(err) - } - return nil -} - -type getLogsParams struct { - pid uint64 - from time.Time - till time.Time - limit int - skip int - format string -} - -func getProcessLogsHF(w http.ResponseWriter, r *http.Request, p rest.Params) error { - logsParams, err := parseGetLogsParameters(r, p) - if err != nil { - return err - } - - logs, err := process.ReadLogs(logsParams.pid, logsParams.from, logsParams.till) - if err != nil { - return asHTTPError(err) - } - - len := len(logs) - fromIdx := int(math.Max(float64(len-logsParams.limit-logsParams.skip), 0)) - toIdx := len - int(math.Min(float64(logsParams.skip), float64(len))) - - // Respond with an appropriate logs format, default json - switch strings.ToLower(logsParams.format) { - case "text": - for _, item := range logs[fromIdx:toIdx] { - line := fmt.Sprintf("[%s] %s \t %s\n", item.Kind, item.Time.Format(process.DateTimeFormat), item.Text) - if _, err := io.WriteString(w, line); err != nil { - log.Printf("Error occurs on writing logs of process %v into response. %s", logsParams.pid, err) - } - } - default: - return restutil.WriteJSON(w, logs[fromIdx:toIdx]) - } - return nil -} - -func parseGetLogsParameters(r *http.Request, p rest.Params) (*getLogsParams, error) { - pid, err := parsePid(p.Get("pid")) - if err != nil { - return nil, rest.BadRequest(err) - } - - // Parse 'from', if 'from' is not specified then read all the logs from the start - // if 'from' format is different from the DATE_TIME_FORMAT then return 400 - from, err := process.ParseTime(r.URL.Query().Get("from"), time.Time{}) - if err != nil { - return nil, rest.BadRequest(errors.New("Bad format of 'from', " + err.Error())) - } - - // Parse 'till', if 'till' is not specified then 'now' is used for it - // if 'till' format is different from the DATE_TIME_FORMAT then return 400 - till, err := process.ParseTime(r.URL.Query().Get("till"), time.Now()) - if err != nil { - return nil, rest.BadRequest(errors.New("Bad format of 'till', " + err.Error())) - } - - // limit logs from the latest to the earliest - // limit - how many the latest logs will be present - // skip - how many log lines should be skipped from the end - limit := restutil.IntQueryParam(r, "limit", DefaultLogsPerPageLimit) - skip := restutil.IntQueryParam(r, "skip", 0) - if limit < 1 { - return nil, rest.BadRequest(errors.New("Required 'limit' to be > 0")) - } - if skip < 0 { - return nil, rest.BadRequest(errors.New("Required 'skip' to be >= 0")) - } - - format := r.URL.Query().Get("format") - - return &getLogsParams{ - pid: pid, - from: from, - till: till, - limit: limit, - skip: skip, - format: format, - }, nil -} - -func getProcessesHF(w http.ResponseWriter, r *http.Request, _ rest.Params) error { - all, err := strconv.ParseBool(r.URL.Query().Get("all")) - if err != nil { - all = false - } - return restutil.WriteJSON(w, process.GetProcesses(all)) -} - -func asHTTPError(err error) error { - if npErr, ok := err.(*process.NoProcessError); ok { - return rest.NotFound(npErr) - } - return err -} diff --git a/agents/go-agents/exec-agent/exec/rest_service_test.go b/agents/go-agents/exec-agent/exec/rest_service_test.go deleted file mode 100644 index 558c0c423b9..00000000000 --- a/agents/go-agents/exec-agent/exec/rest_service_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package exec - -import ( - "bytes" - "encoding/json" - "io/ioutil" - "net/http" - "net/http/httptest" - "os" - "strconv" - "strings" - "testing" - "time" - - "github.com/eclipse/che/agents/go-agents/core/process" - "github.com/eclipse/che/agents/go-agents/core/process/processtest" - "github.com/eclipse/che/agents/go-agents/core/rest" - "net/url" -) - -func TestStartProcessHandlerFunc(t *testing.T) { - command := &process.Command{ - Name: "test", - CommandLine: "echo hello", - Type: "test", - } - req, err := http.NewRequest("POST", "/process", asJSONReader(t, command)) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - - asHTTPHandlerFunc(startProcessHF).ServeHTTP(rr, req) - - if rr.Code != http.StatusOK { - t.Errorf("Expected status code %d but got %d", http.StatusOK, rr.Code) - } - - mp := &process.MachineProcess{} - json.Unmarshal(rr.Body.Bytes(), mp) - failIfDifferent(t, command.Name, mp.Name, "name") - failIfDifferent(t, command.CommandLine, mp.CommandLine, "command-line") - failIfDifferent(t, command.Type, mp.Type, "type") - failIfDifferent(t, -1, mp.ExitCode, "exit-code") - failIfFalse(t, mp.Pid > 0, "Pid > 0") -} - -func TestStartProcessFailsIfCommandIsInvalid(t *testing.T) { - invalidCommands := []*process.Command{ - { - Name: "test", - CommandLine: "", - Type: "test", - }, - { - Name: "", - CommandLine: "echo test", - Type: "test", - }, - } - - for _, command := range invalidCommands { - req, err := http.NewRequest("POST", "/process", asJSONReader(t, command)) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - - asHTTPHandlerFunc(startProcessHF).ServeHTTP(rr, req) - - failIfDifferent(t, http.StatusBadRequest, rr.Code, "status-code") - } -} - -func TestGetsExistingProcess(t *testing.T) { - exp := startAndWaitProcess(t, "echo hello") - - strPid := strconv.Itoa(int(exp.Pid)) - req, err := http.NewRequest("GET", "/process/"+strPid, nil) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - - asHTTPHandlerFunc(getProcessHF, "pid", strPid).ServeHTTP(rr, req) - - failIfDifferent(t, 200, rr.Code, "status-code") - - res := &process.MachineProcess{} - json.Unmarshal(rr.Body.Bytes(), res) - failIfDifferent(t, exp.Pid, res.Pid, "pid") - failIfDifferent(t, exp.Name, res.Name, "name") - failIfDifferent(t, exp.CommandLine, res.CommandLine, "command-line") - failIfDifferent(t, exp.Type, res.Type, "type") - failIfDifferent(t, exp.NativePid, res.NativePid, "native-pid") - failIfDifferent(t, false, res.Alive, "alive") -} - -func TestReturnsNotFoundWhenNoProcess(t *testing.T) { - strPid := "4444" - req, err := http.NewRequest("GET", "/process/"+strPid, nil) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - - asHTTPHandlerFunc(getProcessHF, "pid", strPid).ServeHTTP(rr, req) - - failIfDifferent(t, 404, rr.Code, "status-code") -} - -func TestGetsNoAliveProcesses(t *testing.T) { - startAndWaitProcess(t, "echo test1") - startAndWaitProcess(t, "echo test2") - - req, err := http.NewRequest("GET", "/process", nil) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - - asHTTPHandlerFunc(getProcessesHF).ServeHTTP(rr, req) - - failIfDifferent(t, 200, rr.Code, "status-code") - mps := []process.MachineProcess{} - json.Unmarshal(rr.Body.Bytes(), &mps) - failIfDifferent(t, 0, len(mps), "processes slice len") -} - -func TestGetsProcessLogs(t *testing.T) { - dir, err := ioutil.TempDir(os.TempDir(), "exec-agent-text") - if err != nil { - t.Fatal(err) - } - process.SetLogsDir(dir) - defer process.WipeLogs() - - outputLines := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} - mp := startAndWaitProcess(t, "printf \""+strings.Join(outputLines, "\n")+"\"") - - realLogs, err := process.ReadAllLogs(mp.Pid) - if err != nil { - t.Fatal(err) - } - - type TestCase struct { - expectedLogs []*process.LogMessage - queryString string - } - - cases := []TestCase{ - { - expectedLogs: realLogs[5:], - queryString: "limit=5", - }, - { - expectedLogs: realLogs[:5], - queryString: "skip=5", - }, - { - expectedLogs: realLogs[3:5], - queryString: "limit=2&skip=5", - }, - { - expectedLogs: make([]*process.LogMessage, 0), - queryString: "limit=2&skip=20", - }, - { - expectedLogs: realLogs[9:], - queryString: "limit=1", - }, - { - expectedLogs: realLogs[6:], - queryString: query("from", realLogs[6].Time.Format(process.DateTimeFormat)), - }, - { - expectedLogs: realLogs[6:8], - queryString: query( - "from", realLogs[6].Time.Format(process.DateTimeFormat), - "till", realLogs[7].Time.Format(process.DateTimeFormat), - ), - }, - } - - strPid := strconv.Itoa(int(mp.Pid)) - baseURL := "/process/" + strconv.Itoa(int(mp.Pid)) + "/logs?" - - for _, theCase := range cases { - // fetch logs - req, err := http.NewRequest("GET", baseURL+theCase.queryString, nil) - if err != nil { - t.Fatal(err) - } - rr := httptest.NewRecorder() - asHTTPHandlerFunc(getProcessLogsHF, "pid", strPid).ServeHTTP(rr, req) - - // must be 200ok - failIfDifferent(t, http.StatusOK, rr.Code, "status code") - - // check logs are the same to expected - logs := []*process.LogMessage{} - json.Unmarshal(rr.Body.Bytes(), &logs) - failIfDifferent(t, len(theCase.expectedLogs), len(logs), "logs len") - for i := 0; i < len(theCase.expectedLogs); i++ { - failIfDifferent(t, *theCase.expectedLogs[i], *logs[i], "log messages") - } - } -} - -func query(kv ...string) string { - if len(kv) == 0 { - return "" - } - values := url.Values{} - for i := 0; i < len(kv); i += 2 { - values.Add(kv[i], kv[i+1]) - } - return values.Encode() -} - -func asJSONReader(t *testing.T, v interface{}) *bytes.Reader { - body, err := json.Marshal(v) - if err != nil { - t.Fatal(err) - } - return bytes.NewReader(body) -} - -func startAndWaitProcess(t *testing.T, cmd string) process.MachineProcess { - captor := processtest.NewEventsCaptor(process.DiedEventType) - captor.Capture() - - pb := process.NewBuilder() - pb.CmdLine(cmd) - pb.SubscribeDefault("test", captor) - - mp, err := pb.Start() - if err != nil { - captor.Stop() - t.Fatal(err) - } - - if ok := <-captor.Wait(2 * time.Second); !ok { - t.Errorf("Waited 2 seconds for process to finish, killing the process %d", mp.Pid) - if err := process.Kill(mp.Pid); err != nil { - t.Error(err) - } - t.FailNow() - } - - return mp -} - -func failIfDifferent(t *testing.T, expected interface{}, actual interface{}, context string) { - if expected != actual { - t.Fatalf("Expected to receive '%v' %s but received '%v'", expected, context, actual) - } -} - -func failIfFalse(t *testing.T, condition bool, context string) { - if !condition { - t.Fatalf("%s: false", context) - } -} - -func asHTTPHandlerFunc(f rest.HTTPRouteHandlerFunc, params ...string) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - if err := f(w, r, newFakeParams(params...)); err != nil { - rest.WriteError(w, err) - } - } -} - -func newFakeParams(kv ...string) *fakeParams { - params := &fakeParams{make(map[string]string)} - for i := 0; i < len(kv); i += 2 { - params.items[kv[i]] = kv[i+1] - } - return params -} - -type fakeParams struct { - items map[string]string -} - -func (p *fakeParams) Get(key string) string { - return p.items[key] -} diff --git a/agents/go-agents/exec-agent/exec/ws_service.go b/agents/go-agents/exec-agent/exec/ws_service.go deleted file mode 100644 index e435804ae2a..00000000000 --- a/agents/go-agents/exec-agent/exec/ws_service.go +++ /dev/null @@ -1,312 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package exec - -import ( - "errors" - "math" - "time" - - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che/agents/go-agents/core/process" -) - -// Constants that represent RPC methods identifiers. -const ( - StartMethod = "process.start" - KillMethod = "process.kill" - SubscribeMethod = "process.subscribe" - UnsubscribeMethod = "process.unsubscribe" - UpdateSubscriberMethod = "process.updateSubscriber" - GetLogsMethod = "process.getLogs" - GetProcessMethod = "process.getProcess" - GetProcessesMethod = "process.getProcesses" -) - -// Error codes. -const ( - ProcessAPIErrorCode = 100 - NoSuchProcessErrorCode = 101 - ProcessNotAliveErrorCode = 102 -) - -// RPCRoutes defines process jsonrpc routes. -var RPCRoutes = jsonrpc.RoutesGroup{ - Name: "Process Routes", - Items: []jsonrpc.Route{ - { - Method: StartMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &StartParams{} }), - Handle: jsonrpcStartProcess, - }, - { - Method: KillMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &KillParams{} }), - Handle: jsonrpc.HandleRet(jsonrpcKillProcess), - }, - { - Method: SubscribeMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &SubscribeParams{} }), - Handle: jsonrpc.HandleRet(jsonrpcSubscribe), - }, - { - Method: UnsubscribeMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &UnsubscribeParams{} }), - Handle: jsonrpcUnsubscribe, - }, - { - Method: UpdateSubscriberMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &UpdateSubscriberParams{} }), - Handle: jsonrpc.HandleRet(jsonrpcUpdateSubscriber), - }, - { - Method: GetLogsMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &GetLogsParams{} }), - Handle: jsonrpc.HandleRet(jsonrpcGetProcessLogs), - }, - { - Method: GetProcessMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &GetProcessParams{} }), - Handle: jsonrpcGetProcess, - }, - { - Method: GetProcessesMethod, - Decode: jsonrpc.FactoryDec(func() interface{} { return &GetProcessesParams{} }), - Handle: jsonrpcGetProcesses, - }, - }, -} - -// ProcessResult result of operation performed on process. -type ProcessResult struct { - Pid uint64 `json:"pid"` - Text string `json:"text"` -} - -// StartParams represents params for start process call. -type StartParams struct { - Name string `json:"name"` - CommandLine string `json:"commandLine"` - Type string `json:"type"` - EventTypes string `json:"eventTypes"` -} - -func jsonrpcStartProcess(tun *jsonrpc.Tunnel, params interface{}, t jsonrpc.RespTransmitter) { - startParams := params.(*StartParams) - command := process.Command{ - Name: startParams.Name, - CommandLine: startParams.CommandLine, - Type: startParams.Type, - } - if err := checkCommand(&command); err != nil { - t.SendError(jsonrpc.NewArgsError(err)) - } else { - pb := process.NewBuilder() - pb.Cmd(command) - pb.Subscribe(tun.ID(), parseTypes(startParams.EventTypes), &rpcProcessEventConsumer{tun}) - pb.BeforeEventsHook(func(process process.MachineProcess) { - t.Send(process) - }) - if _, err := pb.Start(); err != nil { - t.SendError(asRPCError(err)) - } - } -} - -// KillParams represents params for kill process call. -type KillParams struct { - Pid uint64 `json:"pid"` - NativePid uint64 `json:"nativePid"` -} - -func jsonrpcKillProcess(_ *jsonrpc.Tunnel, params interface{}) (interface{}, error) { - killParams := params.(*KillParams) - if err := process.Kill(killParams.Pid); err != nil { - return nil, asRPCError(err) - } - return &ProcessResult{Pid: killParams.Pid, Text: "Successfully killed"}, nil -} - -// SubscribeResult represents result of subscribe call. -type SubscribeResult struct { - Pid uint64 `json:"pid"` - EventTypes string `json:"eventTypes"` - Text string `json:"text"` -} - -// SubscribeParams represents params for subscribe to events call. -type SubscribeParams struct { - Pid uint64 `json:"pid"` - EventTypes string `json:"eventTypes"` - After string `json:"after"` -} - -func jsonrpcSubscribe(tun *jsonrpc.Tunnel, params interface{}) (interface{}, error) { - subscribeParams := params.(*SubscribeParams) - - mask := maskFromTypes(subscribeParams.EventTypes) - if mask == 0 { - return nil, jsonrpc.NewArgsError(errors.New("Required at least 1 valid event type")) - } - - subscriber := process.Subscriber{ - ID: tun.ID(), - Mask: mask, - Consumer: &rpcProcessEventConsumer{tun}, - } - // Check whether subscriber should see previous logs or not - if subscribeParams.After == "" { - if err := process.AddSubscriber(subscribeParams.Pid, subscriber); err != nil { - return nil, asRPCError(err) - } - } else { - after, err := time.Parse(process.DateTimeFormat, subscribeParams.After) - if err != nil { - return nil, jsonrpc.NewArgsError(errors.New("Bad format of 'after', " + err.Error())) - } - if err := process.RestoreSubscriber(subscribeParams.Pid, subscriber, after); err != nil { - return nil, err - } - } - return &SubscribeResult{ - Pid: subscribeParams.Pid, - EventTypes: subscribeParams.EventTypes, - Text: "Successfully subscribed", - }, nil -} - -// UnsubscribeParams represents params for unsubscribe from events call. -type UnsubscribeParams struct { - Pid uint64 `json:"pid"` -} - -func jsonrpcUnsubscribe(tun *jsonrpc.Tunnel, params interface{}, t jsonrpc.RespTransmitter) { - unsubscribeParams := params.(*UnsubscribeParams) - if err := process.RemoveSubscriber(unsubscribeParams.Pid, tun.ID()); err != nil { - t.SendError(asRPCError(err)) - } else { - t.Send(&ProcessResult{Pid: unsubscribeParams.Pid, Text: "Successfully unsubscribed"}) - } -} - -// UpdateSubscriberParams represents params for update subscribtion to events call. -type UpdateSubscriberParams struct { - Pid uint64 `json:"pid"` - EventTypes string `json:"eventTypes"` -} - -func jsonrpcUpdateSubscriber(tun *jsonrpc.Tunnel, params interface{}) (interface{}, error) { - updateParams := params.(*UpdateSubscriberParams) - if updateParams.EventTypes == "" { - return nil, jsonrpc.NewArgsError(errors.New("'eventTypes' required for subscriber update")) - } - if err := process.UpdateSubscriber(updateParams.Pid, tun.ID(), maskFromTypes(updateParams.EventTypes)); err != nil { - return nil, asRPCError(err) - } - return &SubscribeResult{ - Pid: updateParams.Pid, - EventTypes: updateParams.EventTypes, - Text: "Subscriber successfully updated", - }, nil -} - -// GetLogsParams represents params for get process logs call. -type GetLogsParams struct { - Pid uint64 `json:"pid"` - From string `json:"from"` - Till string `json:"till"` - Limit int `json:"limit"` - Skip int `json:"skip"` -} - -func jsonrpcGetProcessLogs(_ *jsonrpc.Tunnel, params interface{}) (interface{}, error) { - getLogsParams := params.(*GetLogsParams) - - if getLogsParams.Skip < 0 { - getLogsParams.Skip = 0 - } - if getLogsParams.Limit < 0 { - getLogsParams.Limit = 0 - } - - from, err := process.ParseTime(getLogsParams.From, time.Time{}) - if err != nil { - return nil, jsonrpc.NewArgsError(errors.New("Bad format of 'from', " + err.Error())) - } - - till, err := process.ParseTime(getLogsParams.Till, time.Now()) - if err != nil { - return nil, jsonrpc.NewArgsError(errors.New("Bad format of 'till', " + err.Error())) - } - - logs, err := process.ReadLogs(getLogsParams.Pid, from, till) - if err != nil { - return nil, asRPCError(err) - } - - limit := DefaultLogsPerPageLimit - if getLogsParams.Limit != 0 { - if getLogsParams.Limit < 1 { - return nil, jsonrpc.NewArgsError(errors.New("Required 'limit' to be > 0")) - } - limit = getLogsParams.Limit - } - - skip := 0 - if getLogsParams.Skip != 0 { - if getLogsParams.Skip < 0 { - return nil, jsonrpc.NewArgsError(errors.New("Required 'skip' to be >= 0")) - } - skip = getLogsParams.Skip - } - - logsLen := len(logs) - fromIdx := int(math.Max(float64(logsLen-limit-skip), 0)) - toIdx := logsLen - int(math.Min(float64(skip), float64(logsLen))) - - return logs[fromIdx:toIdx], nil -} - -// GetProcessParams represents params for get process call. -type GetProcessParams struct { - Pid uint64 `json:"pid"` -} - -func jsonrpcGetProcess(_ *jsonrpc.Tunnel, body interface{}, t jsonrpc.RespTransmitter) { - params := body.(*GetProcessParams) - p, err := process.Get(params.Pid) - if err != nil { - t.SendError(asRPCError(err)) - } else { - t.Send(p) - } -} - -// GetProcessesParams represents params for get processes call. -type GetProcessesParams struct { - All bool `json:"all"` -} - -func jsonrpcGetProcesses(_ *jsonrpc.Tunnel, body interface{}, t jsonrpc.RespTransmitter) { - params := body.(*GetProcessesParams) - t.Send(process.GetProcesses(params.All)) -} - -func asRPCError(err error) *jsonrpc.Error { - if npErr, ok := err.(*process.NoProcessError); ok { - return jsonrpc.NewError(NoSuchProcessErrorCode, npErr) - } else if naErr, ok := err.(*process.NotAliveError); ok { - return jsonrpc.NewError(ProcessNotAliveErrorCode, naErr) - } - return jsonrpc.NewError(ProcessAPIErrorCode, err) -} diff --git a/agents/go-agents/exec-agent/exec/ws_service_test.go b/agents/go-agents/exec-agent/exec/ws_service_test.go deleted file mode 100644 index 6a9bd3340b8..00000000000 --- a/agents/go-agents/exec-agent/exec/ws_service_test.go +++ /dev/null @@ -1,212 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package exec - -import ( - "encoding/json" - "io/ioutil" - "os" - "strings" - "testing" - "time" - - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che-go-jsonrpc/jsonrpctest" - "github.com/eclipse/che/agents/go-agents/core/process" -) - -func TestJSONRPCStartProcess(t *testing.T) { - channel, connRecorder := startTestChannel() - defer channel.Close() - - command := &process.Command{Name: "test", CommandLine: "echo test", Type: "test"} - connRecorder.PushNextReq(StartMethod, command) - - if err := connRecorder.WaitUntil(jsonrpctest.ReqSent(process.DiedEventType)); err != nil { - t.Fatal(err) - } - - // first response should be sent - resp, err := connRecorder.GetResponse(0) - if err != nil { - t.Fatal(err) - } - startedProcess := &process.MachineProcess{} - if err := json.Unmarshal(resp.Result, startedProcess); err != nil { - t.Fatal(err) - } - - failIfDifferent(t, command.CommandLine, startedProcess.CommandLine, "Command line") - failIfDifferent(t, command.Name, startedProcess.Name, "Name") - failIfDifferent(t, command.Type, startedProcess.Type, "Type") - failIfDifferent(t, true, startedProcess.Alive, "Alive") - - // check sent events - expMethods := []string{process.StartedEventType, process.StdoutEventType, process.DiedEventType} - - requests, err := connRecorder.GetAllRequests() - if err != nil { - t.Fatal(err) - } - - for i, v := range requests { - if v.Method != expMethods[i] { - t.Fatalf("Expected receive event %s but received %s", expMethods[i], v.Method) - } - } -} - -func TestJSONRPCGetProcess(t *testing.T) { - channel, rec := startTestChannel() - defer channel.Close() - - command := process.Command{Name: "test", CommandLine: "echo test", Type: "test"} - deadProcess := jsonrpcStartAndWaitProcess(t, rec, command) - - // request process - respIdx := len(rec.GetAll()) - rec.PushNextReq(GetProcessMethod, &GetProcessParams{deadProcess.Pid}) - if err := rec.WaitUntil(jsonrpctest.WriteCalledAtLeast(respIdx + 1)); err != nil { - t.Fatal(err) - } - - // get and check response - gotProcess := process.MachineProcess{} - err := rec.UnmarshalResponseResult(respIdx, &gotProcess) - if err != nil { - t.Fatal(err) - } - - failIfDifferent(t, deadProcess.Pid, gotProcess.Pid, "Pid") - failIfDifferent(t, deadProcess.NativePid, gotProcess.NativePid, "Native Pid") - failIfDifferent(t, deadProcess.Alive, gotProcess.Alive, "Alive") - failIfDifferent(t, deadProcess.CommandLine, gotProcess.CommandLine, "CommandLine") - failIfDifferent(t, deadProcess.Name, gotProcess.Name, "Name") -} - -func TestJSONRPCGetProcessLogs(t *testing.T) { - dir, err := ioutil.TempDir(os.TempDir(), "exec-agent-test") - if err != nil { - t.Fatal(err) - } - process.SetLogsDir(dir) - defer process.WipeLogs() - - channel, rec := startTestChannel() - defer channel.Close() - - // start & wait process - outputLines := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"} - command := process.Command{ - Name: "test", - CommandLine: "printf \"" + strings.Join(outputLines, "\n") + "\"", - Type: "test", - } - deadProcess := jsonrpcStartAndWaitProcess(t, rec, command) - - realLogs, err := process.ReadAllLogs(deadProcess.Pid) - if err != nil { - t.Fatal(err) - } - - cases := []struct { - expectedLogs []*process.LogMessage - params GetLogsParams - }{ - { - expectedLogs: realLogs[5:], - params: GetLogsParams{Pid: deadProcess.Pid, Limit: 5}, - }, - { - expectedLogs: realLogs[:5], - params: GetLogsParams{Pid: deadProcess.Pid, Skip: 5}, - }, - { - expectedLogs: realLogs[3:5], - params: GetLogsParams{Pid: deadProcess.Pid, Skip: 5, Limit: 2}, - }, - { - expectedLogs: make([]*process.LogMessage, 0), - params: GetLogsParams{Pid: deadProcess.Pid, Skip: 20, Limit: 2}, - }, - { - expectedLogs: realLogs[9:], - params: GetLogsParams{Pid: deadProcess.Pid, Limit: 1}, - }, - { - expectedLogs: realLogs[6:], - params: GetLogsParams{ - Pid: deadProcess.Pid, - From: realLogs[6].Time.Format(process.DateTimeFormat), - }, - }, - { - expectedLogs: realLogs[6:8], - params: GetLogsParams{ - Pid: deadProcess.Pid, - From: realLogs[6].Time.Format(process.DateTimeFormat), - Till: realLogs[7].Time.Format(process.DateTimeFormat), - }, - }, - } - - for _, theCase := range cases { - respIdx := len(rec.GetAll()) - if err := rec.PushNextReq(GetLogsMethod, theCase.params); err != nil { - t.Fatal(err) - } - - // wait for the response - if err := rec.WaitUntil(jsonrpctest.WriteCalledAtLeast(respIdx + 1)); err != nil { - t.Fatal(err) - } - - logs := []*process.LogMessage{} - if err := rec.UnmarshalResponseResult(respIdx, &logs); err != nil { - t.Fatal(err) - } - failIfDifferent(t, len(theCase.expectedLogs), len(logs), "logs len") - for i := 0; i < len(theCase.expectedLogs); i++ { - failIfDifferent(t, *theCase.expectedLogs[i], *logs[i], "log messages") - } - } -} - -func startTestChannel() (*jsonrpc.Tunnel, *jsonrpctest.ConnRecorder) { - jsonrpc.RegRoutesGroup(RPCRoutes) - connRecorder := jsonrpctest.NewConnRecorder() - channel := jsonrpc.NewTunnel(connRecorder, jsonrpc.DefaultRouter) - connRecorder.CloseAfter(2 * time.Second) - channel.Go() - return channel, connRecorder -} - -func jsonrpcStartAndWaitProcess(t *testing.T, recorder *jsonrpctest.ConnRecorder, command process.Command) process.MachineProcess { - recorder.PushNextReq(StartMethod, command) - if err := recorder.WaitUntil(jsonrpctest.ReqSent(process.DiedEventType)); err != nil { - t.Fatal(err) - } - requests, err := recorder.GetAllRequests() - if err != nil { - t.Fatal(err) - } - - // the last request must be died event - dieReq := requests[len(requests)-1] - deadProcess := process.MachineProcess{} - if err := json.Unmarshal(dieReq.Params, &deadProcess); err != nil { - t.Fatal(err) - } - - return deadProcess -} diff --git a/agents/go-agents/exec-agent/main.go b/agents/go-agents/exec-agent/main.go deleted file mode 100644 index 62643645765..00000000000 --- a/agents/go-agents/exec-agent/main.go +++ /dev/null @@ -1,266 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package main - -import ( - "flag" - "log" - "net/http" - "net/url" - "os" - "regexp" - "strconv" - "time" - - "github.com/eclipse/che/agents/go-agents/core/auth" - "github.com/eclipse/che-go-jsonrpc" - "github.com/eclipse/che-go-jsonrpc/jsonrpcws" - "github.com/eclipse/che/agents/go-agents/core/process" - "github.com/eclipse/che/agents/go-agents/core/rest" - "github.com/eclipse/che/agents/go-agents/core/rest/restutil" - "github.com/eclipse/che/agents/go-agents/exec-agent/exec" -) - -var ( - config = &execAgentConfig{} -) - -func init() { - config.init() -} - -func main() { - flag.Parse() - - log.SetOutput(os.Stdout) - - config.printAll() - - process.SetLogsDir(config.processLogsDir) - process.SetShellInterpreter(config.processShellInterpreter) - - // remove old logs - if err := process.WipeLogs(); err != nil { - log.Fatal(err) - } - - // start cleaner routine - if config.processCleanupPeriodInMinutes > 0 { - if config.processCleanupThresholdInMinutes < 0 { - log.Fatal("Expected process cleanup threshold to be non negative value") - } - cleaner := process.NewCleaner(config.processCleanupPeriodInMinutes, config.processCleanupThresholdInMinutes) - go cleaner.CleanPeriodically() - } - - appHTTPRoutes := []rest.RoutesGroup{ - exec.HTTPRoutes, - { - Name: "Exec-Agent WebSocket routes", - Items: []rest.Route{ - { - Method: "GET", - Path: "/connect", - Name: "Connect to Exec-Agent(websocket)", - HandleFunc: func(w http.ResponseWriter, r *http.Request, _ rest.Params) error { - conn, err := jsonrpcws.Upgrade(w, r) - if err != nil { - return err - } - tunnel := jsonrpc.NewManagedTunnel(conn) - tunnel.SayHello() - return nil - }, - }, - }, - }, - { - Name: "Exec-Agent liveness route", - Items: []rest.Route{ - { - Method: "GET", - Path: "/liveness", - Name: "Check Exec-Agent liveness", - HandleFunc: restutil.OKRespondingFunc, - }, - }, - }, - } - - appOpRoutes := []jsonrpc.RoutesGroup{ - exec.RPCRoutes, - } - - // register routes and http handlers - r := rest.NewDefaultRouter(config.basePath, appHTTPRoutes) - rest.PrintRoutes(appHTTPRoutes) - jsonrpc.RegRoutesGroups(appOpRoutes) - jsonrpc.PrintRoutes(appOpRoutes) - - // do not protect liveness check endpoint - var handler = wrapWithAuth(r, "/liveness") - - server := &http.Server{ - Handler: handler, - Addr: config.serverAddress, - WriteTimeout: 10 * time.Second, - ReadTimeout: 10 * time.Second, - } - log.Fatal(server.ListenAndServe()) -} - -func wrapWithAuth(h http.Handler, ignoreMapping string) http.Handler { - // required authentication for all the requests that match mappings, if auth is configured - if !config.authEnabled { - return h - } - - ignorePattern := regexp.MustCompile(ignoreMapping) - cache := auth.NewCache(time.Minute*time.Duration(config.tokensExpirationTimeoutInMinutes), time.Minute*5) - return auth.NewCachingHandler(h, config.apiEndpoint, droppingRPCChannelsUnauthorizedHandler, cache, ignorePattern) -} - -func droppingRPCChannelsUnauthorizedHandler(w http.ResponseWriter, req *http.Request, err error) { - token := req.URL.Query().Get("token") - for _, tun := range jsonrpc.GetTunnels() { - if wsTun, ok := tun.Conn().(*jsonrpcws.NativeConnAdapter); ok { - if u, err1 := url.ParseRequestURI(wsTun.RequestURI); err1 != nil { - log.Printf("Couldn't parse the RequestURI '%s' of channel '%s'", wsTun.RequestURI, tun.ID()) - } else if u.Query().Get("token") == token { - log.Printf("Token for channel '%s' is expired, trying to drop the channel", tun.ID()) - if dropped, ok := jsonrpc.Rm(tun.ID()); ok { - dropped.Close() - } - } - } - } - http.Error(w, err.Error(), http.StatusUnauthorized) -} - -type execAgentConfig struct { - serverAddress string - basePath string - apiEndpoint string - - authEnabled bool - tokensExpirationTimeoutInMinutes uint - - processShellInterpreter string - processLogsDir string - processCleanupThresholdInMinutes int - processCleanupPeriodInMinutes int -} - -func (cfg *execAgentConfig) init() { - // server configuration - flag.StringVar( - &cfg.serverAddress, - "addr", - ":9000", - "IP:PORT or :PORT the address to start the server on", - ) - flag.StringVar( - &cfg.basePath, - "path", - "", - `the base path for all the rpc & rest routes, so route paths are treated not - as 'server_address + route_path' but 'server_address + path + route_path'. - For example for the server address 'localhost:9000', route path '/connect' and - configured path '/api/' exec-agent server will serve the following route: - 'localhost:9000/api/connect'. - Regexp syntax is supported`, - ) - - // workspace master server configuration - flag.StringVar( - &cfg.apiEndpoint, - "api-endpoint", - os.Getenv("CHE_API"), - `api-endpoint used by exec-agent modules(such as authentication) - to request workspace master. By default the value from 'CHE_API' environment variable is used`, - ) - - // auth configuration - defaultAuthEnabled := false - authEnabledEnv := os.Getenv("CHE_AUTH_ENABLED") - b, e := strconv.ParseBool(authEnabledEnv) - if e == nil { - defaultAuthEnabled = b - } - flag.BoolVar( - &cfg.authEnabled, - "enable-auth", - defaultAuthEnabled, - "whether authenticate requests on workspace master before allowing them to proceed."+ - "By default the value from 'CHE_AUTH_ENABLED' environment variable is used or `false` if it is missing", - ) - flag.UintVar( - &cfg.tokensExpirationTimeoutInMinutes, - "tokens-expiration-timeout", - auth.DefaultTokensExpirationTimeoutInMinutes, - "how much time machine tokens stay in cache(if auth is enabled)", - ) - - // process executor configuration - flag.StringVar( - &cfg.processShellInterpreter, - "cmd", - process.DefaultShellInterpreter, - "shell interpreter", - ) - flag.IntVar( - &cfg.processCleanupPeriodInMinutes, - "process-cleanup-period", - -1, - "how often processs cleanup job will be executed(in minutes)", - ) - flag.IntVar(&cfg.processCleanupThresholdInMinutes, - "process-cleanup-threshold", - -1, - `how much time will dead and unused process stay(in minutes), - if -1 passed then processes won't be cleaned at all. Please note that the time - of real cleanup is between configured threshold and threshold + process-cleanup-period.`, - ) - curDir, err := os.Getwd() - if err != nil { - log.Fatal(err) - } - curDir += string(os.PathSeparator) + "logs" - flag.StringVar( - &cfg.processLogsDir, - "logs-dir", - curDir, - "base directory for process logs", - ) -} - -func (cfg *execAgentConfig) printAll() { - log.Println("Exec-agent configuration") - log.Println(" Server") - log.Printf(" - Address: %s\n", cfg.serverAddress) - log.Printf(" - Base path: '%s'\n", cfg.basePath) - if cfg.authEnabled { - log.Println(" Authentication") - log.Printf(" - Enabled: %t\n", cfg.authEnabled) - log.Printf(" - Tokens expiration timeout: %dm\n", cfg.tokensExpirationTimeoutInMinutes) - log.Println(" Workspace master server") - log.Printf(" - API endpoint: %s\n", cfg.apiEndpoint) - } - log.Println(" Process executor") - log.Printf(" - Logs dir: %s\n", cfg.processLogsDir) - if cfg.processCleanupPeriodInMinutes > 0 { - log.Printf(" - Cleanup job period: %dm\n", cfg.processCleanupPeriodInMinutes) - log.Printf(" - Not used & dead processes stay for: %dm\n", cfg.processCleanupThresholdInMinutes) - } - log.Println() -} diff --git a/agents/go-agents/pom.xml b/agents/go-agents/pom.xml deleted file mode 100644 index bf7f12e5eae..00000000000 --- a/agents/go-agents/pom.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - go-agents - Agent :: Golang agents - - - - com.mycila - license-maven-plugin - - - **/*.go - pom.xml - - - docs/** - terminal-agent/term/server.go - vendor/** - Godeps/** - target/** - README.md - .gitignore - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-sources - compile - - run - - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo - exec-maven-plugin - - - build-go-sources - compile - - exec - - - go - ${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents - - build - -a - ./... - - - 0 - ${project.build.directory}/go-workspace - - - - - - - - - - integration - - false - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - run-tests - test - - run - - - - - - - - - - - - - - - - - - - diff --git a/agents/go-agents/terminal-agent/main.go b/agents/go-agents/terminal-agent/main.go deleted file mode 100644 index e3a0fd05b41..00000000000 --- a/agents/go-agents/terminal-agent/main.go +++ /dev/null @@ -1,208 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// websocket/pty proxy server: -// This program wires a websocket to a pty master. -// -// Usage: -// go build -o che-websocket-terminal -// ./che-websocket-terminal -cmd /bin/bash -addr :9000 -// -// Copyright 2014 Al Tobey tobert@gmail.com -// MIT License, see the LICENSE file -// -package main - -import ( - "flag" - "log" - "net/http" - "os" - "regexp" - "strconv" - "time" - - "github.com/eclipse/che/agents/go-agents/core/activity" - "github.com/eclipse/che/agents/go-agents/core/auth" - "github.com/eclipse/che/agents/go-agents/core/rest" - "github.com/eclipse/che/agents/go-agents/core/rest/restutil" - "github.com/eclipse/che/agents/go-agents/terminal-agent/term" -) - -var ( - config = &terminalAgentConfig{} -) - -func init() { - config.init() -} - -func main() { - flag.Parse() - - log.SetOutput(os.Stdout) - - config.printAll() - - term.Cmd = config.shellInterpreter - - if config.activityTrackingEnabled { - activity.Tracker = activity.NewTracker(config.workspaceID, config.apiEndpoint) - go activity.Tracker.StartTracking() - } - - appHTTPRoutes := []rest.RoutesGroup{ - term.HTTPRoutes, - { - Name: "Terminal-Agent liveness route", - Items: []rest.Route{ - { - Method: "GET", - Path: "/liveness", - Name: "Check Terminal-Agent liveness", - HandleFunc: restutil.OKRespondingFunc, - }, - }, - }, - } - - // register routes and http handlers - r := rest.NewDefaultRouter(config.basePath, appHTTPRoutes) - rest.PrintRoutes(appHTTPRoutes) - - // do not protect liveness check endpoint - var handler = wrapWithAuth(r, "/liveness") - - server := &http.Server{ - Handler: handler, - Addr: config.serverAddress, - WriteTimeout: 10 * time.Second, - ReadTimeout: 10 * time.Second, - } - log.Fatal(server.ListenAndServe()) -} - -func wrapWithAuth(h http.Handler, ignoreMapping string) http.Handler { - // required authentication for all the requests that match mappings, if auth is configured - if !config.authEnabled { - return h - } - - ignorePattern := regexp.MustCompile(ignoreMapping) - cache := auth.NewCache(time.Minute*time.Duration(config.tokensExpirationTimeoutInMinutes), time.Minute*5) - return auth.NewCachingHandler(h, config.apiEndpoint, droppingTerminalConnectionsUnauthorizedHandler, cache, ignorePattern) -} - -func droppingTerminalConnectionsUnauthorizedHandler(w http.ResponseWriter, req *http.Request, err error) { - // TODO disconnect all the clients with the same token if authentication returned unauthorized. -} - -type terminalAgentConfig struct { - serverAddress string - basePath string - apiEndpoint string - - activityTrackingEnabled bool - - shellInterpreter string - - workspaceID string - authEnabled bool - tokensExpirationTimeoutInMinutes uint -} - -func (cfg *terminalAgentConfig) init() { - // server configuration - flag.StringVar( - &cfg.serverAddress, - "addr", - ":9000", - "IP:PORT or :PORT the address to start the server on", - ) - flag.StringVar( - &cfg.basePath, - "path", - "", - `the base path for all the rpc & rest routes, so route paths are treated not - as 'server_address + route_path' but 'server_address + path + route_path'. - For example for the server address 'localhost:9000', route path '/pty' and - configured path '/api/' terminal-agent server will serve the following route: - 'localhost:9000/api/pty'. - Regexp syntax is supported`, - ) - - // terminal configuration - flag.StringVar( - &cfg.shellInterpreter, - "cmd", - "/bin/bash", - "shell interpreter and command to execute on slave side of the pty", - ) - flag.BoolVar( - &cfg.activityTrackingEnabled, - "enable-activity-tracking", - false, - "whether workspace master will be notified about workspace activity", - ) - - // workspace master server configuration - flag.StringVar( - &cfg.apiEndpoint, - "api-endpoint", - os.Getenv("CHE_API"), - `api-endpoint used by terminal-agent modules(such as activity checker or authentication) - to request workspace master. By default the value from 'CHE_API' environment variable is used`, - ) - - // auth configuration - defaultAuthEnabled := false - authEnabledEnv := os.Getenv("CHE_AUTH_ENABLED") - b, e := strconv.ParseBool(authEnabledEnv) - if e == nil { - defaultAuthEnabled = b - } - flag.BoolVar( - &cfg.authEnabled, - "enable-auth", - defaultAuthEnabled, - "whether authenticate requests on workspace master before allowing them to proceed."+ - "By default the value from 'CHE_AUTH_ENABLED' environment variable is used or `false` if it is missing", - ) - flag.UintVar( - &cfg.tokensExpirationTimeoutInMinutes, - "tokens-expiration-timeout", - auth.DefaultTokensExpirationTimeoutInMinutes, - "how much time machine tokens stay in cache(if auth is enabled)", - ) - - cfg.workspaceID = os.Getenv("CHE_WORKSPACE_ID") -} - -func (cfg *terminalAgentConfig) printAll() { - log.Println("Terminal-agent configuration") - log.Println(" Server") - log.Printf(" - Address: %s\n", cfg.serverAddress) - log.Printf(" - Base path: '%s'\n", cfg.basePath) - log.Println(" Terminal") - log.Printf(" - Slave command: '%s'\n", term.Cmd) - log.Printf(" - Activity tracking enabled: %t\n", cfg.activityTrackingEnabled) - if cfg.authEnabled { - log.Println(" Authentication") - log.Printf(" - Enabled: %t\n", cfg.authEnabled) - log.Printf(" - Tokens expiration timeout: %dm\n", cfg.tokensExpirationTimeoutInMinutes) - } - if cfg.authEnabled || cfg.activityTrackingEnabled { - log.Println(" Workspace master server") - log.Printf(" - API endpoint: %s\n", cfg.apiEndpoint) - } - log.Println() -} diff --git a/agents/go-agents/terminal-agent/term/finalizer.go b/agents/go-agents/terminal-agent/term/finalizer.go deleted file mode 100644 index 4198dfef344..00000000000 --- a/agents/go-agents/terminal-agent/term/finalizer.go +++ /dev/null @@ -1,102 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package term - -import ( - "io" - "log" - "os" - "sync" - - "github.com/gorilla/websocket" -) - -// readWriteRoutingFinalizer helps to close connection in concurrent environment corectly -type readWriteRoutingFinalizer struct { - sync.Mutex - readDone bool - writeDone bool - fileClosed bool - reader io.ReadCloser - conn *websocket.Conn - file *os.File -} - -func newFinalizer(reader io.ReadCloser, conn *websocket.Conn, file *os.File) *readWriteRoutingFinalizer { - return &readWriteRoutingFinalizer{ - readDone: false, - writeDone: false, - fileClosed: false, - reader: reader, - conn: conn, - file: file, - } -} - -func (finalizer *readWriteRoutingFinalizer) close() { - finalizer.closeFile() - finalizer.closeConn() - finalizer.closeReader() -} - -// It was supposed that reconnection can be implemented later. -// So if connection lost PTY file is not closed to allow reconnection. -func (finalizer *readWriteRoutingFinalizer) closeConn() { - defer finalizer.Unlock() - - finalizer.Lock() - if !finalizer.writeDone { - // to cleanly close websocket connection, a client should send a close - // frame and wait for the server to close the connection. - err := finalizer.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) - if err != nil { - log.Printf("Failed to send websocket close message: '%s'", err.Error()) - } - if err := finalizer.conn.Close(); err != nil { - log.Printf("Close connection problem: '%s'", err.Error()) - } - - finalizer.writeDone = true - log.Println("Terminal writer closed.") - } -} - -func (finalizer *readWriteRoutingFinalizer) closeFile() { - defer finalizer.Unlock() - - finalizer.Lock() - if !finalizer.fileClosed { - if err := finalizer.file.Close(); err != nil { - log.Printf("Failed to close pty file: '%s'", err.Error()) - } - finalizer.fileClosed = true - log.Println("Pty file closed.") - } -} - -func (finalizer *readWriteRoutingFinalizer) closeReader() { - defer finalizer.Unlock() - - finalizer.Lock() - if !finalizer.readDone { - closeReaderErr := finalizer.reader.Close() - if closeReaderErr != nil { - log.Printf("Failed to close pty file reader: '%s'" + closeReaderErr.Error()) - } - // hack to prevent suspend reader on the operation read when file has been already closed. - _, _ = finalizer.file.Write([]byte{}) - finalizer.readDone = true - log.Println("Terminal reader closed.") - } - -} diff --git a/agents/go-agents/terminal-agent/term/pty.go b/agents/go-agents/terminal-agent/term/pty.go deleted file mode 100644 index 65b8c58c74d..00000000000 --- a/agents/go-agents/terminal-agent/term/pty.go +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package term - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "io" - "log" - "os" - "os/exec" - "syscall" - "unicode/utf8" - - "github.com/eclipse/che/agents/go-agents/core/activity" - "github.com/kr/pty" -) - -type wsPty struct { - cmd *exec.Cmd // pty builds on os.exec - ptyFile *os.File // a pty is simply an os.File -} - -// startPty starts shell interpreter and returns wsPty that represents this terminal -func startPty(command string) (*wsPty, error) { - cmd := exec.Command(command) - cmd.Env = append(os.Environ(), "TERM=xterm") - - file, err := pty.Start(cmd) - if err != nil { - return nil, err - } - - //Set the size of the pty - if err := pty.Setsize(file, &pty.Winsize{Cols: 200, Rows: 60, X: 0, Y: 0}); err != nil { - log.Printf("Error occurs on setting terminal size. %s", err) - } - - return &wsPty{ - ptyFile: file, - cmd: cmd, - }, nil -} - -// Close stops terminal process and its child processes. In modern Unix systems terminal stops with help -// SIGHUP signal and we used such way too. SIGHUP signal used to send a signal to a process -// (or process group), it's signal meaning that pseudo or virtual terminal has been closed. -// Example: command is executed inside a terminal window and the terminal window is closed while -// the command process is still running. -// If the process receiving SIGHUP is a Unix shell, then as part of job control it will often intercept -// the signal and ensure that all stopped processes are continued before sending the signal to child -// processes (more precisely, process groups, represented internally be the shell as a "job"), which -// by default terminates them. -func (wp *wsPty) Close(finalizer *readWriteRoutingFinalizer) { - finalizer.closeFile() - pid := wp.cmd.Process.Pid - if pgid, err := syscall.Getpgid(pid); err == nil { - if err := syscall.Kill(-pgid, syscall.SIGHUP); err != nil { - log.Printf("Failed to SIGHUP terminal process by pgid: '%d'. Cause: '%s'", pgid, err) - } - } - if err := syscall.Kill(pid, syscall.SIGHUP); err != nil { - log.Printf("Failed to SIGHUP terminal process by pid '%d'. Cause: '%s'", pid, err) - } -} - -func (wp *wsPty) handleMessage(msg WebSocketMessage) error { - switch msg.Type { - case "resize": - var size []float64 - if err := json.Unmarshal(msg.Data, &size); err != nil { - log.Printf("Invalid resize message: %s\n", err) - } else { - if err := pty.Setsize(wp.ptyFile, &pty.Winsize{Cols: uint16(size[0]), Rows: uint16(size[1]), X: 0, Y: 0}); err != nil { - log.Printf("Error occurs on setting terminal size. %s", err) - } - activity.Tracker.Notify() - } - - case "data": - var dat string - if err := json.Unmarshal(msg.Data, &dat); err != nil { - log.Printf("Invalid data message %s\n", err) - } else { - if _, err := wp.ptyFile.Write([]byte(dat)); err != nil { - log.Printf("Error occurs on writing data into terminal. %s", err) - } - activity.Tracker.Notify() - } - - default: - return errors.New("Invalid field message type: " + msg.Type + "\n") - } - return nil -} - -func isNormalPtyError(err error) bool { - if err == io.EOF { - return true - } - pathErr, ok := err.(*os.PathError) - return ok && - pathErr.Op == "read" && - pathErr.Path == "/dev/ptmx" && - pathErr.Err.Error() == "input/output error" -} - -// read byte array as Unicode code points (rune in go) -func normalizeBuffer(normalizedBuf *bytes.Buffer, buf []byte, n int) (int, error) { - bufferBytes := normalizedBuf.Bytes() - runeReader := bufio.NewReader(bytes.NewReader(append(bufferBytes[:], buf[:n]...))) - normalizedBuf.Reset() - i := 0 - for i < n { - char, charLen, err := runeReader.ReadRune() - if err != nil { - return i, err - } - if char == utf8.RuneError { - if err := runeReader.UnreadRune(); err != nil { - log.Print(err) - } - return i, nil - } - i += charLen - if _, err := normalizedBuf.WriteRune(char); err != nil { - return i, err - } - } - return i, nil -} diff --git a/agents/go-agents/terminal-agent/term/server.go b/agents/go-agents/terminal-agent/term/server.go deleted file mode 100644 index 281325dd684..00000000000 --- a/agents/go-agents/terminal-agent/term/server.go +++ /dev/null @@ -1,177 +0,0 @@ -package term - -import ( - "bytes" - "encoding/json" - "io" - "io/ioutil" - "log" - "net/http" - "time" - - "github.com/gorilla/websocket" - "github.com/eclipse/che/agents/go-agents/core/common" - "github.com/eclipse/che/agents/go-agents/core/rest" -) - -// WebSocketMessage represents message sent over websocket connection -type WebSocketMessage struct { - Type string `json:"type"` - Data json.RawMessage `json:"data"` -} - -var ( - upgrader = websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { - return true - }, - } - - // Cmd is command used to start new shell - Cmd string - - // PingPeriod defines period of WS pings - PingPeriod = 60 * time.Second - - // HTTPRoutes provides http routes that should be handled to use terminal service - HTTPRoutes = rest.RoutesGroup{ - Name: "Terminal routes", - Items: []rest.Route{ - { - Method: "GET", - Name: "Connect to pty(websocket)", - Path: "/pty", - HandleFunc: ConnectToPtyHF, - }, - }, - } -) - -// ConnectToPtyHF provides communication with TTY over websocket -func ConnectToPtyHF(w http.ResponseWriter, r *http.Request, _ rest.Params) error { - conn, err := upgrader.Upgrade(w, r, nil) - if err != nil { - // upgrader writes http error into response, so no need to process error - return nil - } - - wp, err := startPty(Cmd) - if err != nil { - sendInternalError(conn, "Failed to start command: "+err.Error()) - return nil - } - - reader := ioutil.NopCloser(wp.ptyFile) - finalizer := newFinalizer(reader, conn, wp.ptyFile) - - log.Println("Start new terminal.") - defer log.Println("Terminal process stopped.") - defer finalizer.close() - - // send ping messages - go setupWSPinging(conn, finalizer) - //read output from terminal - go sendPtyOutputToConnection(conn, reader, finalizer) - //write input to terminal - go sendConnectionInputToPty(conn, wp, finalizer) - - waitPTY(wp) - - return nil -} - -// read from the web socket, copying to the pty master -// messages are expected to be text and base64 encoded -func sendConnectionInputToPty(conn *websocket.Conn, wp *wsPty, finalizer *readWriteRoutingFinalizer) { - defer finalizer.closeReader() - - for { - mt, payload, err := conn.ReadMessage() - if err != nil { - if !isNormalWSError(err) { - log.Printf("conn.ReadMessage failed: %s\n", err) - } - return - } - switch mt { - case websocket.BinaryMessage: - log.Printf("Ignoring binary message: %q\n", payload) - case websocket.TextMessage: - var msg WebSocketMessage - if err := json.Unmarshal(payload, &msg); err != nil { - log.Printf("Invalid message %s\n", err) - continue - } - if msg.Type == "close" { - wp.Close(finalizer) - return - } - if errMsg := wp.handleMessage(msg); errMsg != nil { - log.Print(errMsg.Error()) - return - } - - default: - log.Printf("Invalid websocket message type %d\n", mt) - return - } - } -} - -// copy everything from the pty master to the websocket -// using base64 encoding for now due to limitations in term.js -func sendPtyOutputToConnection(conn *websocket.Conn, reader io.Reader, finalizer *readWriteRoutingFinalizer) { - defer finalizer.closeConn() - - buf := make([]byte, 8192) - var buffer bytes.Buffer - // TODO: more graceful exit on socket close / process exit - for { - n, err := reader.Read(buf) - if err != nil { - if !isNormalPtyError(err) { - log.Printf("Failed to read from pty: %s", err) - } - return - } - i, err := normalizeBuffer(&buffer, buf, n) - if err != nil { - log.Printf("Couldn't normalize byte buffer to UTF-8 sequence, due to an error: %s", err.Error()) - return - } - - if err := writeToSocket(conn, buffer.Bytes(), finalizer); err != nil { - return - } - - buffer.Reset() - if i < n { - buffer.Write(buf[i:n]) - } - } -} - -func setupWSPinging(conn *websocket.Conn, finalizer *readWriteRoutingFinalizer) { - ticker := time.NewTicker(PingPeriod) - defer ticker.Stop() - // send ping messages by sheduler - for range ticker.C { - if err := writeWSMessageToSocket(conn, websocket.PingMessage, []byte{}, finalizer); err != nil { - log.Printf("Error occurs on sending ping message to websocket. %v", err) - return - } - } -} - -func waitPTY(wp *wsPty) { - // ignore SIGHUP(hang up) error it's a normal signal to close terminal - if err := wp.cmd.Wait(); err != nil && err.Error() != "signal: hangup" { - log.Printf("Failed to stop process, due to occurred error '%s'", err.Error()) - } -} - -func sendInternalError(conn *websocket.Conn, err string) { - log.Println(err) - common.LogError(conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseInternalServerErr, err))) - common.LogError(conn.Close()) -} diff --git a/agents/go-agents/terminal-agent/term/websocket.go b/agents/go-agents/terminal-agent/term/websocket.go deleted file mode 100644 index 773ca114e5e..00000000000 --- a/agents/go-agents/terminal-agent/term/websocket.go +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package term - -import ( - "log" - "net" - - "github.com/gorilla/websocket" -) - -func isNormalWSError(err error) bool { - closeErr, ok := err.(*websocket.CloseError) - if ok && (closeErr.Code == websocket.CloseGoingAway || closeErr.Code == websocket.CloseNormalClosure) { - return true - } - _, ok = err.(*net.OpError) - return ok -} - -// writeToSocket writes message of type TextMessage into websocket connection -func writeToSocket(conn *websocket.Conn, bytes []byte, finalizer *readWriteRoutingFinalizer) error { - return writeWSMessageToSocket(conn, websocket.TextMessage, bytes, finalizer) -} - -// we write message to websocket with help mutex finalizer to prevent send message after "close connection" message. -func writeWSMessageToSocket(conn *websocket.Conn, messageType int, bytes []byte, finalizer *readWriteRoutingFinalizer) error { - defer finalizer.Unlock() - - finalizer.Lock() - if err := conn.WriteMessage(messageType, bytes); err != nil { - log.Printf("Failed to send websocket message: %s, due to occurred error %s", string(bytes), err.Error()) - return err - } - return nil -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.gitignore b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.gitignore deleted file mode 100644 index 80bed650ec0..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -bin - - diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.travis.yml b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.travis.yml deleted file mode 100644 index 1027f56cd94..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -script: - - go vet ./... - - go test -v ./... - -go: - - 1.3 - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - tip diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/LICENSE b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/LICENSE deleted file mode 100644 index df83a9c2f01..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2012 Dave Grijalva - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md deleted file mode 100644 index 7fc1f793cbc..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md +++ /dev/null @@ -1,97 +0,0 @@ -## Migration Guide from v2 -> v3 - -Version 3 adds several new, frequently requested features. To do so, it introduces a few breaking changes. We've worked to keep these as minimal as possible. This guide explains the breaking changes and how you can quickly update your code. - -### `Token.Claims` is now an interface type - -The most requested feature from the 2.0 verison of this library was the ability to provide a custom type to the JSON parser for claims. This was implemented by introducing a new interface, `Claims`, to replace `map[string]interface{}`. We also included two concrete implementations of `Claims`: `MapClaims` and `StandardClaims`. - -`MapClaims` is an alias for `map[string]interface{}` with built in validation behavior. It is the default claims type when using `Parse`. The usage is unchanged except you must type cast the claims property. - -The old example for parsing a token looked like this.. - -```go - if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil { - fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"]) - } -``` - -is now directly mapped to... - -```go - if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil { - claims := token.Claims.(jwt.MapClaims) - fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"]) - } -``` - -`StandardClaims` is designed to be embedded in your custom type. You can supply a custom claims type with the new `ParseWithClaims` function. Here's an example of using a custom claims type. - -```go - type MyCustomClaims struct { - User string - *StandardClaims - } - - if token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, keyLookupFunc); err == nil { - claims := token.Claims.(*MyCustomClaims) - fmt.Printf("Token for user %v expires %v", claims.User, claims.StandardClaims.ExpiresAt) - } -``` - -### `ParseFromRequest` has been moved - -To keep this library focused on the tokens without becoming overburdened with complex request processing logic, `ParseFromRequest` and its new companion `ParseFromRequestWithClaims` have been moved to a subpackage, `request`. The method signatues have also been augmented to receive a new argument: `Extractor`. - -`Extractors` do the work of picking the token string out of a request. The interface is simple and composable. - -This simple parsing example: - -```go - if token, err := jwt.ParseFromRequest(tokenString, req, keyLookupFunc); err == nil { - fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"]) - } -``` - -is directly mapped to: - -```go - if token, err := request.ParseFromRequest(req, request.OAuth2Extractor, keyLookupFunc); err == nil { - claims := token.Claims.(jwt.MapClaims) - fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"]) - } -``` - -There are several concrete `Extractor` types provided for your convenience: - -* `HeaderExtractor` will search a list of headers until one contains content. -* `ArgumentExtractor` will search a list of keys in request query and form arguments until one contains content. -* `MultiExtractor` will try a list of `Extractors` in order until one returns content. -* `AuthorizationHeaderExtractor` will look in the `Authorization` header for a `Bearer` token. -* `OAuth2Extractor` searches the places an OAuth2 token would be specified (per the spec): `Authorization` header and `access_token` argument -* `PostExtractionFilter` wraps an `Extractor`, allowing you to process the content before it's parsed. A simple example is stripping the `Bearer ` text from a header - - -### RSA signing methods no longer accept `[]byte` keys - -Due to a [critical vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/), we've decided the convenience of accepting `[]byte` instead of `rsa.PublicKey` or `rsa.PrivateKey` isn't worth the risk of misuse. - -To replace this behavior, we've added two helper methods: `ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)` and `ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)`. These are just simple helpers for unpacking PEM encoded PKCS1 and PKCS8 keys. If your keys are encoded any other way, all you need to do is convert them to the `crypto/rsa` package's types. - -```go - func keyLookupFunc(*Token) (interface{}, error) { - // Don't forget to validate the alg is what you expect: - if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok { - return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) - } - - // Look up key - key, err := lookupPublicKey(token.Header["kid"]) - if err != nil { - return nil, err - } - - // Unpack key from PEM encoded PKCS8 - return jwt.ParseRSAPublicKeyFromPEM(key) - } -``` diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/README.md b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/README.md deleted file mode 100644 index 25aec486c63..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/README.md +++ /dev/null @@ -1,85 +0,0 @@ -A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) - -[![Build Status](https://travis-ci.org/dgrijalva/jwt-go.svg?branch=master)](https://travis-ci.org/dgrijalva/jwt-go) - -**BREAKING CHANGES:*** Version 3.0.0 is here. It includes _a lot_ of changes including a few that break the API. We've tried to break as few things as possible, so there should just be a few type signature changes. A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. - -**NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided. - - -## What the heck is a JWT? - -JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens. - -In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for `Bearer` tokens in Oauth 2. A token is made of three parts, separated by `.`'s. The first two parts are JSON objects, that have been [base64url](http://tools.ietf.org/html/rfc4648) encoded. The last part is the signature, encoded the same way. - -The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used. - -The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [the RFC](http://self-issued.info/docs/draft-jones-json-web-token.html) for information about reserved keys and the proper way to add your own. - -## What's in the box? - -This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own. - -## Examples - -See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) for examples of usage: - -* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-Parse--Hmac) -* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-New--Hmac) -* [Directory of Examples](https://godoc.org/github.com/dgrijalva/jwt-go#pkg-examples) - -## Extensions - -This library publishes all the necessary components for adding your own signing methods. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`. - -Here's an example of an extension that integrates with the Google App Engine signing tools: https://github.com/someone1/gcp-jwt-go - -## Compliance - -This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences: - -* In order to protect against accidental use of [Unsecured JWTs](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#UnsecuredJWT), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key. - -## Project Status & Versioning - -This library is considered production ready. Feedback and feature requests are appreciated. The API should be considered stable. There should be very few backwards-incompatible changes outside of major version updates (and only with good reason). - -This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `master`. Periodically, versions will be tagged from `master`. You can find all the releases on [the project releases page](https://github.com/dgrijalva/jwt-go/releases). - -While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users. You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v2`. It will do the right thing WRT semantic versioning. - -## Usage Tips - -### Signing vs Encryption - -A token is simply a JSON object that is signed by its author. this tells you exactly two things about the data: - -* The author of the token was in the possession of the signing secret -* The data has not been modified since it was signed - -It's important to know that JWT does not provide encryption, which means anyone who has access to the token can read its contents. If you need to protect (encrypt) the data, there is a companion spec, `JWE`, that provides this functionality. JWE is currently outside the scope of this library. - -### Choosing a Signing Method - -There are several signing methods available, and you should probably take the time to learn about the various options before choosing one. The principal design decision is most likely going to be symmetric vs asymmetric. - -Symmetric signing methods, such as HSA, use only a single secret. This is probably the simplest signing method to use since any `[]byte` can be used as a valid secret. They are also slightly computationally faster to use, though this rarely is enough to matter. Symmetric signing methods work the best when both producers and consumers of tokens are trusted, or even the same system. Since the same secret is used to both sign and validate tokens, you can't easily distribute the key for validation. - -Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification. - -### JWT and OAuth - -It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication. - -Without going too far down the rabbit hole, here's a description of the interaction of these technologies: - -* OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth. -* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token. -* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL. - -## More - -Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go). - -The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in the documentation. diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md deleted file mode 100644 index c21551f6bbd..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md +++ /dev/null @@ -1,111 +0,0 @@ -## `jwt-go` Version History - -#### 3.1.0 - -* Improvements to `jwt` command line tool -* Added `SkipClaimsValidation` option to `Parser` -* Documentation updates - -#### 3.0.0 - -* **Compatibility Breaking Changes**: See MIGRATION_GUIDE.md for tips on updating your code - * Dropped support for `[]byte` keys when using RSA signing methods. This convenience feature could contribute to security vulnerabilities involving mismatched key types with signing methods. - * `ParseFromRequest` has been moved to `request` subpackage and usage has changed - * The `Claims` property on `Token` is now type `Claims` instead of `map[string]interface{}`. The default value is type `MapClaims`, which is an alias to `map[string]interface{}`. This makes it possible to use a custom type when decoding claims. -* Other Additions and Changes - * Added `Claims` interface type to allow users to decode the claims into a custom type - * Added `ParseWithClaims`, which takes a third argument of type `Claims`. Use this function instead of `Parse` if you have a custom type you'd like to decode into. - * Dramatically improved the functionality and flexibility of `ParseFromRequest`, which is now in the `request` subpackage - * Added `ParseFromRequestWithClaims` which is the `FromRequest` equivalent of `ParseWithClaims` - * Added new interface type `Extractor`, which is used for extracting JWT strings from http requests. Used with `ParseFromRequest` and `ParseFromRequestWithClaims`. - * Added several new, more specific, validation errors to error type bitmask - * Moved examples from README to executable example files - * Signing method registry is now thread safe - * Added new property to `ValidationError`, which contains the raw error returned by calls made by parse/verify (such as those returned by keyfunc or json parser) - -#### 2.7.0 - -This will likely be the last backwards compatible release before 3.0.0, excluding essential bug fixes. - -* Added new option `-show` to the `jwt` command that will just output the decoded token without verifying -* Error text for expired tokens includes how long it's been expired -* Fixed incorrect error returned from `ParseRSAPublicKeyFromPEM` -* Documentation updates - -#### 2.6.0 - -* Exposed inner error within ValidationError -* Fixed validation errors when using UseJSONNumber flag -* Added several unit tests - -#### 2.5.0 - -* Added support for signing method none. You shouldn't use this. The API tries to make this clear. -* Updated/fixed some documentation -* Added more helpful error message when trying to parse tokens that begin with `BEARER ` - -#### 2.4.0 - -* Added new type, Parser, to allow for configuration of various parsing parameters - * You can now specify a list of valid signing methods. Anything outside this set will be rejected. - * You can now opt to use the `json.Number` type instead of `float64` when parsing token JSON -* Added support for [Travis CI](https://travis-ci.org/dgrijalva/jwt-go) -* Fixed some bugs with ECDSA parsing - -#### 2.3.0 - -* Added support for ECDSA signing methods -* Added support for RSA PSS signing methods (requires go v1.4) - -#### 2.2.0 - -* Gracefully handle a `nil` `Keyfunc` being passed to `Parse`. Result will now be the parsed token and an error, instead of a panic. - -#### 2.1.0 - -Backwards compatible API change that was missed in 2.0.0. - -* The `SignedString` method on `Token` now takes `interface{}` instead of `[]byte` - -#### 2.0.0 - -There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change. - -The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`. - -It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`. - -* **Compatibility Breaking Changes** - * `SigningMethodHS256` is now `*SigningMethodHMAC` instead of `type struct` - * `SigningMethodRS256` is now `*SigningMethodRSA` instead of `type struct` - * `KeyFunc` now returns `interface{}` instead of `[]byte` - * `SigningMethod.Sign` now takes `interface{}` instead of `[]byte` for the key - * `SigningMethod.Verify` now takes `interface{}` instead of `[]byte` for the key -* Renamed type `SigningMethodHS256` to `SigningMethodHMAC`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodHS256` - * Added public package global `SigningMethodHS384` - * Added public package global `SigningMethodHS512` -* Renamed type `SigningMethodRS256` to `SigningMethodRSA`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodRS256` - * Added public package global `SigningMethodRS384` - * Added public package global `SigningMethodRS512` -* Moved sample private key for HMAC tests from an inline value to a file on disk. Value is unchanged. -* Refactored the RSA implementation to be easier to read -* Exposed helper methods `ParseRSAPrivateKeyFromPEM` and `ParseRSAPublicKeyFromPEM` - -#### 1.0.2 - -* Fixed bug in parsing public keys from certificates -* Added more tests around the parsing of keys for RS256 -* Code refactoring in RS256 implementation. No functional changes - -#### 1.0.1 - -* Fixed panic if RS256 signing method was passed an invalid key - -#### 1.0.0 - -* First versioned release -* API stabilized -* Supports creating, signing, parsing, and validating JWT tokens -* Supports RS256 and HS256 signing methods \ No newline at end of file diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/claims.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/claims.go deleted file mode 100644 index f0228f02e03..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/claims.go +++ /dev/null @@ -1,134 +0,0 @@ -package jwt - -import ( - "crypto/subtle" - "fmt" - "time" -) - -// For a type to be a Claims object, it must just have a Valid method that determines -// if the token is invalid for any supported reason -type Claims interface { - Valid() error -} - -// Structured version of Claims Section, as referenced at -// https://tools.ietf.org/html/rfc7519#section-4.1 -// See examples for how to use this with your own claim types -type StandardClaims struct { - Audience string `json:"aud,omitempty"` - ExpiresAt int64 `json:"exp,omitempty"` - Id string `json:"jti,omitempty"` - IssuedAt int64 `json:"iat,omitempty"` - Issuer string `json:"iss,omitempty"` - NotBefore int64 `json:"nbf,omitempty"` - Subject string `json:"sub,omitempty"` -} - -// Validates time based claims "exp, iat, nbf". -// There is no accounting for clock skew. -// As well, if any of the above claims are not in the token, it will still -// be considered a valid claim. -func (c StandardClaims) Valid() error { - vErr := new(ValidationError) - now := TimeFunc().Unix() - - // The claims below are optional, by default, so if they are set to the - // default value in Go, let's not fail the verification for them. - if c.VerifyExpiresAt(now, false) == false { - delta := time.Unix(now, 0).Sub(time.Unix(c.ExpiresAt, 0)) - vErr.Inner = fmt.Errorf("token is expired by %v", delta) - vErr.Errors |= ValidationErrorExpired - } - - if c.VerifyIssuedAt(now, false) == false { - vErr.Inner = fmt.Errorf("Token used before issued") - vErr.Errors |= ValidationErrorIssuedAt - } - - if c.VerifyNotBefore(now, false) == false { - vErr.Inner = fmt.Errorf("token is not valid yet") - vErr.Errors |= ValidationErrorNotValidYet - } - - if vErr.valid() { - return nil - } - - return vErr -} - -// Compares the aud claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool { - return verifyAud(c.Audience, cmp, req) -} - -// Compares the exp claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool { - return verifyExp(c.ExpiresAt, cmp, req) -} - -// Compares the iat claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool { - return verifyIat(c.IssuedAt, cmp, req) -} - -// Compares the iss claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool { - return verifyIss(c.Issuer, cmp, req) -} - -// Compares the nbf claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool { - return verifyNbf(c.NotBefore, cmp, req) -} - -// ----- helpers - -func verifyAud(aud string, cmp string, required bool) bool { - if aud == "" { - return !required - } - if subtle.ConstantTimeCompare([]byte(aud), []byte(cmp)) != 0 { - return true - } else { - return false - } -} - -func verifyExp(exp int64, now int64, required bool) bool { - if exp == 0 { - return !required - } - return now <= exp -} - -func verifyIat(iat int64, now int64, required bool) bool { - if iat == 0 { - return !required - } - return now >= iat -} - -func verifyIss(iss string, cmp string, required bool) bool { - if iss == "" { - return !required - } - if subtle.ConstantTimeCompare([]byte(iss), []byte(cmp)) != 0 { - return true - } else { - return false - } -} - -func verifyNbf(nbf int64, now int64, required bool) bool { - if nbf == 0 { - return !required - } - return now >= nbf -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/doc.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/doc.go deleted file mode 100644 index a86dc1a3b34..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html -// -// See README.md for more info. -package jwt diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa.go deleted file mode 100644 index 2f59a222363..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa.go +++ /dev/null @@ -1,147 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/ecdsa" - "crypto/rand" - "errors" - "math/big" -) - -var ( - // Sadly this is missing from crypto/ecdsa compared to crypto/rsa - ErrECDSAVerification = errors.New("crypto/ecdsa: verification error") -) - -// Implements the ECDSA family of signing methods signing methods -type SigningMethodECDSA struct { - Name string - Hash crypto.Hash - KeySize int - CurveBits int -} - -// Specific instances for EC256 and company -var ( - SigningMethodES256 *SigningMethodECDSA - SigningMethodES384 *SigningMethodECDSA - SigningMethodES512 *SigningMethodECDSA -) - -func init() { - // ES256 - SigningMethodES256 = &SigningMethodECDSA{"ES256", crypto.SHA256, 32, 256} - RegisterSigningMethod(SigningMethodES256.Alg(), func() SigningMethod { - return SigningMethodES256 - }) - - // ES384 - SigningMethodES384 = &SigningMethodECDSA{"ES384", crypto.SHA384, 48, 384} - RegisterSigningMethod(SigningMethodES384.Alg(), func() SigningMethod { - return SigningMethodES384 - }) - - // ES512 - SigningMethodES512 = &SigningMethodECDSA{"ES512", crypto.SHA512, 66, 521} - RegisterSigningMethod(SigningMethodES512.Alg(), func() SigningMethod { - return SigningMethodES512 - }) -} - -func (m *SigningMethodECDSA) Alg() string { - return m.Name -} - -// Implements the Verify method from SigningMethod -// For this verify method, key must be an ecdsa.PublicKey struct -func (m *SigningMethodECDSA) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - // Get the key - var ecdsaKey *ecdsa.PublicKey - switch k := key.(type) { - case *ecdsa.PublicKey: - ecdsaKey = k - default: - return ErrInvalidKeyType - } - - if len(sig) != 2*m.KeySize { - return ErrECDSAVerification - } - - r := big.NewInt(0).SetBytes(sig[:m.KeySize]) - s := big.NewInt(0).SetBytes(sig[m.KeySize:]) - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Verify the signature - if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus == true { - return nil - } else { - return ErrECDSAVerification - } -} - -// Implements the Sign method from SigningMethod -// For this signing method, key must be an ecdsa.PrivateKey struct -func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) (string, error) { - // Get the key - var ecdsaKey *ecdsa.PrivateKey - switch k := key.(type) { - case *ecdsa.PrivateKey: - ecdsaKey = k - default: - return "", ErrInvalidKeyType - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return r, s - if r, s, err := ecdsa.Sign(rand.Reader, ecdsaKey, hasher.Sum(nil)); err == nil { - curveBits := ecdsaKey.Curve.Params().BitSize - - if m.CurveBits != curveBits { - return "", ErrInvalidKey - } - - keyBytes := curveBits / 8 - if curveBits%8 > 0 { - keyBytes += 1 - } - - // We serialize the outpus (r and s) into big-endian byte arrays and pad - // them with zeros on the left to make sure the sizes work out. Both arrays - // must be keyBytes long, and the output must be 2*keyBytes long. - rBytes := r.Bytes() - rBytesPadded := make([]byte, keyBytes) - copy(rBytesPadded[keyBytes-len(rBytes):], rBytes) - - sBytes := s.Bytes() - sBytesPadded := make([]byte, keyBytes) - copy(sBytesPadded[keyBytes-len(sBytes):], sBytes) - - out := append(rBytesPadded, sBytesPadded...) - - return EncodeSegment(out), nil - } else { - return "", err - } -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go deleted file mode 100644 index d19624b7264..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go +++ /dev/null @@ -1,67 +0,0 @@ -package jwt - -import ( - "crypto/ecdsa" - "crypto/x509" - "encoding/pem" - "errors" -) - -var ( - ErrNotECPublicKey = errors.New("Key is not a valid ECDSA public key") - ErrNotECPrivateKey = errors.New("Key is not a valid ECDSA private key") -) - -// Parse PEM encoded Elliptic Curve Private Key Structure -func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil { - return nil, err - } - - var pkey *ecdsa.PrivateKey - var ok bool - if pkey, ok = parsedKey.(*ecdsa.PrivateKey); !ok { - return nil, ErrNotECPrivateKey - } - - return pkey, nil -} - -// Parse PEM encoded PKCS1 or PKCS8 public key -func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { - if cert, err := x509.ParseCertificate(block.Bytes); err == nil { - parsedKey = cert.PublicKey - } else { - return nil, err - } - } - - var pkey *ecdsa.PublicKey - var ok bool - if pkey, ok = parsedKey.(*ecdsa.PublicKey); !ok { - return nil, ErrNotECPublicKey - } - - return pkey, nil -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/errors.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/errors.go deleted file mode 100644 index 1c93024aad2..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/errors.go +++ /dev/null @@ -1,59 +0,0 @@ -package jwt - -import ( - "errors" -) - -// Error constants -var ( - ErrInvalidKey = errors.New("key is invalid") - ErrInvalidKeyType = errors.New("key is of invalid type") - ErrHashUnavailable = errors.New("the requested hash function is unavailable") -) - -// The errors that might occur when parsing and validating a token -const ( - ValidationErrorMalformed uint32 = 1 << iota // Token is malformed - ValidationErrorUnverifiable // Token could not be verified because of signing problems - ValidationErrorSignatureInvalid // Signature validation failed - - // Standard Claim validation errors - ValidationErrorAudience // AUD validation failed - ValidationErrorExpired // EXP validation failed - ValidationErrorIssuedAt // IAT validation failed - ValidationErrorIssuer // ISS validation failed - ValidationErrorNotValidYet // NBF validation failed - ValidationErrorId // JTI validation failed - ValidationErrorClaimsInvalid // Generic claims validation error -) - -// Helper for constructing a ValidationError with a string error message -func NewValidationError(errorText string, errorFlags uint32) *ValidationError { - return &ValidationError{ - text: errorText, - Errors: errorFlags, - } -} - -// The error from Parse if token is not valid -type ValidationError struct { - Inner error // stores the error returned by external dependencies, i.e.: KeyFunc - Errors uint32 // bitfield. see ValidationError... constants - text string // errors that do not have a valid error just have text -} - -// Validation error is an error type -func (e ValidationError) Error() string { - if e.Inner != nil { - return e.Inner.Error() - } else if e.text != "" { - return e.text - } else { - return "token is invalid" - } -} - -// No errors -func (e *ValidationError) valid() bool { - return e.Errors == 0 -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/hmac.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/hmac.go deleted file mode 100644 index c2299192545..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/hmac.go +++ /dev/null @@ -1,94 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/hmac" - "errors" -) - -// Implements the HMAC-SHA family of signing methods signing methods -type SigningMethodHMAC struct { - Name string - Hash crypto.Hash -} - -// Specific instances for HS256 and company -var ( - SigningMethodHS256 *SigningMethodHMAC - SigningMethodHS384 *SigningMethodHMAC - SigningMethodHS512 *SigningMethodHMAC - ErrSignatureInvalid = errors.New("signature is invalid") -) - -func init() { - // HS256 - SigningMethodHS256 = &SigningMethodHMAC{"HS256", crypto.SHA256} - RegisterSigningMethod(SigningMethodHS256.Alg(), func() SigningMethod { - return SigningMethodHS256 - }) - - // HS384 - SigningMethodHS384 = &SigningMethodHMAC{"HS384", crypto.SHA384} - RegisterSigningMethod(SigningMethodHS384.Alg(), func() SigningMethod { - return SigningMethodHS384 - }) - - // HS512 - SigningMethodHS512 = &SigningMethodHMAC{"HS512", crypto.SHA512} - RegisterSigningMethod(SigningMethodHS512.Alg(), func() SigningMethod { - return SigningMethodHS512 - }) -} - -func (m *SigningMethodHMAC) Alg() string { - return m.Name -} - -// Verify the signature of HSXXX tokens. Returns nil if the signature is valid. -func (m *SigningMethodHMAC) Verify(signingString, signature string, key interface{}) error { - // Verify the key is the right type - keyBytes, ok := key.([]byte) - if !ok { - return ErrInvalidKeyType - } - - // Decode signature, for comparison - sig, err := DecodeSegment(signature) - if err != nil { - return err - } - - // Can we use the specified hashing method? - if !m.Hash.Available() { - return ErrHashUnavailable - } - - // This signing method is symmetric, so we validate the signature - // by reproducing the signature from the signing string and key, then - // comparing that against the provided signature. - hasher := hmac.New(m.Hash.New, keyBytes) - hasher.Write([]byte(signingString)) - if !hmac.Equal(sig, hasher.Sum(nil)) { - return ErrSignatureInvalid - } - - // No validation errors. Signature is good. - return nil -} - -// Implements the Sign method from SigningMethod for this signing method. -// Key must be []byte -func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, error) { - if keyBytes, ok := key.([]byte); ok { - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := hmac.New(m.Hash.New, keyBytes) - hasher.Write([]byte(signingString)) - - return EncodeSegment(hasher.Sum(nil)), nil - } - - return "", ErrInvalidKey -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/map_claims.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/map_claims.go deleted file mode 100644 index 291213c460d..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/map_claims.go +++ /dev/null @@ -1,94 +0,0 @@ -package jwt - -import ( - "encoding/json" - "errors" - // "fmt" -) - -// Claims type that uses the map[string]interface{} for JSON decoding -// This is the default claims type if you don't supply one -type MapClaims map[string]interface{} - -// Compares the aud claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyAudience(cmp string, req bool) bool { - aud, _ := m["aud"].(string) - return verifyAud(aud, cmp, req) -} - -// Compares the exp claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool { - switch exp := m["exp"].(type) { - case float64: - return verifyExp(int64(exp), cmp, req) - case json.Number: - v, _ := exp.Int64() - return verifyExp(v, cmp, req) - } - return req == false -} - -// Compares the iat claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool { - switch iat := m["iat"].(type) { - case float64: - return verifyIat(int64(iat), cmp, req) - case json.Number: - v, _ := iat.Int64() - return verifyIat(v, cmp, req) - } - return req == false -} - -// Compares the iss claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyIssuer(cmp string, req bool) bool { - iss, _ := m["iss"].(string) - return verifyIss(iss, cmp, req) -} - -// Compares the nbf claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool { - switch nbf := m["nbf"].(type) { - case float64: - return verifyNbf(int64(nbf), cmp, req) - case json.Number: - v, _ := nbf.Int64() - return verifyNbf(v, cmp, req) - } - return req == false -} - -// Validates time based claims "exp, iat, nbf". -// There is no accounting for clock skew. -// As well, if any of the above claims are not in the token, it will still -// be considered a valid claim. -func (m MapClaims) Valid() error { - vErr := new(ValidationError) - now := TimeFunc().Unix() - - if m.VerifyExpiresAt(now, false) == false { - vErr.Inner = errors.New("Token is expired") - vErr.Errors |= ValidationErrorExpired - } - - if m.VerifyIssuedAt(now, false) == false { - vErr.Inner = errors.New("Token used before issued") - vErr.Errors |= ValidationErrorIssuedAt - } - - if m.VerifyNotBefore(now, false) == false { - vErr.Inner = errors.New("Token is not valid yet") - vErr.Errors |= ValidationErrorNotValidYet - } - - if vErr.valid() { - return nil - } - - return vErr -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/none.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/none.go deleted file mode 100644 index f04d189d067..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/none.go +++ /dev/null @@ -1,52 +0,0 @@ -package jwt - -// Implements the none signing method. This is required by the spec -// but you probably should never use it. -var SigningMethodNone *signingMethodNone - -const UnsafeAllowNoneSignatureType unsafeNoneMagicConstant = "none signing method allowed" - -var NoneSignatureTypeDisallowedError error - -type signingMethodNone struct{} -type unsafeNoneMagicConstant string - -func init() { - SigningMethodNone = &signingMethodNone{} - NoneSignatureTypeDisallowedError = NewValidationError("'none' signature type is not allowed", ValidationErrorSignatureInvalid) - - RegisterSigningMethod(SigningMethodNone.Alg(), func() SigningMethod { - return SigningMethodNone - }) -} - -func (m *signingMethodNone) Alg() string { - return "none" -} - -// Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Verify(signingString, signature string, key interface{}) (err error) { - // Key must be UnsafeAllowNoneSignatureType to prevent accidentally - // accepting 'none' signing method - if _, ok := key.(unsafeNoneMagicConstant); !ok { - return NoneSignatureTypeDisallowedError - } - // If signing method is none, signature must be an empty string - if signature != "" { - return NewValidationError( - "'none' signing method with non-empty signature", - ValidationErrorSignatureInvalid, - ) - } - - // Accept 'none' signing method. - return nil -} - -// Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Sign(signingString string, key interface{}) (string, error) { - if _, ok := key.(unsafeNoneMagicConstant); ok { - return "", nil - } - return "", NoneSignatureTypeDisallowedError -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/parser.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/parser.go deleted file mode 100644 index 7bf1c4ea084..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/parser.go +++ /dev/null @@ -1,131 +0,0 @@ -package jwt - -import ( - "bytes" - "encoding/json" - "fmt" - "strings" -) - -type Parser struct { - ValidMethods []string // If populated, only these methods will be considered valid - UseJSONNumber bool // Use JSON Number format in JSON decoder - SkipClaimsValidation bool // Skip claims validation during token parsing -} - -// Parse, validate, and return a token. -// keyFunc will receive the parsed token and should return the key for validating. -// If everything is kosher, err will be nil -func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { - return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc) -} - -func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { - parts := strings.Split(tokenString, ".") - if len(parts) != 3 { - return nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) - } - - var err error - token := &Token{Raw: tokenString} - - // parse Header - var headerBytes []byte - if headerBytes, err = DecodeSegment(parts[0]); err != nil { - if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { - return token, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) - } - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - if err = json.Unmarshal(headerBytes, &token.Header); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // parse Claims - var claimBytes []byte - token.Claims = claims - - if claimBytes, err = DecodeSegment(parts[1]); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) - if p.UseJSONNumber { - dec.UseNumber() - } - // JSON Decode. Special case for map type to avoid weird pointer behavior - if c, ok := token.Claims.(MapClaims); ok { - err = dec.Decode(&c) - } else { - err = dec.Decode(&claims) - } - // Handle decode error - if err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // Lookup signature method - if method, ok := token.Header["alg"].(string); ok { - if token.Method = GetSigningMethod(method); token.Method == nil { - return token, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) - } - } else { - return token, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) - } - - // Verify signing method is in the required set - if p.ValidMethods != nil { - var signingMethodValid = false - var alg = token.Method.Alg() - for _, m := range p.ValidMethods { - if m == alg { - signingMethodValid = true - break - } - } - if !signingMethodValid { - // signing method is not in the listed set - return token, NewValidationError(fmt.Sprintf("signing method %v is invalid", alg), ValidationErrorSignatureInvalid) - } - } - - // Lookup key - var key interface{} - if keyFunc == nil { - // keyFunc was not provided. short circuiting validation - return token, NewValidationError("no Keyfunc was provided.", ValidationErrorUnverifiable) - } - if key, err = keyFunc(token); err != nil { - // keyFunc returned an error - return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable} - } - - vErr := &ValidationError{} - - // Validate Claims - if !p.SkipClaimsValidation { - if err := token.Claims.Valid(); err != nil { - - // If the Claims Valid returned an error, check if it is a validation error, - // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set - if e, ok := err.(*ValidationError); !ok { - vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} - } else { - vErr = e - } - } - } - - // Perform validation - token.Signature = parts[2] - if err = token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil { - vErr.Inner = err - vErr.Errors |= ValidationErrorSignatureInvalid - } - - if vErr.valid() { - token.Valid = true - return token, nil - } - - return token, vErr -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa.go deleted file mode 100644 index 0ae0b1984e5..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa.go +++ /dev/null @@ -1,100 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" -) - -// Implements the RSA family of signing methods signing methods -type SigningMethodRSA struct { - Name string - Hash crypto.Hash -} - -// Specific instances for RS256 and company -var ( - SigningMethodRS256 *SigningMethodRSA - SigningMethodRS384 *SigningMethodRSA - SigningMethodRS512 *SigningMethodRSA -) - -func init() { - // RS256 - SigningMethodRS256 = &SigningMethodRSA{"RS256", crypto.SHA256} - RegisterSigningMethod(SigningMethodRS256.Alg(), func() SigningMethod { - return SigningMethodRS256 - }) - - // RS384 - SigningMethodRS384 = &SigningMethodRSA{"RS384", crypto.SHA384} - RegisterSigningMethod(SigningMethodRS384.Alg(), func() SigningMethod { - return SigningMethodRS384 - }) - - // RS512 - SigningMethodRS512 = &SigningMethodRSA{"RS512", crypto.SHA512} - RegisterSigningMethod(SigningMethodRS512.Alg(), func() SigningMethod { - return SigningMethodRS512 - }) -} - -func (m *SigningMethodRSA) Alg() string { - return m.Name -} - -// Implements the Verify method from SigningMethod -// For this signing method, must be an rsa.PublicKey structure. -func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - var rsaKey *rsa.PublicKey - var ok bool - - if rsaKey, ok = key.(*rsa.PublicKey); !ok { - return ErrInvalidKeyType - } - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Verify the signature - return rsa.VerifyPKCS1v15(rsaKey, m.Hash, hasher.Sum(nil), sig) -} - -// Implements the Sign method from SigningMethod -// For this signing method, must be an rsa.PrivateKey structure. -func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) { - var rsaKey *rsa.PrivateKey - var ok bool - - // Validate type of key - if rsaKey, ok = key.(*rsa.PrivateKey); !ok { - return "", ErrInvalidKey - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return the encoded bytes - if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil { - return EncodeSegment(sigBytes), nil - } else { - return "", err - } -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go deleted file mode 100644 index 10ee9db8a4e..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go +++ /dev/null @@ -1,126 +0,0 @@ -// +build go1.4 - -package jwt - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" -) - -// Implements the RSAPSS family of signing methods signing methods -type SigningMethodRSAPSS struct { - *SigningMethodRSA - Options *rsa.PSSOptions -} - -// Specific instances for RS/PS and company -var ( - SigningMethodPS256 *SigningMethodRSAPSS - SigningMethodPS384 *SigningMethodRSAPSS - SigningMethodPS512 *SigningMethodRSAPSS -) - -func init() { - // PS256 - SigningMethodPS256 = &SigningMethodRSAPSS{ - &SigningMethodRSA{ - Name: "PS256", - Hash: crypto.SHA256, - }, - &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - Hash: crypto.SHA256, - }, - } - RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod { - return SigningMethodPS256 - }) - - // PS384 - SigningMethodPS384 = &SigningMethodRSAPSS{ - &SigningMethodRSA{ - Name: "PS384", - Hash: crypto.SHA384, - }, - &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - Hash: crypto.SHA384, - }, - } - RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod { - return SigningMethodPS384 - }) - - // PS512 - SigningMethodPS512 = &SigningMethodRSAPSS{ - &SigningMethodRSA{ - Name: "PS512", - Hash: crypto.SHA512, - }, - &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - Hash: crypto.SHA512, - }, - } - RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod { - return SigningMethodPS512 - }) -} - -// Implements the Verify method from SigningMethod -// For this verify method, key must be an rsa.PublicKey struct -func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - var rsaKey *rsa.PublicKey - switch k := key.(type) { - case *rsa.PublicKey: - rsaKey = k - default: - return ErrInvalidKey - } - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, m.Options) -} - -// Implements the Sign method from SigningMethod -// For this signing method, key must be an rsa.PrivateKey struct -func (m *SigningMethodRSAPSS) Sign(signingString string, key interface{}) (string, error) { - var rsaKey *rsa.PrivateKey - - switch k := key.(type) { - case *rsa.PrivateKey: - rsaKey = k - default: - return "", ErrInvalidKeyType - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return the encoded bytes - if sigBytes, err := rsa.SignPSS(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil), m.Options); err == nil { - return EncodeSegment(sigBytes), nil - } else { - return "", err - } -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go deleted file mode 100644 index 213a90dbbf8..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go +++ /dev/null @@ -1,69 +0,0 @@ -package jwt - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" -) - -var ( - ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key") - ErrNotRSAPrivateKey = errors.New("Key is not a valid RSA private key") - ErrNotRSAPublicKey = errors.New("Key is not a valid RSA public key") -) - -// Parse PEM encoded PKCS1 or PKCS8 private key -func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - var parsedKey interface{} - if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil { - if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { - return nil, err - } - } - - var pkey *rsa.PrivateKey - var ok bool - if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { - return nil, ErrNotRSAPrivateKey - } - - return pkey, nil -} - -// Parse PEM encoded PKCS1 or PKCS8 public key -func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { - if cert, err := x509.ParseCertificate(block.Bytes); err == nil { - parsedKey = cert.PublicKey - } else { - return nil, err - } - } - - var pkey *rsa.PublicKey - var ok bool - if pkey, ok = parsedKey.(*rsa.PublicKey); !ok { - return nil, ErrNotRSAPublicKey - } - - return pkey, nil -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/signing_method.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/signing_method.go deleted file mode 100644 index ed1f212b21e..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/signing_method.go +++ /dev/null @@ -1,35 +0,0 @@ -package jwt - -import ( - "sync" -) - -var signingMethods = map[string]func() SigningMethod{} -var signingMethodLock = new(sync.RWMutex) - -// Implement SigningMethod to add new methods for signing or verifying tokens. -type SigningMethod interface { - Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid - Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error - Alg() string // returns the alg identifier for this method (example: 'HS256') -} - -// Register the "alg" name and a factory function for signing method. -// This is typically done during init() in the method's implementation -func RegisterSigningMethod(alg string, f func() SigningMethod) { - signingMethodLock.Lock() - defer signingMethodLock.Unlock() - - signingMethods[alg] = f -} - -// Get a signing method from an "alg" string -func GetSigningMethod(alg string) (method SigningMethod) { - signingMethodLock.RLock() - defer signingMethodLock.RUnlock() - - if methodF, ok := signingMethods[alg]; ok { - method = methodF() - } - return -} diff --git a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/token.go b/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/token.go deleted file mode 100644 index d637e0867c6..00000000000 --- a/agents/go-agents/vendor/github.com/dgrijalva/jwt-go/token.go +++ /dev/null @@ -1,108 +0,0 @@ -package jwt - -import ( - "encoding/base64" - "encoding/json" - "strings" - "time" -) - -// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time). -// You can override it to use another time value. This is useful for testing or if your -// server uses a different time zone than your tokens. -var TimeFunc = time.Now - -// Parse methods use this callback function to supply -// the key for verification. The function receives the parsed, -// but unverified Token. This allows you to use properties in the -// Header of the token (such as `kid`) to identify which key to use. -type Keyfunc func(*Token) (interface{}, error) - -// A JWT Token. Different fields will be used depending on whether you're -// creating or parsing/verifying a token. -type Token struct { - Raw string // The raw token. Populated when you Parse a token - Method SigningMethod // The signing method used or to be used - Header map[string]interface{} // The first segment of the token - Claims Claims // The second segment of the token - Signature string // The third segment of the token. Populated when you Parse a token - Valid bool // Is the token valid? Populated when you Parse/Verify a token -} - -// Create a new Token. Takes a signing method -func New(method SigningMethod) *Token { - return NewWithClaims(method, MapClaims{}) -} - -func NewWithClaims(method SigningMethod, claims Claims) *Token { - return &Token{ - Header: map[string]interface{}{ - "typ": "JWT", - "alg": method.Alg(), - }, - Claims: claims, - Method: method, - } -} - -// Get the complete, signed token -func (t *Token) SignedString(key interface{}) (string, error) { - var sig, sstr string - var err error - if sstr, err = t.SigningString(); err != nil { - return "", err - } - if sig, err = t.Method.Sign(sstr, key); err != nil { - return "", err - } - return strings.Join([]string{sstr, sig}, "."), nil -} - -// Generate the signing string. This is the -// most expensive part of the whole deal. Unless you -// need this for something special, just go straight for -// the SignedString. -func (t *Token) SigningString() (string, error) { - var err error - parts := make([]string, 2) - for i, _ := range parts { - var jsonValue []byte - if i == 0 { - if jsonValue, err = json.Marshal(t.Header); err != nil { - return "", err - } - } else { - if jsonValue, err = json.Marshal(t.Claims); err != nil { - return "", err - } - } - - parts[i] = EncodeSegment(jsonValue) - } - return strings.Join(parts, "."), nil -} - -// Parse, validate, and return a token. -// keyFunc will receive the parsed token and should return the key for validating. -// If everything is kosher, err will be nil -func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { - return new(Parser).Parse(tokenString, keyFunc) -} - -func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { - return new(Parser).ParseWithClaims(tokenString, claims, keyFunc) -} - -// Encode JWT specific base64url encoding with padding stripped -func EncodeSegment(seg []byte) string { - return strings.TrimRight(base64.URLEncoding.EncodeToString(seg), "=") -} - -// Decode JWT specific base64url encoding with padding stripped -func DecodeSegment(seg string) ([]byte, error) { - if l := len(seg) % 4; l > 0 { - seg += strings.Repeat("=", 4-l) - } - - return base64.URLEncoding.DecodeString(seg) -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.gitignore b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.gitignore deleted file mode 100644 index 4515a83c1af..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -.idea/ \ No newline at end of file diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.travis.yml b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.travis.yml deleted file mode 100644 index 175f994c764..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This is a weird way of telling Travis to use the fast container-based test -# runner instead of the slow VM-based runner. -sudo: false - -language: go - - -go: - - 1.10.x - -# Only clone the most recent commit. -git: - depth: 1 - - -install: true - -# Don't email me the results of the test runs. -notifications: - email: false - -# Anything in before_script that returns a nonzero exit code will flunk the -# build and immediately stop. It's sorta like having set -e enabled in bash. -# Make sure golangci-lint is vendored by running -# dep ensure -add github.com/golangci/golangci-lint/cmd/golangci-lint -# ...and adding this to your Gopkg.toml file. -# required = ["github.com/golangci/golangci-lint/cmd/golangci-lint"] -before_script: -# - go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint - -# script always runs to completion (set +e). If we have linter issues AND a -# failing test, we want to see both. Configure golangci-lint with a -# .golangci.yml file at the top level of your repo. -script: -# - golangci-lint run # run a bunch of code checkers/linters in parallel - - go test -v -race ./... # Run all the tests with the race detector enabled \ No newline at end of file diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.lock b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.lock deleted file mode 100644 index 27b8c7145da..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.lock +++ /dev/null @@ -1,16 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:b1888d094847a5198b91d76a299e45c2c8debe9f9b9eb9a6e7b1dc7ec2a27513" - name = "github.com/gorilla/websocket" - packages = ["."] - pruneopts = "UT" - revision = "361d4c0ffd78338ebe0a9e6320cdbe115d7dc026" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = ["github.com/gorilla/websocket"] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.toml b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.toml deleted file mode 100644 index ecc97fe43a9..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/Gopkg.toml +++ /dev/null @@ -1,7 +0,0 @@ -[[override]] - name = "github.com/gorilla/websocket" - revision = "361d4c0ffd78338ebe0a9e6320cdbe115d7dc026" - -[prune] - go-tests = true - unused-packages = true diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/LICENSE b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/LICENSE deleted file mode 100644 index e48e0963459..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/LICENSE +++ /dev/null @@ -1,277 +0,0 @@ -Eclipse Public License - v 2.0 - - THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE - PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION - OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial content - Distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - i) changes to the Program, and - ii) additions to the Program; - where such changes and/or additions to the Program originate from - and are Distributed by that particular Contributor. A Contribution - "originates" from a Contributor if it was added to the Program by - such Contributor itself or anyone acting on such Contributor's behalf. - Contributions do not include changes or additions to the Program that - are not Modified Works. - -"Contributor" means any person or entity that Distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which -are necessarily infringed by the use or sale of its Contribution alone -or when combined with the Program. - -"Program" means the Contributions Distributed in accordance with this -Agreement. - -"Recipient" means anyone who receives the Program under this Agreement -or any Secondary License (as applicable), including Contributors. - -"Derivative Works" shall mean any work, whether in Source Code or other -form, that is based on (or derived from) the Program and for which the -editorial revisions, annotations, elaborations, or other modifications -represent, as a whole, an original work of authorship. - -"Modified Works" shall mean any work in Source Code or other form that -results from an addition to, deletion from, or modification of the -contents of the Program, including, for purposes of clarity any new file -in Source Code form that contains any contents of the Program. Modified -Works shall not include works that contain only declarations, -interfaces, types, classes, structures, or files of the Program solely -in each case in order to link to, bind by name, or subclass the Program -or Modified Works thereof. - -"Distribute" means the acts of a) distributing or b) making available -in any manner that enables the transfer of a copy. - -"Source Code" means the form of a Program preferred for making -modifications, including but not limited to software source code, -documentation source, and configuration files. - -"Secondary License" means either the GNU General Public License, -Version 2.0, or any later versions of that license, including any -exceptions or additional permissions as identified by the initial -Contributor. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare Derivative Works of, publicly display, - publicly perform, Distribute and sublicense the Contribution of such - Contributor, if any, and such Derivative Works. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in Source Code or other form. This patent license shall - apply to the combination of the Contribution and the Program if, at - the time the Contribution is added by the Contributor, such addition - of the Contribution causes such combination to be covered by the - Licensed Patents. The patent license shall not apply to any other - combinations which include the Contribution. No hardware per se is - licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. - Each Contributor disclaims any liability to Recipient for claims - brought by any other entity based on infringement of intellectual - property rights or otherwise. As a condition to exercising the - rights and licenses granted hereunder, each Recipient hereby - assumes sole responsibility to secure any other intellectual - property rights needed, if any. For example, if a third party - patent license is required to allow Recipient to Distribute the - Program, it is Recipient's responsibility to acquire that license - before distributing the Program. - - d) Each Contributor represents that to its knowledge it has - sufficient copyright rights in its Contribution, if any, to grant - the copyright license set forth in this Agreement. - - e) Notwithstanding the terms of any Secondary License, no - Contributor makes additional grants to any Recipient (other than - those set forth in this Agreement) as a result of such Recipient's - receipt of the Program under the terms of a Secondary License - (if permitted under the terms of Section 3). - -3. REQUIREMENTS - -3.1 If a Contributor Distributes the Program in any form, then: - - a) the Program must also be made available as Source Code, in - accordance with section 3.2, and the Contributor must accompany - the Program with a statement that the Source Code for the Program - is available under this Agreement, and informs Recipients how to - obtain it in a reasonable manner on or through a medium customarily - used for software exchange; and - - b) the Contributor may Distribute the Program under a license - different than this Agreement, provided that such license: - i) effectively disclaims on behalf of all other Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all other Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) does not attempt to limit or alter the recipients' rights - in the Source Code under section 3.2; and - - iv) requires any subsequent distribution of the Program by any - party to be under a license that satisfies the requirements - of this section 3. - -3.2 When the Program is Distributed as Source Code: - - a) it must be made available under this Agreement, or if the - Program (i) is combined with other material in a separate file or - files made available under a Secondary License, and (ii) the initial - Contributor attached to the Source Code the notice described in - Exhibit A of this Agreement, then the Program may be made available - under the terms of such Secondary Licenses, and - - b) a copy of this Agreement must be included with each copy of - the Program. - -3.3 Contributors may not remove or alter any copyright, patent, -trademark, attribution notices, disclaimers of warranty, or limitations -of liability ("notices") contained within the Program from any copy of -the Program which they Distribute, provided that Contributors may add -their own appropriate notices. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities -with respect to end users, business partners and the like. While this -license is intended to facilitate the commercial use of the Program, -the Contributor who includes the Program in a commercial product -offering should do so in a manner which does not create potential -liability for other Contributors. Therefore, if a Contributor includes -the Program in a commercial product offering, such Contributor -("Commercial Contributor") hereby agrees to defend and indemnify every -other Contributor ("Indemnified Contributor") against any losses, -damages and costs (collectively "Losses") arising from claims, lawsuits -and other legal actions brought by a third party against the Indemnified -Contributor to the extent caused by the acts or omissions of such -Commercial Contributor in connection with its distribution of the Program -in a commercial product offering. The obligations in this section do not -apply to any claims or Losses relating to any actual or alleged -intellectual property infringement. In order to qualify, an Indemnified -Contributor must: a) promptly notify the Commercial Contributor in -writing of such claim, and b) allow the Commercial Contributor to control, -and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may -participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance -claims and warranties are such Commercial Contributor's responsibility -alone. Under this section, the Commercial Contributor would have to -defend claims against the other Contributors related to those performance -claims and warranties, and if a court requires any other Contributor to -pay any damages as a result, the Commercial Contributor must pay -those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT -PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR -PURPOSE. Each Recipient is solely responsible for determining the -appropriateness of using and distributing the Program and assumes all -risks associated with its exercise of rights under this Agreement, -including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs -or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT -PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS -SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further -action by the parties hereto, such provision shall be reformed to the -minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other software -or hardware) infringes such Recipient's patent(s), then such Recipient's -rights granted under Section 2(b) shall terminate as of the date such -litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it -fails to comply with any of the material terms or conditions of this -Agreement and does not cure such failure in a reasonable period of -time after becoming aware of such noncompliance. If all Recipient's -rights under this Agreement terminate, Recipient agrees to cease use -and distribution of the Program as soon as reasonably practicable. -However, Recipient's obligations under this Agreement and any licenses -granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, -but in order to avoid inconsistency the Agreement is copyrighted and -may only be modified in the following manner. The Agreement Steward -reserves the right to publish new versions (including revisions) of -this Agreement from time to time. No one other than the Agreement -Steward has the right to modify this Agreement. The Eclipse Foundation -is the initial Agreement Steward. The Eclipse Foundation may assign the -responsibility to serve as the Agreement Steward to a suitable separate -entity. Each new version of the Agreement will be given a distinguishing -version number. The Program (including Contributions) may always be -Distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to Distribute the Program (including its -Contributions) under the new version. - -Except as expressly stated in Sections 2(a) and 2(b) above, Recipient -receives no rights or licenses to the intellectual property of any -Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted -under this Agreement are reserved. Nothing in this Agreement is intended -to be enforceable by any entity that is not a Contributor or Recipient. -No third-party beneficiary rights are created under this Agreement. - -Exhibit A - Form of Secondary Licenses Notice - -"This Source Code may also be made available under the following -Secondary Licenses when the conditions for such availability set forth -in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), -version(s), and exceptions or additional permissions here}." - - Simply including a copy of this Agreement, including this Exhibit A - is not sufficient to license the Source Code under Secondary Licenses. - - If it is not possible or desirable to put the notice in a particular - file, then You may include the notice in a location (such as a LICENSE - file in a relevant directory) where a recipient would be likely to - look for such a notice. - - You may add additional accurate notices of copyright ownership. diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/README.md b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/README.md deleted file mode 100644 index 729626e22ee..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/README.md +++ /dev/null @@ -1,32 +0,0 @@ -Websocket API ---- -[JSON RPC 2.0](http://www.jsonrpc.org/specification) protocol is used for client-server -communication, but: -- `params` is always json object(never array) -- server to client notifications are treated as Events - -the apis include some of the following fields: -```json -{ - "jsonrpc" : "2.0", - "method": "...", - "id": "...", - "params": { }, - "error" : { }, - "result" : { } -} -``` - these fields are part of the protocol so they are not documented. - - - -##### Websocket messages order - -The order is respected -``` -Message fragments MUST be delivered to the recipient in the order sent by the sender. -``` -Helpful Sources -* https://tools.ietf.org/html/rfc6455 (search the sentence above) -* http://stackoverflow.com/questions/11804721/can-websocket-messages-arrive-out-of-order -* http://stackoverflow.com/questions/14287224/processing-websockets-messages-in-order-of-receiving diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/event/event.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/event/event.go deleted file mode 100644 index e70a1e320c4..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/event/event.go +++ /dev/null @@ -1,155 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package event provides lightweight primitives for event-bus-consumer communication. -package event - -import "sync" - -// E is an interface for event. -// Only instances of this interface can be published in Bus. -type E interface { - - // Type returns a type of this event. - // Bus uses returned type to retrieve and notify consumers. - Type() string -} - -// Consumer is an interface for event handlers. -type Consumer interface { - - // Accept handles given event. - Accept(event E) -} - -// TmpConsumer allows consumer to be removed from bus each time after accept. -// Accept is called at least once for such consumers. -type TmpConsumer interface { - Consumer - - // IsDone called by bus after accept, if func returns true - // this consumer will be removed from bus. - IsDone() bool -} - -// Bus is a event-consumer communication layer. -// It manages events publications and handling, its synchronous -// and safe to use from multiple goroutines. -// Use NewBus() func to get an instance of it. -type Bus struct { - sync.RWMutex - consumers map[string][]Consumer -} - -// ConsumerF is a function which is also consumer, -// allows to use anonymous functions as consumers. -type ConsumerF func(event E) - -// Accept calls consumer function passing event to it. -func (f ConsumerF) Accept(event E) { f(event) } - -// NewBus creates a new bus. -func NewBus() *Bus { - return &Bus{consumers: make(map[string][]Consumer)} -} - -// Pub publishes an event to the interested consumers. -func (bus *Bus) Pub(e E) { - bus.RLock() - consumers, ok := bus.consumers[e.Type()] - bus.RUnlock() - - if ok { - for _, v := range consumers { - v.Accept(e) - if tmpCons, ok := v.(TmpConsumer); ok && tmpCons.IsDone() { - bus.Rm(tmpCons) - } - } - } -} - -// Sub subscribes to the events of given type so -// given consumer will receive them. -func (bus *Bus) Sub(consumer Consumer, eType string) { - bus.Lock() - defer bus.Unlock() - bus.consumers[eType] = append(bus.copyConsumers(eType), consumer) -} - -// SubAny does the same as Sub func, but for multiple event types. -func (bus *Bus) SubAny(consumer Consumer, types ...string) { - bus.Lock() - defer bus.Unlock() - for _, t := range types { - bus.consumers[t] = append(bus.copyConsumers(t), consumer) - } -} - -// Rm removes given consumer from the bus, == operator is used -// to determine what elements should be removed. -// Returns true if consumer is removed. -func (bus *Bus) Rm(consumer Consumer) bool { - return bus.RmIf(func(c Consumer) bool { return c == consumer }) -} - -// RmIf removes consumers for which predicate func returns true. -// Returns true if any consumer was removed. -func (bus *Bus) RmIf(predicate func(c Consumer) bool) bool { - bus.Lock() - defer bus.Unlock() - ok := false - for _type, candidates := range bus.consumers { - for idx, candidate := range candidates { - if predicate(candidate) { - bus.rm(_type, idx) - ok = true - } - } - } - return ok -} - -// Clear assigns new map value to bus consumers and returns old ones. -// The modification of returned map won't affect bus consumers. -func (bus *Bus) Clear() map[string][]Consumer { - bus.Lock() - defer bus.Unlock() - tmp := bus.consumers - bus.consumers = make(map[string][]Consumer) - return tmp -} - -// Removes consumer subscribed to a given type and placed at a -// given index. If it is the last consumer then the whole slice is removed, -// otherwise a copy of slice is used, so concurrently publishing go-routines are not affected. -// Note that this function MUST be called within an appropriate lock. -func (bus *Bus) rm(key string, idx int) { - arr := bus.consumers[key] - if len(arr) == 1 { - delete(bus.consumers, key) - } else { - newArr := make([]Consumer, 0, len(arr)-1) - newArr = append(newArr, arr[:idx]...) - newArr = append(newArr, arr[idx+1:]...) - bus.consumers[key] = newArr - } -} - -// Returns a copy of consumers of a given event type. -// Note that this function MUST be called within an appropriate lock. -func (bus *Bus) copyConsumers(eType string) []Consumer { - consumers := bus.consumers[eType] - snapshot := make([]Consumer, len(consumers)) - copy(snapshot, consumers) - return snapshot -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/native_conn_recorder.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/native_conn_recorder.go deleted file mode 100644 index d5d478e36f5..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/native_conn_recorder.go +++ /dev/null @@ -1,236 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpctest - -import ( - "encoding/json" - "errors" - "sync" - "time" - - "github.com/eclipse/che-go-jsonrpc" -) - -// ConnRecorder is a fake connection which records all writes -// and provides functionality to push reads. -type ConnRecorder struct { - mutex *sync.Mutex - cond *sync.Cond - capturedWrites [][]byte - nextChan chan []byte - closed bool -} - -// NewConnRecorder returns a new conn recorder. -func NewConnRecorder() *ConnRecorder { - mx := &sync.Mutex{} - return &ConnRecorder{ - mutex: mx, - cond: sync.NewCond(mx), - capturedWrites: make([][]byte, 0), - nextChan: make(chan []byte), - } -} - -// NativeConnWaitPredicate is used to wait on recorder until the condition -// behind this predicate is met. -type NativeConnWaitPredicate func(recorder *ConnRecorder) bool - -// WriteCalledAtLeast is a predicate that allows to wait until write is called at -// least given number of times. -func WriteCalledAtLeast(times int) NativeConnWaitPredicate { - return func(recorder *ConnRecorder) bool { - return len(recorder.capturedWrites) >= times - } -} - -// ReqSent is a predicate that waits until a given method is requested. -func ReqSent(method string) NativeConnWaitPredicate { - return func(recorder *ConnRecorder) bool { - wLen := len(recorder.capturedWrites) - if wLen == 0 { - return false - } - for _, v := range recorder.capturedWrites { - req := &jsonrpc.Request{} - if err := json.Unmarshal(v, req); err != nil { - return false - } - if req.Method == method { - return true - } - } - return false - } -} - -// Get returns bytes which were wrote (idx+1)th to this connection. -func (recorder *ConnRecorder) Get(idx int) []byte { - return recorder.capturedWrites[idx] -} - -// GetAll returns all captured writes. -func (recorder *ConnRecorder) GetAll() [][]byte { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - cp := make([][]byte, len(recorder.capturedWrites)) - copy(cp, recorder.capturedWrites) - return cp -} - -// CloseAfter closes this request after specified timeout. -func (recorder *ConnRecorder) CloseAfter(dur time.Duration) { - go func() { - <-time.NewTimer(dur).C - recorder.Close() - }() -} - -// Unmarshal parses bytes wrote (idx+1)th and applies it on given value. -func (recorder *ConnRecorder) Unmarshal(idx int, v interface{}) error { - return json.Unmarshal(recorder.Get(idx), v) -} - -// GetRequest gets bytes wrote (idx+1)th and unmarshals them as *jsonrpc.Request. -func (recorder *ConnRecorder) GetRequest(idx int) (*jsonrpc.Request, error) { - req := &jsonrpc.Request{} - err := recorder.Unmarshal(idx, req) - return req, err -} - -// GetAllRequests goes through all captured data tries to unmarshal it -// to the requests and then returns the result. -// Result will contains only those requests which method is different from "". -func (recorder *ConnRecorder) GetAllRequests() ([]*jsonrpc.Request, error) { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - res := make([]*jsonrpc.Request, 0) - for _, v := range recorder.capturedWrites { - req := &jsonrpc.Request{} - err := json.Unmarshal(v, req) - if err != nil { - return nil, err - } - if req.Method != "" { - res = append(res, req) - } - } - return res, nil -} - -// GetResponse gets bytes wrote (idx+1)th and unmarshals them as *jsonrpc.Response. -func (recorder *ConnRecorder) GetResponse(idx int) (*jsonrpc.Response, error) { - resp := &jsonrpc.Response{} - err := recorder.Unmarshal(idx, resp) - if floatID, ok := resp.ID.(float64); ok { - resp.ID = int(floatID) - } - return resp, err -} - -// UnmarshalResponseResult unmarshals response.Result wrote (idx+1)th to a given value. -func (recorder *ConnRecorder) UnmarshalResponseResult(idx int, v interface{}) error { - resp, err := recorder.GetResponse(idx) - if err != nil { - return err - } - return json.Unmarshal(resp.Result, v) -} - -// UnmarshalRequestParams unmarshals request.Params wrote (idx+1)th to a given value. -func (recorder *ConnRecorder) UnmarshalRequestParams(idx int, v interface{}) error { - req, err := recorder.GetRequest(idx) - if err != nil { - return err - } - return json.Unmarshal(req.Params, &v) -} - -// WaitUntil waits until either recorder is closed or predicate returned true, -// if closed before predicate condition is met, error is returned. -func (recorder *ConnRecorder) WaitUntil(p NativeConnWaitPredicate) error { - recorder.cond.L.Lock() - for { - if recorder.closed { - recorder.cond.L.Unlock() - return errors.New("Closed before condition met") - } - if p(recorder) { - recorder.cond.L.Unlock() - return nil - } - recorder.cond.Wait() - } - recorder.cond.L.Unlock() - return nil -} - -// PushNextRaw pushes marshaled -// data to the read channel, so if Next() is called the data is returned. -func (recorder *ConnRecorder) PushNextRaw(data []byte) { - recorder.nextChan <- data -} - -// PushNext marshals a given value to json and -// pushes marshaled data to the read channel as PushNextRaw func does. -func (recorder *ConnRecorder) PushNext(v interface{}) error { - marshaled, err := json.Marshal(v) - if err != nil { - return err - } - recorder.PushNextRaw(marshaled) - return nil -} - -// PushNextReq marshals a given method and params as requests and pushes it using PushNextRaw. -func (recorder *ConnRecorder) PushNextReq(method string, params interface{}) error { - marshaledParams, err := json.Marshal(params) - if err != nil { - return err - } - return recorder.PushNext(&jsonrpc.Request{ - ID: "test", - Method: method, - Params: marshaledParams, - }) -} - -// Write captures given bytes. -func (recorder *ConnRecorder) Write(body []byte) error { - recorder.mutex.Lock() - recorder.capturedWrites = append(recorder.capturedWrites, body) - recorder.cond.Broadcast() - recorder.mutex.Unlock() - return nil -} - -// Next returns bytes pushed by one of Push* functions. -func (recorder *ConnRecorder) Next() ([]byte, error) { - data, ok := <-recorder.nextChan - if !ok { - return nil, jsonrpc.NewCloseError(errors.New("Closed")) - } - return data, nil -} - -// Close closes this recorder, so all the waiters wake up and receive an error. -func (recorder *ConnRecorder) Close() error { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - if !recorder.closed { - recorder.closed = true - recorder.cond.Broadcast() - close(recorder.nextChan) - } - return nil -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/recording_request_dispatcher.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/recording_request_dispatcher.go deleted file mode 100644 index 523fb84d4cd..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/recording_request_dispatcher.go +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpctest - -import ( - "errors" - "sync" - "time" - - "github.com/eclipse/che-go-jsonrpc" -) - -// ReqRecorder helps to catch/record jsonrpc.Tunnel incoming requests. -type ReqRecorder struct { - mutex *sync.Mutex - cond *sync.Cond - closed bool - requests []*reqPair -} - -// NewReqRecorder creates a new recorder. -func NewReqRecorder() *ReqRecorder { - mx := &sync.Mutex{} - return &ReqRecorder{ - mutex: mx, - cond: sync.NewCond(mx), - closed: false, - requests: make([]*reqPair, 0), - } -} - -// ReqRecorderWaitPredicate is used to wait on recorder until the condition -// behind this predicate is met. -type ReqRecorderWaitPredicate func(req *ReqRecorder) bool - -// ResponseArrivedAtLeast is a predicate that allows to wait until write is called at -// least given number of times. -func ResponseArrivedAtLeast(times int) ReqRecorderWaitPredicate { - return func(recorder *ReqRecorder) bool { - return len(recorder.requests) >= times - } -} - -// WaitUntil waits until either recorder is closed or predicate returned true, -// if closed before predicate returned true, error is returned. -func (recorder *ReqRecorder) WaitUntil(p ReqRecorderWaitPredicate) error { - recorder.cond.L.Lock() - for { - if recorder.closed { - recorder.cond.L.Unlock() - return errors.New("Closed before condition is met") - } - if p(recorder) { - recorder.cond.L.Unlock() - return nil - } - recorder.cond.Wait() - } - recorder.cond.L.Unlock() - return nil -} - -// CloseAfter closes this request after specified timeout. -func (recorder *ReqRecorder) CloseAfter(dur time.Duration) { - go func() { - <-time.NewTimer(dur).C - recorder.Close() - }() -} - -// FindHandler returns this recorder. -func (recorder *ReqRecorder) FindHandler(method string) (jsonrpc.MethodHandler, bool) { - return recorder, true -} - -// Unmarshal returns given params. -func (recorder *ReqRecorder) Unmarshal(params []byte) (interface{}, error) { - return params, nil -} - -// Call records a call of method handler. -func (recorder *ReqRecorder) Call(tun *jsonrpc.Tunnel, params interface{}, rt jsonrpc.RespTransmitter) { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - if byteParams, ok := params.([]byte); ok { - recorder.requests = append(recorder.requests, &reqPair{ - request: &jsonrpc.Request{ - Params: byteParams, - }, - transmitter: rt, - }) - recorder.cond.Broadcast() - } -} - -// Get returns request + response transmitter which were caught (idx+1)th. -func (recorder *ReqRecorder) Get(idx int) (*jsonrpc.Request, jsonrpc.RespTransmitter) { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - pair := recorder.requests[idx] - return pair.request, pair.transmitter -} - -// Close closes this recorder all waiters will be notified about close -// and WaitUntil will return errors for them. -func (recorder *ReqRecorder) Close() { - recorder.mutex.Lock() - defer recorder.mutex.Unlock() - if !recorder.closed { - recorder.closed = true - recorder.cond.Broadcast() - } -} - -type reqPair struct { - request *jsonrpc.Request - transmitter jsonrpc.RespTransmitter -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/tunnel.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/tunnel.go deleted file mode 100644 index 8b1014e45ac..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpctest/tunnel.go +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpctest - -import ( - "time" - - "github.com/eclipse/che-go-jsonrpc" -) - -// NewTmpTunnel creates a new running jsonrpc.Tunnel based on test connection -// and test request dispatcher which will be automatically closed after specified timeout. -func NewTmpTunnel(t time.Duration) (*jsonrpc.Tunnel, *ConnRecorder, *ReqRecorder) { - connRecorder := NewConnRecorder() - connRecorder.CloseAfter(t) - reqRecorder := NewReqRecorder() - reqRecorder.CloseAfter(t) - tunnel := jsonrpc.NewTunnel(connRecorder, reqRecorder) - tunnel.Go() - return tunnel, connRecorder, reqRecorder -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpcws/jsonrpc_impl.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpcws/jsonrpc_impl.go deleted file mode 100644 index 2883f8d78ab..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/jsonrpcws/jsonrpc_impl.go +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package jsonrpcws provides implementation of jsonrpc.NativeConn based on websocket. -// -// The example: -// -// Client: -// conn, err := jsonrpcws.Dial("ws://host:port/path", token123456798) -// if err != nil { -// panic(err) -// } -// tunnel := jsonrpc.NewTunnel(conn, jsonrpc.DefaultRouter) -// tunnel.Go() -// tunnel.SayHello() -// -// Server: -// conn, err := jsonrpcws.Upgrade(w, r) -// if err != nil { -// panic(err) -// } -// tunnel := jsonrpc.NewTunnel(conn, jsonrpc.DefaultRouter) -// tunnel.Go() -// tunnel.SayHello() -package jsonrpcws - -import ( - "net/http" - - "github.com/gorilla/websocket" - "github.com/eclipse/che-go-jsonrpc" -) - -var ( - // default upgrader that is used for upgrading http connection to WebSocket - // may be changed by client if custom settings are needed - DefaultUpgrader = &websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024, - CheckOrigin: func(r *http.Request) bool { - return true - }, - } - - // default dialer that is used for WebSocket connection establishing - // may be changed by client if custom settings are needed - DefaultDialer = websocket.DefaultDialer -) - -// Dial establishes a new client WebSocket connection. -// If argument 'token' is empty authentication won't be used, -// otherwise authorization token will be added. -func Dial(url string, token string) (*NativeConnAdapter, error) { - var headers http.Header - if token != "" { - headers = make(map[string][]string) - headers.Add("Authorization", token) - } - conn, _, err := DefaultDialer.Dial(url, headers) - if err != nil { - return nil, err - } - return &NativeConnAdapter{conn: conn}, nil -} - -// Upgrade upgrades http connection to WebSocket connection. -func Upgrade(w http.ResponseWriter, r *http.Request) (*NativeConnAdapter, error) { - conn, err := DefaultUpgrader.Upgrade(w, r, nil) - if err != nil { - return nil, err - } - return &NativeConnAdapter{RequestURI: r.RequestURI, conn: conn}, nil -} - -// NativeConnAdapter adapts WebSocket connection to jsonrpc.NativeConn. -type NativeConnAdapter struct { - - // RequestURI is http.Request URI which is set on connection Upgrade. - RequestURI string - - // A real websocket connection. - conn *websocket.Conn -} - -// Write writes text message to the WebSocket connection. -func (adapter *NativeConnAdapter) Write(data []byte) error { - return adapter.conn.WriteMessage(websocket.TextMessage, data) -} - -// Next reads next text message from the WebSocket connection. -func (adapter *NativeConnAdapter) Next() ([]byte, error) { - for { - mType, data, err := adapter.conn.ReadMessage() - if err != nil { - if closeErr, ok := err.(*websocket.CloseError); ok { - return nil, jsonrpc.NewCloseError(closeErr) - } - return nil, err - } - if mType == websocket.TextMessage { - return data, nil - } - } -} - -// Close closes this connection. -func (adapter *NativeConnAdapter) Close() error { - err := adapter.conn.Close() - if closeErr, ok := err.(*websocket.CloseError); ok && isNormallyClosed(closeErr.Code) { - return nil - } - return err -} - -func isNormallyClosed(code int) bool { - return code == websocket.CloseGoingAway || - code == websocket.CloseNormalClosure || - code == websocket.CloseNoStatusReceived -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/model.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/model.go deleted file mode 100644 index 487fcf5dc47..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/model.go +++ /dev/null @@ -1,162 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -// Package jsonrpc provides lightweight implementation of JSONRPC 2.0 protocol. -// See http://www.jsonrpc.org/specification. -// -// - the implementation does not support 'Batch' operations. -// - the implementation supports 2.0 version only. -// - the implementation uses 2.0 version for those requests that do not specify the version. -package jsonrpc - -import ( - "encoding/json" - "fmt" -) - -const ( - // ParseErrorCode indicates that invalid JSON was received by the server. - ParseErrorCode = -32700 - - // InvalidRequestErrorCode indicates that request object is not valid, - // fails when route decoder can't decode params. - InvalidRequestErrorCode = -32600 - - // MethodNotFoundErrorCode indicates that there is no route for such method. - MethodNotFoundErrorCode = -32601 - - // InvalidParamsErrorCode indicates that handler parameters are considered as not valid. - // This error type should be returned directly from the Handle - InvalidParamsErrorCode = -32602 - - // InternalErrorCode is returned when error returned from the Route Handle is different from Error type. - InternalErrorCode = -32603 - - // TimeoutErrorCode is returned when timeout is reached where response should arrive. - TimeoutErrorCode = -32001 - - // -32000 to -32099 Reserved for implementation-defined server-errors. -) - -// Request is the identified call of the method. -// Server MUST eventually reply on the response and include -// the same identifier value as the request provides. -// -// Request without id is Notification. -// Server MUST NOT reply to Notification. -type Request struct { - - // Version of this request e.g. '2.0'. - // - // The version field is required. - Version string `json:"jsonrpc"` - - // Method is the name which will be proceeded by this request. - // - // Must not start with "rpc" + (U+002E or ASCII 46), such methods are - // reserved for rpc internal methods and extensions. - // - // The method field is required. - Method string `json:"method"` - - // The unique identifier of this operation request. - // If a client needs to identify the result of the operation execution, - // the id should be passed by the client, then it is guaranteed - // that the client will receive the result frame with the same id. - // The uniqueness of the identifier must be controlled by the client, - // if client doesn't specify the identifier in the operation call, - // the response won't contain the identifier as well. - // - // It is preferable to specify identifier for those calls which may - // either validate data, or produce such information which can't be - // identified by itself. - // - // If id is set then the object is Request otherwise it's Notification. - ID interface{} `json:"id,omitempty"` - - // Params parameters which are needed for operation execution. - // Params are either json array or json object, for json objects - // names of the parameters are case sensitive. - // - // The params field is optional. - Params json.RawMessage `json:"params"` -} - -// IsNotification tests if this request is notification(id is not set). -func (r *Request) IsNotification() bool { - if r.ID == nil { - return true - } else if id, ok := r.ID.(string); ok { - return id == "" - } else if id, ok := r.ID.(int); ok { - return id == 0 - } - return false -} - -// Response is a reply on a certain request, which represents the result -// of the certain operation execution. -// Response MUST provide the same identifier as the request which forced it. -type Response struct { - - // Version of this response e.g. '2.0'. - // The version is required. - Version string `json:"jsonrpc"` - - // The operation call identifier, will be set only - // if the operation contains it. - ID interface{} `json:"id,omitempty"` - - // Result is the result of the method call. - // Result can be anything determined by the operation(method). - // Result and Error are mutually exclusive. - Result json.RawMessage `json:"result,omitempty"` - - // Result and Error are mutually exclusive. - // Present only if the operation execution fails due to an error. - Error *Error `json:"error,omitempty"` -} - -// Error indicates any exceptional situation during operation execution, -// e.g an attempt to perform operation using invalid data. -type Error struct { - error `json:"-"` - - // Code is the value indicating the certain error type. - Code int `json:"code"` - - // Message is the description of this error. - Message string `json:"message"` - - // Data any kind of data which provides additional - // information about the error e.g. stack trace, error time. - Data json.RawMessage `json:"data,omitempty"` -} - -// NewArgsError creates error object from provided error and sets error code InvalidParamsErrorCode. -func NewArgsError(err error) *Error { - return NewError(InvalidParamsErrorCode, err) -} - -// NewError creates an error from the given error and code. -func NewError(code int, err error) *Error { - return &Error{ - error: err, - Code: code, - Message: err.Error(), - } -} - -// NewErrorf creates an error from the given code and formatted message. -func NewErrorf(code int, format string, args ...interface{}) *Error { - return NewError(code, fmt.Errorf(format, args...)) -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/registry.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/registry.go deleted file mode 100644 index 374c48befef..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/registry.go +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpc - -import "sync" - -// DefaultRegistry is package registry, which is used by NewManagedTunnel. -var DefaultRegistry = NewRegistry() - -// Save saves a given tunnel is the default registry. -func Save(tun *Tunnel) { - DefaultRegistry.Save(tun) -} - -// Rm removes a given tunnel from the default registry. -func Rm(id string) (*Tunnel, bool) { - return DefaultRegistry.Rm(id) -} - -// GetTunnels gets tunnels managed by default registry. -func GetTunnels() []*Tunnel { - return DefaultRegistry.GetTunnels() -} - -// Get gets a single tunnel managed by default registry. -func Get(id string) (*Tunnel, bool) { - return DefaultRegistry.Get(id) -} - -// TunnelRegistry is a simple storage for tunnels. -type TunnelRegistry struct { - sync.RWMutex - tunnels map[string]*Tunnel -} - -// NewRegistry creates a new registry. -func NewRegistry() *TunnelRegistry { - return &TunnelRegistry{tunnels: make(map[string]*Tunnel)} -} - -// Save saves a tunnel with a given id in this registry, overrides existing one. -func (reg *TunnelRegistry) Save(tunnel *Tunnel) { - reg.Lock() - defer reg.Unlock() - reg.tunnels[tunnel.id] = tunnel -} - -// Rm removes tunnel with given id from the registry. -func (reg *TunnelRegistry) Rm(id string) (*Tunnel, bool) { - reg.Lock() - defer reg.Unlock() - tun, ok := reg.tunnels[id] - if ok { - delete(reg.tunnels, id) - } - return tun, ok -} - -// GetTunnels returns all the tunnels which the registry keeps. -func (reg *TunnelRegistry) GetTunnels() []*Tunnel { - reg.RLock() - defer reg.RUnlock() - tunnels := make([]*Tunnel, 0) - for _, v := range reg.tunnels { - tunnels = append(tunnels, v) - } - return tunnels -} - -// Get returns tunnel with a given id. -func (reg *TunnelRegistry) Get(id string) (*Tunnel, bool) { - reg.RLock() - defer reg.RUnlock() - tun, ok := reg.tunnels[id] - return tun, ok -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/route.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/route.go deleted file mode 100644 index dbeb20401e5..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/route.go +++ /dev/null @@ -1,163 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpc - -import ( - "encoding/json" - "log" - "sync" -) - -// DefaultRouter is a default package router. -// It might be used as tunnels request handler. -var DefaultRouter = NewRouter() - -// RegRoute registers route using package DefaultRouter. -func RegRoute(r Route) { DefaultRouter.Register(r) } - -// RegRoutesGroup registers routes group using package DefaultRouter. -func RegRoutesGroup(rg RoutesGroup) { DefaultRouter.RegisterGroup(rg) } - -// RegRoutesGroups registers routes groups using package DefaultRouter. -func RegRoutesGroups(rgs []RoutesGroup) { DefaultRouter.RegisterGroups(rgs) } - -// DecodeFunc used to decode route params for forth handling by HandleFunc. -type DecodeFunc func(body []byte) (interface{}, error) - -// HandleFunc used to handle route request. -type HandleFunc func(tun *Tunnel, params interface{}, t RespTransmitter) - -// Route defines named operation and its handler. -type Route struct { - - // Method is the operation name like defined by Request.Method. - Method string - - // Decode used for decoding raw request parameters - // into the certain object. If decoding is okay, then - // decoded value will be passed to the Handle - // of this request route, so it is up to the route - // - to define type safe couple of Decode & Handle. - Decode DecodeFunc - - // Handle handler for decoded request parameters. - // If handler function can't perform the operation then - // handler function should either return an error, or - // send it directly within transmitter#SendError func. - // Params is a value returned from the Decode. - Handle HandleFunc -} - -// FactoryDec uses given function to get an instance of object -// and then unmarshal params json into that object. -// The result of this function can be used as Route.Decode function. -func FactoryDec(create func() interface{}) DecodeFunc { - return func(body []byte) (interface{}, error) { - v := create() - if err := json.Unmarshal(body, &v); err != nil { - return nil, err - } - return v, nil - } -} - -// HandleRet converts handle function without transmitter to the HandleFunc. -// Returned values will be sent with transmitter. -func HandleRet(f func(tun *Tunnel, params interface{}) (interface{}, error)) HandleFunc { - return func(tun *Tunnel, params interface{}, t RespTransmitter) { - if res, err := f(tun, params); err == nil { - t.Send(res) - } else { - t.SendError(asJSONRPCErr(err)) - } - } -} - -// Unmarshal unpacks raw request params using route.Decode. -func (r Route) Unmarshal(params []byte) (interface{}, error) { - if r.Decode == nil { - return nil, nil - } - return r.Decode(params) -} - -// Call handles request using Route.Handle. -func (r Route) Call(tun *Tunnel, params interface{}, rt RespTransmitter) { r.Handle(tun, params, rt) } - -// RoutesGroup is named group of rpc routes. -type RoutesGroup struct { - - // Name is the name of this group. - Name string - - // Items routes. - Items []Route -} - -// Router is a simple request dispatcher. -type Router struct { - mutex sync.RWMutex - routes map[string]Route -} - -// NewRouter returns a new router. -func NewRouter() *Router { - return &Router{routes: make(map[string]Route)} -} - -// Register registers a new route in this router. -func (r *Router) Register(route Route) { - r.mutex.Lock() - defer r.mutex.Unlock() - r.routes[route.Method] = route -} - -// RegisterGroup registers a whole routes group. -func (r *Router) RegisterGroup(group RoutesGroup) { - for _, route := range group.Items { - r.Register(route) - } -} - -// RegisterGroups registers -func (r *Router) RegisterGroups(groups []RoutesGroup) { - for _, group := range groups { - r.RegisterGroup(group) - } -} - -// FindHandler finds a route for a given method. -func (r *Router) FindHandler(method string) (MethodHandler, bool) { - r.mutex.RLock() - defer r.mutex.RUnlock() - route, ok := r.routes[method] - return route, ok -} - -// PrintRoutes prints provided rpc routes by group. -func PrintRoutes(rg []RoutesGroup) { - log.Print("⇩ Registered RPCRoutes:\n\n") - for _, group := range rg { - log.Printf("%s:\n", group.Name) - for _, route := range group.Items { - log.Printf("✓ %s\n", route.Method) - } - } -} - -func asJSONRPCErr(err error) *Error { - if rpcerr, ok := err.(*Error); ok { - return rpcerr - } - return NewError(InternalErrorCode, err) -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/transport_specific.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/transport_specific.go deleted file mode 100644 index 4102ad60f10..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/transport_specific.go +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpc - -// NativeConn provides low level interface for jsonrpc.Tunnel -// to communicate with native connection such as websocket. -type NativeConn interface { - - // Write writes bytes to the connection. - Write(body []byte) error - - // Next is blocking read of incoming messages. - // If connection is closed an error of type *jsonrpc.CloseError - // must be returned. - Next() ([]byte, error) - - // Closes this connection. - Close() error -} - -// CloseError is an error which MUST be -// published by NativeConn implementations and used to determine -// the cases when tunnel job should be stopped. -type CloseError struct{ error } - -// NewCloseError creates a new close error based on a given error. -func NewCloseError(err error) *CloseError { - return &CloseError{error: err} -} diff --git a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/tunnel.go b/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/tunnel.go deleted file mode 100644 index 6fedfac0bb7..00000000000 --- a/agents/go-agents/vendor/github.com/eclipse/che-go-jsonrpc/tunnel.go +++ /dev/null @@ -1,594 +0,0 @@ -// -// Copyright (c) 2012-2018 Red Hat, Inc. -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// -// Contributors: -// Red Hat, Inc. - initial API and implementation -// - -package jsonrpc - -import ( - "encoding/json" - "errors" - "fmt" - "log" - "strconv" - "sync" - "sync/atomic" - "time" -) - -const ( - // DefaultVersion is a version which is used by this package - // for all the types of sent/received data. - DefaultVersion = "2.0" - - // ConnectedNotificationMethodName notification sent by Tunnel.SayHello(). - ConnectedNotificationMethodName = "connected" - - // DefaultAllowedResponseDelay is allowed time for reply to be sent. - // RespTransmitter waits for MethodHandler to respond to the request - // or replies with timeout error if timeout is reached. - // The value is experimental. - DefaultAllowedResponseDelay = time.Minute - - // DefaultWatchQueuePeriod is how often request queue lookups requests. - // The value is experimental. - DefaultWatchQueuePeriod = time.Minute - - // DefaultMaxRequestHoldTimeout is how long a request stays in the queue - // and waits for the response to come, if reply is not made in time - // RespHandlerFunc is called with TimeoutError. - // Note that request stays in request queue from DefaultMaxRequestHoldTimeout - // to DefaultMaxRequestHoldTimeout + DefaultWatchQueuePeriod time. - DefaultMaxRequestHoldTimeout = time.Minute -) - -const ( - // The initial state of created tunnel, tunnel is not running(Go func is not called). - stateCreated = 0 - - // Go func was called on the tunnel, tunnel is running. - stateRunning = 1 - - // Tunnel is closed. Tunnel may be closed only if it was running before. - stateClosed = -1 -) - -var ( - prevTunID uint64 - prevReqID int64 -) - -// Tunnel is high level jsonrpc transport layer which -// uses native connection to access low level transport routines. -type Tunnel struct { - - // id is the unique identifier of this tunnel. - id string - - // created is the time when this tunnel was created. - created time.Time - - // conn is a native connection on which this tunnel is based. - conn NativeConn - - // Anything put to this tunnel will be packaged to json and sent to the client. - jsonOut chan interface{} - - // Helps to dispatch request to the right method handler. - reqDispatcher ReqDispatcher - - // Queue for requests. - q *requestQ - - // Helps to close the tunnel. - closer *closer - - // Keeps current state of the tunnel. - state int32 -} - -// NewTunnel creates a new tunnel. -// Use tunnel.Go() to start communication. -func NewTunnel(conn NativeConn, dispatcher ReqDispatcher) *Tunnel { - q := &requestQ{ - pairs: make(map[int64]*rqPair), - allowedResponseDelay: DefaultAllowedResponseDelay, - stop: make(chan bool, 1), - ticker: time.NewTicker(DefaultWatchQueuePeriod), - } - tunnel := &Tunnel{ - id: "tunnel-" + strconv.Itoa(int(atomic.AddUint64(&prevTunID, 1))), - created: time.Now(), - conn: conn, - jsonOut: make(chan interface{}), - reqDispatcher: dispatcher, - q: q, - state: stateCreated, - } - tunnel.closer = &closer{tunnel: tunnel, outClosed: make(chan bool, 1)} - return tunnel -} - -// NewManagedTunnel creates a new tunnel using given connection -// and DefaultRouter as request dispatcher, then the tunnel is saved -// in default registry and Go func is called. -func NewManagedTunnel(conn NativeConn) *Tunnel { - tunnel := NewTunnel(conn, DefaultRouter) - Save(tunnel) - tunnel.Go() - return tunnel -} - -// ReqDispatcher is a single handler for all the tunnel incoming requests. -// The main responsibility is to provide the right method handler for incoming request. -type ReqDispatcher interface { - - // FindHandler must return a handler for a given method and ok=true, - // if there is no such handler func must return ok=false - FindHandler(method string) (MethodHandler, bool) -} - -// RespHandleFunc used to handle requests responses. -// The request is sent by one of the Request, RequestBare methods. -// If the response doesn't arrive in time the handler func will be called -// with an error with code TimeoutErrorCode. -type RespHandleFunc func(result []byte, err *Error) - -// MethodHandler handles a certain method. -// First raw request parameters are decoded using Unmarshal function -// and then if call returned no error handle is called. -type MethodHandler interface { - - // Unmarshal decodes request raw request parameters - // e.g. parses json and returns instance of structured params. - // If the handler does not need parameters - (nil, nil) should be returned. - // If returned error is different from nil Call is not executed. - Unmarshal(params []byte) (interface{}, error) - - // Call calls handler of this request. - // If no Send method is called on response transmitter instance - // timeout error reply will be sent, unless request is notification. - Call(tun *Tunnel, params interface{}, rt RespTransmitter) -} - -// RespTransmitter provides interface which allows to respond to request from any method handler. -// The implementation must guarantee that reply will be eventually sent -// for those requests which are not notifications. -// Functions Send & SendError MUST not be called both or twice on the same -// instance of transmitter. The request id MUST be included to the response. -type RespTransmitter interface { - - // Send sends jsonrpc response with a given result in body. - // This function can be called only once on one transmitter instance. - Send(result interface{}) - - // SendError sends jsonrpc response with a given error in body. - // This function can be called only once on one transmitter instance. - SendError(err *Error) -} - -// ID returns the identifier of this tunnel. -func (tun *Tunnel) ID() string { return tun.id } - -// Conn returns the connection this tunnel is based on. -func (tun *Tunnel) Conn() NativeConn { return tun.conn } - -// Go starts this tunnel, makes it functional. -func (tun *Tunnel) Go() { - if atomic.CompareAndSwapInt32(&tun.state, stateCreated, stateRunning) { - go tun.mainWriteLoop() - go tun.mainReadLoop() - go tun.q.watch() - } -} - -// Notify sends notification(request without id) using given params as its body. -func (tun *Tunnel) Notify(method string, params interface{}) error { - marshaledParams, err := json.Marshal(params) - if err != nil { - return err - } - return tun.trySend(&Request{ - Version: DefaultVersion, - Method: method, - Params: marshaledParams, - }) -} - -// NotifyBare sends notification like Notify does but -// sends no request parameters in it. -func (tun *Tunnel) NotifyBare(method string) error { - return tun.trySend(&Request{Version: DefaultVersion, Method: method}) -} - -// Request sends request marshalling a given params as its body. -// RespHandleFunc will be called as soon as the response arrives, -// or response arrival timeout reached, in that case error of type -// TimeoutError will be passed to the handler. -func (tun *Tunnel) Request(method string, params interface{}, rhf RespHandleFunc) error { - marshaledParams, err := json.Marshal(params) - if err != nil { - return err - } - id := atomic.AddInt64(&prevReqID, 1) - request := &Request{ - ID: id, - Method: method, - Params: marshaledParams, - } - tun.q.add(id, request, time.Now(), rhf) - return tun.trySend(request) -} - -// RequestBare sends the request like Request func does -// but sends no params in it. -func (tun *Tunnel) RequestBare(method string, rhf RespHandleFunc) error { - id := atomic.AddInt64(&prevReqID, 1) - request := &Request{ID: id, Method: method} - tun.q.add(id, request, time.Now(), rhf) - return tun.trySend(request) -} - -// Close closes native connection and internal sources, so started -// go routines should be eventually stopped. -func (tun *Tunnel) Close() { - tun.closer.closeOnce() -} - -// IsClosed returns true if this tunnel is closed and false otherwise. -func (tun *Tunnel) IsClosed() bool { - return atomic.LoadInt32(&tun.state) == stateClosed -} - -// SayHello sends hello notification. -func (tun *Tunnel) SayHello() { - tun.Notify(ConnectedNotificationMethodName, &TunnelNotification{ - Time: tun.created, - ChannelID: tun.id, - TunnelID: tun.id, - Text: "Hello!", - }) -} - -// TunnelNotification struct describing notification params sent by SayHello. -type TunnelNotification struct { - - // Time is the time channel was created. - Time time.Time `json:"time"` - - // ChannelID is the id of the tunnel. - // The value is the same to TunnelID, its kept for backward comp. - ChannelID string `json:"channel"` - - // TunnelID the id of the tunnel. - TunnelID string `json:"tunnel"` - - // Text event message. - Text string `json:"text"` -} - -func (tun *Tunnel) trySend(notMarshaled interface{}) (err error) { - defer func() { - if r := recover(); r != nil { - err = NewCloseError(errors.New("Connection closed")) - } - }() - tun.jsonOut <- notMarshaled - return nil -} - -func (tun *Tunnel) respond(r *Response) { - if err := tun.trySend(r); err != nil { - log.Printf("Trying to send response '%v' to the closed connection", r) - } -} - -func (tun *Tunnel) mainWriteLoop() { - for message := range tun.jsonOut { - if bytes, err := json.Marshal(message); err != nil { - log.Printf("Couldn't marshal message: %T, %v to json. Error %s", message, message, err.Error()) - } else { - if err := tun.conn.Write(bytes); err != nil { - log.Printf("Couldn't write message to the tunnel. Message: %T, %v", message, message) - } - } - } - tun.closer.outClosed <- true -} - -func (tun *Tunnel) mainReadLoop() { - for { - binMessage, err := tun.conn.Next() - if err == nil { - tun.handleMessage(binMessage) - } else { - tun.closer.closeOnce() - return - } - } -} - -func (tun *Tunnel) handleResponse(r *Response) { - if r.ID == nil { - log.Print("Received response with empty identifier, response will be ignored") - return - } - - // float64 used for json numbers https://blog.golang.org/json-and-go - floatID, ok := r.ID.(float64) - if !ok { - log.Printf("Received response with non-numeric identifier %T %v, "+ - "response will be ignored", r.ID, r.ID) - return - } - - id := int64(floatID) - rqPair, ok := tun.q.remove(id) - if ok { - rqPair.respHandlerFunc(r.Result, r.Error) - } else { - log.Printf("Response handler for request id '%v' is missing which means that response "+ - "arrived to late, or response provides a wrong id", id) - } -} - -func (tun *Tunnel) handleMessage(binMessage []byte) { - draft := &draft{} - err := json.Unmarshal(binMessage, draft) - - // parse error indicated - if err != nil { - tun.respond(&Response{ - Version: DefaultVersion, - ID: nil, - Error: NewError(ParseErrorCode, errors.New("Error while parsing request")), - }) - return - } - - // version check - if draft.Version == "" { - draft.Version = DefaultVersion - } else if draft.Version != DefaultVersion { - err := fmt.Errorf("Version %s is not supported, please use %s", draft.Version, DefaultVersion) - tun.respond(&Response{ - Version: DefaultVersion, - ID: nil, - Error: NewError(InvalidRequestErrorCode, err), - }) - return - } - - if draft.Method == "" { - tun.handleResponse(&Response{ - Version: draft.Version, - ID: draft.ID, - Result: draft.Result, - Error: draft.Error, - }) - } else { - tun.handleRequest(&Request{ - Version: draft.Version, - Method: draft.Method, - ID: draft.ID, - Params: draft.RawParams, - }) - } -} - -func (tun *Tunnel) handleRequest(r *Request) { - handler, ok := tun.reqDispatcher.FindHandler(r.Method) - - if !ok { - if !r.IsNotification() { - tun.jsonOut <- &Response{ - ID: r.ID, - Version: DefaultVersion, - Error: NewErrorf(MethodNotFoundErrorCode, "No such method %s", r.Method), - } - } - return - } - - // handle params decoding - decodedParams, err := handler.Unmarshal(r.Params) - if err != nil { - if !r.IsNotification() { - tun.respond(&Response{ - ID: r.ID, - Version: DefaultVersion, - Error: NewError(ParseErrorCode, errors.New("Couldn't parse params")), - }) - } - return - } - - // pick the right transmitter - var transmitter RespTransmitter - if r.IsNotification() { - transmitter = &doNothingTransmitter{r} - } else { - transmitter = newWatchingRespTransmitter(r.ID, tun) - } - - // make a method call - handler.Call(tun, decodedParams, transmitter) -} - -// both request and response -type draft struct { - Version string `json:"jsonrpc"` - Method string `json:"method"` - ID interface{} `json:"id"` - RawParams json.RawMessage `json:"params"` - Result json.RawMessage `json:"result,omitempty"` - Error *Error `json:"error,omitempty"` -} - -type closer struct { - tunnel *Tunnel - outClosed chan bool -} - -func (closer *closer) closeOnce() { - if atomic.CompareAndSwapInt32(&closer.tunnel.state, stateRunning, stateClosed) { - close(closer.tunnel.jsonOut) - // wait write loop to complete - <-closer.outClosed - - closer.tunnel.q.stopWatching() - if err := closer.tunnel.conn.Close(); err != nil { - log.Printf("Error while closing connection, %s", err.Error()) - } - } -} - -type rqPair struct { - request *Request - respHandlerFunc RespHandleFunc - saved time.Time -} - -// Request queue is used for internal request + response handler storage, -// which allows to handle future responses. -// The q does not support any request identifiers except int64. -type requestQ struct { - sync.RWMutex - pairs map[int64]*rqPair - ticker *time.Ticker - stop chan bool - allowedResponseDelay time.Duration -} - -func (q *requestQ) watch() { - for { - select { - case <-q.ticker.C: - q.dropOutdatedOnce() - case <-q.stop: - q.ticker.Stop() - return - } - } -} - -func (q *requestQ) dropOutdatedOnce() { - dropTime := time.Now().Add(-q.allowedResponseDelay) - dropout := make([]int64, 0) - - q.RLock() - for id, pair := range q.pairs { - if pair.saved.Before(dropTime) { - dropout = append(dropout, id) - } - } - q.RUnlock() - - for _, id := range dropout { - if rqPair, ok := q.remove(id); ok { - rqPair.respHandlerFunc(nil, NewError(TimeoutErrorCode, errors.New("Response didn't arrive in time"))) - } - } -} - -func (q *requestQ) stopWatching() { q.stop <- true } - -func (q *requestQ) add(id int64, r *Request, time time.Time, rhf RespHandleFunc) { - q.Lock() - defer q.Unlock() - q.pairs[id] = &rqPair{ - request: r, - respHandlerFunc: rhf, - saved: time, - } -} - -func (q *requestQ) remove(id int64) (*rqPair, bool) { - q.Lock() - defer q.Unlock() - pair, ok := q.pairs[id] - if ok { - delete(q.pairs, id) - } - return pair, ok -} - -func newWatchingRespTransmitter(id interface{}, c *Tunnel) *respTransmitter { - t := &respTransmitter{ - reqID: id, - tunnel: c, - once: &sync.Once{}, - done: make(chan bool, 1), - } - go t.watch(DefaultMaxRequestHoldTimeout) - return t -} - -type respTransmitter struct { - reqID interface{} - tunnel *Tunnel - once *sync.Once - done chan bool -} - -func (drt *respTransmitter) watch(timeout time.Duration) { - timer := time.NewTimer(timeout) - select { - case <-timer.C: - drt.SendError(NewErrorf(TimeoutErrorCode, "Server didn't respond to the request %v in time ", drt.reqID)) - case <-drt.done: - timer.Stop() - } -} - -func (drt *respTransmitter) Send(result interface{}) { - drt.release(func() { - marshaled, _ := json.Marshal(result) - drt.tunnel.respond(&Response{ - Version: DefaultVersion, - ID: drt.reqID, - Result: marshaled, - }) - }) -} - -func (drt *respTransmitter) SendError(err *Error) { - drt.release(func() { - drt.tunnel.jsonOut <- &Response{ - Version: DefaultVersion, - ID: drt.reqID, - Error: err, - } - }) -} - -func (drt *respTransmitter) release(f func()) { - drt.once.Do(func() { - f() - drt.done <- true - }) -} - -type doNothingTransmitter struct { - request *Request -} - -func (nrt *doNothingTransmitter) logNoResponse(res interface{}) { - log.Printf( - "The response to the notification '%s' will not be send(jsonrpc2.0 spec). The response was %T, %v", - nrt.request.Method, - res, - res, - ) -} - -func (nrt *doNothingTransmitter) Send(result interface{}) { nrt.logNoResponse(result) } - -func (nrt *doNothingTransmitter) SendError(err *Error) { nrt.logNoResponse(err) } diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/.gitignore b/agents/go-agents/vendor/github.com/gorilla/websocket/.gitignore deleted file mode 100644 index 00268614f04..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/.travis.yml b/agents/go-agents/vendor/github.com/gorilla/websocket/.travis.yml deleted file mode 100644 index 8687342e9d4..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: go - -go: - - 1.1 - - 1.2 - - tip diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/AUTHORS b/agents/go-agents/vendor/github.com/gorilla/websocket/AUTHORS deleted file mode 100644 index b003eca0ca1..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -# This is the official list of Gorilla WebSocket authors for copyright -# purposes. -# -# Please keep the list sorted. - -Gary Burd -Joachim Bauch - diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/LICENSE b/agents/go-agents/vendor/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 9171c972252..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/README.md b/agents/go-agents/vendor/github.com/gorilla/websocket/README.md deleted file mode 100644 index 9d71959ea1a..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Gorilla WebSocket - -Gorilla WebSocket is a [Go](http://golang.org/) implementation of the -[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. - -### Documentation - -* [API Reference](http://godoc.org/github.com/gorilla/websocket) -* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) -* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) -* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo) -* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) - -### Status - -The Gorilla WebSocket package provides a complete and tested implementation of -the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The -package API is stable. - -### Installation - - go get github.com/gorilla/websocket - -### Protocol Compliance - -The Gorilla WebSocket package passes the server tests in the [Autobahn Test -Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn -subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). - -### Gorilla WebSocket compared with other packages - - - - - - - - - - - - - - - - - - -
github.com/gorillagolang.org/x/net
RFC 6455 Features
Passes Autobahn Test SuiteYesNo
Receive fragmented messageYesNo, see note 1
Send close messageYesNo
Send pings and receive pongsYesNo
Get the type of a received data messageYesYes, see note 2
Other Features
Limit size of received messageYesNo
Read message using io.ReaderYesNo, see note 3
Write message using io.WriteCloserYesNo, see note 3
- -Notes: - -1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html). -2. The application can get the type of a received data message by implementing - a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal) - function. -3. The go.net io.Reader and io.Writer operate across WebSocket frame boundaries. - Read returns when the input buffer is full or a frame boundary is - encountered. Each call to Write sends a single frame message. The Gorilla - io.Reader and io.WriteCloser operate on a single WebSocket message. - diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/client.go b/agents/go-agents/vendor/github.com/gorilla/websocket/client.go deleted file mode 100644 index 3bf9b2e8405..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/client.go +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "bytes" - "crypto/tls" - "errors" - "io" - "io/ioutil" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// ErrBadHandshake is returned when the server response to opening handshake is -// invalid. -var ErrBadHandshake = errors.New("websocket: bad handshake") - -// NewClient creates a new client connection using the given net connection. -// The URL u specifies the host and request URI. Use requestHeader to specify -// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies -// (Cookie). Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etc. -// -// Deprecated: Use Dialer instead. -func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufSize, writeBufSize int) (c *Conn, response *http.Response, err error) { - d := Dialer{ - ReadBufferSize: readBufSize, - WriteBufferSize: writeBufSize, - NetDial: func(net, addr string) (net.Conn, error) { - return netConn, nil - }, - } - return d.Dial(u.String(), requestHeader) -} - -// A Dialer contains options for connecting to WebSocket server. -type Dialer struct { - // NetDial specifies the dial function for creating TCP connections. If - // NetDial is nil, net.Dial is used. - NetDial func(network, addr string) (net.Conn, error) - - // Proxy specifies a function to return a proxy for a given - // Request. If the function returns a non-nil error, the - // request is aborted with the provided error. - // If Proxy is nil or returns a nil *URL, no proxy is used. - Proxy func(*http.Request) (*url.URL, error) - - // TLSClientConfig specifies the TLS configuration to use with tls.Client. - // If nil, the default configuration is used. - TLSClientConfig *tls.Config - - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // Input and output buffer sizes. If the buffer size is zero, then a - // default value of 4096 is used. - ReadBufferSize, WriteBufferSize int - - // Subprotocols specifies the client's requested subprotocols. - Subprotocols []string -} - -var errMalformedURL = errors.New("malformed ws or wss URL") - -// parseURL parses the URL. -// -// This function is a replacement for the standard library url.Parse function. -// In Go 1.4 and earlier, url.Parse loses information from the path. -func parseURL(s string) (*url.URL, error) { - // From the RFC: - // - // ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ] - // wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ] - - var u url.URL - switch { - case strings.HasPrefix(s, "ws://"): - u.Scheme = "ws" - s = s[len("ws://"):] - case strings.HasPrefix(s, "wss://"): - u.Scheme = "wss" - s = s[len("wss://"):] - default: - return nil, errMalformedURL - } - - u.Host = s - u.Opaque = "/" - if i := strings.Index(s, "/"); i >= 0 { - u.Host = s[:i] - u.Opaque = s[i:] - } - - if strings.Contains(u.Host, "@") { - // Don't bother parsing user information because user information is - // not allowed in websocket URIs. - return nil, errMalformedURL - } - - return &u, nil -} - -func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) { - hostPort = u.Host - hostNoPort = u.Host - if i := strings.LastIndex(u.Host, ":"); i > strings.LastIndex(u.Host, "]") { - hostNoPort = hostNoPort[:i] - } else { - switch u.Scheme { - case "wss": - hostPort += ":443" - case "https": - hostPort += ":443" - default: - hostPort += ":80" - } - } - return hostPort, hostNoPort -} - -// DefaultDialer is a dialer with all fields set to the default zero values. -var DefaultDialer = &Dialer{ - Proxy: http.ProxyFromEnvironment, -} - -// Dial creates a new client connection. Use requestHeader to specify the -// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). -// Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etcetera. The response body may not contain the entire response and does not -// need to be closed by the application. -func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) { - - if d == nil { - d = &Dialer{ - Proxy: http.ProxyFromEnvironment, - } - } - - challengeKey, err := generateChallengeKey() - if err != nil { - return nil, nil, err - } - - u, err := parseURL(urlStr) - if err != nil { - return nil, nil, err - } - - switch u.Scheme { - case "ws": - u.Scheme = "http" - case "wss": - u.Scheme = "https" - default: - return nil, nil, errMalformedURL - } - - if u.User != nil { - // User name and password are not allowed in websocket URIs. - return nil, nil, errMalformedURL - } - - req := &http.Request{ - Method: "GET", - URL: u, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: make(http.Header), - Host: u.Host, - } - - // Set the request headers using the capitalization for names and values in - // RFC examples. Although the capitalization shouldn't matter, there are - // servers that depend on it. The Header.Set method is not used because the - // method canonicalizes the header names. - req.Header["Upgrade"] = []string{"websocket"} - req.Header["Connection"] = []string{"Upgrade"} - req.Header["Sec-WebSocket-Key"] = []string{challengeKey} - req.Header["Sec-WebSocket-Version"] = []string{"13"} - if len(d.Subprotocols) > 0 { - req.Header["Sec-WebSocket-Protocol"] = []string{strings.Join(d.Subprotocols, ", ")} - } - for k, vs := range requestHeader { - switch { - case k == "Host": - if len(vs) > 0 { - req.Host = vs[0] - } - case k == "Upgrade" || - k == "Connection" || - k == "Sec-Websocket-Key" || - k == "Sec-Websocket-Version" || - (k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0): - return nil, nil, errors.New("websocket: duplicate header not allowed: " + k) - default: - req.Header[k] = vs - } - } - - hostPort, hostNoPort := hostPortNoPort(u) - - var proxyURL *url.URL - // Check wether the proxy method has been configured - if d.Proxy != nil { - proxyURL, err = d.Proxy(req) - } - if err != nil { - return nil, nil, err - } - - var targetHostPort string - if proxyURL != nil { - targetHostPort, _ = hostPortNoPort(proxyURL) - } else { - targetHostPort = hostPort - } - - var deadline time.Time - if d.HandshakeTimeout != 0 { - deadline = time.Now().Add(d.HandshakeTimeout) - } - - netDial := d.NetDial - if netDial == nil { - netDialer := &net.Dialer{Deadline: deadline} - netDial = netDialer.Dial - } - - netConn, err := netDial("tcp", targetHostPort) - if err != nil { - return nil, nil, err - } - - defer func() { - if netConn != nil { - netConn.Close() - } - }() - - if err := netConn.SetDeadline(deadline); err != nil { - return nil, nil, err - } - - if proxyURL != nil { - connectReq := &http.Request{ - Method: "CONNECT", - URL: &url.URL{Opaque: hostPort}, - Host: hostPort, - Header: make(http.Header), - } - - connectReq.Write(netConn) - - // Read response. - // Okay to use and discard buffered reader here, because - // TLS server will not speak until spoken to. - br := bufio.NewReader(netConn) - resp, err := http.ReadResponse(br, connectReq) - if err != nil { - return nil, nil, err - } - if resp.StatusCode != 200 { - f := strings.SplitN(resp.Status, " ", 2) - return nil, nil, errors.New(f[1]) - } - } - - if u.Scheme == "https" { - cfg := d.TLSClientConfig - if cfg == nil { - cfg = &tls.Config{ServerName: hostNoPort} - } else if cfg.ServerName == "" { - shallowCopy := *cfg - cfg = &shallowCopy - cfg.ServerName = hostNoPort - } - tlsConn := tls.Client(netConn, cfg) - netConn = tlsConn - if err := tlsConn.Handshake(); err != nil { - return nil, nil, err - } - if !cfg.InsecureSkipVerify { - if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { - return nil, nil, err - } - } - } - - conn := newConn(netConn, false, d.ReadBufferSize, d.WriteBufferSize) - - if err := req.Write(netConn); err != nil { - return nil, nil, err - } - - resp, err := http.ReadResponse(conn.br, req) - if err != nil { - return nil, nil, err - } - if resp.StatusCode != 101 || - !strings.EqualFold(resp.Header.Get("Upgrade"), "websocket") || - !strings.EqualFold(resp.Header.Get("Connection"), "upgrade") || - resp.Header.Get("Sec-Websocket-Accept") != computeAcceptKey(challengeKey) { - // Before closing the network connection on return from this - // function, slurp up some of the response to aid application - // debugging. - buf := make([]byte, 1024) - n, _ := io.ReadFull(resp.Body, buf) - resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n])) - return nil, resp, ErrBadHandshake - } - - resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") - - netConn.SetDeadline(time.Time{}) - netConn = nil // to avoid close in defer. - return conn, resp, nil -} diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/conn.go b/agents/go-agents/vendor/github.com/gorilla/websocket/conn.go deleted file mode 100644 index e8b6b3e0455..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/conn.go +++ /dev/null @@ -1,831 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "encoding/binary" - "errors" - "io" - "io/ioutil" - "math/rand" - "net" - "strconv" - "time" -) - -const ( - maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask - maxControlFramePayloadSize = 125 - finalBit = 1 << 7 - maskBit = 1 << 7 - writeWait = time.Second - - defaultReadBufferSize = 4096 - defaultWriteBufferSize = 4096 - - continuationFrame = 0 - noFrame = -1 -) - -// Close codes defined in RFC 6455, section 11.7. -const ( - CloseNormalClosure = 1000 - CloseGoingAway = 1001 - CloseProtocolError = 1002 - CloseUnsupportedData = 1003 - CloseNoStatusReceived = 1005 - CloseAbnormalClosure = 1006 - CloseInvalidFramePayloadData = 1007 - ClosePolicyViolation = 1008 - CloseMessageTooBig = 1009 - CloseMandatoryExtension = 1010 - CloseInternalServerErr = 1011 - CloseTLSHandshake = 1015 -) - -// The message types are defined in RFC 6455, section 11.8. -const ( - // TextMessage denotes a text data message. The text message payload is - // interpreted as UTF-8 encoded text data. - TextMessage = 1 - - // BinaryMessage denotes a binary data message. - BinaryMessage = 2 - - // CloseMessage denotes a close control message. The optional message - // payload contains a numeric code and text. Use the FormatCloseMessage - // function to format a close message payload. - CloseMessage = 8 - - // PingMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - PingMessage = 9 - - // PongMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - PongMessage = 10 -) - -// ErrCloseSent is returned when the application writes a message to the -// connection after sending a close message. -var ErrCloseSent = errors.New("websocket: close sent") - -// ErrReadLimit is returned when reading a message that is larger than the -// read limit set for the connection. -var ErrReadLimit = errors.New("websocket: read limit exceeded") - -// netError satisfies the net Error interface. -type netError struct { - msg string - temporary bool - timeout bool -} - -func (e *netError) Error() string { return e.msg } -func (e *netError) Temporary() bool { return e.temporary } -func (e *netError) Timeout() bool { return e.timeout } - -// CloseError represents close frame. -type CloseError struct { - - // Code is defined in RFC 6455, section 11.7. - Code int - - // Text is the optional text payload. - Text string -} - -func (e *CloseError) Error() string { - return "websocket: close " + strconv.Itoa(e.Code) + " " + e.Text -} - -var ( - errWriteTimeout = &netError{msg: "websocket: write timeout", timeout: true, temporary: true} - errUnexpectedEOF = &CloseError{Code: CloseAbnormalClosure, Text: io.ErrUnexpectedEOF.Error()} - errBadWriteOpCode = errors.New("websocket: bad write message type") - errWriteClosed = errors.New("websocket: write closed") - errInvalidControlFrame = errors.New("websocket: invalid control frame") -) - -func hideTempErr(err error) error { - if e, ok := err.(net.Error); ok && e.Temporary() { - err = &netError{msg: e.Error(), timeout: e.Timeout()} - } - return err -} - -func isControl(frameType int) bool { - return frameType == CloseMessage || frameType == PingMessage || frameType == PongMessage -} - -func isData(frameType int) bool { - return frameType == TextMessage || frameType == BinaryMessage -} - -func maskBytes(key [4]byte, pos int, b []byte) int { - for i := range b { - b[i] ^= key[pos&3] - pos++ - } - return pos & 3 -} - -func newMaskKey() [4]byte { - n := rand.Uint32() - return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)} -} - -// Conn represents a WebSocket connection. -type Conn struct { - conn net.Conn - isServer bool - subprotocol string - - // Write fields - mu chan bool // used as mutex to protect write to conn and closeSent - closeSent bool // true if close message was sent - - // Message writer fields. - writeErr error - writeBuf []byte // frame is constructed in this buffer. - writePos int // end of data in writeBuf. - writeFrameType int // type of the current frame. - writeSeq int // incremented to invalidate message writers. - writeDeadline time.Time - - // Read fields - readErr error - br *bufio.Reader - readRemaining int64 // bytes remaining in current frame. - readFinal bool // true the current message has more frames. - readSeq int // incremented to invalidate message readers. - readLength int64 // Message size. - readLimit int64 // Maximum message size. - readMaskPos int - readMaskKey [4]byte - handlePong func(string) error - handlePing func(string) error -} - -func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) *Conn { - mu := make(chan bool, 1) - mu <- true - - if readBufferSize == 0 { - readBufferSize = defaultReadBufferSize - } - if writeBufferSize == 0 { - writeBufferSize = defaultWriteBufferSize - } - - c := &Conn{ - isServer: isServer, - br: bufio.NewReaderSize(conn, readBufferSize), - conn: conn, - mu: mu, - readFinal: true, - writeBuf: make([]byte, writeBufferSize+maxFrameHeaderSize), - writeFrameType: noFrame, - writePos: maxFrameHeaderSize, - } - c.SetPingHandler(nil) - c.SetPongHandler(nil) - return c -} - -// Subprotocol returns the negotiated protocol for the connection. -func (c *Conn) Subprotocol() string { - return c.subprotocol -} - -// Close closes the underlying network connection without sending or waiting for a close frame. -func (c *Conn) Close() error { - return c.conn.Close() -} - -// LocalAddr returns the local network address. -func (c *Conn) LocalAddr() net.Addr { - return c.conn.LocalAddr() -} - -// RemoteAddr returns the remote network address. -func (c *Conn) RemoteAddr() net.Addr { - return c.conn.RemoteAddr() -} - -// Write methods - -func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error { - <-c.mu - defer func() { c.mu <- true }() - - if c.closeSent { - return ErrCloseSent - } else if frameType == CloseMessage { - c.closeSent = true - } - - c.conn.SetWriteDeadline(deadline) - for _, buf := range bufs { - if len(buf) > 0 { - n, err := c.conn.Write(buf) - if n != len(buf) { - // Close on partial write. - c.conn.Close() - } - if err != nil { - return err - } - } - } - return nil -} - -// WriteControl writes a control message with the given deadline. The allowed -// message types are CloseMessage, PingMessage and PongMessage. -func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error { - if !isControl(messageType) { - return errBadWriteOpCode - } - if len(data) > maxControlFramePayloadSize { - return errInvalidControlFrame - } - - b0 := byte(messageType) | finalBit - b1 := byte(len(data)) - if !c.isServer { - b1 |= maskBit - } - - buf := make([]byte, 0, maxFrameHeaderSize+maxControlFramePayloadSize) - buf = append(buf, b0, b1) - - if c.isServer { - buf = append(buf, data...) - } else { - key := newMaskKey() - buf = append(buf, key[:]...) - buf = append(buf, data...) - maskBytes(key, 0, buf[6:]) - } - - d := time.Hour * 1000 - if !deadline.IsZero() { - d = deadline.Sub(time.Now()) - if d < 0 { - return errWriteTimeout - } - } - - timer := time.NewTimer(d) - select { - case <-c.mu: - timer.Stop() - case <-timer.C: - return errWriteTimeout - } - defer func() { c.mu <- true }() - - if c.closeSent { - return ErrCloseSent - } else if messageType == CloseMessage { - c.closeSent = true - } - - c.conn.SetWriteDeadline(deadline) - n, err := c.conn.Write(buf) - if n != 0 && n != len(buf) { - c.conn.Close() - } - return hideTempErr(err) -} - -// NextWriter returns a writer for the next message to send. The writer's -// Close method flushes the complete message to the network. -// -// There can be at most one open writer on a connection. NextWriter closes the -// previous writer if the application has not already done so. -// -// The NextWriter method and the writers returned from the method cannot be -// accessed by more than one goroutine at a time. -func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) { - if c.writeErr != nil { - return nil, c.writeErr - } - - if c.writeFrameType != noFrame { - if err := c.flushFrame(true, nil); err != nil { - return nil, err - } - } - - if !isControl(messageType) && !isData(messageType) { - return nil, errBadWriteOpCode - } - - c.writeFrameType = messageType - return messageWriter{c, c.writeSeq}, nil -} - -func (c *Conn) flushFrame(final bool, extra []byte) error { - length := c.writePos - maxFrameHeaderSize + len(extra) - - // Check for invalid control frames. - if isControl(c.writeFrameType) && - (!final || length > maxControlFramePayloadSize) { - c.writeSeq++ - c.writeFrameType = noFrame - c.writePos = maxFrameHeaderSize - return errInvalidControlFrame - } - - b0 := byte(c.writeFrameType) - if final { - b0 |= finalBit - } - b1 := byte(0) - if !c.isServer { - b1 |= maskBit - } - - // Assume that the frame starts at beginning of c.writeBuf. - framePos := 0 - if c.isServer { - // Adjust up if mask not included in the header. - framePos = 4 - } - - switch { - case length >= 65536: - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 127 - binary.BigEndian.PutUint64(c.writeBuf[framePos+2:], uint64(length)) - case length > 125: - framePos += 6 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 126 - binary.BigEndian.PutUint16(c.writeBuf[framePos+2:], uint16(length)) - default: - framePos += 8 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | byte(length) - } - - if !c.isServer { - key := newMaskKey() - copy(c.writeBuf[maxFrameHeaderSize-4:], key[:]) - maskBytes(key, 0, c.writeBuf[maxFrameHeaderSize:c.writePos]) - if len(extra) > 0 { - c.writeErr = errors.New("websocket: internal error, extra used in client mode") - return c.writeErr - } - } - - // Write the buffers to the connection. - c.writeErr = c.write(c.writeFrameType, c.writeDeadline, c.writeBuf[framePos:c.writePos], extra) - - // Setup for next frame. - c.writePos = maxFrameHeaderSize - c.writeFrameType = continuationFrame - if final { - c.writeSeq++ - c.writeFrameType = noFrame - } - return c.writeErr -} - -type messageWriter struct { - c *Conn - seq int -} - -func (w messageWriter) err() error { - c := w.c - if c.writeSeq != w.seq { - return errWriteClosed - } - if c.writeErr != nil { - return c.writeErr - } - return nil -} - -func (w messageWriter) ncopy(max int) (int, error) { - n := len(w.c.writeBuf) - w.c.writePos - if n <= 0 { - if err := w.c.flushFrame(false, nil); err != nil { - return 0, err - } - n = len(w.c.writeBuf) - w.c.writePos - } - if n > max { - n = max - } - return n, nil -} - -func (w messageWriter) write(final bool, p []byte) (int, error) { - if err := w.err(); err != nil { - return 0, err - } - - if len(p) > 2*len(w.c.writeBuf) && w.c.isServer { - // Don't buffer large messages. - err := w.c.flushFrame(final, p) - if err != nil { - return 0, err - } - return len(p), nil - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.c.writePos:], p[:n]) - w.c.writePos += n - p = p[n:] - } - return nn, nil -} - -func (w messageWriter) Write(p []byte) (int, error) { - return w.write(false, p) -} - -func (w messageWriter) WriteString(p string) (int, error) { - if err := w.err(); err != nil { - return 0, err - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.c.writePos:], p[:n]) - w.c.writePos += n - p = p[n:] - } - return nn, nil -} - -func (w messageWriter) ReadFrom(r io.Reader) (nn int64, err error) { - if err := w.err(); err != nil { - return 0, err - } - for { - if w.c.writePos == len(w.c.writeBuf) { - err = w.c.flushFrame(false, nil) - if err != nil { - break - } - } - var n int - n, err = r.Read(w.c.writeBuf[w.c.writePos:]) - w.c.writePos += n - nn += int64(n) - if err != nil { - if err == io.EOF { - err = nil - } - break - } - } - return nn, err -} - -func (w messageWriter) Close() error { - if err := w.err(); err != nil { - return err - } - return w.c.flushFrame(true, nil) -} - -// WriteMessage is a helper method for getting a writer using NextWriter, -// writing the message and closing the writer. -func (c *Conn) WriteMessage(messageType int, data []byte) error { - wr, err := c.NextWriter(messageType) - if err != nil { - return err - } - w := wr.(messageWriter) - if _, err := w.write(true, data); err != nil { - return err - } - if c.writeSeq == w.seq { - if err := c.flushFrame(true, nil); err != nil { - return err - } - } - return nil -} - -// SetWriteDeadline sets the write deadline on the underlying network -// connection. After a write has timed out, the websocket state is corrupt and -// all future writes will return an error. A zero value for t means writes will -// not time out. -func (c *Conn) SetWriteDeadline(t time.Time) error { - c.writeDeadline = t - return nil -} - -// Read methods - -// readFull is like io.ReadFull except that io.EOF is never returned. -func (c *Conn) readFull(p []byte) (err error) { - var n int - for n < len(p) && err == nil { - var nn int - nn, err = c.br.Read(p[n:]) - n += nn - } - if n == len(p) { - err = nil - } else if err == io.EOF { - err = errUnexpectedEOF - } - return -} - -func (c *Conn) advanceFrame() (int, error) { - - // 1. Skip remainder of previous frame. - - if c.readRemaining > 0 { - if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil { - return noFrame, err - } - } - - // 2. Read and parse first two bytes of frame header. - - var b [8]byte - if err := c.readFull(b[:2]); err != nil { - return noFrame, err - } - - final := b[0]&finalBit != 0 - frameType := int(b[0] & 0xf) - reserved := int((b[0] >> 4) & 0x7) - mask := b[1]&maskBit != 0 - c.readRemaining = int64(b[1] & 0x7f) - - if reserved != 0 { - return noFrame, c.handleProtocolError("unexpected reserved bits " + strconv.Itoa(reserved)) - } - - switch frameType { - case CloseMessage, PingMessage, PongMessage: - if c.readRemaining > maxControlFramePayloadSize { - return noFrame, c.handleProtocolError("control frame length > 125") - } - if !final { - return noFrame, c.handleProtocolError("control frame not final") - } - case TextMessage, BinaryMessage: - if !c.readFinal { - return noFrame, c.handleProtocolError("message start before final message frame") - } - c.readFinal = final - case continuationFrame: - if c.readFinal { - return noFrame, c.handleProtocolError("continuation after final message frame") - } - c.readFinal = final - default: - return noFrame, c.handleProtocolError("unknown opcode " + strconv.Itoa(frameType)) - } - - // 3. Read and parse frame length. - - switch c.readRemaining { - case 126: - if err := c.readFull(b[:2]); err != nil { - return noFrame, err - } - c.readRemaining = int64(binary.BigEndian.Uint16(b[:2])) - case 127: - if err := c.readFull(b[:8]); err != nil { - return noFrame, err - } - c.readRemaining = int64(binary.BigEndian.Uint64(b[:8])) - } - - // 4. Handle frame masking. - - if mask != c.isServer { - return noFrame, c.handleProtocolError("incorrect mask flag") - } - - if mask { - c.readMaskPos = 0 - if err := c.readFull(c.readMaskKey[:]); err != nil { - return noFrame, err - } - } - - // 5. For text and binary messages, enforce read limit and return. - - if frameType == continuationFrame || frameType == TextMessage || frameType == BinaryMessage { - - c.readLength += c.readRemaining - if c.readLimit > 0 && c.readLength > c.readLimit { - c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) - return noFrame, ErrReadLimit - } - - return frameType, nil - } - - // 6. Read control frame payload. - - var payload []byte - if c.readRemaining > 0 { - payload = make([]byte, c.readRemaining) - c.readRemaining = 0 - if err := c.readFull(payload); err != nil { - return noFrame, err - } - if c.isServer { - maskBytes(c.readMaskKey, 0, payload) - } - } - - // 7. Process control frame payload. - - switch frameType { - case PongMessage: - if err := c.handlePong(string(payload)); err != nil { - return noFrame, err - } - case PingMessage: - if err := c.handlePing(string(payload)); err != nil { - return noFrame, err - } - case CloseMessage: - c.WriteControl(CloseMessage, []byte{}, time.Now().Add(writeWait)) - closeCode := CloseNoStatusReceived - closeText := "" - if len(payload) >= 2 { - closeCode = int(binary.BigEndian.Uint16(payload)) - closeText = string(payload[2:]) - } - return noFrame, &CloseError{Code: closeCode, Text: closeText} - } - - return frameType, nil -} - -func (c *Conn) handleProtocolError(message string) error { - c.WriteControl(CloseMessage, FormatCloseMessage(CloseProtocolError, message), time.Now().Add(writeWait)) - return errors.New("websocket: " + message) -} - -// NextReader returns the next data message received from the peer. The -// returned messageType is either TextMessage or BinaryMessage. -// -// There can be at most one open reader on a connection. NextReader discards -// the previous message if the application has not already consumed it. -// -// The NextReader method and the readers returned from the method cannot be -// accessed by more than one goroutine at a time. -func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { - - c.readSeq++ - c.readLength = 0 - - for c.readErr == nil { - frameType, err := c.advanceFrame() - if err != nil { - c.readErr = hideTempErr(err) - break - } - if frameType == TextMessage || frameType == BinaryMessage { - return frameType, messageReader{c, c.readSeq}, nil - } - } - return noFrame, nil, c.readErr -} - -type messageReader struct { - c *Conn - seq int -} - -func (r messageReader) Read(b []byte) (int, error) { - - if r.seq != r.c.readSeq { - return 0, io.EOF - } - - for r.c.readErr == nil { - - if r.c.readRemaining > 0 { - if int64(len(b)) > r.c.readRemaining { - b = b[:r.c.readRemaining] - } - n, err := r.c.br.Read(b) - r.c.readErr = hideTempErr(err) - if r.c.isServer { - r.c.readMaskPos = maskBytes(r.c.readMaskKey, r.c.readMaskPos, b[:n]) - } - r.c.readRemaining -= int64(n) - return n, r.c.readErr - } - - if r.c.readFinal { - r.c.readSeq++ - return 0, io.EOF - } - - frameType, err := r.c.advanceFrame() - switch { - case err != nil: - r.c.readErr = hideTempErr(err) - case frameType == TextMessage || frameType == BinaryMessage: - r.c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader") - } - } - - err := r.c.readErr - if err == io.EOF && r.seq == r.c.readSeq { - err = errUnexpectedEOF - } - return 0, err -} - -// ReadMessage is a helper method for getting a reader using NextReader and -// reading from that reader to a buffer. -func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { - var r io.Reader - messageType, r, err = c.NextReader() - if err != nil { - return messageType, nil, err - } - p, err = ioutil.ReadAll(r) - return messageType, p, err -} - -// SetReadDeadline sets the read deadline on the underlying network connection. -// After a read has timed out, the websocket connection state is corrupt and -// all future reads will return an error. A zero value for t means reads will -// not time out. -func (c *Conn) SetReadDeadline(t time.Time) error { - return c.conn.SetReadDeadline(t) -} - -// SetReadLimit sets the maximum size for a message read from the peer. If a -// message exceeds the limit, the connection sends a close frame to the peer -// and returns ErrReadLimit to the application. -func (c *Conn) SetReadLimit(limit int64) { - c.readLimit = limit -} - -// SetPingHandler sets the handler for ping messages received from the peer. -// The appData argument to h is the PING frame application data. The default -// ping handler sends a pong to the peer. -func (c *Conn) SetPingHandler(h func(appData string) error) { - if h == nil { - h = func(message string) error { - err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) - if err == ErrCloseSent { - return nil - } else if e, ok := err.(net.Error); ok && e.Temporary() { - return nil - } - return err - } - } - c.handlePing = h -} - -// SetPongHandler sets the handler for pong messages received from the peer. -// The appData argument to h is the PONG frame application data. The default -// pong handler does nothing. -func (c *Conn) SetPongHandler(h func(appData string) error) { - if h == nil { - h = func(string) error { return nil } - } - c.handlePong = h -} - -// UnderlyingConn returns the internal net.Conn. This can be used to further -// modifications to connection specific flags. -func (c *Conn) UnderlyingConn() net.Conn { - return c.conn -} - -// FormatCloseMessage formats closeCode and text as a WebSocket close message. -func FormatCloseMessage(closeCode int, text string) []byte { - buf := make([]byte, 2+len(text)) - binary.BigEndian.PutUint16(buf, uint16(closeCode)) - copy(buf[2:], text) - return buf -} diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/doc.go b/agents/go-agents/vendor/github.com/gorilla/websocket/doc.go deleted file mode 100644 index 72286279c2b..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/doc.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package websocket implements the WebSocket protocol defined in RFC 6455. -// -// Overview -// -// The Conn type represents a WebSocket connection. A server application uses -// the Upgrade function from an Upgrader object with a HTTP request handler -// to get a pointer to a Conn: -// -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } -// -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } -// -// Call the connection's WriteMessage and ReadMessage methods to send and -// receive messages as a slice of bytes. This snippet of code shows how to echo -// messages using these methods: -// -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// return -// } -// if err = conn.WriteMessage(messageType, p); err != nil { -// return err -// } -// } -// -// In above snippet of code, p is a []byte and messageType is an int with value -// websocket.BinaryMessage or websocket.TextMessage. -// -// An application can also send and receive messages using the io.WriteCloser -// and io.Reader interfaces. To send a message, call the connection NextWriter -// method to get an io.WriteCloser, write the message to the writer and close -// the writer when done. To receive a message, call the connection NextReader -// method to get an io.Reader and read until io.EOF is returned. This snippet -// snippet shows how to echo messages using the NextWriter and NextReader -// methods: -// -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages -// -// The WebSocket protocol distinguishes between text and binary data messages. -// Text messages are interpreted as UTF-8 encoded text. The interpretation of -// binary messages is left to the application. -// -// This package uses the TextMessage and BinaryMessage integer constants to -// identify the two data message types. The ReadMessage and NextReader methods -// return the type of the received message. The messageType argument to the -// WriteMessage and NextWriter methods specifies the type of a sent message. -// -// It is the application's responsibility to ensure that text messages are -// valid UTF-8 encoded text. -// -// Control Messages -// -// The WebSocket protocol defines three types of control messages: close, ping -// and pong. Call the connection WriteControl, WriteMessage or NextWriter -// methods to send a control message to the peer. -// -// Connections handle received ping and pong messages by invoking a callback -// function set with SetPingHandler and SetPongHandler methods. These callback -// functions can be invoked from the ReadMessage method, the NextReader method -// or from a call to the data message reader returned from NextReader. -// -// Connections handle received close messages by returning an error from the -// ReadMessage method, the NextReader method or from a call to the data message -// reader returned from NextReader. -// -// Concurrency -// -// Connections support one concurrent reader and one concurrent writer. -// -// Applications are responsible for ensuring that no more than one goroutine -// calls the write methods (NextWriter, SetWriteDeadline, WriteMessage, -// WriteJSON) concurrently and that no more than one goroutine calls the read -// methods (NextReader, SetReadDeadline, ReadMessage, ReadJSON, SetPongHandler, -// SetPingHandler) concurrently. -// -// The Close and WriteControl methods can be called concurrently with all other -// methods. -// -// Read is Required -// -// The application must read the connection to process ping and close messages -// sent from the peer. If the application is not otherwise interested in -// messages from the peer, then the application should start a goroutine to read -// and discard messages from the peer. A simple example is: -// -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } -// -// Origin Considerations -// -// Web browsers allow Javascript applications to open a WebSocket connection to -// any host. It's up to the server to enforce an origin policy using the Origin -// request header sent by the browser. -// -// The Upgrader calls the function specified in the CheckOrigin field to check -// the origin. If the CheckOrigin function returns false, then the Upgrade -// method fails the WebSocket handshake with HTTP status 403. -// -// If the CheckOrigin field is nil, then the Upgrader uses a safe default: fail -// the handshake if the Origin request header is present and not equal to the -// Host request header. -// -// An application can allow connections from any origin by specifying a -// function that always returns true: -// -// var upgrader = websocket.Upgrader{ -// CheckOrigin: func(r *http.Request) bool { return true }, -// } -// -// The deprecated Upgrade function does not enforce an origin policy. It's the -// application's responsibility to check the Origin header before calling -// Upgrade. -package websocket diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/json.go b/agents/go-agents/vendor/github.com/gorilla/websocket/json.go deleted file mode 100644 index 4f0e36875a5..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/json.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "encoding/json" - "io" -) - -// WriteJSON is deprecated, use c.WriteJSON instead. -func WriteJSON(c *Conn, v interface{}) error { - return c.WriteJSON(v) -} - -// WriteJSON writes the JSON encoding of v to the connection. -// -// See the documentation for encoding/json Marshal for details about the -// conversion of Go values to JSON. -func (c *Conn) WriteJSON(v interface{}) error { - w, err := c.NextWriter(TextMessage) - if err != nil { - return err - } - err1 := json.NewEncoder(w).Encode(v) - err2 := w.Close() - if err1 != nil { - return err1 - } - return err2 -} - -// ReadJSON is deprecated, use c.ReadJSON instead. -func ReadJSON(c *Conn, v interface{}) error { - return c.ReadJSON(v) -} - -// ReadJSON reads the next JSON-encoded message from the connection and stores -// it in the value pointed to by v. -// -// See the documentation for the encoding/json Unmarshal function for details -// about the conversion of JSON to a Go value. -func (c *Conn) ReadJSON(v interface{}) error { - _, r, err := c.NextReader() - if err != nil { - return err - } - err = json.NewDecoder(r).Decode(v) - if err == io.EOF { - // One value is expected in the message. - err = io.ErrUnexpectedEOF - } - return err -} diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/server.go b/agents/go-agents/vendor/github.com/gorilla/websocket/server.go deleted file mode 100644 index 3a9805f0268..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/server.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "errors" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// HandshakeError describes an error with the handshake from the peer. -type HandshakeError struct { - message string -} - -func (e HandshakeError) Error() string { return e.message } - -// Upgrader specifies parameters for upgrading an HTTP connection to a -// WebSocket connection. -type Upgrader struct { - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer - // size is zero, then a default value of 4096 is used. The I/O buffer sizes - // do not limit the size of the messages that can be sent or received. - ReadBufferSize, WriteBufferSize int - - // Subprotocols specifies the server's supported protocols in order of - // preference. If this field is set, then the Upgrade method negotiates a - // subprotocol by selecting the first match in this list with a protocol - // requested by the client. - Subprotocols []string - - // Error specifies the function for generating HTTP error responses. If Error - // is nil, then http.Error is used to generate the HTTP response. - Error func(w http.ResponseWriter, r *http.Request, status int, reason error) - - // CheckOrigin returns true if the request Origin header is acceptable. If - // CheckOrigin is nil, the host in the Origin header must not be set or - // must match the host of the request. - CheckOrigin func(r *http.Request) bool -} - -func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status int, reason string) (*Conn, error) { - err := HandshakeError{reason} - if u.Error != nil { - u.Error(w, r, status, err) - } else { - http.Error(w, http.StatusText(status), status) - } - return nil, err -} - -// checkSameOrigin returns true if the origin is not set or is equal to the request host. -func checkSameOrigin(r *http.Request) bool { - origin := r.Header["Origin"] - if len(origin) == 0 { - return true - } - u, err := url.Parse(origin[0]) - if err != nil { - return false - } - return u.Host == r.Host -} - -func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string { - if u.Subprotocols != nil { - clientProtocols := Subprotocols(r) - for _, serverProtocol := range u.Subprotocols { - for _, clientProtocol := range clientProtocols { - if clientProtocol == serverProtocol { - return clientProtocol - } - } - } - } else if responseHeader != nil { - return responseHeader.Get("Sec-Websocket-Protocol") - } - return "" -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie) and the -// application negotiated subprotocol (Sec-Websocket-Protocol). -func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) { - if r.Method != "GET" { - return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: method not GET") - } - if values := r.Header["Sec-Websocket-Version"]; len(values) == 0 || values[0] != "13" { - return u.returnError(w, r, http.StatusBadRequest, "websocket: version != 13") - } - - if !tokenListContainsValue(r.Header, "Connection", "upgrade") { - return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find connection header with token 'upgrade'") - } - - if !tokenListContainsValue(r.Header, "Upgrade", "websocket") { - return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find upgrade header with token 'websocket'") - } - - checkOrigin := u.CheckOrigin - if checkOrigin == nil { - checkOrigin = checkSameOrigin - } - if !checkOrigin(r) { - return u.returnError(w, r, http.StatusForbidden, "websocket: origin not allowed") - } - - challengeKey := r.Header.Get("Sec-Websocket-Key") - if challengeKey == "" { - return u.returnError(w, r, http.StatusBadRequest, "websocket: key missing or blank") - } - - subprotocol := u.selectSubprotocol(r, responseHeader) - - var ( - netConn net.Conn - br *bufio.Reader - err error - ) - - h, ok := w.(http.Hijacker) - if !ok { - return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker") - } - var rw *bufio.ReadWriter - netConn, rw, err = h.Hijack() - if err != nil { - return u.returnError(w, r, http.StatusInternalServerError, err.Error()) - } - br = rw.Reader - - if br.Buffered() > 0 { - netConn.Close() - return nil, errors.New("websocket: client sent data before handshake is complete") - } - - c := newConn(netConn, true, u.ReadBufferSize, u.WriteBufferSize) - c.subprotocol = subprotocol - - p := c.writeBuf[:0] - p = append(p, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "...) - p = append(p, computeAcceptKey(challengeKey)...) - p = append(p, "\r\n"...) - if c.subprotocol != "" { - p = append(p, "Sec-Websocket-Protocol: "...) - p = append(p, c.subprotocol...) - p = append(p, "\r\n"...) - } - for k, vs := range responseHeader { - if k == "Sec-Websocket-Protocol" { - continue - } - for _, v := range vs { - p = append(p, k...) - p = append(p, ": "...) - for i := 0; i < len(v); i++ { - b := v[i] - if b <= 31 { - // prevent response splitting. - b = ' ' - } - p = append(p, b) - } - p = append(p, "\r\n"...) - } - } - p = append(p, "\r\n"...) - - // Clear deadlines set by HTTP server. - netConn.SetDeadline(time.Time{}) - - if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)) - } - if _, err = netConn.Write(p); err != nil { - netConn.Close() - return nil, err - } - if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Time{}) - } - - return c, nil -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// This function is deprecated, use websocket.Upgrader instead. -// -// The application is responsible for checking the request origin before -// calling Upgrade. An example implementation of the same origin policy is: -// -// if req.Header.Get("Origin") != "http://"+req.Host { -// http.Error(w, "Origin not allowed", 403) -// return -// } -// -// If the endpoint supports subprotocols, then the application is responsible -// for negotiating the protocol used on the connection. Use the Subprotocols() -// function to get the subprotocols requested by the client. Use the -// Sec-Websocket-Protocol response header to specify the subprotocol selected -// by the application. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie) and the -// negotiated subprotocol (Sec-Websocket-Protocol). -// -// The connection buffers IO to the underlying network connection. The -// readBufSize and writeBufSize parameters specify the size of the buffers to -// use. Messages can be larger than the buffers. -// -// If the request is not a valid WebSocket handshake, then Upgrade returns an -// error of type HandshakeError. Applications should handle this error by -// replying to the client with an HTTP error response. -func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header, readBufSize, writeBufSize int) (*Conn, error) { - u := Upgrader{ReadBufferSize: readBufSize, WriteBufferSize: writeBufSize} - u.Error = func(w http.ResponseWriter, r *http.Request, status int, reason error) { - // don't return errors to maintain backwards compatibility - } - u.CheckOrigin = func(r *http.Request) bool { - // allow all connections by default - return true - } - return u.Upgrade(w, r, responseHeader) -} - -// Subprotocols returns the subprotocols requested by the client in the -// Sec-Websocket-Protocol header. -func Subprotocols(r *http.Request) []string { - h := strings.TrimSpace(r.Header.Get("Sec-Websocket-Protocol")) - if h == "" { - return nil - } - protocols := strings.Split(h, ",") - for i := range protocols { - protocols[i] = strings.TrimSpace(protocols[i]) - } - return protocols -} diff --git a/agents/go-agents/vendor/github.com/gorilla/websocket/util.go b/agents/go-agents/vendor/github.com/gorilla/websocket/util.go deleted file mode 100644 index ffdc265ed78..00000000000 --- a/agents/go-agents/vendor/github.com/gorilla/websocket/util.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "crypto/rand" - "crypto/sha1" - "encoding/base64" - "io" - "net/http" - "strings" -) - -// tokenListContainsValue returns true if the 1#token header with the given -// name contains token. -func tokenListContainsValue(header http.Header, name string, value string) bool { - for _, v := range header[name] { - for _, s := range strings.Split(v, ",") { - if strings.EqualFold(value, strings.TrimSpace(s)) { - return true - } - } - } - return false -} - -var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") - -func computeAcceptKey(challengeKey string) string { - h := sha1.New() - h.Write([]byte(challengeKey)) - h.Write(keyGUID) - return base64.StdEncoding.EncodeToString(h.Sum(nil)) -} - -func generateChallengeKey() (string, error) { - p := make([]byte, 16) - if _, err := io.ReadFull(rand.Reader, p); err != nil { - return "", err - } - return base64.StdEncoding.EncodeToString(p), nil -} diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/.travis.yml b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/.travis.yml deleted file mode 100644 index 24cae4c4df5..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -sudo: false -language: go -go: - - 1.1 - - 1.2 - - 1.3 - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - tip diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/LICENSE b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/LICENSE deleted file mode 100644 index b829abc8a17..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013 Julien Schmidt. All rights reserved. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of the contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL JULIEN SCHMIDT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/README.md b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/README.md deleted file mode 100644 index 7204fd678c9..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/README.md +++ /dev/null @@ -1,276 +0,0 @@ -# HttpRouter [![Build Status](https://travis-ci.org/julienschmidt/httprouter.svg?branch=master)](https://travis-ci.org/julienschmidt/httprouter) [![GoDoc](https://godoc.org/github.com/julienschmidt/httprouter?status.svg)](http://godoc.org/github.com/julienschmidt/httprouter) - -HttpRouter is a lightweight high performance HTTP request router (also called *multiplexer* or just *mux* for short) for [Go](https://golang.org/). - -In contrast to the [default mux][http.ServeMux] of Go's `net/http` package, this router supports variables in the routing pattern and matches against the request method. It also scales better. - -The router is optimized for high performance and a small memory footprint. It scales well even with very long paths and a large number of routes. A compressing dynamic trie (radix tree) structure is used for efficient matching. - -## Features - -**Only explicit matches:** With other routers, like [`http.ServeMux`][http.ServeMux], a requested URL path could match multiple patterns. Therefore they have some awkward pattern priority rules, like *longest match* or *first registered, first matched*. By design of this router, a request can only match exactly one or no route. As a result, there are also no unintended matches, which makes it great for SEO and improves the user experience. - -**Stop caring about trailing slashes:** Choose the URL style you like, the router automatically redirects the client if a trailing slash is missing or if there is one extra. Of course it only does so, if the new path has a handler. If you don't like it, you can [turn off this behavior](https://godoc.org/github.com/julienschmidt/httprouter#Router.RedirectTrailingSlash). - -**Path auto-correction:** Besides detecting the missing or additional trailing slash at no extra cost, the router can also fix wrong cases and remove superfluous path elements (like `../` or `//`). Is [CAPTAIN CAPS LOCK](http://www.urbandictionary.com/define.php?term=Captain+Caps+Lock) one of your users? HttpRouter can help him by making a case-insensitive look-up and redirecting him to the correct URL. - -**Parameters in your routing pattern:** Stop parsing the requested URL path, just give the path segment a name and the router delivers the dynamic value to you. Because of the design of the router, path parameters are very cheap. - -**Zero Garbage:** The matching and dispatching process generates zero bytes of garbage. In fact, the only heap allocations that are made, is by building the slice of the key-value pairs for path parameters. If the request path contains no parameters, not a single heap allocation is necessary. - -**Best Performance:** [Benchmarks speak for themselves][benchmark]. See below for technical details of the implementation. - -**No more server crashes:** You can set a [Panic handler][Router.PanicHandler] to deal with panics occurring during handling a HTTP request. The router then recovers and lets the `PanicHandler` log what happened and deliver a nice error page. - -**Perfect for APIs:** The router design encourages to build sensible, hierarchical RESTful APIs. Moreover it has builtin native support for [OPTIONS requests](http://zacstewart.com/2012/04/14/http-options-method.html) and `405 Method Not Allowed` replies. - -Of course you can also set **custom [`NotFound`][Router.NotFound] and [`MethodNotAllowed`](https://godoc.org/github.com/julienschmidt/httprouter#Router.MethodNotAllowed) handlers** and [**serve static files**][Router.ServeFiles]. - -## Usage - -This is just a quick introduction, view the [GoDoc](http://godoc.org/github.com/julienschmidt/httprouter) for details. - -Let's start with a trivial example: - -```go -package main - -import ( - "fmt" - "github.com/julienschmidt/httprouter" - "net/http" - "log" -) - -func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - fmt.Fprint(w, "Welcome!\n") -} - -func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - fmt.Fprintf(w, "hello, %s!\n", ps.ByName("name")) -} - -func main() { - router := httprouter.New() - router.GET("/", Index) - router.GET("/hello/:name", Hello) - - log.Fatal(http.ListenAndServe(":8080", router)) -} -``` - -### Named parameters - -As you can see, `:name` is a *named parameter*. The values are accessible via `httprouter.Params`, which is just a slice of `httprouter.Param`s. You can get the value of a parameter either by its index in the slice, or by using the `ByName(name)` method: `:name` can be retrived by `ByName("name")`. - -Named parameters only match a single path segment: - -``` -Pattern: /user/:user - - /user/gordon match - /user/you match - /user/gordon/profile no match - /user/ no match -``` - -**Note:** Since this router has only explicit matches, you can not register static routes and parameters for the same path segment. For example you can not register the patterns `/user/new` and `/user/:user` for the same request method at the same time. The routing of different request methods is independent from each other. - -### Catch-All parameters - -The second type are *catch-all* parameters and have the form `*name`. Like the name suggests, they match everything. Therefore they must always be at the **end** of the pattern: - -``` -Pattern: /src/*filepath - - /src/ match - /src/somefile.go match - /src/subdir/somefile.go match -``` - -## How does it work? - -The router relies on a tree structure which makes heavy use of *common prefixes*, it is basically a *compact* [*prefix tree*](https://en.wikipedia.org/wiki/Trie) (or just [*Radix tree*](https://en.wikipedia.org/wiki/Radix_tree)). Nodes with a common prefix also share a common parent. Here is a short example what the routing tree for the `GET` request method could look like: - -``` -Priority Path Handle -9 \ *<1> -3 ├s nil -2 |├earch\ *<2> -1 |└upport\ *<3> -2 ├blog\ *<4> -1 | └:post nil -1 | └\ *<5> -2 ├about-us\ *<6> -1 | └team\ *<7> -1 └contact\ *<8> -``` - -Every `*` represents the memory address of a handler function (a pointer). If you follow a path trough the tree from the root to the leaf, you get the complete route path, e.g `\blog\:post\`, where `:post` is just a placeholder ([*parameter*](#named-parameters)) for an actual post name. Unlike hash-maps, a tree structure also allows us to use dynamic parts like the `:post` parameter, since we actually match against the routing patterns instead of just comparing hashes. [As benchmarks show][benchmark], this works very well and efficient. - -Since URL paths have a hierarchical structure and make use only of a limited set of characters (byte values), it is very likely that there are a lot of common prefixes. This allows us to easily reduce the routing into ever smaller problems. Moreover the router manages a separate tree for every request method. For one thing it is more space efficient than holding a method->handle map in every single node, for another thing is also allows us to greatly reduce the routing problem before even starting the look-up in the prefix-tree. - -For even better scalability, the child nodes on each tree level are ordered by priority, where the priority is just the number of handles registered in sub nodes (children, grandchildren, and so on..). This helps in two ways: - -1. Nodes which are part of the most routing paths are evaluated first. This helps to make as much routes as possible to be reachable as fast as possible. -2. It is some sort of cost compensation. The longest reachable path (highest cost) can always be evaluated first. The following scheme visualizes the tree structure. Nodes are evaluated from top to bottom and from left to right. - -``` -├------------ -├--------- -├----- -├---- -├-- -├-- -└- -``` - -## Why doesn't this work with `http.Handler`? - -**It does!** The router itself implements the `http.Handler` interface. Moreover the router provides convenient [adapters for `http.Handler`][Router.Handler]s and [`http.HandlerFunc`][Router.HandlerFunc]s which allows them to be used as a [`httprouter.Handle`][Router.Handle] when registering a route. The only disadvantage is, that no parameter values can be retrieved when a `http.Handler` or `http.HandlerFunc` is used, since there is no efficient way to pass the values with the existing function parameters. Therefore [`httprouter.Handle`][Router.Handle] has a third function parameter. - -Just try it out for yourself, the usage of HttpRouter is very straightforward. The package is compact and minimalistic, but also probably one of the easiest routers to set up. - -## Where can I find Middleware *X*? - -This package just provides a very efficient request router with a few extra features. The router is just a [`http.Handler`][http.Handler], you can chain any http.Handler compatible middleware before the router, for example the [Gorilla handlers](http://www.gorillatoolkit.org/pkg/handlers). Or you could [just write your own](https://justinas.org/writing-http-middleware-in-go/), it's very easy! - -Alternatively, you could try [a web framework based on HttpRouter](#web-frameworks-based-on-httprouter). - -### Multi-domain / Sub-domains - -Here is a quick example: Does your server serve multiple domains / hosts? -You want to use sub-domains? -Define a router per host! - -```go -// We need an object that implements the http.Handler interface. -// Therefore we need a type for which we implement the ServeHTTP method. -// We just use a map here, in which we map host names (with port) to http.Handlers -type HostSwitch map[string]http.Handler - -// Implement the ServerHTTP method on our new type -func (hs HostSwitch) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // Check if a http.Handler is registered for the given host. - // If yes, use it to handle the request. - if handler := hs[r.Host]; handler != nil { - handler.ServeHTTP(w, r) - } else { - // Handle host names for wich no handler is registered - http.Error(w, "Forbidden", 403) // Or Redirect? - } -} - -func main() { - // Initialize a router as usual - router := httprouter.New() - router.GET("/", Index) - router.GET("/hello/:name", Hello) - - // Make a new HostSwitch and insert the router (our http handler) - // for example.com and port 12345 - hs := make(HostSwitch) - hs["example.com:12345"] = router - - // Use the HostSwitch to listen and serve on port 12345 - log.Fatal(http.ListenAndServe(":12345", hs)) -} -``` - -### Basic Authentication - -Another quick example: Basic Authentication (RFC 2617) for handles: - -```go -package main - -import ( - "fmt" - "log" - "net/http" - - "github.com/julienschmidt/httprouter" -) - -func BasicAuth(h httprouter.Handle, requiredUser, requiredPassword string) httprouter.Handle { - return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - // Get the Basic Authentication credentials - user, password, hasAuth := r.BasicAuth() - - if hasAuth && user == requiredUser && password == requiredPassword { - // Delegate request to the given handle - h(w, r, ps) - } else { - // Request Basic Authentication otherwise - w.Header().Set("WWW-Authenticate", "Basic realm=Restricted") - http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) - } - } -} - -func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - fmt.Fprint(w, "Not protected!\n") -} - -func Protected(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - fmt.Fprint(w, "Protected!\n") -} - -func main() { - user := "gordon" - pass := "secret!" - - router := httprouter.New() - router.GET("/", Index) - router.GET("/protected/", BasicAuth(Protected, user, pass)) - - log.Fatal(http.ListenAndServe(":8080", router)) -} -``` - -## Chaining with the NotFound handler - -**NOTE: It might be required to set [`Router.HandleMethodNotAllowed`][Router.HandleMethodNotAllowed] to `false` to avoid problems.** - -You can use another [`http.Handler`][http.Handler], for example another router, to handle requests which could not be matched by this router by using the [`Router.NotFound`][Router.NotFound] handler. This allows chaining. - -### Static files - -The `NotFound` handler can for example be used to serve static files from the root path `/` (like an `index.html` file along with other assets): - -```go -// Serve static files from the ./public directory -router.NotFound = http.FileServer(http.Dir("public")) -``` - -But this approach sidesteps the strict core rules of this router to avoid routing problems. A cleaner approach is to use a distinct sub-path for serving files, like `/static/*filepath` or `/files/*filepath`. - -## Web Frameworks based on HttpRouter - -If the HttpRouter is a bit too minimalistic for you, you might try one of the following more high-level 3rd-party web frameworks building upon the HttpRouter package: - -* [Ace](https://github.com/plimble/ace): Blazing fast Go Web Framework -* [api2go](https://github.com/manyminds/api2go): A JSON API Implementation for Go -* [Gin](https://github.com/gin-gonic/gin): Features a martini-like API with much better performance -* [Goat](https://github.com/bahlo/goat): A minimalistic REST API server in Go -* [Hikaru](https://github.com/najeira/hikaru): Supports standalone and Google AppEngine -* [Hitch](https://github.com/nbio/hitch): Hitch ties httprouter, [httpcontext](https://github.com/nbio/httpcontext), and middleware up in a bow -* [httpway](https://github.com/corneldamian/httpway): Simple middleware extension with context for httprouter and a server with gracefully shutdown support -* [kami](https://github.com/guregu/kami): A tiny web framework using x/net/context -* [Medeina](https://github.com/imdario/medeina): Inspired by Ruby's Roda and Cuba -* [Neko](https://github.com/rocwong/neko): A lightweight web application framework for Golang -* [River](https://github.com/abiosoft/river): River is a simple and lightweight REST server -* [Roxanna](https://github.com/iamthemuffinman/Roxanna): An amalgamation of httprouter, better logging, and hot reload -* [siesta](https://github.com/VividCortex/siesta): Composable HTTP handlers with contexts -* [xmux](https://github.com/rs/xmux): xmux is a httprouter fork on top of xhandler (net/context aware) - -[benchmark]: -[http.Handler]: -[Router.Handle]: -[Router.HandleMethodNotAllowed]: -[Router.Handler]: -[Router.HandlerFunc]: -[Router.NotFound]: -[Router.PanicHandler]: -[Router.ServeFiles]: diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/path.go b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/path.go deleted file mode 100644 index 486134db379..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/path.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2013 Julien Schmidt. All rights reserved. -// Based on the path package, Copyright 2009 The Go Authors. -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file. - -package httprouter - -// CleanPath is the URL version of path.Clean, it returns a canonical URL path -// for p, eliminating . and .. elements. -// -// The following rules are applied iteratively until no further processing can -// be done: -// 1. Replace multiple slashes with a single slash. -// 2. Eliminate each . path name element (the current directory). -// 3. Eliminate each inner .. path name element (the parent directory) -// along with the non-.. element that precedes it. -// 4. Eliminate .. elements that begin a rooted path: -// that is, replace "/.." by "/" at the beginning of a path. -// -// If the result of this process is an empty string, "/" is returned -func CleanPath(p string) string { - // Turn empty string into "/" - if p == "" { - return "/" - } - - n := len(p) - var buf []byte - - // Invariants: - // reading from path; r is index of next byte to process. - // writing to buf; w is index of next byte to write. - - // path must start with '/' - r := 1 - w := 1 - - if p[0] != '/' { - r = 0 - buf = make([]byte, n+1) - buf[0] = '/' - } - - trailing := n > 2 && p[n-1] == '/' - - // A bit more clunky without a 'lazybuf' like the path package, but the loop - // gets completely inlined (bufApp). So in contrast to the path package this - // loop has no expensive function calls (except 1x make) - - for r < n { - switch { - case p[r] == '/': - // empty path element, trailing slash is added after the end - r++ - - case p[r] == '.' && r+1 == n: - trailing = true - r++ - - case p[r] == '.' && p[r+1] == '/': - // . element - r++ - - case p[r] == '.' && p[r+1] == '.' && (r+2 == n || p[r+2] == '/'): - // .. element: remove to last / - r += 2 - - if w > 1 { - // can backtrack - w-- - - if buf == nil { - for w > 1 && p[w] != '/' { - w-- - } - } else { - for w > 1 && buf[w] != '/' { - w-- - } - } - } - - default: - // real path element. - // add slash if needed - if w > 1 { - bufApp(&buf, p, w, '/') - w++ - } - - // copy element - for r < n && p[r] != '/' { - bufApp(&buf, p, w, p[r]) - w++ - r++ - } - } - } - - // re-append trailing slash - if trailing && w > 1 { - bufApp(&buf, p, w, '/') - w++ - } - - if buf == nil { - return p[:w] - } - return string(buf[:w]) -} - -// internal helper to lazily create a buffer if necessary -func bufApp(buf *[]byte, s string, w int, c byte) { - if *buf == nil { - if s[w] == c { - return - } - - *buf = make([]byte, len(s)) - copy(*buf, s[:w]) - } - (*buf)[w] = c -} diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/router.go b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/router.go deleted file mode 100644 index bb1733005bd..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/router.go +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright 2013 Julien Schmidt. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file. - -// Package httprouter is a trie based high performance HTTP request router. -// -// A trivial example is: -// -// package main -// -// import ( -// "fmt" -// "github.com/julienschmidt/httprouter" -// "net/http" -// "log" -// ) -// -// func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { -// fmt.Fprint(w, "Welcome!\n") -// } -// -// func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { -// fmt.Fprintf(w, "hello, %s!\n", ps.ByName("name")) -// } -// -// func main() { -// router := httprouter.New() -// router.GET("/", Index) -// router.GET("/hello/:name", Hello) -// -// log.Fatal(http.ListenAndServe(":8080", router)) -// } -// -// The router matches incoming requests by the request method and the path. -// If a handle is registered for this path and method, the router delegates the -// request to that function. -// For the methods GET, POST, PUT, PATCH and DELETE shortcut functions exist to -// register handles, for all other methods router.Handle can be used. -// -// The registered path, against which the router matches incoming requests, can -// contain two types of parameters: -// Syntax Type -// :name named parameter -// *name catch-all parameter -// -// Named parameters are dynamic path segments. They match anything until the -// next '/' or the path end: -// Path: /blog/:category/:post -// -// Requests: -// /blog/go/request-routers match: category="go", post="request-routers" -// /blog/go/request-routers/ no match, but the router would redirect -// /blog/go/ no match -// /blog/go/request-routers/comments no match -// -// Catch-all parameters match anything until the path end, including the -// directory index (the '/' before the catch-all). Since they match anything -// until the end, catch-all parameters must always be the final path element. -// Path: /files/*filepath -// -// Requests: -// /files/ match: filepath="/" -// /files/LICENSE match: filepath="/LICENSE" -// /files/templates/article.html match: filepath="/templates/article.html" -// /files no match, but the router would redirect -// -// The value of parameters is saved as a slice of the Param struct, consisting -// each of a key and a value. The slice is passed to the Handle func as a third -// parameter. -// There are two ways to retrieve the value of a parameter: -// // by the name of the parameter -// user := ps.ByName("user") // defined by :user or *user -// -// // by the index of the parameter. This way you can also get the name (key) -// thirdKey := ps[2].Key // the name of the 3rd parameter -// thirdValue := ps[2].Value // the value of the 3rd parameter -package httprouter - -import ( - "net/http" -) - -// Handle is a function that can be registered to a route to handle HTTP -// requests. Like http.HandlerFunc, but has a third parameter for the values of -// wildcards (variables). -type Handle func(http.ResponseWriter, *http.Request, Params) - -// Param is a single URL parameter, consisting of a key and a value. -type Param struct { - Key string - Value string -} - -// Params is a Param-slice, as returned by the router. -// The slice is ordered, the first URL parameter is also the first slice value. -// It is therefore safe to read values by the index. -type Params []Param - -// ByName returns the value of the first Param which key matches the given name. -// If no matching Param is found, an empty string is returned. -func (ps Params) ByName(name string) string { - for i := range ps { - if ps[i].Key == name { - return ps[i].Value - } - } - return "" -} - -// Router is a http.Handler which can be used to dispatch requests to different -// handler functions via configurable routes -type Router struct { - trees map[string]*node - - // Enables automatic redirection if the current route can't be matched but a - // handler for the path with (without) the trailing slash exists. - // For example if /foo/ is requested but a route only exists for /foo, the - // client is redirected to /foo with http status code 301 for GET requests - // and 307 for all other request methods. - RedirectTrailingSlash bool - - // If enabled, the router tries to fix the current request path, if no - // handle is registered for it. - // First superfluous path elements like ../ or // are removed. - // Afterwards the router does a case-insensitive lookup of the cleaned path. - // If a handle can be found for this route, the router makes a redirection - // to the corrected path with status code 301 for GET requests and 307 for - // all other request methods. - // For example /FOO and /..//Foo could be redirected to /foo. - // RedirectTrailingSlash is independent of this option. - RedirectFixedPath bool - - // If enabled, the router checks if another method is allowed for the - // current route, if the current request can not be routed. - // If this is the case, the request is answered with 'Method Not Allowed' - // and HTTP status code 405. - // If no other Method is allowed, the request is delegated to the NotFound - // handler. - HandleMethodNotAllowed bool - - // If enabled, the router automatically replies to OPTIONS requests. - // Custom OPTIONS handlers take priority over automatic replies. - HandleOPTIONS bool - - // Configurable http.Handler which is called when no matching route is - // found. If it is not set, http.NotFound is used. - NotFound http.Handler - - // Configurable http.Handler which is called when a request - // cannot be routed and HandleMethodNotAllowed is true. - // If it is not set, http.Error with http.StatusMethodNotAllowed is used. - // The "Allow" header with allowed request methods is set before the handler - // is called. - MethodNotAllowed http.Handler - - // Function to handle panics recovered from http handlers. - // It should be used to generate a error page and return the http error code - // 500 (Internal Server Error). - // The handler can be used to keep your server from crashing because of - // unrecovered panics. - PanicHandler func(http.ResponseWriter, *http.Request, interface{}) -} - -// Make sure the Router conforms with the http.Handler interface -var _ http.Handler = New() - -// New returns a new initialized Router. -// Path auto-correction, including trailing slashes, is enabled by default. -func New() *Router { - return &Router{ - RedirectTrailingSlash: true, - RedirectFixedPath: true, - HandleMethodNotAllowed: true, - HandleOPTIONS: true, - } -} - -// GET is a shortcut for router.Handle("GET", path, handle) -func (r *Router) GET(path string, handle Handle) { - r.Handle("GET", path, handle) -} - -// HEAD is a shortcut for router.Handle("HEAD", path, handle) -func (r *Router) HEAD(path string, handle Handle) { - r.Handle("HEAD", path, handle) -} - -// OPTIONS is a shortcut for router.Handle("OPTIONS", path, handle) -func (r *Router) OPTIONS(path string, handle Handle) { - r.Handle("OPTIONS", path, handle) -} - -// POST is a shortcut for router.Handle("POST", path, handle) -func (r *Router) POST(path string, handle Handle) { - r.Handle("POST", path, handle) -} - -// PUT is a shortcut for router.Handle("PUT", path, handle) -func (r *Router) PUT(path string, handle Handle) { - r.Handle("PUT", path, handle) -} - -// PATCH is a shortcut for router.Handle("PATCH", path, handle) -func (r *Router) PATCH(path string, handle Handle) { - r.Handle("PATCH", path, handle) -} - -// DELETE is a shortcut for router.Handle("DELETE", path, handle) -func (r *Router) DELETE(path string, handle Handle) { - r.Handle("DELETE", path, handle) -} - -// Handle registers a new request handle with the given path and method. -// -// For GET, POST, PUT, PATCH and DELETE requests the respective shortcut -// functions can be used. -// -// This function is intended for bulk loading and to allow the usage of less -// frequently used, non-standardized or custom methods (e.g. for internal -// communication with a proxy). -func (r *Router) Handle(method, path string, handle Handle) { - if path[0] != '/' { - panic("path must begin with '/' in path '" + path + "'") - } - - if r.trees == nil { - r.trees = make(map[string]*node) - } - - root := r.trees[method] - if root == nil { - root = new(node) - r.trees[method] = root - } - - root.addRoute(path, handle) -} - -// Handler is an adapter which allows the usage of an http.Handler as a -// request handle. -func (r *Router) Handler(method, path string, handler http.Handler) { - r.Handle(method, path, - func(w http.ResponseWriter, req *http.Request, _ Params) { - handler.ServeHTTP(w, req) - }, - ) -} - -// HandlerFunc is an adapter which allows the usage of an http.HandlerFunc as a -// request handle. -func (r *Router) HandlerFunc(method, path string, handler http.HandlerFunc) { - r.Handler(method, path, handler) -} - -// ServeFiles serves files from the given file system root. -// The path must end with "/*filepath", files are then served from the local -// path /defined/root/dir/*filepath. -// For example if root is "/etc" and *filepath is "passwd", the local file -// "/etc/passwd" would be served. -// Internally a http.FileServer is used, therefore http.NotFound is used instead -// of the Router's NotFound handler. -// To use the operating system's file system implementation, -// use http.Dir: -// router.ServeFiles("/src/*filepath", http.Dir("/var/www")) -func (r *Router) ServeFiles(path string, root http.FileSystem) { - if len(path) < 10 || path[len(path)-10:] != "/*filepath" { - panic("path must end with /*filepath in path '" + path + "'") - } - - fileServer := http.FileServer(root) - - r.GET(path, func(w http.ResponseWriter, req *http.Request, ps Params) { - req.URL.Path = ps.ByName("filepath") - fileServer.ServeHTTP(w, req) - }) -} - -func (r *Router) recv(w http.ResponseWriter, req *http.Request) { - if rcv := recover(); rcv != nil { - r.PanicHandler(w, req, rcv) - } -} - -// Lookup allows the manual lookup of a method + path combo. -// This is e.g. useful to build a framework around this router. -// If the path was found, it returns the handle function and the path parameter -// values. Otherwise the third return value indicates whether a redirection to -// the same path with an extra / without the trailing slash should be performed. -func (r *Router) Lookup(method, path string) (Handle, Params, bool) { - if root := r.trees[method]; root != nil { - return root.getValue(path) - } - return nil, nil, false -} - -func (r *Router) allowed(path, reqMethod string) (allow string) { - if path == "*" { // server-wide - for method := range r.trees { - if method == "OPTIONS" { - continue - } - - // add request method to list of allowed methods - if len(allow) == 0 { - allow = method - } else { - allow += ", " + method - } - } - } else { // specific path - for method := range r.trees { - // Skip the requested method - we already tried this one - if method == reqMethod || method == "OPTIONS" { - continue - } - - handle, _, _ := r.trees[method].getValue(path) - if handle != nil { - // add request method to list of allowed methods - if len(allow) == 0 { - allow = method - } else { - allow += ", " + method - } - } - } - } - if len(allow) > 0 { - allow += ", OPTIONS" - } - return -} - -// ServeHTTP makes the router implement the http.Handler interface. -func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { - if r.PanicHandler != nil { - defer r.recv(w, req) - } - - path := req.URL.Path - - if root := r.trees[req.Method]; root != nil { - if handle, ps, tsr := root.getValue(path); handle != nil { - handle(w, req, ps) - return - } else if req.Method != "CONNECT" && path != "/" { - code := 301 // Permanent redirect, request with GET method - if req.Method != "GET" { - // Temporary redirect, request with same method - // As of Go 1.3, Go does not support status code 308. - code = 307 - } - - if tsr && r.RedirectTrailingSlash { - if len(path) > 1 && path[len(path)-1] == '/' { - req.URL.Path = path[:len(path)-1] - } else { - req.URL.Path = path + "/" - } - http.Redirect(w, req, req.URL.String(), code) - return - } - - // Try to fix the request path - if r.RedirectFixedPath { - fixedPath, found := root.findCaseInsensitivePath( - CleanPath(path), - r.RedirectTrailingSlash, - ) - if found { - req.URL.Path = string(fixedPath) - http.Redirect(w, req, req.URL.String(), code) - return - } - } - } - } - - if req.Method == "OPTIONS" { - // Handle OPTIONS requests - if r.HandleOPTIONS { - if allow := r.allowed(path, req.Method); len(allow) > 0 { - w.Header().Set("Allow", allow) - return - } - } - } else { - // Handle 405 - if r.HandleMethodNotAllowed { - if allow := r.allowed(path, req.Method); len(allow) > 0 { - w.Header().Set("Allow", allow) - if r.MethodNotAllowed != nil { - r.MethodNotAllowed.ServeHTTP(w, req) - } else { - http.Error(w, - http.StatusText(http.StatusMethodNotAllowed), - http.StatusMethodNotAllowed, - ) - } - return - } - } - } - - // Handle 404 - if r.NotFound != nil { - r.NotFound.ServeHTTP(w, req) - } else { - http.NotFound(w, req) - } -} diff --git a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/tree.go b/agents/go-agents/vendor/github.com/julienschmidt/httprouter/tree.go deleted file mode 100644 index 1f4f995c12a..00000000000 --- a/agents/go-agents/vendor/github.com/julienschmidt/httprouter/tree.go +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright 2013 Julien Schmidt. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file. - -package httprouter - -import ( - "strings" - "unicode" - "unicode/utf8" -) - -func min(a, b int) int { - if a <= b { - return a - } - return b -} - -func countParams(path string) uint8 { - var n uint - for i := 0; i < len(path); i++ { - if path[i] != ':' && path[i] != '*' { - continue - } - n++ - } - if n >= 255 { - return 255 - } - return uint8(n) -} - -type nodeType uint8 - -const ( - static nodeType = iota // default - root - param - catchAll -) - -type node struct { - path string - wildChild bool - nType nodeType - maxParams uint8 - indices string - children []*node - handle Handle - priority uint32 -} - -// increments priority of the given child and reorders if necessary -func (n *node) incrementChildPrio(pos int) int { - n.children[pos].priority++ - prio := n.children[pos].priority - - // adjust position (move to front) - newPos := pos - for newPos > 0 && n.children[newPos-1].priority < prio { - // swap node positions - tmpN := n.children[newPos-1] - n.children[newPos-1] = n.children[newPos] - n.children[newPos] = tmpN - - newPos-- - } - - // build new index char string - if newPos != pos { - n.indices = n.indices[:newPos] + // unchanged prefix, might be empty - n.indices[pos:pos+1] + // the index char we move - n.indices[newPos:pos] + n.indices[pos+1:] // rest without char at 'pos' - } - - return newPos -} - -// addRoute adds a node with the given handle to the path. -// Not concurrency-safe! -func (n *node) addRoute(path string, handle Handle) { - fullPath := path - n.priority++ - numParams := countParams(path) - - // non-empty tree - if len(n.path) > 0 || len(n.children) > 0 { - walk: - for { - // Update maxParams of the current node - if numParams > n.maxParams { - n.maxParams = numParams - } - - // Find the longest common prefix. - // This also implies that the common prefix contains no ':' or '*' - // since the existing key can't contain those chars. - i := 0 - max := min(len(path), len(n.path)) - for i < max && path[i] == n.path[i] { - i++ - } - - // Split edge - if i < len(n.path) { - child := node{ - path: n.path[i:], - wildChild: n.wildChild, - nType: static, - indices: n.indices, - children: n.children, - handle: n.handle, - priority: n.priority - 1, - } - - // Update maxParams (max of all children) - for i := range child.children { - if child.children[i].maxParams > child.maxParams { - child.maxParams = child.children[i].maxParams - } - } - - n.children = []*node{&child} - // []byte for proper unicode char conversion, see #65 - n.indices = string([]byte{n.path[i]}) - n.path = path[:i] - n.handle = nil - n.wildChild = false - } - - // Make new node a child of this node - if i < len(path) { - path = path[i:] - - if n.wildChild { - n = n.children[0] - n.priority++ - - // Update maxParams of the child node - if numParams > n.maxParams { - n.maxParams = numParams - } - numParams-- - - // Check if the wildcard matches - if len(path) >= len(n.path) && n.path == path[:len(n.path)] && - // Check for longer wildcard, e.g. :name and :names - (len(n.path) >= len(path) || path[len(n.path)] == '/') { - continue walk - } else { - // Wildcard conflict - pathSeg := strings.SplitN(path, "/", 2)[0] - prefix := fullPath[:strings.Index(fullPath, pathSeg)] + n.path - panic("'" + pathSeg + - "' in new path '" + fullPath + - "' conflicts with existing wildcard '" + n.path + - "' in existing prefix '" + prefix + - "'") - } - } - - c := path[0] - - // slash after param - if n.nType == param && c == '/' && len(n.children) == 1 { - n = n.children[0] - n.priority++ - continue walk - } - - // Check if a child with the next path byte exists - for i := 0; i < len(n.indices); i++ { - if c == n.indices[i] { - i = n.incrementChildPrio(i) - n = n.children[i] - continue walk - } - } - - // Otherwise insert it - if c != ':' && c != '*' { - // []byte for proper unicode char conversion, see #65 - n.indices += string([]byte{c}) - child := &node{ - maxParams: numParams, - } - n.children = append(n.children, child) - n.incrementChildPrio(len(n.indices) - 1) - n = child - } - n.insertChild(numParams, path, fullPath, handle) - return - - } else if i == len(path) { // Make node a (in-path) leaf - if n.handle != nil { - panic("a handle is already registered for path '" + fullPath + "'") - } - n.handle = handle - } - return - } - } else { // Empty tree - n.insertChild(numParams, path, fullPath, handle) - n.nType = root - } -} - -func (n *node) insertChild(numParams uint8, path, fullPath string, handle Handle) { - var offset int // already handled bytes of the path - - // find prefix until first wildcard (beginning with ':'' or '*'') - for i, max := 0, len(path); numParams > 0; i++ { - c := path[i] - if c != ':' && c != '*' { - continue - } - - // find wildcard end (either '/' or path end) - end := i + 1 - for end < max && path[end] != '/' { - switch path[end] { - // the wildcard name must not contain ':' and '*' - case ':', '*': - panic("only one wildcard per path segment is allowed, has: '" + - path[i:] + "' in path '" + fullPath + "'") - default: - end++ - } - } - - // check if this Node existing children which would be - // unreachable if we insert the wildcard here - if len(n.children) > 0 { - panic("wildcard route '" + path[i:end] + - "' conflicts with existing children in path '" + fullPath + "'") - } - - // check if the wildcard has a name - if end-i < 2 { - panic("wildcards must be named with a non-empty name in path '" + fullPath + "'") - } - - if c == ':' { // param - // split path at the beginning of the wildcard - if i > 0 { - n.path = path[offset:i] - offset = i - } - - child := &node{ - nType: param, - maxParams: numParams, - } - n.children = []*node{child} - n.wildChild = true - n = child - n.priority++ - numParams-- - - // if the path doesn't end with the wildcard, then there - // will be another non-wildcard subpath starting with '/' - if end < max { - n.path = path[offset:end] - offset = end - - child := &node{ - maxParams: numParams, - priority: 1, - } - n.children = []*node{child} - n = child - } - - } else { // catchAll - if end != max || numParams > 1 { - panic("catch-all routes are only allowed at the end of the path in path '" + fullPath + "'") - } - - if len(n.path) > 0 && n.path[len(n.path)-1] == '/' { - panic("catch-all conflicts with existing handle for the path segment root in path '" + fullPath + "'") - } - - // currently fixed width 1 for '/' - i-- - if path[i] != '/' { - panic("no / before catch-all in path '" + fullPath + "'") - } - - n.path = path[offset:i] - - // first node: catchAll node with empty path - child := &node{ - wildChild: true, - nType: catchAll, - maxParams: 1, - } - n.children = []*node{child} - n.indices = string(path[i]) - n = child - n.priority++ - - // second node: node holding the variable - child = &node{ - path: path[i:], - nType: catchAll, - maxParams: 1, - handle: handle, - priority: 1, - } - n.children = []*node{child} - - return - } - } - - // insert remaining path part and handle to the leaf - n.path = path[offset:] - n.handle = handle -} - -// Returns the handle registered with the given path (key). The values of -// wildcards are saved to a map. -// If no handle can be found, a TSR (trailing slash redirect) recommendation is -// made if a handle exists with an extra (without the) trailing slash for the -// given path. -func (n *node) getValue(path string) (handle Handle, p Params, tsr bool) { -walk: // outer loop for walking the tree - for { - if len(path) > len(n.path) { - if path[:len(n.path)] == n.path { - path = path[len(n.path):] - // If this node does not have a wildcard (param or catchAll) - // child, we can just look up the next child node and continue - // to walk down the tree - if !n.wildChild { - c := path[0] - for i := 0; i < len(n.indices); i++ { - if c == n.indices[i] { - n = n.children[i] - continue walk - } - } - - // Nothing found. - // We can recommend to redirect to the same URL without a - // trailing slash if a leaf exists for that path. - tsr = (path == "/" && n.handle != nil) - return - - } - - // handle wildcard child - n = n.children[0] - switch n.nType { - case param: - // find param end (either '/' or path end) - end := 0 - for end < len(path) && path[end] != '/' { - end++ - } - - // save param value - if p == nil { - // lazy allocation - p = make(Params, 0, n.maxParams) - } - i := len(p) - p = p[:i+1] // expand slice within preallocated capacity - p[i].Key = n.path[1:] - p[i].Value = path[:end] - - // we need to go deeper! - if end < len(path) { - if len(n.children) > 0 { - path = path[end:] - n = n.children[0] - continue walk - } - - // ... but we can't - tsr = (len(path) == end+1) - return - } - - if handle = n.handle; handle != nil { - return - } else if len(n.children) == 1 { - // No handle found. Check if a handle for this path + a - // trailing slash exists for TSR recommendation - n = n.children[0] - tsr = (n.path == "/" && n.handle != nil) - } - - return - - case catchAll: - // save param value - if p == nil { - // lazy allocation - p = make(Params, 0, n.maxParams) - } - i := len(p) - p = p[:i+1] // expand slice within preallocated capacity - p[i].Key = n.path[2:] - p[i].Value = path - - handle = n.handle - return - - default: - panic("invalid node type") - } - } - } else if path == n.path { - // We should have reached the node containing the handle. - // Check if this node has a handle registered. - if handle = n.handle; handle != nil { - return - } - - if path == "/" && n.wildChild && n.nType != root { - tsr = true - return - } - - // No handle found. Check if a handle for this path + a - // trailing slash exists for trailing slash recommendation - for i := 0; i < len(n.indices); i++ { - if n.indices[i] == '/' { - n = n.children[i] - tsr = (len(n.path) == 1 && n.handle != nil) || - (n.nType == catchAll && n.children[0].handle != nil) - return - } - } - - return - } - - // Nothing found. We can recommend to redirect to the same URL with an - // extra trailing slash if a leaf exists for that path - tsr = (path == "/") || - (len(n.path) == len(path)+1 && n.path[len(path)] == '/' && - path == n.path[:len(n.path)-1] && n.handle != nil) - return - } -} - -// Makes a case-insensitive lookup of the given path and tries to find a handler. -// It can optionally also fix trailing slashes. -// It returns the case-corrected path and a bool indicating whether the lookup -// was successful. -func (n *node) findCaseInsensitivePath(path string, fixTrailingSlash bool) (ciPath []byte, found bool) { - return n.findCaseInsensitivePathRec( - path, - strings.ToLower(path), - make([]byte, 0, len(path)+1), // preallocate enough memory for new path - [4]byte{}, // empty rune buffer - fixTrailingSlash, - ) -} - -// shift bytes in array by n bytes left -func shiftNRuneBytes(rb [4]byte, n int) [4]byte { - switch n { - case 0: - return rb - case 1: - return [4]byte{rb[1], rb[2], rb[3], 0} - case 2: - return [4]byte{rb[2], rb[3]} - case 3: - return [4]byte{rb[3]} - default: - return [4]byte{} - } -} - -// recursive case-insensitive lookup function used by n.findCaseInsensitivePath -func (n *node) findCaseInsensitivePathRec(path, loPath string, ciPath []byte, rb [4]byte, fixTrailingSlash bool) ([]byte, bool) { - loNPath := strings.ToLower(n.path) - -walk: // outer loop for walking the tree - for len(loPath) >= len(loNPath) && (len(loNPath) == 0 || loPath[1:len(loNPath)] == loNPath[1:]) { - // add common path to result - ciPath = append(ciPath, n.path...) - - if path = path[len(n.path):]; len(path) > 0 { - loOld := loPath - loPath = loPath[len(loNPath):] - - // If this node does not have a wildcard (param or catchAll) child, - // we can just look up the next child node and continue to walk down - // the tree - if !n.wildChild { - // skip rune bytes already processed - rb = shiftNRuneBytes(rb, len(loNPath)) - - if rb[0] != 0 { - // old rune not finished - for i := 0; i < len(n.indices); i++ { - if n.indices[i] == rb[0] { - // continue with child node - n = n.children[i] - loNPath = strings.ToLower(n.path) - continue walk - } - } - } else { - // process a new rune - var rv rune - - // find rune start - // runes are up to 4 byte long, - // -4 would definitely be another rune - var off int - for max := min(len(loNPath), 3); off < max; off++ { - if i := len(loNPath) - off; utf8.RuneStart(loOld[i]) { - // read rune from cached lowercase path - rv, _ = utf8.DecodeRuneInString(loOld[i:]) - break - } - } - - // calculate lowercase bytes of current rune - utf8.EncodeRune(rb[:], rv) - // skipp already processed bytes - rb = shiftNRuneBytes(rb, off) - - for i := 0; i < len(n.indices); i++ { - // lowercase matches - if n.indices[i] == rb[0] { - // must use a recursive approach since both the - // uppercase byte and the lowercase byte might exist - // as an index - if out, found := n.children[i].findCaseInsensitivePathRec( - path, loPath, ciPath, rb, fixTrailingSlash, - ); found { - return out, true - } - break - } - } - - // same for uppercase rune, if it differs - if up := unicode.ToUpper(rv); up != rv { - utf8.EncodeRune(rb[:], up) - rb = shiftNRuneBytes(rb, off) - - for i := 0; i < len(n.indices); i++ { - // uppercase matches - if n.indices[i] == rb[0] { - // continue with child node - n = n.children[i] - loNPath = strings.ToLower(n.path) - continue walk - } - } - } - } - - // Nothing found. We can recommend to redirect to the same URL - // without a trailing slash if a leaf exists for that path - return ciPath, (fixTrailingSlash && path == "/" && n.handle != nil) - } - - n = n.children[0] - switch n.nType { - case param: - // find param end (either '/' or path end) - k := 0 - for k < len(path) && path[k] != '/' { - k++ - } - - // add param value to case insensitive path - ciPath = append(ciPath, path[:k]...) - - // we need to go deeper! - if k < len(path) { - if len(n.children) > 0 { - // continue with child node - n = n.children[0] - loNPath = strings.ToLower(n.path) - loPath = loPath[k:] - path = path[k:] - continue - } - - // ... but we can't - if fixTrailingSlash && len(path) == k+1 { - return ciPath, true - } - return ciPath, false - } - - if n.handle != nil { - return ciPath, true - } else if fixTrailingSlash && len(n.children) == 1 { - // No handle found. Check if a handle for this path + a - // trailing slash exists - n = n.children[0] - if n.path == "/" && n.handle != nil { - return append(ciPath, '/'), true - } - } - return ciPath, false - - case catchAll: - return append(ciPath, path...), true - - default: - panic("invalid node type") - } - } else { - // We should have reached the node containing the handle. - // Check if this node has a handle registered. - if n.handle != nil { - return ciPath, true - } - - // No handle found. - // Try to fix the path by adding a trailing slash - if fixTrailingSlash { - for i := 0; i < len(n.indices); i++ { - if n.indices[i] == '/' { - n = n.children[i] - if (len(n.path) == 1 && n.handle != nil) || - (n.nType == catchAll && n.children[0].handle != nil) { - return append(ciPath, '/'), true - } - return ciPath, false - } - } - } - return ciPath, false - } - } - - // Nothing found. - // Try to fix the path by adding / removing a trailing slash - if fixTrailingSlash { - if path == "/" { - return ciPath, true - } - if len(loPath)+1 == len(loNPath) && loNPath[len(loPath)] == '/' && - loPath[1:] == loNPath[1:len(loPath)] && n.handle != nil { - return append(ciPath, n.path...), true - } - } - return ciPath, false -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/.gitignore b/agents/go-agents/vendor/github.com/kr/pty/.gitignore deleted file mode 100644 index 1f0a99f2f2b..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -[568].out -_go* -_test* -_obj diff --git a/agents/go-agents/vendor/github.com/kr/pty/License b/agents/go-agents/vendor/github.com/kr/pty/License deleted file mode 100644 index 6b7558b6b42..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/agents/go-agents/vendor/github.com/kr/pty/README.md b/agents/go-agents/vendor/github.com/kr/pty/README.md deleted file mode 100644 index f9bb002e03e..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# pty - -Pty is a Go package for using unix pseudo-terminals. - -## Install - - go get github.com/kr/pty - -## Example - -### Command - -```go -package main - -import ( - "github.com/kr/pty" - "io" - "os" - "os/exec" -) - -func main() { - c := exec.Command("grep", "--color=auto", "bar") - f, err := pty.Start(c) - if err != nil { - panic(err) - } - - go func() { - f.Write([]byte("foo\n")) - f.Write([]byte("bar\n")) - f.Write([]byte("baz\n")) - f.Write([]byte{4}) // EOT - }() - io.Copy(os.Stdout, f) -} -``` - -### Shell - -```go -package main - -import ( - "io" - "log" - "os" - "os/exec" - "os/signal" - "syscall" - - "github.com/kr/pty" - "golang.org/x/crypto/ssh/terminal" -) - -func test() error { - // Create arbitrary command. - c := exec.Command("bash") - - // Start the command with a pty. - ptmx, err := pty.Start(c) - if err != nil { - return err - } - // Make sure to close the pty at the end. - defer func() { _ = ptmx.Close() }() // Best effort. - - // Handle pty size. - ch := make(chan os.Signal, 1) - signal.Notify(ch, syscall.SIGWINCH) - go func() { - for range ch { - if err := pty.InheritSize(os.Stdin, ptmx); err != nil { - log.Printf("error resizing pty: %s", err) - } - } - }() - ch <- syscall.SIGWINCH // Initial resize. - - // Set stdin in raw mode. - oldState, err := terminal.MakeRaw(int(os.Stdin.Fd())) - if err != nil { - panic(err) - } - defer func() { _ = terminal.Restore(int(os.Stdin.Fd()), oldState) }() // Best effort. - - // Copy stdin to the pty and the pty to stdout. - go func() { _, _ = io.Copy(ptmx, os.Stdin) }() - _, _ = io.Copy(os.Stdout, ptmx) - - return nil -} - -func main() { - if err := test(); err != nil { - log.Fatal(err) - } -} -``` diff --git a/agents/go-agents/vendor/github.com/kr/pty/doc.go b/agents/go-agents/vendor/github.com/kr/pty/doc.go deleted file mode 100644 index 190cfbea929..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Package pty provides functions for working with Unix terminals. -package pty - -import ( - "errors" - "os" -) - -// ErrUnsupported is returned if a function is not -// available on the current platform. -var ErrUnsupported = errors.New("unsupported") - -// Opens a pty and its corresponding tty. -func Open() (pty, tty *os.File, err error) { - return open() -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ioctl.go b/agents/go-agents/vendor/github.com/kr/pty/ioctl.go deleted file mode 100644 index c57c19e7e25..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ioctl.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build !windows - -package pty - -import "syscall" - -func ioctl(fd, cmd, ptr uintptr) error { - _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) - if e != 0 { - return e - } - return nil -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ioctl_bsd.go b/agents/go-agents/vendor/github.com/kr/pty/ioctl_bsd.go deleted file mode 100644 index 73b12c53cf4..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ioctl_bsd.go +++ /dev/null @@ -1,39 +0,0 @@ -// +build darwin dragonfly freebsd netbsd openbsd - -package pty - -// from -const ( - _IOC_VOID uintptr = 0x20000000 - _IOC_OUT uintptr = 0x40000000 - _IOC_IN uintptr = 0x80000000 - _IOC_IN_OUT uintptr = _IOC_OUT | _IOC_IN - _IOC_DIRMASK = _IOC_VOID | _IOC_OUT | _IOC_IN - - _IOC_PARAM_SHIFT = 13 - _IOC_PARAM_MASK = (1 << _IOC_PARAM_SHIFT) - 1 -) - -func _IOC_PARM_LEN(ioctl uintptr) uintptr { - return (ioctl >> 16) & _IOC_PARAM_MASK -} - -func _IOC(inout uintptr, group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return inout | (param_len&_IOC_PARAM_MASK)<<16 | uintptr(group)<<8 | ioctl_num -} - -func _IO(group byte, ioctl_num uintptr) uintptr { - return _IOC(_IOC_VOID, group, ioctl_num, 0) -} - -func _IOR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_OUT, group, ioctl_num, param_len) -} - -func _IOW(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_IN, group, ioctl_num, param_len) -} - -func _IOWR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { - return _IOC(_IOC_IN_OUT, group, ioctl_num, param_len) -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/mktypes.bash b/agents/go-agents/vendor/github.com/kr/pty/mktypes.bash deleted file mode 100755 index 82ee16721cb..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/mktypes.bash +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -GOOSARCH="${GOOS}_${GOARCH}" -case "$GOOSARCH" in -_* | *_ | _) - echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 - exit 1 - ;; -esac - -GODEFS="go tool cgo -godefs" - -$GODEFS types.go |gofmt > ztypes_$GOARCH.go - -case $GOOS in -freebsd|dragonfly|openbsd) - $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go - ;; -esac diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_darwin.go b/agents/go-agents/vendor/github.com/kr/pty/pty_darwin.go deleted file mode 100644 index 6344b6b0efb..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_darwin.go +++ /dev/null @@ -1,65 +0,0 @@ -package pty - -import ( - "errors" - "os" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - pFD, err := syscall.Open("/dev/ptmx", syscall.O_RDWR|syscall.O_CLOEXEC, 0) - if err != nil { - return nil, nil, err - } - p := os.NewFile(uintptr(pFD), "/dev/ptmx") - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := grantpt(p); err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func ptsname(f *os.File) (string, error) { - n := make([]byte, _IOC_PARM_LEN(syscall.TIOCPTYGNAME)) - - err := ioctl(f.Fd(), syscall.TIOCPTYGNAME, uintptr(unsafe.Pointer(&n[0]))) - if err != nil { - return "", err - } - - for i, c := range n { - if c == 0 { - return string(n[:i]), nil - } - } - return "", errors.New("TIOCPTYGNAME string not NUL-terminated") -} - -func grantpt(f *os.File) error { - return ioctl(f.Fd(), syscall.TIOCPTYGRANT, 0) -} - -func unlockpt(f *os.File) error { - return ioctl(f.Fd(), syscall.TIOCPTYUNLK, 0) -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_dragonfly.go b/agents/go-agents/vendor/github.com/kr/pty/pty_dragonfly.go deleted file mode 100644 index b7d1f20f29e..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_dragonfly.go +++ /dev/null @@ -1,80 +0,0 @@ -package pty - -import ( - "errors" - "os" - "strings" - "syscall" - "unsafe" -) - -// same code as pty_darwin.go -func open() (pty, tty *os.File, err error) { - p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := grantpt(p); err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func grantpt(f *os.File) error { - _, err := isptmaster(f.Fd()) - return err -} - -func unlockpt(f *os.File) error { - _, err := isptmaster(f.Fd()) - return err -} - -func isptmaster(fd uintptr) (bool, error) { - err := ioctl(fd, syscall.TIOCISPTMASTER, 0) - return err == nil, err -} - -var ( - emptyFiodgnameArg fiodgnameArg - ioctl_FIODNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) -) - -func ptsname(f *os.File) (string, error) { - name := make([]byte, _C_SPECNAMELEN) - fa := fiodgnameArg{Name: (*byte)(unsafe.Pointer(&name[0])), Len: _C_SPECNAMELEN, Pad_cgo_0: [4]byte{0, 0, 0, 0}} - - err := ioctl(f.Fd(), ioctl_FIODNAME, uintptr(unsafe.Pointer(&fa))) - if err != nil { - return "", err - } - - for i, c := range name { - if c == 0 { - s := "/dev/" + string(name[:i]) - return strings.Replace(s, "ptm", "pts", -1), nil - } - } - return "", errors.New("TIOCPTYGNAME string not NUL-terminated") -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_freebsd.go b/agents/go-agents/vendor/github.com/kr/pty/pty_freebsd.go deleted file mode 100644 index 63b6d91337a..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_freebsd.go +++ /dev/null @@ -1,78 +0,0 @@ -package pty - -import ( - "errors" - "os" - "syscall" - "unsafe" -) - -func posixOpenpt(oflag int) (fd int, err error) { - r0, _, e1 := syscall.Syscall(syscall.SYS_POSIX_OPENPT, uintptr(oflag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = e1 - } - return fd, err -} - -func open() (pty, tty *os.File, err error) { - fd, err := posixOpenpt(syscall.O_RDWR | syscall.O_CLOEXEC) - if err != nil { - return nil, nil, err - } - p := os.NewFile(uintptr(fd), "/dev/pts") - // In case of error after this point, make sure we close the pts fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - t, err := os.OpenFile("/dev/"+sname, os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func isptmaster(fd uintptr) (bool, error) { - err := ioctl(fd, syscall.TIOCPTMASTER, 0) - return err == nil, err -} - -var ( - emptyFiodgnameArg fiodgnameArg - ioctlFIODGNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) -) - -func ptsname(f *os.File) (string, error) { - master, err := isptmaster(f.Fd()) - if err != nil { - return "", err - } - if !master { - return "", syscall.EINVAL - } - - const n = _C_SPECNAMELEN + 1 - var ( - buf = make([]byte, n) - arg = fiodgnameArg{Len: n, Buf: (*byte)(unsafe.Pointer(&buf[0]))} - ) - if err := ioctl(f.Fd(), ioctlFIODGNAME, uintptr(unsafe.Pointer(&arg))); err != nil { - return "", err - } - - for i, c := range buf { - if c == 0 { - return string(buf[:i]), nil - } - } - return "", errors.New("FIODGNAME string not NUL-terminated") -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_linux.go b/agents/go-agents/vendor/github.com/kr/pty/pty_linux.go deleted file mode 100644 index 296dd212985..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_linux.go +++ /dev/null @@ -1,51 +0,0 @@ -package pty - -import ( - "os" - "strconv" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) - if err != nil { - return nil, nil, err - } - // In case of error after this point, make sure we close the ptmx fd. - defer func() { - if err != nil { - _ = p.Close() // Best effort. - } - }() - - sname, err := ptsname(p) - if err != nil { - return nil, nil, err - } - - if err := unlockpt(p); err != nil { - return nil, nil, err - } - - t, err := os.OpenFile(sname, os.O_RDWR|syscall.O_NOCTTY, 0) - if err != nil { - return nil, nil, err - } - return p, t, nil -} - -func ptsname(f *os.File) (string, error) { - var n _C_uint - err := ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n))) - if err != nil { - return "", err - } - return "/dev/pts/" + strconv.Itoa(int(n)), nil -} - -func unlockpt(f *os.File) error { - var u _C_int - // use TIOCSPTLCK with a zero valued arg to clear the slave pty lock - return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u))) -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_openbsd.go b/agents/go-agents/vendor/github.com/kr/pty/pty_openbsd.go deleted file mode 100644 index 6e7aeae7c07..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_openbsd.go +++ /dev/null @@ -1,33 +0,0 @@ -package pty - -import ( - "os" - "syscall" - "unsafe" -) - -func open() (pty, tty *os.File, err error) { - /* - * from ptm(4): - * The PTMGET command allocates a free pseudo terminal, changes its - * ownership to the caller, revokes the access privileges for all previous - * users, opens the file descriptors for the master and slave devices and - * returns them to the caller in struct ptmget. - */ - - p, err := os.OpenFile("/dev/ptm", os.O_RDWR|syscall.O_CLOEXEC, 0) - if err != nil { - return nil, nil, err - } - defer p.Close() - - var ptm ptmget - if err := ioctl(p.Fd(), uintptr(ioctl_PTMGET), uintptr(unsafe.Pointer(&ptm))); err != nil { - return nil, nil, err - } - - pty = os.NewFile(uintptr(ptm.Cfd), "/dev/ptm") - tty = os.NewFile(uintptr(ptm.Sfd), "/dev/ptm") - - return pty, tty, nil -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/pty_unsupported.go b/agents/go-agents/vendor/github.com/kr/pty/pty_unsupported.go deleted file mode 100644 index 9a3e721bc42..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/pty_unsupported.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !linux,!darwin,!freebsd,!dragonfly,!openbsd - -package pty - -import ( - "os" -) - -func open() (pty, tty *os.File, err error) { - return nil, nil, ErrUnsupported -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/run.go b/agents/go-agents/vendor/github.com/kr/pty/run.go deleted file mode 100644 index baecca8af93..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/run.go +++ /dev/null @@ -1,34 +0,0 @@ -// +build !windows - -package pty - -import ( - "os" - "os/exec" - "syscall" -) - -// Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, -// and c.Stderr, calls c.Start, and returns the File of the tty's -// corresponding pty. -func Start(c *exec.Cmd) (pty *os.File, err error) { - pty, tty, err := Open() - if err != nil { - return nil, err - } - defer tty.Close() - c.Stdout = tty - c.Stdin = tty - c.Stderr = tty - if c.SysProcAttr == nil { - c.SysProcAttr = &syscall.SysProcAttr{} - } - c.SysProcAttr.Setctty = true - c.SysProcAttr.Setsid = true - err = c.Start() - if err != nil { - pty.Close() - return nil, err - } - return pty, err -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/types.go b/agents/go-agents/vendor/github.com/kr/pty/types.go deleted file mode 100644 index 5aecb6bcdcb..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/types.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build ignore - -package pty - -import "C" - -type ( - _C_int C.int - _C_uint C.uint -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/types_dragonfly.go b/agents/go-agents/vendor/github.com/kr/pty/types_dragonfly.go deleted file mode 100644 index 5c0493b8517..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/types_dragonfly.go +++ /dev/null @@ -1,17 +0,0 @@ -// +build ignore - -package pty - -/* -#define _KERNEL -#include -#include -#include -*/ -import "C" - -const ( - _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ -) - -type fiodgnameArg C.struct_fiodname_args diff --git a/agents/go-agents/vendor/github.com/kr/pty/types_freebsd.go b/agents/go-agents/vendor/github.com/kr/pty/types_freebsd.go deleted file mode 100644 index ce3eb951810..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/types_freebsd.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build ignore - -package pty - -/* -#include -#include -*/ -import "C" - -const ( - _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ -) - -type fiodgnameArg C.struct_fiodgname_arg diff --git a/agents/go-agents/vendor/github.com/kr/pty/types_openbsd.go b/agents/go-agents/vendor/github.com/kr/pty/types_openbsd.go deleted file mode 100644 index 47701b5f9e0..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/types_openbsd.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build ignore - -package pty - -/* -#include -#include -#include -*/ -import "C" - -type ptmget C.struct_ptmget - -var ioctl_PTMGET = C.PTMGET diff --git a/agents/go-agents/vendor/github.com/kr/pty/util.go b/agents/go-agents/vendor/github.com/kr/pty/util.go deleted file mode 100644 index 68a8584cfeb..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/util.go +++ /dev/null @@ -1,64 +0,0 @@ -// +build !windows - -package pty - -import ( - "os" - "syscall" - "unsafe" -) - -// InheritSize applies the terminal size of master to slave. This should be run -// in a signal handler for syscall.SIGWINCH to automatically resize the slave when -// the master receives a window size change notification. -func InheritSize(master, slave *os.File) error { - size, err := GetsizeFull(master) - if err != nil { - return err - } - err = Setsize(slave, size) - if err != nil { - return err - } - return nil -} - -// Setsize resizes t to s. -func Setsize(t *os.File, ws *Winsize) error { - return windowRectCall(ws, t.Fd(), syscall.TIOCSWINSZ) -} - -// GetsizeFull returns the full terminal size description. -func GetsizeFull(t *os.File) (size *Winsize, err error) { - var ws Winsize - err = windowRectCall(&ws, t.Fd(), syscall.TIOCGWINSZ) - return &ws, err -} - -// Getsize returns the number of rows (lines) and cols (positions -// in each line) in terminal t. -func Getsize(t *os.File) (rows, cols int, err error) { - ws, err := GetsizeFull(t) - return int(ws.Rows), int(ws.Cols), err -} - -// Winsize describes the terminal size. -type Winsize struct { - Rows uint16 // ws_row: Number of rows (in cells) - Cols uint16 // ws_col: Number of columns (in cells) - X uint16 // ws_xpixel: Width in pixels - Y uint16 // ws_ypixel: Height in pixels -} - -func windowRectCall(ws *Winsize, fd, a2 uintptr) error { - _, _, errno := syscall.Syscall( - syscall.SYS_IOCTL, - fd, - a2, - uintptr(unsafe.Pointer(ws)), - ) - if errno != 0 { - return syscall.Errno(errno) - } - return nil -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_386.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_386.go deleted file mode 100644 index ff0b8fd838f..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_386.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_amd64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_amd64.go deleted file mode 100644 index ff0b8fd838f..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_amd64.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm.go deleted file mode 100644 index ff0b8fd838f..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm.go +++ /dev/null @@ -1,9 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm64.go deleted file mode 100644 index 6c29a4b9188..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -// +build arm64 - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go deleted file mode 100644 index 6b0ba037f89..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go +++ /dev/null @@ -1,14 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_dragonfly.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Name *byte - Len uint32 - Pad_cgo_0 [4]byte -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_386.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_386.go deleted file mode 100644 index d9975374e3c..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_386.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Buf *byte -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go deleted file mode 100644 index 5fa102fcdf6..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go +++ /dev/null @@ -1,14 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Pad_cgo_0 [4]byte - Buf *byte -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_arm.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_arm.go deleted file mode 100644 index d9975374e3c..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_freebsd_arm.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package pty - -const ( - _C_SPECNAMELEN = 0x3f -) - -type fiodgnameArg struct { - Len int32 - Buf *byte -} diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_mipsx.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_mipsx.go deleted file mode 100644 index f0ce74086ae..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_mipsx.go +++ /dev/null @@ -1,12 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -// +build linux -// +build mips mipsle mips64 mips64le - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_386.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_386.go deleted file mode 100644 index ccb3aab9ae9..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_386.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package pty - -type ptmget struct { - Cfd int32 - Sfd int32 - Cn [16]int8 - Sn [16]int8 -} - -var ioctl_PTMGET = 0x40287401 diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go deleted file mode 100644 index e67051688f0..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_openbsd_amd64.go +++ /dev/null @@ -1,13 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package pty - -type ptmget struct { - Cfd int32 - Sfd int32 - Cn [16]int8 - Sn [16]int8 -} - -var ioctl_PTMGET = 0x40287401 diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64.go deleted file mode 100644 index 4e1af84312b..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build ppc64 - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64le.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64le.go deleted file mode 100644 index e6780f4e237..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_ppc64le.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build ppc64le - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/go-agents/vendor/github.com/kr/pty/ztypes_s390x.go b/agents/go-agents/vendor/github.com/kr/pty/ztypes_s390x.go deleted file mode 100644 index a7452b61cb3..00000000000 --- a/agents/go-agents/vendor/github.com/kr/pty/ztypes_s390x.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build s390x - -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types.go - -package pty - -type ( - _C_int int32 - _C_uint uint32 -) diff --git a/agents/ls-camel/pom.xml b/agents/ls-camel/pom.xml deleted file mode 100644 index b6436c9ddab..00000000000 --- a/agents/ls-camel/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-camel-agent - Language Server Apache Camel Agent - diff --git a/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.json b/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.json deleted file mode 100644 index b3b9bc2133d..00000000000 --- a/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.camel", - "version": "1.0.0", - "name": "Apache Camel language server", - "description": "Apache Camel intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.script.sh b/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.script.sh deleted file mode 100644 index 2318d3a8c77..00000000000 --- a/agents/ls-camel/src/main/resources/installers/1.0.0/org.eclipse.che.ls.camel.script.sh +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=https://github.com/camel-tooling/camel-language-server/releases/download/1.0.0-SNAPSHOT/camel-lsp-server-1.0.0-SNAPSHOT.jar -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-camel -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - - -############################### -### Install Apache Camel LS ### -############################### - -curl -L -s ${AGENT_BINARIES_URI} -o ${LS_DIR}/camel-lsp-server.jar - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "java -jar ${LS_DIR}/camel-lsp-server.jar" > ${LS_LAUNCHER} diff --git a/agents/ls-clang/pom.xml b/agents/ls-clang/pom.xml deleted file mode 100644 index 2a6366c68cd..00000000000 --- a/agents/ls-clang/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-clang-agent - Language Server Clang Agent - diff --git a/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.json b/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.json deleted file mode 100644 index 0cbe6283df3..00000000000 --- a/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.clangd", - "version": "1.0.0", - "name": "Clangd language server", - "description": "Clangd intellisense for C/C++ projects.", - "dependencies": [], - "properties": {} - } diff --git a/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.script.sh b/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.script.sh deleted file mode 100644 index 67a5db59a06..00000000000 --- a/agents/ls-clang/src/main/resources/installers/1.0.0/org.eclipse.che.ls.clang.script.sh +++ /dev/null @@ -1,173 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } -command -v wget >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" wget"; } - -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-clangd -LS_LAUNCHER=${LS_DIR}/launch.sh -CLANGD_VERSION=6.0 -CLANGD_BINARY=clangd - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################### -#### Install packages ### -######################### -# -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - echo "LLVM / Clang ${CLANGD_VERSION} not supported on Red Hat Enterprise Linux 7."; - exit 1; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - echo "LLVM / Clang ${CLANGD_VERSION} not supported on Red Hat Enterprise Linux 6."; - exit 1; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - { - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; - # Fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421 - ${SUDO} apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-${CLANGD_VERSION} main"; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y clang-tools-${CLANGD_VERSION}; - ${SUDO} ln -s /usr/bin/clangd-${CLANGD_VERSION} /usr/bin/clangd - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - { - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; - # Fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421 - ${SUDO} apt-add-repository "deb http://apt.llvm.org/jessie/ llvm-toolchain-jessie-${CLANGD_VERSION} main"; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y clang-tools-${CLANGD_VERSION}; - ${SUDO} ln -s /usr/bin/clangd-${CLANGD_VERSION} /usr/bin/clangd - } - -## Fedora 23 -############ -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - echo "LLVM / Clang ${CLANGD_VERSION} not supported on Fedora 23."; - exit 1; - } - -## CentOS 7.1 & Oracle Linux 7.1 -################################ -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - echo "LLVM / Clang ${CLANGD_VERSION} not supported on CentOS."; - exit 1; - } - -## openSUSE 13.2 -################ -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v ${CLANGD_BINARY} >/dev/null 2>&1 || { - echo "LLVM / Clang ${CLANGD_VERSION} not supported on OpenSUSE 13.2."; - exit 1; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################### -### Install Clangd LS ### -######################### - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "tee -a ${HOME}/clangd-input.log | clangd -disable-symbolication -pretty -resource-dir=/usr/include/ -enable-snippets | tee -a ${HOME}/clangd-output.log" > ${LS_LAUNCHER} diff --git a/agents/ls-csharp/pom.xml b/agents/ls-csharp/pom.xml deleted file mode 100644 index 728d5be167b..00000000000 --- a/agents/ls-csharp/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-csharp-agent - Language Server C# Agent - diff --git a/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.json b/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.json deleted file mode 100644 index 5dc363a6e37..00000000000 --- a/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.csharp", - "version": "1.0.1", - "name": "C# language server", - "description": "C# intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.script.sh b/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.script.sh deleted file mode 100644 index 2a0f26c06b1..00000000000 --- a/agents/ls-csharp/src/main/resources/installers/1.0.1/org.eclipse.che.ls.csharp.script.sh +++ /dev/null @@ -1,208 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -LS_CSHARP_VERSION="1.31.1" -AGENT_BINARIES_URI="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${LS_CSHARP_VERSION}/omnisharp-linux-x64.tar.gz" -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-csharp -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - ${SUDO} subscription-manager repos --enable=rhel-7-server-dotnet-rpms; - ${SUDO} yum install scl-utils rh-dotnetcore20; - ${SUDO} scl enable rh-dotnetcore20 bash; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - ${SUDO} subscription-manager repos --enable=rhel-7-server-dotnet-rpms; - ${SUDO} yum install scl-utils rh-dotnetcore20; - ${SUDO} scl enable rh-dotnetcore20 bash; - } - - -# Install for Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17, 18 (64 bit) -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - RELEASE_NAME="trusty" - { - if echo ${LINUX_VERSION} | grep -qi "14.04"; then - RELEASE_NAME="trusty" - fi - if echo ${LINUX_VERSION} | grep -qi "16.04"; then - RELEASE_NAME="xenial" - fi - if echo ${LINUX_VERSION} | grep -qi "16.10"; then - RELEASE_NAME="yakkety" - fi - }; - - command -v dotnet >/dev/null 2>&1 || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install apt-transport-https; - - ${SUDO} sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet-release/ '${RELEASE_NAME}' main" > /etc/apt/sources.list.d/dotnetdev.list' - ${SUDO} apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 - - ${SUDO} apt-get update - ${SUDO} apt-get -y install dotnet-sdk-2.0.0-preview2-006497 - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - curl -L -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-preview2-linux-x64-bin; - ${SUDO} apt-get update; - ${SUDO} apt-get -y install libunwind8 gettext; - ${SUDO} mkdir -p /opt/dotnet; - ${SUDO} tar zxf dotnet.tar.gz -C /opt/dotnet; - rm dotnet.tar.gz; - ${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin; - } - -# Fedora 24, 25, 26 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - PACKAGES=${PACKAGES}" procps-ng" - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - curl -L -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-preview2-linux-x64-bin; - ${SUDO} dnf -y install libunwind libicu; - ${SUDO} mkdir -p /opt/dotnet; - ${SUDO} tar zxf dotnet.tar.gz -C /opt/dotnet; - rm dotnet.tar.gz; - ${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin; - } - -# CentOS 7.1 (64 bit) & Oracle Linux 7.1 (64 bit) -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - curl -L -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-preview2-linux-x64-bin; - ${SUDO} yum -y install libunwind libicu; - ${SUDO} mkdir -p /opt/dotnet; - ${SUDO} tar zxf dotnet.tar.gz -C /opt/dotnet; - rm dotnet.tar.gz; - ${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin; - } - -# SUSE Linux Enterprise Server (64 bit), openSUSE (64 bit) -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v dotnet >/dev/null 2>&1 || { - curl -L -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-preview2-linux-x64-bin - ${SUDO} zypper install -y libunwind libicu; - ${SUDO} mkdir -p /opt/dotnet; - ${SUDO} tar zxf dotnet.tar.gz -C /opt/dotnet; - rm dotnet.tar.gz; - ${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat /etc/os-release - exit 1 -fi - - -##################### -### Install C# LS ### -##################### - - -if [ ! -f "${LS_DIR}/run" ]; then - echo "Downloading C# language server" - curl -s -L -o ${LS_DIR}/omnisharp-linux-x64.tar.gz ${AGENT_BINARIES_URI} - cd ${LS_DIR} && tar -xzf omnisharp-linux-x64.tar.gz -fi - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "${LS_DIR}/run -lsp" > ${LS_LAUNCHER} diff --git a/agents/ls-golang/pom.xml b/agents/ls-golang/pom.xml deleted file mode 100644 index 20d61de68e4..00000000000 --- a/agents/ls-golang/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-golang-agent - Language Server Golang Agent - diff --git a/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.json b/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.json deleted file mode 100644 index 16c45a9c85e..00000000000 --- a/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.golang", - "version": "0.1.7", - "name": "Golang language server", - "description": "Go intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.script.sh b/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.script.sh deleted file mode 100644 index d89b6543e79..00000000000 --- a/agents/ls-golang/src/main/resources/installers/0.1.7/org.eclipse.che.ls.golang.script.sh +++ /dev/null @@ -1,208 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -command -v go >/dev/null 2>&1 || { - echo "<<<<<<<<<<< ERROR >>>>>>>>>>>>" - echo "Go not found in PATH" - echo "Use an image with Go installed" - echo "Exiting" - exit 1 - } -GOLANG_LS_VERSION="0.1.7" -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-golang -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p /projects/.che -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} dnf -y install nodejs; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js - ${SUDO} zypper in nodejs - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -####################### -## Install Golang LS ## -####################### - -if [ ! -d "${LS_DIR}/node_modules" ]; then - cd ${LS_DIR} - echo "Installing Golang Language Server..." - npm i go-language-server@${GOLANG_LS_VERSION} -fi - -## Install LS dependencies - -echo "Installing Golang LS dependencies..." - -go get -v github.com/nsf/gocode -go get -v github.com/uudashr/gopkgs/cmd/gopkgs -go get -v github.com/ramya-rao-a/go-outline -go get -v github.com/acroca/go-symbols -go get -v golang.org/x/tools/cmd/guru -go get -v golang.org/x/tools/cmd/gorename -go get -v github.com/fatih/gomodifytags -go get -v github.com/haya14busa/goplay/cmd/goplay -go get -v github.com/josharian/impl -go get -v github.com/tylerb/gotype-live -go get -v github.com/rogpeppe/godef -go get -v golang.org/x/tools/cmd/godoc -go get -v github.com/zmb3/gogetdoc -go get -v golang.org/x/tools/cmd/goimports -go get -v sourcegraph.com/sqs/goreturns -go get -v github.com/golang/lint/golint -go get -v github.com/cweill/gotests/... -go get -v github.com/alecthomas/gometalinter -go get -v honnef.co/go/tools/... -go get -v github.com/sourcegraph/go-langserver -go get -v github.com/derekparker/delve/cmd/dlv - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} - -echo "nodejs ${LS_DIR}/node_modules/go-language-server/out/src-vscode-mock/cli.js --stdio" > ${LS_LAUNCHER} diff --git a/agents/ls-java/pom.xml b/agents/ls-java/pom.xml deleted file mode 100644 index ffc39db2645..00000000000 --- a/agents/ls-java/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-java-agent - Language Server Java Agent - diff --git a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.json b/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.json deleted file mode 100644 index 6e53dfad5a7..00000000000 --- a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.java", - "version": "1.0.1", - "name": "Java language server", - "description": "Eclipse jdt.ls based language server ", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh b/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh deleted file mode 100644 index 5269e116afa..00000000000 --- a/agents/ls-java/src/main/resources/installers/1.0.1/org.eclipse.che.ls.java.script.sh +++ /dev/null @@ -1,153 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -DOWNLOAD_AGENT_BINARIES_URI='${WORKSPACE_MASTER_URI}/agent-binaries/jdt.ls.tar.gz' - -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-java -LS_LAUNCHER=${LS_DIR}/launch.sh -LS_DATA_DIR=$HOME/jdtls/data - -if [ ! "$CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS" ]; then - CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS="-Xmx1024M" -fi - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -####################### -### Install JDT LS ### -####################### - -# Compute URI of workspace master -WORKSPACE_MASTER_URI=$(echo $CHE_API | cut -d / -f 1-3) - -## Evaluate variables now that prefix is defined -eval "DOWNLOAD_AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI}" - -CA_ARG="" -if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--cacert /tmp/che/secret/ca.crt" -fi - -echo Downloading java LS -curl ${CA_ARG} -sL ${DOWNLOAD_AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -echo writing start script to ${LS_LAUNCHER} -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -EQUINOX_LAUNCHER=$(ls ${LS_DIR}/plugins/org.eclipse.equinox.launcher_*.jar) -echo "java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -noverify ${CHE_WORKSPACE_JDT_LS_HEAP_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4410 -jar ${EQUINOX_LAUNCHER} -configuration ./config_linux -data ${LS_DATA_DIR}" > ${LS_LAUNCHER} diff --git a/agents/ls-json/pom.xml b/agents/ls-json/pom.xml deleted file mode 100644 index c97a933e7c0..00000000000 --- a/agents/ls-json/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-json-agent - Language Server Json Agent - diff --git a/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.json b/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.json deleted file mode 100644 index 13a7c7ba20e..00000000000 --- a/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.json", - "version": "1.0.1", - "name": "JSON language server", - "description": "JSON intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.script.sh b/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.script.sh deleted file mode 100644 index 281b6d6840a..00000000000 --- a/agents/ls-json/src/main/resources/installers/1.0.1/org.eclipse.che.ls.json.script.sh +++ /dev/null @@ -1,182 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.json.binaries/1.0.1 -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-json -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} dnf -y install nodejs; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js - ${SUDO} zypper in nodejs - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} apk update - ${SUDO} apk add nodejs; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -####################### -### Install Json LS ### -####################### - -curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "nodejs ${LS_DIR}/vscode-json-server/out/jsonServerMain.js --stdio" > ${LS_LAUNCHER} diff --git a/agents/ls-php/pom.xml b/agents/ls-php/pom.xml deleted file mode 100644 index 820d778475e..00000000000 --- a/agents/ls-php/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-php-agent - Language Server PHP Agent - diff --git a/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.json b/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.json deleted file mode 100644 index 33cf66a34f4..00000000000 --- a/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.php", - "version": "2.0.1", - "name": "PHP language server", - "description": "PHP intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.script.sh b/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.script.sh deleted file mode 100644 index 05e7bec5fc2..00000000000 --- a/agents/ls-php/src/main/resources/installers/2.0.1/org.eclipse.che.ls.php.script.sh +++ /dev/null @@ -1,134 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.php.binaries/2.0.1 -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-php -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat /etc/os-release - exit 1 -fi - - -###################### -### Install PHP LS ### -###################### - -curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal" > ${LS_LAUNCHER} -echo "${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php" >> ${LS_LAUNCHER} diff --git a/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.json b/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.json deleted file mode 100644 index ea56625b0fc..00000000000 --- a/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.php", - "version": "5.3.7", - "name": "PHP language server", - "description": "PHP intellisense https://github.com/felixfbecker/php-language-server", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.script.sh b/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.script.sh deleted file mode 100644 index 47408fdb3d1..00000000000 --- a/agents/ls-php/src/main/resources/installers/5.3.7/org.eclipse.che.ls.php.script.sh +++ /dev/null @@ -1,134 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.php.binaries/5.3.7 -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-php -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat /etc/os-release - exit 1 -fi - - -###################### -### Install PHP LS ### -###################### - -curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal" > ${LS_LAUNCHER} -echo "${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php" >> ${LS_LAUNCHER} diff --git a/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.json b/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.json deleted file mode 100644 index b821e94c301..00000000000 --- a/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.php", - "version": "5.4.0", - "name": "PHP language server", - "description": "PHP intellisense https://github.com/felixfbecker/php-language-server", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.script.sh b/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.script.sh deleted file mode 100644 index 8fc4babc27a..00000000000 --- a/agents/ls-php/src/main/resources/installers/5.4.0/org.eclipse.che.ls.php.script.sh +++ /dev/null @@ -1,138 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.php.binaries/5.4.0 -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-php -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat /etc/os-release - exit 1 -fi - - -###################### -### Install PHP LS ### -###################### - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} - -if [ ! -d "${LS_DIR}/php-language-server" ]; then - curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - echo "export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal" > ${LS_LAUNCHER} - echo "${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php" >> ${LS_LAUNCHER} -else - echo "php ${LS_DIR}/php-language-server/bin/php-language-server.php" >> ${LS_LAUNCHER} -fi diff --git a/agents/ls-python/pom.xml b/agents/ls-python/pom.xml deleted file mode 100644 index e741fe4f61a..00000000000 --- a/agents/ls-python/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-python-agent - Language Server python Agent - diff --git a/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.json b/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.json deleted file mode 100644 index b624488a03e..00000000000 --- a/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.python", - "version": "1.0.3", - "name": "Python language server", - "description": "Python intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.script.sh b/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.script.sh deleted file mode 100644 index 996f9421a0d..00000000000 --- a/agents/ls-python/src/main/resources/installers/1.0.3/org.eclipse.che.ls.python.script.sh +++ /dev/null @@ -1,206 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -unset PYTHON_DEPS -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } -command -v python3.5 >/dev/null 2>&1 || { PYTHON_DEPS=${PYTHON_DEPS}" python3.5"; } -command -v pip3 >/dev/null 2>&1 || { PYTHON_DEPS=${PYTHON_DEPS}" pip3"; } - -AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.python.binaries/1.0.3 -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-python -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v python3.5 >/dev/null 2>&1 || { - ${SUDO} yum-config-manager --enable rhel-server-rhscl-7-rpms; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} yum-config-manager --enable rhel-server-rhscl-7-rpms; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - if echo ${LINUX_VERSION} | grep -qi "14.04"; then - DEADSNAKES="/etc/apt/sources.list.d/deadsnakes.list"; - ${SUDO} touch ${DEADSNAKES}; - echo "deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - echo "deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - ${SUDO} gpg --keyserver keyserver.ubuntu.com --recv-keys DB82666C; - ${SUDO} gpg --export DB82666C | ${SUDO} apt-key add -; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - else - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5; - ${SUDO} apt-get install -y python3-pip; - fi - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - DEADSNAKES="/etc/apt/sources.list.d/deadsnakes.list"; - ${SUDO} touch ${DEADSNAKES}; - echo "deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - echo "deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - ${SUDO} gpg --keyserver keyserver.ubuntu.com --recv-keys DB82666C; - ${SUDO} gpg --export DB82666C | ${SUDO} apt-key add -; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - PACKAGES=${PACKAGES}" procps-ng" - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} dnf -y install python35 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - - ${SUDO} yum -y install centos-release-scl; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} zypper ar -f http://download.opensuse.org/repositories/home:/Ledest:/bashisms/openSUSE_13.2/ home:Ledest:bashisms - ${SUDO} zypper --no-gpg-checks ref - ${SUDO} zypper install -y python3 - ${SUDO} zypper install -y python3-pip - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################### -### Install Python LS ### -######################### - -curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -cd ${LS_DIR} && ${SUDO} pip3 install --process-dependency-links . - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "pyls" > ${LS_LAUNCHER} diff --git a/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.json b/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.json deleted file mode 100644 index 490081406d7..00000000000 --- a/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.python", - "version": "1.0.4", - "name": "Python language server", - "description": "Python intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.script.sh b/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.script.sh deleted file mode 100644 index d0a254aaa56..00000000000 --- a/agents/ls-python/src/main/resources/installers/1.0.4/org.eclipse.che.ls.python.script.sh +++ /dev/null @@ -1,207 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -unset PYTHON_DEPS -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } -command -v python >/dev/null 2>&1 || { PYTHON_DEPS=${PYTHON_DEPS}" python"; } -command -v pip >/dev/null 2>&1 || { PYTHON_DEPS=${PYTHON_DEPS}" pip"; } - -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-python -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v python >/dev/null 2>&1 || { - ${SUDO} yum-config-manager --enable rhel-server-rhscl-7-rpms; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} yum-config-manager --enable rhel-server-rhscl-7-rpms; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - if echo ${LINUX_VERSION} | grep -qi "14.04"; then - DEADSNAKES="/etc/apt/sources.list.d/deadsnakes.list"; - ${SUDO} touch ${DEADSNAKES}; - echo "deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - echo "deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - ${SUDO} gpg --keyserver keyserver.ubuntu.com --recv-keys DB82666C; - ${SUDO} gpg --export DB82666C | ${SUDO} apt-key add -; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - else - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5; - ${SUDO} apt-get install -y python3-pip; - fi - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - DEADSNAKES="/etc/apt/sources.list.d/deadsnakes.list"; - ${SUDO} touch ${DEADSNAKES}; - echo "deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - echo "deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ${SUDO} tee --append ${DEADSNAKES}; - ${SUDO} gpg --keyserver keyserver.ubuntu.com --recv-keys DB82666C; - ${SUDO} gpg --export DB82666C | ${SUDO} apt-key add -; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y python3.5 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - PACKAGES=${PACKAGES}" procps-ng" - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} dnf -y install python35 bzip2; - ${SUDO} curl https://bootstrap.pypa.io/ez_setup.py -o - | ${SUDO} python3.5 - ${SUDO} easy_install pip - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - - ${SUDO} yum -y install centos-release-scl; - ${SUDO} yum -y install rh-python35 bzip2; - export LD_LIBRARY_PATH="/opt/rh/rh-python35/root/usr/lib64" - export PATH="/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - echo "export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64" >> $HOME/.bashrc - echo "export PATH=/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $HOME/.bashrc - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - test "${PYTHON_DEPS}" = "" || { - ${SUDO} zypper ar -f http://download.opensuse.org/repositories/home:/Ledest:/bashisms/openSUSE_13.2/ home:Ledest:bashisms - ${SUDO} zypper --no-gpg-checks ref - ${SUDO} zypper install -y python - ${SUDO} zypper install -y python-pip - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################### -### Install Python LS ### -######################### - -command -v pyls >/dev/null 2>&1 || { -echo "Installing Python Language Server..." -${SUDO} pip install --upgrade setuptools -${SUDO} pip install 'python-language-server[all]' -} - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "pyls" > ${LS_LAUNCHER} diff --git a/agents/ls-typescript/pom.xml b/agents/ls-typescript/pom.xml deleted file mode 100644 index 2edb3305d5b..00000000000 --- a/agents/ls-typescript/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-typescript-agent - Language Server typescript Agent - diff --git a/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.json b/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.json deleted file mode 100644 index 132c0eb4021..00000000000 --- a/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.js-ts", - "version": "1.0.1", - "name": "TypeScript language server", - "description": "TypeScript intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.script.sh b/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.script.sh deleted file mode 100644 index c8833162bb6..00000000000 --- a/agents/ls-typescript/src/main/resources/installers/1.0.1/org.eclipse.che.ls.typescript.script.sh +++ /dev/null @@ -1,177 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-typescript -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} dnf -y install nodejs; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js - ${SUDO} zypper in nodejs - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################## -### Install JS-TS LS ### -######################## - -# Check if tsserver and typescript-language-server are installed - -unset TS_NPMS -command -v tsserver >/dev/null 2>&1 || { TS_NPMS=${TS_NPMS}" typescript"; } -command -v typescript-language-server >/dev/null 2>&1 || { TS_NPMS=${TS_NPMS}" typescript-language-server"; } - -npm ping -test "${TS_NPMS}" = "" || { - ${SUDO} npm install -g ${TS_NPMS}; - } - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "typescript-language-server --stdio" > ${LS_LAUNCHER} diff --git a/agents/ls-vue/pom.xml b/agents/ls-vue/pom.xml deleted file mode 100644 index c66e433320d..00000000000 --- a/agents/ls-vue/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-vue-agent - Language Server Vue Agent - - - - com.mycila - license-maven-plugin - - - **/*.sh - - - - - - diff --git a/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.json b/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.json deleted file mode 100644 index 85712ebd048..00000000000 --- a/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.vue", - "version": "1.0.0", - "name": "VueJS Language Server", - "description": "VueJS Intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.script.sh b/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.script.sh deleted file mode 100644 index a3e2abbd953..00000000000 --- a/agents/ls-vue/src/main/resources/installers/1.0.0/org.eclipse.che.ls.vue.script.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sébastiend Demanou - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-vue -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(awk '{print $1}' < $FILE) -elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cut -c 1-8 < $FILE) -else - FILE="/etc/os-release" - LINUX_TYPE=$(grep ^ID= < $FILE | tr '[:upper:]' '[:lower:]') -fi - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_10.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_10.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_10.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_10.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_10.x | ${SUDO} bash -; - ${SUDO} dnf -y install nodejs; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_10.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js - ${SUDO} zypper in nodejs - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################## -### Install VueJS LS ### -######################## - -# Check if Vue CLI and vue-language-server are installed - -unset VUE_NPMS -command -v vue >/dev/null 2>&1 || { VUE_NPMS=${VUE_NPMS}" @vue/cli @vue/cli-service-global"; } -command -v vls >/dev/null 2>&1 || { VUE_NPMS=${VUE_NPMS}" vue-language-server"; } - -test "${VUE_NPMS}" = "" || { - ${SUDO} npm install -g ${VUE_NPMS}; - } - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "vls --stdio" > ${LS_LAUNCHER} diff --git a/agents/ls-yaml/pom.xml b/agents/ls-yaml/pom.xml deleted file mode 100644 index f028699eae1..00000000000 --- a/agents/ls-yaml/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ls-yaml-agent - Language Server Yaml Agent - diff --git a/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.json b/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.json deleted file mode 100644 index 911e5b47cdd..00000000000 --- a/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.ls.yaml", - "version": "1.0.0", - "name": "Yaml language server", - "description": "Yaml intellisense", - "dependencies": [], - "properties": {} -} diff --git a/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.script.sh b/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.script.sh deleted file mode 100644 index 9fcfd4cb693..00000000000 --- a/agents/ls-yaml/src/main/resources/installers/1.0.0/org.eclipse.che.ls.yaml.script.sh +++ /dev/null @@ -1,169 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; } - -AGENT_BINARIES_URI=http://download.jboss.org/jbosstools/oxygen/stable/builds/yaml-language-server/yaml-language-server-latest.tar.gz -CHE_DIR=$HOME/che -LS_DIR=${CHE_DIR}/ls-yaml -LS_LAUNCHER=${LS_DIR}/launch.sh - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -MACHINE_TYPE=$(uname -m) - -mkdir -p ${CHE_DIR} -mkdir -p ${LS_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - { - curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -; - }; - - ${SUDO} apt-get update; - ${SUDO} apt-get install -y nodejs; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} dnf -y install nodejs; - } - - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -; - ${SUDO} yum -y install nodejs; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - - command -v nodejs >/dev/null 2>&1 || { - ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js - ${SUDO} zypper in nodejs - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - - -######################## -### Install Yaml LS ### -######################## - -curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR} - -touch ${LS_LAUNCHER} -chmod +x ${LS_LAUNCHER} -echo "nodejs ${LS_DIR}/out/server/src/server.js --stdio" > ${LS_LAUNCHER} diff --git a/agents/pom.xml b/agents/pom.xml deleted file mode 100644 index 4be5bdeb2af..00000000000 --- a/agents/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - che-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - ../pom.xml - - che-agents-parent - pom - Che Agents Parent - - bootstrapper - go-agents - ls-golang - exec - terminal - ssh - unison - ls-json - ls-java - git-credentials - ls-php - ls-python - ls-typescript - ls-csharp - ls-yaml - ls-camel - ls-clang - ls-vue - - diff --git a/agents/ssh/pom.xml b/agents/ssh/pom.xml deleted file mode 100644 index f534bacf5db..00000000000 --- a/agents/ssh/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - ssh-agent - SSH Agent - diff --git a/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.json b/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.json deleted file mode 100644 index 1a0327aa032..00000000000 --- a/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "org.eclipse.che.ssh", - "version": "1.0.0", - "name": "SSH", - "description": "SSH server, key-pair generation", - "dependencies": [], - "properties": {}, - "servers": { - "ssh": { - "port": "22/tcp", - "protocol" : "ssh" - } - } -} diff --git a/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.script.sh b/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.script.sh deleted file mode 100644 index 2b449e23e20..00000000000 --- a/agents/ssh/src/main/resources/installers/1.0.0/org.eclipse.che.ssh.script.sh +++ /dev/null @@ -1,155 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -if ! is_current_user_root && ! is_current_user_sudoer; then - (>&2 echo "Current user is not a sudoer and cannot start SSH daemon. SSH service won't be available for this workspace") - exit 1 -fi - -set_sudo_command -unset PACKAGES - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -############################### -### Install Needed packages ### -############################### - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openSSH"; } - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -# Alpine 3.3 -############$$ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh"; } - test "${PACKAGES}" = "" || { - ${SUDO} apk update; - ${SUDO} apk add openssh ${PACKAGES}; - } - -# Centos 6.6, 6.7, 6.8 -############ -elif echo ${LINUX_TYPE} | grep -qi "CentOS"; then - command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - -else - >&2 echo "Unrecognized Linux Type" - command -v sshd >/dev/null 2>&1 || { - >&2 cat $FILE; - exit 1; - } - ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd -fi - -command -v pidof >/dev/null 2>&1 && { - pidof sshd >/dev/null 2>&1 && exit -} || { - ps -fC sshd >/dev/null 2>&1 && exit -} - -# generate host keys and running sshd - -${SUDO} mkdir -p /var/run/sshd - -${SUDO} /usr/bin/ssh-keygen -A - -${SUDO} /usr/sbin/sshd -D - diff --git a/agents/terminal/pom.xml b/agents/terminal/pom.xml deleted file mode 100644 index 78eac04a418..00000000000 --- a/agents/terminal/pom.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - terminal-agent - Agent :: Terminal - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-sources - compile - - run - - - - - - - - - - - - - - - - - - - - - com.soebes.maven.plugins - iterator-maven-plugin - 0.5.0 - - - compile-go-agents - compile - - iterator - - - - - linux_arm5 - - linux - arm - 5 - - - - linux_arm6 - - linux - arm - 6 - - - - linux_arm7 - - linux - arm - 7 - - - - linux_amd64 - - linux - amd64 - - - - linux_i386 - - linux - 386 - - - - - - - org.codehaus.mojo - exec-maven-plugin - - exec - - go - ${project.build.directory}/go-workspace/src/github.com/eclipse/che/agents/go-agents/terminal-agent - - build - -a - -installsuffix - cgo - -o - ${project.build.directory}/${item}/che-websocket-terminal - - - 0 - ${project.build.directory}/go-workspace - ${go.target.os} - ${go.target.architecture} - ${go.target.arm.version} - - - - - - - - assembly - package - - iterator - - - - linux_arm5 - linux_arm6 - linux_arm7 - linux_amd64 - linux_i386 - - - - - maven-assembly-plugin - - single - - posix - - ${basedir}/src/assembly/assembly.xml - - - - - - - - - - - diff --git a/agents/terminal/src/assembly/assembly.xml b/agents/terminal/src/assembly/assembly.xml deleted file mode 100644 index 37e993c7e56..00000000000 --- a/agents/terminal/src/assembly/assembly.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - ${item} - true - terminal - - zip - tar.gz - - - - ${project.build.directory}/${item} - - che-websocket-terminal - - 0755 - - - - diff --git a/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.json b/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.json deleted file mode 100644 index 788a6108583..00000000000 --- a/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "org.eclipse.che.terminal", - "version": "1.0.0", - "name": "Terminal", - "description": "Embedded web terminal", - "dependencies": [], - "properties": {}, - "servers": { - "terminal": { - "port": "4411/tcp", - "protocol": "ws", - "path" : "/pty", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - } - } -} diff --git a/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.script.sh b/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.script.sh deleted file mode 100644 index 3e11c3b8b46..00000000000 --- a/agents/terminal/src/main/resources/installers/1.0.0/org.eclipse.che.terminal.script.sh +++ /dev/null @@ -1,237 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -CURL_INSTALLED=false -WGET_INSTALLED=false -command -v curl >/dev/null 2>&1 && CURL_INSTALLED=true -command -v wget >/dev/null 2>&1 && WGET_INSTALLED=true - -# no curl, no wget, install curl -if [ ${CURL_INSTALLED} = false ] && [ ${WGET_INSTALLED} = false ]; then - PACKAGES=${PACKAGES}" curl"; - CURL_INSTALLED=true -fi - -CHE_DIR=$HOME/che -LOCAL_AGENT_BINARIES_URI='/mnt/che/terminal/websocket-terminal-${PREFIX}.tar.gz' -DOWNLOAD_AGENT_BINARIES_URI='${WORKSPACE_MASTER_URI}/agent-binaries/${PREFIX}/terminal/websocket-terminal-${PREFIX}.tar.gz' -TARGET_AGENT_BINARIES_URI='file://${CHE_DIR}/websocket-terminal-${PREFIX}.tar.gz' - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi -MACHINE_TYPE=$(uname -m) -SHELL_INTERPRETER="/bin/sh" - - -mkdir -p ${CHE_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -# Centos 6.6, 6.7, 6.8 -############ -elif echo ${LINUX_TYPE} | grep -qi "CentOS"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ - -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - -command -v pidof >/dev/null 2>&1 && { - pidof che-websocket-terminal >/dev/null 2>&1 && exit -} || { - ps -fC che-websocket-terminal >/dev/null 2>&1 && exit -} - - -######################## -### Install Terminal ### -######################## -if echo ${MACHINE_TYPE} | grep -qi "x86_64"; then - PREFIX=linux_amd64 -elif echo ${MACHINE_TYPE} | grep -qi "arm5"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm6"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm7"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "armv7l"; then - PREFIX=linux_arm7 -else - >&2 echo "Unrecognized Machine Type" - >&2 uname -a - exit 1 -fi - -# Compute URI of workspace master -WORKSPACE_MASTER_URI=$(echo $CHE_API | cut -d / -f 1-3) - -## Evaluate variables now that prefix is defined -eval "LOCAL_AGENT_BINARIES_URI=${LOCAL_AGENT_BINARIES_URI}" -eval "DOWNLOAD_AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI}" -eval "TARGET_AGENT_BINARIES_URI=${TARGET_AGENT_BINARIES_URI}" - -LOCAL_AGENT_PATH= -if [ -f "${LOCAL_AGENT_BINARIES_URI}" ]; then - AGENT_BINARIES_URI="file://${LOCAL_AGENT_BINARIES_URI}" - LOCAL_AGENT_PATH=${LOCAL_AGENT_BINARIES_URI} -elif [ -f $(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") ]; then - AGENT_BINARIES_URI="file://"$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") - LOCAL_AGENT_PATH=$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") -else - AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI} -fi - -# If file is already on the filesystem, use it -if [ ! -z ${LOCAL_AGENT_PATH} ]; then - tar zxf ${LOCAL_AGENT_PATH} -C ${CHE_DIR} -else - echo "Terminal Agent binary is downloaded remotely" - # Use curl - if [ ${CURL_INSTALLED} = true ]; then - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--cacert /tmp/che/secret/ca.crt" - fi - - if curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g'); then - curl ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') -s $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - curl ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') -s $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - curl -s $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') | tar xzf - -C ${CHE_DIR} - else - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--ca-certificate /tmp/che/secret/ca.crt" - fi - - # replace https by http as wget may not be able to handle ssl - AGENT_BINARIES_URI=$(echo ${AGENT_BINARIES_URI} | sed 's/https/http/g') - - # use wget - WGET_SPIDER="wget --spider" - if wget 2>&1 | grep -q BusyBox; then - WGET_SPIDER="wget -s" - fi - LOCAL_DOWNLOAD=$(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') - if ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') >/dev/null; then - wget ${CA_ARG} -qO ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - wget ${CA_ARG} -qO- ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - tar xzf ${LOCAL_DOWNLOAD} -C ${CHE_DIR} - fi -fi - - - -if [ -f /bin/bash ]; then - SHELL_INTERPRETER="/bin/bash" -fi - -##################################################### -### terminal-agent run command will be added here ### -##################################################### -$HOME/che/terminal/che-websocket-terminal -addr :4411 -cmd ${SHELL_INTERPRETER} diff --git a/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.json b/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.json deleted file mode 100644 index 360b4338079..00000000000 --- a/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "org.eclipse.che.terminal", - "version": "1.0.1", - "name": "Terminal", - "description": "Embedded web terminal", - "dependencies": [], - "properties": {}, - "servers": { - "terminal": { - "port": "4411/tcp", - "protocol": "ws", - "path" : "/pty", - "attributes": { - "secure": "true", - "unsecuredPaths": "/liveness" - } - } - } -} diff --git a/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.script.sh b/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.script.sh deleted file mode 100644 index e979c83289b..00000000000 --- a/agents/terminal/src/main/resources/installers/1.0.1/org.eclipse.che.terminal.script.sh +++ /dev/null @@ -1,237 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES -command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; } -CURL_INSTALLED=false -WGET_INSTALLED=false -command -v curl >/dev/null 2>&1 && CURL_INSTALLED=true -command -v wget >/dev/null 2>&1 && WGET_INSTALLED=true - -# no curl, no wget, install curl -if [ ${CURL_INSTALLED} = false ] && [ ${WGET_INSTALLED} = false ]; then - PACKAGES=${PACKAGES}" curl"; - CURL_INSTALLED=true -fi - -CHE_DIR=$HOME/che -LOCAL_AGENT_BINARIES_URI='/mnt/che/terminal/websocket-terminal-${PREFIX}.tar.gz' -DOWNLOAD_AGENT_BINARIES_URI='${WORKSPACE_MASTER_URI}/agent-binaries/${PREFIX}/terminal/websocket-terminal-${PREFIX}.tar.gz' -TARGET_AGENT_BINARIES_URI='file://${CHE_DIR}/websocket-terminal-${PREFIX}.tar.gz' - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi -MACHINE_TYPE=$(uname -m) -SHELL_INTERPRETER="/bin/sh" - - -mkdir -p ${CHE_DIR} - -######################## -### Install packages ### -######################## - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - test "${PACKAGES}" = "" || { - ${SUDO} apk update - ${SUDO} apk add ${PACKAGES}; - } - -# Centos 6.6, 6.7, 6.8 -############ -elif echo ${LINUX_TYPE} | grep -qi "CentOS"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ - -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - test "${PACKAGES}" = "" || { - ${SUDO} yum install ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat $FILE - exit 1 -fi - -######################## -### Install Terminal ### -######################## -if echo ${MACHINE_TYPE} | grep -qi "x86_64"; then - PREFIX=linux_amd64 -elif echo ${MACHINE_TYPE} | grep -qi "arm5"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm6"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "arm7"; then - PREFIX=linux_arm7 -elif echo ${MACHINE_TYPE} | grep -qi "armv7l"; then - PREFIX=linux_arm7 -else - >&2 echo "Unrecognized Machine Type" - >&2 uname -a - exit 1 -fi - -# Compute URI of workspace master -WORKSPACE_MASTER_URI=$(echo $CHE_API | cut -d / -f 1-3) - -## Evaluate variables now that prefix is defined -eval "LOCAL_AGENT_BINARIES_URI=${LOCAL_AGENT_BINARIES_URI}" -eval "DOWNLOAD_AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI}" -eval "TARGET_AGENT_BINARIES_URI=${TARGET_AGENT_BINARIES_URI}" - -LOCAL_AGENT_PATH= -if [ -f "${LOCAL_AGENT_BINARIES_URI}" ]; then - AGENT_BINARIES_URI="file://${LOCAL_AGENT_BINARIES_URI}" - LOCAL_AGENT_PATH=${LOCAL_AGENT_BINARIES_URI} -elif [ -f $(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") ]; then - AGENT_BINARIES_URI="file://"$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") - LOCAL_AGENT_PATH=$(echo "${LOCAL_AGENT_BINARIES_URI}" | sed "s/-${PREFIX}//g") -else - AGENT_BINARIES_URI=${DOWNLOAD_AGENT_BINARIES_URI} -fi - -# If file is already on the filesystem, use it -if [ ! -z ${LOCAL_AGENT_PATH} ]; then - tar zxf ${LOCAL_AGENT_PATH} -C ${CHE_DIR} -else - echo "Terminal Agent binary is downloaded remotely" - # Use curl - if [ ${CURL_INSTALLED} = true ]; then - - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--cacert /tmp/che/secret/ca.crt" - fi - - if curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g'); then - curl -sSf ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif curl ${CA_ARG} -o /dev/null --silent --head --fail $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - curl -sSf ${CA_ARG} -o $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - else - # both of test curl commands failed. - # perform them without --silent option to propagate errors - echo "Trying: curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g')" - curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - echo "Trying: curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g')" - curl -sSf ${CA_ARG} -o /dev/null --head $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - curl -sSf $(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') | tar xzf - -C ${CHE_DIR} - else - CA_ARG="" - if [ -f /tmp/che/secret/ca.crt ]; then - echo "Certificate File /tmp/che/secret/ca.crt will be used for binaries downloading" - CA_ARG="--ca-certificate /tmp/che/secret/ca.crt" - fi - - # replace https by http as wget may not be able to handle ssl - AGENT_BINARIES_URI=$(echo ${AGENT_BINARIES_URI} | sed 's/https/http/g') - - # use wget - WGET_SPIDER="wget --spider" - if wget 2>&1 | grep -q BusyBox; then - WGET_SPIDER="wget -s" - fi - LOCAL_DOWNLOAD=$(echo ${TARGET_AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g' | sed 's/file:\/\///g') - if ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') >/dev/null; then - wget ${CA_ARG} -qO ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/\${PREFIX}/'${PREFIX}'/g') - elif ${WGET_SPIDER} ${CA_ARG} -q $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g'); then - wget ${CA_ARG} -qO- ${LOCAL_DOWNLOAD} $(echo ${AGENT_BINARIES_URI} | sed 's/-\${PREFIX}//g') - fi - tar xzf ${LOCAL_DOWNLOAD} -C ${CHE_DIR} - fi -fi - - - -if [ -f /bin/bash ]; then - SHELL_INTERPRETER="/bin/bash" -fi - -TERMINAL_PORT=${CHE_SERVER_TERMINAL_PORT:-4411} - -$HOME/che/terminal/che-websocket-terminal -addr :${TERMINAL_PORT} -cmd ${SHELL_INTERPRETER} diff --git a/agents/unison/pom.xml b/agents/unison/pom.xml deleted file mode 100644 index ed7f5a0a7cb..00000000000 --- a/agents/unison/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - 4.0.0 - - che-agents-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - unison-agent - Unison Agent - diff --git a/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.json b/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.json deleted file mode 100644 index acf56f471a1..00000000000 --- a/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "org.eclipse.che.unison", - "version": "1.0.0", - "name": "File sync", - "description": "Unison File Synchronizer", - "dependencies": [], - "properties": {} -} diff --git a/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.script.sh b/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.script.sh deleted file mode 100644 index 2867c15254f..00000000000 --- a/agents/unison/src/main/resources/installers/1.0.0/org.eclipse.che.unison.script.sh +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -is_current_user_root() { - test "$(id -u)" = 0 -} - -is_current_user_sudoer() { - sudo -n true > /dev/null 2>&1 -} - -set_sudo_command() { - if is_current_user_sudoer && ! is_current_user_root; then SUDO="sudo -E"; else unset SUDO; fi -} - -set_sudo_command -unset PACKAGES - -if [ -f /etc/centos-release ]; then - FILE="/etc/centos-release" - LINUX_TYPE=$(cat $FILE | awk '{print $1}') - elif [ -f /etc/redhat-release ]; then - FILE="/etc/redhat-release" - LINUX_TYPE=$(cat $FILE | cut -c 1-8) - else - FILE="/etc/os-release" - LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]') - LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=) -fi - -############################### -### Install Needed packaged ### -############################### - -# Red Hat Enterprise Linux 7 -############################ -if echo ${LINUX_TYPE} | grep -qi "rhel"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Red Hat Enterprise Linux 6 -############################ -elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# Ubuntu 14.04 16.04 / Linux Mint 17 -#################################### -elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Debian 8 -########## -elif echo ${LINUX_TYPE} | grep -qi "debian"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} apt-get update; - ${SUDO} apt-get -y install ${PACKAGES}; - } - -# Fedora 23 -########### -elif echo ${LINUX_TYPE} | grep -qi "fedora"; then - command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; } - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} dnf -y install ${PACKAGES}; - } - -# CentOS 7.1 & Oracle Linux 7.1 -############################### -elif echo ${LINUX_TYPE} | grep -qi "centos"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} yum -y install ${PACKAGES}; - } - -# openSUSE 13.2 -############### -elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} zypper install -y ${PACKAGES}; - } - -# Alpine 3.3 -############$$ -elif echo ${LINUX_TYPE} | grep -qi "alpine"; then - command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; } - test "${PACKAGES}" = "" || { - ${SUDO} apk update; - ${SUDO} apk add ${PACKAGES}; - } - -else - >&2 echo "Unrecognized Linux Type" - >&2 cat /etc/os-release - exit 1 -fi diff --git a/assembly/assembly-ide-war/src/main/webapp/META-INF/context.xml b/assembly/assembly-ide-war/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 6182051ddf6..00000000000 --- a/assembly/assembly-ide-war/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 995e67c65cb..62861cefc18 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -25,7 +25,7 @@ org.eclipse.che - assembly-ide-war + assembly-root-war war @@ -33,44 +33,11 @@ assembly-workspace-loader-war war - - org.eclipse.che - assembly-wsagent-server - tar.gz - org.eclipse.che assembly-wsmaster-war war - - org.eclipse.che - bootstrapper - zip - linux_amd64 - - - org.eclipse.che - exec-agent - tar.gz - linux_amd64 - - - org.eclipse.che - terminal-agent - tar.gz - linux_amd64 - - - org.eclipse.che.core - che-core-ide-stacks - jar - - - org.eclipse.che.core - che-core-ide-templates - jar - org.eclipse.che.dashboard che-dashboard-war @@ -91,17 +58,6 @@ che-tomcat8-slf4j-logback zip - - org.eclipse.che.ls.jdt - jdt.ls.extension.product - tar.gz - - - org.eclipse.che.plugin - che-plugin-sdk-tools - jar - jar-with-dependencies - org.postgresql postgresql diff --git a/assembly/assembly-main/src/assembly/assembly.xml b/assembly/assembly-main/src/assembly/assembly.xml index c1d3c3c34fe..b7080be2c04 100644 --- a/assembly/assembly-main/src/assembly/assembly.xml +++ b/assembly/assembly-main/src/assembly/assembly.xml @@ -35,7 +35,7 @@ tomcat/webapps ROOT.war - org.eclipse.che:assembly-ide-war + org.eclipse.che:assembly-root-war @@ -74,63 +74,6 @@ org.eclipse.che.lib:che-swagger-war - - false - false - lib - jdt.ls.tar.gz - - org.eclipse.che.ls.jdt:jdt.ls.extension.product - - - - false - false - lib - ws-agent.tar.gz - - org.eclipse.che:assembly-wsagent-server - - - - false - false - lib/linux_amd64/terminal - websocket-terminal-linux_amd64.tar.gz - - org.eclipse.che:terminal-agent:tar.gz:linux_amd64 - - - - false - true - lib/linux_amd64 - - org.eclipse.che:bootstrapper:zip:linux_amd64 - - - - false - false - lib/linux_amd64/exec - exec-agent-linux_amd64.tar.gz - - org.eclipse.che:exec-agent:tar.gz:linux_amd64 - - - - false - true - templates - - org.eclipse.che.core:che-core-ide-templates - - - - META-INF/** - - - false false diff --git a/assembly/assembly-ide-war/pom.xml b/assembly/assembly-root-war/pom.xml similarity index 78% rename from assembly/assembly-ide-war/pom.xml rename to assembly/assembly-root-war/pom.xml index 194ebb50ebf..66565f4ac9f 100644 --- a/assembly/assembly-ide-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -19,10 +19,10 @@ org.eclipse.che 7.0.0-rc-4.0-SNAPSHOT - assembly-ide-war + assembly-root-war war Che IDE :: War Packaging - Packages Che IDE GWT application as a Java web app + Packages Che root web app UTF-8 @@ -31,10 +31,6 @@ ch.qos.logback logback-classic - - com.google.inject - guice - com.google.inject.extensions guice-servlet @@ -43,12 +39,6 @@ javax.inject javax.inject - - - org.eclipse.che - che-ide-gwt-app - war - org.eclipse.che.core che-core-commons-inject @@ -100,18 +90,6 @@ - - org.eclipse.che.core - che-core-dynamodule-maven-plugin - - - generate - - build - - - - org.apache.maven.plugins maven-dependency-plugin @@ -120,11 +98,9 @@ analyze - - org.eclipse.che:che-ide-gwt-app + ch.qos.logback:logback-classic org.eclipse.che.core:che-core-commons-j2ee org.eclipse.che.core:che-core-commons-logback - ch.qos.logback:logback-classic diff --git a/assembly/assembly-ide-war/src/main/java/org/eclipse/che/ApiAccessRejectionFilter.java b/assembly/assembly-root-war/src/main/java/org/eclipse/che/ApiAccessRejectionFilter.java similarity index 100% rename from assembly/assembly-ide-war/src/main/java/org/eclipse/che/ApiAccessRejectionFilter.java rename to assembly/assembly-root-war/src/main/java/org/eclipse/che/ApiAccessRejectionFilter.java diff --git a/assembly/assembly-ide-war/src/main/java/org/eclipse/che/DashboardModule.java b/assembly/assembly-root-war/src/main/java/org/eclipse/che/DashboardModule.java similarity index 100% rename from assembly/assembly-ide-war/src/main/java/org/eclipse/che/DashboardModule.java rename to assembly/assembly-root-war/src/main/java/org/eclipse/che/DashboardModule.java diff --git a/assembly/assembly-ide-war/src/main/java/org/eclipse/che/DashboardRedirectionFilter.java b/assembly/assembly-root-war/src/main/java/org/eclipse/che/DashboardRedirectionFilter.java similarity index 100% rename from assembly/assembly-ide-war/src/main/java/org/eclipse/che/DashboardRedirectionFilter.java rename to assembly/assembly-root-war/src/main/java/org/eclipse/che/DashboardRedirectionFilter.java diff --git a/assembly/assembly-ide-war/src/main/java/org/eclipse/che/IDEController.java b/assembly/assembly-root-war/src/main/java/org/eclipse/che/IDEController.java similarity index 100% rename from assembly/assembly-ide-war/src/main/java/org/eclipse/che/IDEController.java rename to assembly/assembly-root-war/src/main/java/org/eclipse/che/IDEController.java diff --git a/ide/che-ide-gwt-app/src/main/module.gwt.xml b/assembly/assembly-root-war/src/main/webapp/META-INF/context.xml similarity index 75% rename from ide/che-ide-gwt-app/src/main/module.gwt.xml rename to assembly/assembly-root-war/src/main/webapp/META-INF/context.xml index 4d6c9adfe95..a4eb10d7964 100644 --- a/ide/che-ide-gwt-app/src/main/module.gwt.xml +++ b/assembly/assembly-root-war/src/main/webapp/META-INF/context.xml @@ -12,6 +12,6 @@ Red Hat, Inc. - initial API and implementation --> - - - + + + diff --git a/assembly/assembly-ide-war/src/main/webapp/WEB-INF/rewrite.config b/assembly/assembly-root-war/src/main/webapp/WEB-INF/rewrite.config similarity index 100% rename from assembly/assembly-ide-war/src/main/webapp/WEB-INF/rewrite.config rename to assembly/assembly-root-war/src/main/webapp/WEB-INF/rewrite.config diff --git a/assembly/assembly-ide-war/src/main/webapp/WEB-INF/web.xml b/assembly/assembly-root-war/src/main/webapp/WEB-INF/web.xml similarity index 96% rename from assembly/assembly-ide-war/src/main/webapp/WEB-INF/web.xml rename to assembly/assembly-root-war/src/main/webapp/WEB-INF/web.xml index d6bcf7b67ec..86ceca1ccad 100644 --- a/assembly/assembly-ide-war/src/main/webapp/WEB-INF/web.xml +++ b/assembly/assembly-root-war/src/main/webapp/WEB-INF/web.xml @@ -15,9 +15,7 @@ - + version="3.0"> IDE diff --git a/ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/IDE.html b/assembly/assembly-root-war/src/main/webapp/_app/IDE.html similarity index 100% rename from ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/IDE.html rename to assembly/assembly-root-war/src/main/webapp/_app/IDE.html diff --git a/assembly/assembly-ide-war/src/main/webapp/_app/factory-contribute.svg b/assembly/assembly-root-war/src/main/webapp/_app/factory-contribute.svg similarity index 100% rename from assembly/assembly-ide-war/src/main/webapp/_app/factory-contribute.svg rename to assembly/assembly-root-war/src/main/webapp/_app/factory-contribute.svg diff --git a/assembly/assembly-ide-war/src/main/webapp/_app/factory-review.svg b/assembly/assembly-root-war/src/main/webapp/_app/factory-review.svg similarity index 100% rename from assembly/assembly-ide-war/src/main/webapp/_app/factory-review.svg rename to assembly/assembly-root-war/src/main/webapp/_app/factory-review.svg diff --git a/assembly/assembly-ide-war/src/main/webapp/_app/favicon.ico b/assembly/assembly-root-war/src/main/webapp/_app/favicon.ico similarity index 100% rename from assembly/assembly-ide-war/src/main/webapp/_app/favicon.ico rename to assembly/assembly-root-war/src/main/webapp/_app/favicon.ico diff --git a/ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.css b/assembly/assembly-root-war/src/main/webapp/_app/loader.css similarity index 100% rename from ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.css rename to assembly/assembly-root-war/src/main/webapp/_app/loader.css diff --git a/ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.html b/assembly/assembly-root-war/src/main/webapp/_app/loader.html similarity index 100% rename from ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.html rename to assembly/assembly-root-war/src/main/webapp/_app/loader.html diff --git a/ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.js b/assembly/assembly-root-war/src/main/webapp/_app/loader.js similarity index 100% rename from ide/che-ide-gwt-app/src/main/resources/org/eclipse/che/ide/public/loader.js rename to assembly/assembly-root-war/src/main/webapp/_app/loader.js diff --git a/assembly/assembly-ide-war/src/test/java/org/eclipse/che/ApiAccessRejectionFilterTest.java b/assembly/assembly-root-war/src/test/java/org/eclipse/che/ApiAccessRejectionFilterTest.java similarity index 100% rename from assembly/assembly-ide-war/src/test/java/org/eclipse/che/ApiAccessRejectionFilterTest.java rename to assembly/assembly-root-war/src/test/java/org/eclipse/che/ApiAccessRejectionFilterTest.java diff --git a/assembly/assembly-ide-war/src/test/java/org/eclipse/che/DashboardRedirectionFilterTest.java b/assembly/assembly-root-war/src/test/java/org/eclipse/che/DashboardRedirectionFilterTest.java similarity index 100% rename from assembly/assembly-ide-war/src/test/java/org/eclipse/che/DashboardRedirectionFilterTest.java rename to assembly/assembly-root-war/src/test/java/org/eclipse/che/DashboardRedirectionFilterTest.java diff --git a/assembly/assembly-wsagent-server/pom.xml b/assembly/assembly-wsagent-server/pom.xml deleted file mode 100644 index 843ec5fdcaa..00000000000 --- a/assembly/assembly-wsagent-server/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - 4.0.0 - - che-assembly-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - assembly-wsagent-server - pom - Che Assembly Workspace Agent Server - - - log4j - log4j - - - org.apache.maven.shared - maven-dependency-tree - - - org.eclipse.che - assembly-wsagent-war - war - - - org.eclipse.che.core - che-core-commons-lang - - - org.eclipse.che.lib - che-tomcat8-slf4j-logback - zip - - - org.jdom - jdom - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - make-assembly - package - - single - - - - - posix - false - false - - ${project.basedir}/src/assembly/assembly.xml - - ext-server-${project.version} - - - - org.apache.maven.plugins - maven-dependency-plugin - - - log4j:log4j - org.jdom:jdom - org.eclipse.che.core:che-core-commons-lang - org.apache.maven.shared:maven-dependency-tree - - - - - - diff --git a/assembly/assembly-wsagent-server/src/assembly/LICENSE-mit.txt b/assembly/assembly-wsagent-server/src/assembly/LICENSE-mit.txt deleted file mode 100644 index 2ca24cb99ae..00000000000 --- a/assembly/assembly-wsagent-server/src/assembly/LICENSE-mit.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015 Red Hat, Inc. - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/assembly/assembly-wsagent-server/src/assembly/assembly.xml b/assembly/assembly-wsagent-server/src/assembly/assembly.xml deleted file mode 100644 index 9255f779aa2..00000000000 --- a/assembly/assembly-wsagent-server/src/assembly/assembly.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - tomcat-zip - - zip - tar.gz - - false - - - true - - - org.eclipse.che.lib:che-tomcat8-slf4j-logback - - - - false - false - webapps - ROOT.war - - org.eclipse.che:assembly-wsagent-war - - - - - - ${project.basedir}/src/assembly/che-templates - che-templates - - - ${project.basedir}/src/assembly/webapps - webapps - - - - - ${project.basedir}/src/assembly/server.xml - conf - server.xml - - - ${project.basedir}/src/assembly/LICENSE-mit.txt - - LICENSE-mit.txt - - - ${project.basedir}/src/assembly/setenv.sh - bin - setenv.sh - 755 - unix - - - diff --git a/assembly/assembly-wsagent-server/src/assembly/server.xml b/assembly/assembly-wsagent-server/src/assembly/server.xml deleted file mode 100644 index df9714fae68..00000000000 --- a/assembly/assembly-wsagent-server/src/assembly/server.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assembly/assembly-wsagent-server/src/assembly/setenv.sh b/assembly/assembly-wsagent-server/src/assembly/setenv.sh deleted file mode 100644 index 0dd143ff528..00000000000 --- a/assembly/assembly-wsagent-server/src/assembly/setenv.sh +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -#Global Conf dir -[ -z "${CHE_LOCAL_CONF_DIR}" ] && CHE_LOCAL_CONF_DIR="${CATALINA_HOME}/conf/" - -#Global JAVA options -[ -z "${JAVA_OPTS}" ] && JAVA_OPTS="-Xms256m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplication -Djava.security.egd=file:/dev/./urandom" - -#Global LOGS DIR -[ -z "${CHE_LOGS_DIR}" ] && CHE_LOGS_DIR="$CATALINA_HOME/logs" - -[ -z "${CHE_LOGS_LEVEL}" ] && CHE_LOGS_LEVEL="INFO" - -[ -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 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dche.local.conf.dir=${CHE_LOCAL_CONF_DIR}" - -#Class path -[ -z "${CLASSPATH}" ] && CLASSPATH="${CATALINA_HOME}/conf/:${JAVA_HOME}/lib/tools.jar" - - -# On java9 runtime, enable activation and JAXB API -JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g') -[ "$JAVA_VERSION" -ge 9 ] && JAVA_OPTS="$JAVA_OPTS --add-modules java.activation --add-modules java.xml.bind" - -add_cert_to_truststore() { - SELF_SIGNED_CERT=/tmp/che/secret/ca.crt - - if [ ! -f $SELF_SIGNED_CERT ]; then - return 0; - fi - - mkdir -p $CHE_LOCAL_CONF_DIR/conf - WSAGENT_JAVA_TRUST_STORE=$CHE_LOCAL_CONF_DIR/conf/wsagent_cacerts - - DEFAULT_JAVA_TRUST_STORE=$JAVA_HOME/jre/lib/security/cacerts - if [ -f $DEFAULT_JAVA_TRUST_STORE ]; then - cp $DEFAULT_JAVA_TRUST_STORE $WSAGENT_JAVA_TRUST_STORE - echo "Found a self-signed cert. Workspace Agent Java trust store will be based ${DEFAULT_JAVA_TRUST_STORE}" - else - DEFAULT_JAVA_TRUST_STORE=$JAVA_HOME/lib/security/cacerts - if [ -f $DEFAULT_JAVA_TRUST_STORE ]; then - cp $DEFAULT_JAVA_TRUST_STORE $WSAGENT_JAVA_TRUST_STORE - echo "Found a self-signed cert. Workspace Agent Java trust store will be based ${DEFAULT_JAVA_TRUST_STORE}" - fi - fi - - DEFAULT_JAVA_TRUST_STORE_PASS="changeit" - JAVA_TRUST_STORE_PASS=${JAVA_TRUST_STORE_PASS:-${DEFAULT_JAVA_TRUST_STORE_PASS}} - - # make sure that owner has permissions to write and other groups have permissions to read - chmod 644 $WSAGENT_JAVA_TRUST_STORE - - echo yes | keytool -keystore $WSAGENT_JAVA_TRUST_STORE -importcert -alias HOSTDOMAIN -file $SELF_SIGNED_CERT -storepass $JAVA_TRUST_STORE_PASS > /dev/null - - # allow only read by all groups - chmod 444 $WSAGENT_JAVA_TRUST_STORE - - export JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=$WSAGENT_JAVA_TRUST_STORE -Djavax.net.ssl.trustStorePassword=changeit" -} - -add_cert_to_truststore - -export JAVA_OPTS="$JAVA_OPTS -Dche.logs.dir=${CHE_LOGS_DIR} -Dche.logs.level=${CHE_LOGS_LEVEL} -Djuli-logback.configurationFile=file:$CATALINA_HOME/conf/tomcat-logger.xml" - -[ -z "${SERVER_PORT}" ] && SERVER_PORT=8080 -export SERVER_PORT diff --git a/assembly/assembly-wsagent-war/pom.xml b/assembly/assembly-wsagent-war/pom.xml deleted file mode 100644 index 26ce9d9e95b..00000000000 --- a/assembly/assembly-wsagent-war/pom.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - - 4.0.0 - - che-assembly-parent - org.eclipse.che - 7.0.0-rc-4.0-SNAPSHOT - - assembly-wsagent-war - war - Che Workspace Agent War Packaging - - - org.eclipse.che.core - che-core-workspace-activity-server - - - org.eclipse.che.core - che-wsagent-core - war - - - org.eclipse.che.lib - che-swagger-module - - - org.eclipse.che.plugin - che-plugin-camel-server - - - org.eclipse.che.plugin - che-plugin-ceylon-lang-server - - - org.eclipse.che.plugin - che-plugin-clangd-lang-server - - - org.eclipse.che.plugin - che-plugin-composer-server - - - org.eclipse.che.plugin - che-plugin-cpp-lang-server - - - org.eclipse.che.plugin - che-plugin-csharp-lang-server - - - org.eclipse.che.plugin - che-plugin-gdb-server - - - org.eclipse.che.plugin - che-plugin-github-provider-github - - - org.eclipse.che.plugin - che-plugin-github-server - - - org.eclipse.che.plugin - che-plugin-golang-lang-server - - - org.eclipse.che.plugin - che-plugin-golang-lang-shared - - - org.eclipse.che.plugin - che-plugin-java-debugger-server - - - org.eclipse.che.plugin - che-plugin-java-ext-lang-server - - - org.eclipse.che.plugin - che-plugin-java-plain-server - - - org.eclipse.che.plugin - che-plugin-java-server - - - org.eclipse.che.plugin - che-plugin-json-server - - - org.eclipse.che.plugin - che-plugin-maven-generator-archetype - - - org.eclipse.che.plugin - che-plugin-maven-server - - - org.eclipse.che.plugin - che-plugin-nodejs-debugger-server - - - org.eclipse.che.plugin - che-plugin-nodejs-lang-server - - - org.eclipse.che.plugin - che-plugin-php-lang-server - - - org.eclipse.che.plugin - che-plugin-pullrequest-server - - - org.eclipse.che.plugin - che-plugin-python-lang-server - - - org.eclipse.che.plugin - che-plugin-testing-base - - - org.eclipse.che.plugin - che-plugin-testing-junit-runtime - - - org.eclipse.che.plugin - che-plugin-testing-junit-server - - - org.eclipse.che.plugin - che-plugin-testing-phpunit-server - - - org.eclipse.che.plugin - che-plugin-testing-testng-runtime - - - org.eclipse.che.plugin - che-plugin-testing-testng-server - - - org.eclipse.che.plugin - che-plugin-web-ext-server - - - org.eclipse.che.plugin - che-plugin-yaml-server - - - org.eclipse.che.plugin - che-plugin-yaml-shared - - - org.eclipse.che.plugin - che-plugin-zend-debugger-server - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - analyze - - true - - - - - - org.eclipse.che.core - che-core-dynamodule-maven-plugin - - - generate - - build - - - - - true - - - - org.apache.maven.plugins - maven-war-plugin - - true - WEB-INF/lib/*gwt*.jar, - WEB-INF/lib/gin-*.jar, - WEB-INF/lib/jsr305*.jar - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - buildinfo - process-resources - - run - - - - che.product.build_info = ${build.info} - - - - - - - - diff --git a/assembly/assembly-wsagent-war/src/main/java/org/eclipse/che/wsagent/server/SwaggerServletModule.java b/assembly/assembly-wsagent-war/src/main/java/org/eclipse/che/wsagent/server/SwaggerServletModule.java deleted file mode 100644 index 0de85b9ff1e..00000000000 --- a/assembly/assembly-wsagent-war/src/main/java/org/eclipse/che/wsagent/server/SwaggerServletModule.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.wsagent.server; - -import com.google.common.collect.ImmutableMap; -import com.google.inject.servlet.ServletModule; -import org.eclipse.che.inject.DynaModule; - -/** @author Sergii Kabashniuk */ -@DynaModule -public class SwaggerServletModule extends ServletModule { - @Override - protected void configureServlets() { - bind(io.swagger.jaxrs.config.DefaultJaxrsConfig.class).asEagerSingleton(); - install(new org.eclipse.che.swagger.deploy.DocsModule()); - serve("/swaggerinit") - .with( - io.swagger.jaxrs.config.DefaultJaxrsConfig.class, - ImmutableMap.of( - "api.version", "1.0", - "swagger.api.title", "Eclipse Che", - "swagger.api.basepath", "/api")); - } -} diff --git a/assembly/assembly-wsagent-war/src/main/webapp/META-INF/context.xml b/assembly/assembly-wsagent-war/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 4c57e4c7d53..00000000000 --- a/assembly/assembly-wsagent-war/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 482e20e232d..cd769223427 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -47,6 +47,10 @@ com.google.inject.extensions guice-assistedinject + + com.google.inject.extensions + guice-persist + com.google.inject.extensions guice-servlet @@ -68,90 +72,32 @@ jaeger-tracerresolver - javax.inject - javax.inject - - - net.logstash.logback - logstash-logback-encoder - - - org.eclipse.che - bootstrapper - tar.gz - linux_amd64 - - - org.eclipse.che - che-exec-agent-client + io.micrometer + micrometer-core - org.eclipse.che - exec-agent + io.micrometer + micrometer-registry-prometheus - org.eclipse.che - git-credentials-agent - - - org.eclipse.che - ls-camel-agent - - - org.eclipse.che - ls-clang-agent - - - org.eclipse.che - ls-csharp-agent - - - org.eclipse.che - ls-golang-agent - - - org.eclipse.che - ls-java-agent - - - org.eclipse.che - ls-json-agent - - - org.eclipse.che - ls-php-agent - - - org.eclipse.che - ls-python-agent - - - org.eclipse.che - ls-typescript-agent - - - org.eclipse.che - ls-vue-agent - - - org.eclipse.che - ls-yaml-agent + javax.inject + javax.inject - org.eclipse.che - ssh-agent + net.logstash.logback + logstash-logback-encoder - org.eclipse.che - terminal-agent + org.eclipse.che.core + che-core-api-account - org.eclipse.che - unison-agent + org.eclipse.che.core + che-core-api-auth org.eclipse.che.core - che-core-api-auth + che-core-api-auth-shared org.eclipse.che.core @@ -169,6 +115,10 @@ org.eclipse.che.core che-core-api-installer + + org.eclipse.che.core + che-core-api-installer-shared + org.eclipse.che.core che-core-api-logger @@ -209,14 +159,30 @@ org.eclipse.che.core che-core-api-workspace-activity + + org.eclipse.che.core + che-core-commons-auth + org.eclipse.che.core che-core-commons-inject + + org.eclipse.che.core + che-core-commons-lang + org.eclipse.che.core che-core-commons-logback + + org.eclipse.che.core + che-core-commons-mail + + + org.eclipse.che.core + che-core-commons-schedule + org.eclipse.che.core che-core-db @@ -233,10 +199,6 @@ org.eclipse.che.core che-core-db-vendor-postgresql - - org.eclipse.che.core - che-core-ide-stacks - org.eclipse.che.core che-core-metrics-core @@ -257,34 +219,26 @@ org.eclipse.che.core che-core-tracing-web - - org.eclipse.che.core - wsagent - org.eclipse.che.core wsmaster-local org.eclipse.che.infrastructure - infrastructure-openshift - - - org.eclipse.che.infrastructure.docker - docker-auth + infrastructure-kubernetes - org.eclipse.che.infrastructure.docker - docker-client - - - org.eclipse.che.infrastructure.docker - infrastructure-docker + org.eclipse.che.infrastructure + infrastructure-openshift org.eclipse.che.lib che-swagger-module + + org.eclipse.che.multiuser + che-multiuser-api-authorization + org.eclipse.che.multiuser che-multiuser-api-authorization-impl @@ -297,6 +251,10 @@ org.eclipse.che.multiuser che-multiuser-api-organization + + org.eclipse.che.multiuser + che-multiuser-api-permission + org.eclipse.che.multiuser che-multiuser-api-resource @@ -365,14 +323,6 @@ org.eclipse.che.multiuser che-multiuser-sql-schema - - org.eclipse.che.plugin - che-plugin-github-shared - - - org.eclipse.che.plugin - che-plugin-machine-ext-server - org.eclipse.persistence org.eclipse.persistence.core @@ -421,6 +371,10 @@ org.slf4j log4j-over-slf4j + + org.slf4j + slf4j-api + javax.servlet javax.servlet-api @@ -459,18 +413,6 @@ - - org.eclipse.che.core - che-core-dynamodule-maven-plugin - - - generate - - build - - - - org.apache.maven.plugins maven-dependency-plugin @@ -478,37 +420,36 @@ analyze - true - - - - copy-bootstrapper - process-resources - - copy - - - - - org.eclipse.che - bootstrapper - linux_amd64 - tar.gz - bootstrapper.tar.gz - - - ${project.build.directory}/classes + + + org.slf4j:jcl-over-slf4j + org.slf4j:jul-to-slf4j + org.slf4j:log4j-over-slf4j + ch.qos.logback:logback-classic + net.logstash.logback:logstash-logback-encoder + com.h2database:h2 + org.eclipse.che.core:che-core-db-vendor-mysql + org.eclipse.che.core:che-core-sql-schema + org.eclipse.che.core:che-core-api-ssh-shared + org.eclipse.che.core:che-core-api-project-templates-shared + org.eclipse.che.multiuser:che-multiuser-sql-schema + org.jgroups:jgroups + io.jaegertracing:jaeger-core + io.jaegertracing:jaeger-client + io.jaegertracing:jaeger-tracerresolver + org.eclipse.che.multiuser:che-multiuser-personal-account + org.eclipse.che.multiuser:che-multiuser-keycloak-token-provider + org.eclipse.persistence:org.eclipse.persistence.extension + org.eclipse.persistence:org.eclipse.persistence.jpa + org.jgroups.kubernetes:kubernetes + org.postgresql:postgresql + com.google.guava:guava + org.everrest:everrest-core + - - org.apache.maven.plugins - maven-war-plugin - - WEB-INF/lib/**gwt**, WEB-INF/lib/jsr305*.jar - - org.codehaus.mojo 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 acfecbf0a2a..eab2e573746 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 @@ -25,7 +25,6 @@ import java.util.Map; import java.util.Set; import javax.sql.DataSource; -import org.eclipse.che.agent.exec.client.ExecAgentClientFactory; import org.eclipse.che.api.core.notification.RemoteSubscriptionStorage; import org.eclipse.che.api.core.rest.CheJsonProvider; import org.eclipse.che.api.core.rest.MessageBodyAdapter; @@ -99,8 +98,6 @@ import org.eclipse.che.security.PasswordEncryptor; import org.eclipse.che.security.oauth.EmbeddedOAuthAPI; import org.eclipse.che.security.oauth.OAuthAPI; -import org.eclipse.che.workspace.infrastructure.docker.DockerInfraModule; -import org.eclipse.che.workspace.infrastructure.docker.local.LocalDockerModule; import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfraModule; import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfrastructure; import org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment; @@ -172,7 +169,6 @@ protected void configure() { bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class); bind(org.eclipse.che.api.workspace.server.WorkspaceService.class); install(new FactoryModuleBuilder().build(ServersCheckerFactory.class)); - install(new FactoryModuleBuilder().build(ExecAgentClientFactory.class)); Multibinder internalEnvironmentProvisioners = Multibinder.newSetBinder(binder(), InternalEnvironmentProvisioner.class); @@ -289,9 +285,6 @@ protected void configure() { install(new OpenShiftInfraModule()); } else if (KubernetesInfrastructure.NAME.equals(infrastructure)) { install(new KubernetesInfraModule()); - } else { - install(new LocalDockerModule()); - install(new DockerInfraModule()); } install(new CheJsonRpcWebSocketConfigurationModule()); diff --git a/assembly/assembly-wsmaster-war/src/main/webapp/META-INF/context.xml b/assembly/assembly-wsmaster-war/src/main/webapp/META-INF/context.xml index 8949d99461f..ca387ffb807 100644 --- a/assembly/assembly-wsmaster-war/src/main/webapp/META-INF/context.xml +++ b/assembly/assembly-wsmaster-war/src/main/webapp/META-INF/context.xml @@ -14,13 +14,6 @@ --> - - - - diff --git a/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/web.xml b/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/web.xml index 8171a60c50f..063a817c5c5 100644 --- a/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/web.xml +++ b/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/web.xml @@ -15,10 +15,7 @@ - - + version="3.0"> org.eclipse.che.inject.CheBootstrap diff --git a/assembly/pom.xml b/assembly/pom.xml index 9426c72a3b6..b69ef23b0ac 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -24,10 +24,8 @@ pom Che IDE :: Parent - assembly-wsagent-war - assembly-wsagent-server - assembly-ide-war assembly-wsmaster-war + assembly-root-war assembly-workspace-loader-war assembly-main diff --git a/core/che-core-dynamodule-maven-plugin/pom.xml b/core/che-core-dynamodule-maven-plugin/pom.xml deleted file mode 100644 index d897b5fd188..00000000000 --- a/core/che-core-dynamodule-maven-plugin/pom.xml +++ /dev/null @@ -1,263 +0,0 @@ - - - - 4.0.0 - - che-core-parent - org.eclipse.che.core - 7.0.0-rc-4.0-SNAPSHOT - - che-core-dynamodule-maven-plugin - maven-plugin - Che Core :: API :: DynaModule maven plugin - - - com.google.guava - guava - - - org.apache.maven - maven-core - - - org.eclipse.che.core - che-core-commons-inject - - - org.eclipse.che.core - che-core-commons-lang - - - org.ow2.asm - asm - - - org.slf4j - slf4j-api - - - org.apache.maven - maven-artifact - provided - - - org.apache.maven - maven-model - provided - - - org.apache.maven - maven-plugin-api - provided - - - org.apache.maven.plugin-tools - maven-plugin-annotations - provided - - - org.eclipse.sisu - org.eclipse.sisu.plexus - provided - - - jsr250-api - javax.annotation - - - - - junit - junit - test - - - org.apache.maven - maven-compat - test - - - org.apache.maven.plugin-testing - maven-plugin-testing-harness - test - - - org.codehaus.plexus - plexus-utils - test - - - org.eclipse.che.core - che-core-api-core - test - - - org.eclipse.che.core - che-wsagent-core - ${project.version} - war - test - - - org.mockito - mockito-core - test - - - org.mockito - mockito-testng - test - - - org.testng - testng - test - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - compile - - copy - - - - - org.eclipse.che.core - che-wsagent-core - ${project.version} - war - che-wsagent-core-${project.version}.war - ${project.build.directory}/local-repo/org/eclipse/che/core/che-wsagent-core/${project.version} - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-it-test-source - process-resources - - add-test-source - - - - src/it/java - - - - - add-it-test-resources - process-resources - - add-test-resource - - - - - src/it/resources - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${project.version} - - - **/*ITest.java - - - - - org.apache.maven.plugins - maven-plugin-plugin - - - mojo-descriptor - - descriptor - - - - - true - - - - - - - integration-tests - - - !skipIntegrationTests - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - integration-test - - test - - - - ${project.build.directory} - - - none - - - **/*ITest.java - - - - - - - **/*ITest.java - - - - - - - - - - - diff --git a/core/che-core-dynamodule-maven-plugin/src/it/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoITest.java b/core/che-core-dynamodule-maven-plugin/src/it/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoITest.java deleted file mode 100644 index 669e6b85f29..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/it/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoITest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import com.google.inject.Module; -import java.io.File; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URISyntaxException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.List; -import java.util.Optional; -import java.util.stream.Stream; -import org.eclipse.che.inject.ModuleFinder; -import org.mockito.testng.MockitoTestNGListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -/** - * Integration test of {@Link DynaModuleListGeneratorMojo} - * It generates the DynaModule list and load it. - * @author Florent Benoit - */ -@Listeners(value = {MockitoTestNGListener.class}) -public class DynaModuleListGeneratorMojoITest { - - /** - * Logger. - */ - private static final Logger LOG = LoggerFactory.getLogger(DynaModuleListGeneratorMojoITest.class); - - /** - * DynaModule generated class name - */ - private static final String GENERATED_GUICE_CLASSNAME = "MyDynamoduleTestModule"; - - /** - * DynaModule generated filename - */ - private static final String GENERATED_GUICE_FILE = GENERATED_GUICE_CLASSNAME + ".class"; - - /** - * Target folder of maven. - */ - private Path buildDirectory; - - /** - * Init folders - */ - @BeforeClass - public void init() throws URISyntaxException, IOException, InterruptedException { - - // target folder - String buildDirectoryProperty = System.getProperty("buildDirectory"); - if (buildDirectoryProperty != null) { - buildDirectory = new File(buildDirectoryProperty).toPath(); - } - - LOG.debug("Using building directory {0}", buildDirectory); - } - - /** - * Starts tests by compiling generated Java class from maven plugin - * @throws IOException if unable to start process - * @throws InterruptedException if unable to wait the end of the process - */ - @Test - public void compileGuiceListModule() - throws IOException, InterruptedException, IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException { - - // search generated guice module list file - Path p = this.buildDirectory; - final int maxDepth = 10; - Stream matches = java.nio.file.Files.find(p, maxDepth, (path, basicFileAttributes) -> (path.getFileName().toString().equals(GENERATED_GUICE_FILE) && path.toString().contains("testModuleListGenerated"))); - - // take first - Optional optionalPath = matches.findFirst(); - if (!optionalPath.isPresent()) { - throw new IllegalStateException("Unable to find generated Guice file named '" + GENERATED_GUICE_FILE + "'. Check it has been generated first"); - } - - Path generatedJavaFilePath = optionalPath.get(); - - String className = generatedJavaFilePath.getFileName().toString(); - className = className.substring(0, className.length() - ".class".length()); - - Class moduleFinderClass = (Class) new CustomClassLoader().defineClass("org.eclipse.che.dynamodule." + className, Files - .readAllBytes(generatedJavaFilePath)); - - ModuleFinder moduleFinder= moduleFinderClass.getDeclaredConstructor().newInstance(); - List moduleList = moduleFinder.getModules(); - Assert.assertEquals(moduleList.size(), 2); - - - Assert.assertTrue(moduleList.stream().anyMatch(item -> item.getClass().equals(MyCustomModule.class))); - Assert.assertTrue(moduleList.stream().anyMatch(item -> item.getClass().equals(AnotherCustomModule.class))); - } - - - /** - * Custom loader to define the class - */ - private static class CustomClassLoader extends ClassLoader { - public Class defineClass(String name, byte[] b) { - return defineClass(name, b, 0, b.length); - } - } - -} diff --git a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListByteCodeGenerator.java b/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListByteCodeGenerator.java deleted file mode 100644 index d2589eaf385..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListByteCodeGenerator.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES; -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ACC_SUPER; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ASTORE; -import static org.objectweb.asm.Opcodes.DUP; -import static org.objectweb.asm.Opcodes.INVOKEINTERFACE; -import static org.objectweb.asm.Opcodes.INVOKESPECIAL; -import static org.objectweb.asm.Opcodes.NEW; -import static org.objectweb.asm.Opcodes.POP; -import static org.objectweb.asm.Opcodes.RETURN; - -import java.io.File; -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Collection; -import java.util.Set; -import org.eclipse.che.inject.ModuleFinder; -import org.eclipse.che.plugin.dynamodule.scanner.DynaModuleScanner; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Type; - -/** - * Generates the class implementing the ModuleFinder interface. - * - * @author Florent Benoit - */ -public class DynaModuleListByteCodeGenerator { - - /** Package used to generate the class */ - private static final String PACKAGE_NAME = "org/eclipse/che/dynamodule/"; - - /** URLS to parse */ - private Collection urls; - - /** Name of the class to generate */ - private String className = "DynaModuleList"; - - /** Pattern for excluding some files. */ - private String[] additionalSkipResources; - - /** Bytecode generated that is corresponding to the generated class. */ - private byte[] classToGenerate; - - /** Instance of the scanner */ - private DynaModuleScanner dynaModuleScanner; - - /** Directory used to unpack war files */ - private File unpackedDirectory; - - /** Scan jar in war files. */ - private boolean scanJarInWarDependencies; - - /** Setup a new generator */ - public DynaModuleListByteCodeGenerator() { - this.dynaModuleScanner = new DynaModuleScanner(); - } - - /** - * Search all classes annotated with {@link org.eclipse.che.inject.DynaModule} and generate a - * class that will provide all these modules - */ - protected void init() { - dynaModuleScanner.setAdditionalSkipResources(additionalSkipResources); - dynaModuleScanner.setUnpackedDirectory(unpackedDirectory); - dynaModuleScanner.setScanJarInWarDependencies(scanJarInWarDependencies); - - urls.forEach( - url -> { - try { - dynaModuleScanner.scan(url); - } catch (URISyntaxException | IOException e) { - throw new IllegalStateException("Unable to initialize the scanner", e); - } - }); - - dynaModuleScanner.stats(); - generateClass(dynaModuleScanner.getDynaModuleClasses()); - } - - public void setClassName(String className) { - this.className = className; - } - - public void setUrls(Collection urls) { - this.urls = urls; - } - - protected void generateClass(Set guiceModules) { - ClassWriter cw = new ClassWriter(COMPUTE_FRAMES); - MethodVisitor methodVisitor; - - // interface to implement - String moduleFinderInternalClassName = Type.getType(ModuleFinder.class).getInternalName(); - - cw.visit( - 52, - ACC_PUBLIC + ACC_SUPER, - PACKAGE_NAME.concat(className), - null, - "java/lang/Object", - new String[] {moduleFinderInternalClassName}); - - // default constructor - methodVisitor = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); - methodVisitor.visitCode(); - methodVisitor.visitVarInsn(ALOAD, 0); - methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false); - methodVisitor.visitInsn(RETURN); - methodVisitor.visitMaxs(0, 0); - methodVisitor.visitEnd(); - - // implements getModules method - final MethodVisitor getModulesMethodVisitor = - cw.visitMethod( - ACC_PUBLIC, - "getModules", - "()Ljava/util/List;", - "()Ljava/util/List;", - null); - getModulesMethodVisitor.visitCode(); - getModulesMethodVisitor.visitTypeInsn(NEW, "java/util/ArrayList"); - getModulesMethodVisitor.visitInsn(DUP); - getModulesMethodVisitor.visitMethodInsn( - INVOKESPECIAL, "java/util/ArrayList", "", "()V", false); - getModulesMethodVisitor.visitVarInsn(ASTORE, 1); - - guiceModules.forEach( - moduleClassName -> { - String moduleInternalName = moduleClassName.replace(".", "/"); - // add each modules - getModulesMethodVisitor.visitVarInsn(ALOAD, 1); - getModulesMethodVisitor.visitTypeInsn(NEW, moduleInternalName); - getModulesMethodVisitor.visitInsn(DUP); - getModulesMethodVisitor.visitMethodInsn( - INVOKESPECIAL, moduleInternalName, "", "()V", false); - getModulesMethodVisitor.visitMethodInsn( - INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", true); - getModulesMethodVisitor.visitInsn(POP); - }); - - // end of the method getModules() - getModulesMethodVisitor.visitVarInsn(ALOAD, 1); - getModulesMethodVisitor.visitInsn(ARETURN); - getModulesMethodVisitor.visitMaxs(0, 0); - getModulesMethodVisitor.visitEnd(); - - cw.visitEnd(); - - this.classToGenerate = cw.toByteArray(); - } - - /** Execute this generator. */ - public byte[] execute() { - init(); - return this.classToGenerate; - } - - public void setSkipResources(String[] additionalSkipResources) { - this.additionalSkipResources = additionalSkipResources; - } - - protected DynaModuleScanner getDynaModuleScanner() { - return dynaModuleScanner; - } - - public void setUnpackedDirectory(File unpackedDirectory) { - this.unpackedDirectory = unpackedDirectory; - } - - public void setScanJarInWarDependencies(boolean scanJarInWarDependencies) { - this.scanJarInWarDependencies = scanJarInWarDependencies; - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojo.java b/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojo.java deleted file mode 100644 index 2201d18a042..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojo.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import static com.google.common.base.CaseFormat.LOWER_HYPHEN; -import static com.google.common.base.CaseFormat.UPPER_CAMEL; - -import java.io.File; -import java.io.IOException; -import java.io.Writer; -import java.net.MalformedURLException; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DependencyResolutionRequiredException; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; -import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.maven.project.MavenProject; - -/** - * Mojo for generating Guice module that will include all {@link org.eclipse.che.inject.DynaModule} - * annotations found.
- * It allows to disable the runtime scan that is scanning all JAR files. - * - * @author Florent Benoit - */ -@Mojo( - name = "build", - defaultPhase = LifecyclePhase.PROCESS_CLASSES, - requiresProject = true, - requiresDependencyCollection = ResolutionScope.RUNTIME) -public class DynaModuleListGeneratorMojo extends AbstractMojo { - - /** Project providing artifact id, version and dependencies. */ - @Parameter(defaultValue = "${project}", readonly = true) - private MavenProject project; - - /** build directory. */ - @Parameter(defaultValue = "${project.build.directory}") - private File targetDirectory; - - /** List pattern of files to be excluded during the scan. */ - @Parameter private String[] skipResources; - - /** Directory used to generate the code */ - private File generatedDirectory; - - /** Directory used to unpack war files */ - private File unpackedDirectory; - - /** Local Repository. */ - @Parameter(defaultValue = "${localRepository}", readonly = true, required = true) - protected ArtifactRepository localRepository; - - /** Path to the generated file */ - private File guiceGeneratedModuleFile; - - /** Use of classpath instead of dependencies */ - private boolean useClassPath; - - /** Scan war dependencies */ - @Parameter private boolean scanWarDependencies; - - /** Scan .jar files in war dependencies */ - @Parameter(defaultValue = "true") - private boolean scanJarInWarDependencies; - - private DynaModuleListByteCodeGenerator dynaModuleListGenerator; - - /** Repository system used to generate a repository session. */ - @Component private org.apache.maven.repository.RepositorySystem repositorySystem; - - /** The remote repositories used to get artifacts. */ - @Parameter( - defaultValue = "${project.remoteArtifactRepositories}", - required = true, - readonly = true) - private List artifactRepositories; - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - long start = System.currentTimeMillis(); - generatedDirectory = new File(targetDirectory, "generated-sources/dynamodules"); - unpackedDirectory = new File(targetDirectory, "unpacked-dynamodule"); - if (!generatedDirectory.exists() && !generatedDirectory.mkdirs()) { - throw new MojoExecutionException( - "Unable to create a directory for writing Guice DynaModule file '" - + generatedDirectory - + "'."); - } - if (!unpackedDirectory.exists() && !unpackedDirectory.mkdirs()) { - throw new MojoExecutionException( - "Unable to create a directory for writing Guice unpacked files '" - + unpackedDirectory - + "'."); - } - - dynaModuleListGenerator = new DynaModuleListByteCodeGenerator(); - dynaModuleListGenerator.setSkipResources(skipResources); - dynaModuleListGenerator.setUnpackedDirectory(unpackedDirectory); - dynaModuleListGenerator.setScanJarInWarDependencies(scanJarInWarDependencies); - - String className = LOWER_HYPHEN.to(UPPER_CAMEL, project.getArtifactId().replace(".", "-")); - - Collection urls; - if (useClassPath) { - urls = new ArrayList<>(); - String javaClassPath = System.getProperty("java.class.path"); - if (javaClassPath != null) { - for (String path : javaClassPath.split(File.pathSeparator)) { - try { - urls.add(new File(path).toURI().toURL()); - } catch (Exception e) { - throw new MojoExecutionException("Unable to get URL", e); - } - } - } - } else { - urls = new ArrayList<>(); - List elements; - try { - elements = project.getCompileClasspathElements(); - } catch (DependencyResolutionRequiredException e) { - throw new MojoExecutionException("Unable to get classpath elements", e); - } - - for (String element : elements) { - try { - urls.add(new File(element).toURI().toURL()); - } catch (MalformedURLException e) { - throw new MojoExecutionException("Unable to create URL", e); - } - } - } - - // do we have extra wars ? - if (scanWarDependencies) { - for (Artifact dependencyArtifact : - this.project - .getDependencyArtifacts() - .stream() - .filter(dependency -> "war".equals(dependency.getType())) - .collect(Collectors.toList())) { - Artifact toResolveArtifact = - repositorySystem.createArtifact( - dependencyArtifact.getGroupId(), - dependencyArtifact.getArtifactId(), - dependencyArtifact.getVersion(), - dependencyArtifact.getScope(), - dependencyArtifact.getType()); - - ArtifactResolutionRequest artifactResolutionRequest = new ArtifactResolutionRequest(); - artifactResolutionRequest.setArtifact(toResolveArtifact); - artifactResolutionRequest - .setLocalRepository(localRepository) - .setRemoteRepositories(artifactRepositories); - - ArtifactResolutionResult resolutionResult; - resolutionResult = this.repositorySystem.resolve(artifactResolutionRequest); - - // The file should exists, but we never know. - File file = resolutionResult.getArtifacts().stream().findFirst().get().getFile(); - if (file != null && file.exists()) { - try { - urls.add(file.toURI().toURL()); - } catch (MalformedURLException e) { - throw new MojoExecutionException("Unable to get URL from file " + file, e); - } - } - } - } - - dynaModuleListGenerator.setUrls(urls); - dynaModuleListGenerator.setClassName(className); - - // define output path for the file to write - byte[] byteCodeToGenerate = dynaModuleListGenerator.execute(); - - String fullClassName = "org.eclipse.che.dynamodule." + className; - - this.guiceGeneratedModuleFile = - new File( - targetDirectory, - "classes" + File.separator + fullClassName.replace(".", File.separator) + ".class"); - File parentDir = this.guiceGeneratedModuleFile.getParentFile(); - if (!parentDir.exists() && !parentDir.mkdirs()) { - throw new MojoExecutionException( - "Unable to create a directory for writing Guice DynaModule file '" + parentDir + "'."); - } - - try { - Files.write(guiceGeneratedModuleFile.toPath(), byteCodeToGenerate); - } catch (IOException e) { - throw new MojoExecutionException( - "Unable to generate class for writing Guice DynaModule file '" + parentDir + "'."); - } - - // And now, generates the ServiceLoader - File serviceLoaderModuleFile = - new File( - targetDirectory, - "classes" - + File.separator - + "META-INF" - + File.separator - + "services" - + File.separator - + "org.eclipse.che.inject.ModuleFinder"); - File parentServiceLoaderDir = serviceLoaderModuleFile.getParentFile(); - if (!parentServiceLoaderDir.exists() && !parentServiceLoaderDir.mkdirs()) { - throw new MojoExecutionException( - "Unable to create a directory for writing Guice ServiceLoader ModuleFinder file '" - + parentServiceLoaderDir - + "'."); - } - - try (Writer fileWriter = - Files.newBufferedWriter(serviceLoaderModuleFile.toPath(), StandardCharsets.UTF_8)) { - fileWriter.write(fullClassName); - } catch (IOException e) { - throw new MojoExecutionException("Cannot write Guice ServiceLoader DynaModule file", e); - } - - long end = System.currentTimeMillis(); - - getLog().debug("Generating Guice DynaModule file in " + (end - start) + " ms."); - } - - /** - * Gets the DynaModule generated file - * - * @return the generated file DynaModule link - */ - public File getGuiceGeneratedModuleFile() { - return guiceGeneratedModuleFile; - } - - public DynaModuleListByteCodeGenerator getDynaModuleListGenerator() { - return dynaModuleListGenerator; - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScanner.java b/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScanner.java deleted file mode 100644 index 35ef6b04b3f..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScanner.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule.scanner; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.stream.Stream; -import org.eclipse.che.commons.lang.ZipUtils; -import org.objectweb.asm.ClassReader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Scanner used to scan the directories and file in order to analyze all classes. - * - * @author Florent Benoit - */ -public class DynaModuleScanner { - - private static final Logger LOGGER = LoggerFactory.getLogger(DynaModuleScanner.class); - - private List times = new ArrayList<>(); - - /** List of the classes that are containing DynaModules. */ - private Set matchingClasses = new HashSet<>(); - - private final List skipResources = new ArrayList<>(); - - /** Directory used to unpack war files */ - private File unpackedDirectory; - - /** Scan jars in war. */ - private boolean scanJarInWarDependencies; - - public DynaModuleScanner() { - - // regexp list for skipping dependencies - // note, that the name should match two patterns, as if its resolved from local maven repo, - // and as if it is resolved from target directory, while being scanned inside other WAR archive: - - // home/user/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.7/jackson-databind-2.9.7.jar - // /home/user/che/assembly/assembly-wsagent-war/target/unpacked-dynamodule/che-wsagent-core-7.0.0-RC-1.0-SNAPSHOT.war/WEB-INF/lib/jackson-annotations-2.9.7.jar - this.skipResources.add(".*/gwt-.*.jar"); - this.skipResources.add(".*/guice.*.jar"); - this.skipResources.add(".*/testng-.*.jar"); - this.skipResources.add(".*/lucene-.*.jar"); - this.skipResources.add(".*/guava-.*.jar"); - this.skipResources.add(".*/org-eclipse-jdt-core-repack-.*.jar"); - this.skipResources.add(".*/org.eclipse.jdt.ui-.*.jar"); - this.skipResources.add(".*/org.eclipse.lsp4j-.*.jar"); - this.skipResources.add(".*/org.eclipse.osgi-.*.jar"); - this.skipResources.add(".*/jackson-.*.jar"); - this.skipResources.add(".*/xtend-.*.jar"); - this.skipResources.add(".*/search-.*.jar"); - this.skipResources.add(".*/javax.json-.*.jar"); - this.skipResources.add(".*/javax.json-api-.*.jar"); - this.skipResources.add(".*/justify-.*.jar"); - } - - /** - * Public method that is accepting the URL - * - * @param url the URL to scan - * @throws URISyntaxException - * @throws IOException - */ - public void scan(URL url) throws URISyntaxException, IOException { - - boolean skip = skipResources.stream().anyMatch(pattern -> url.toString().matches(pattern)); - if (skip) { - LOGGER.debug("skipping URL {}", url); - return; - } - - performScan(url); - } - - /** - * Performs the scan of the URL. - * - * @param url the url to analyze - * @throws URISyntaxException - * @throws IOException - */ - protected void performScan(URL url) throws URISyntaxException, IOException { - - long start = System.currentTimeMillis(); - - // scan is based upon the type of the URL - Path path = Paths.get(url.toURI()); - if (Files.isDirectory(path)) { - scanDirectory(path); - } else { - if (path.toString().endsWith(".jar") || path.toString().endsWith(".war")) { - if (scanJarInWarDependencies && path.toString().endsWith(".war")) { - scanDeepWar(path); - } else { - try (JarFile jarFile = new JarFile(path.toFile())) { - scanJar(jarFile); - } - } - } else if (path.toString().endsWith(".class")) { - scanFile(path); - } - } - long end = System.currentTimeMillis(); - times.add(new UrlTime(url, (end - start))); - } - - /** scan the given directory */ - protected void scanDirectory(Path directory) throws IOException { - final int maxDepth = 10; - Stream matches = - java.nio.file.Files.find( - directory, maxDepth, (path, basicFileAttributes) -> path.toString().endsWith(".class")); - matches.forEach( - file -> { - try { - scanFile(file); - } catch (IOException e) { - throw new IllegalStateException("Unable to scan the file", e); - } - }); - - matches = - java.nio.file.Files.find( - directory, maxDepth, (path, basicFileAttributes) -> path.toString().endsWith(".jar")); - matches.forEach( - file -> { - boolean skip = - skipResources.stream().anyMatch(pattern -> file.toString().matches(pattern)); - if (skip) { - LOGGER.debug("skipping jar file {} inside directory {}", file.toFile(), directory); - } else { - try (JarFile jarFile = new JarFile(file.toFile())) { - LOGGER.debug("scanning jar file {} inside directory {}", file.toFile(), directory); - scanJar(jarFile); - } catch (IOException e) { - throw new IllegalStateException("Unable to scan the file", e); - } - } - }); - } - - /** scan the given .class file */ - protected void scanFile(Path file) throws IOException { - boolean skip = skipResources.stream().anyMatch(pattern -> file.toString().matches(pattern)); - if (skip) { - LOGGER.debug("skipping file {}", file); - return; - } - - if (Files.isRegularFile(file)) { - LOGGER.debug("scanning file {}", file); - try (InputStream is = new FileInputStream(file.toFile())) { - scanInputStream(is); - } - } - } - - /** scan the given jar file */ - protected void scanJar(final JarFile jarFile) throws IOException { - - Enumeration enumEntries = jarFile.entries(); - while (enumEntries.hasMoreElements()) { - JarEntry jarEntry = enumEntries.nextElement(); - if (jarEntry.getName().endsWith(".class")) { - boolean skip = - skipResources.stream().anyMatch(pattern -> jarEntry.getName().matches(pattern)); - if (skip) { - LOGGER.debug( - "skipping jar entry {} from jarFile {}", jarEntry.getName(), jarFile.getName()); - } else { - LOGGER.debug( - "scanning jar entry {} from jarFile {}", jarEntry.getName(), jarFile.getName()); - scanInputStream(jarFile.getInputStream(jarEntry)); - } - } - } - } - - protected void scanDeepWar(final Path warPath) throws IOException { - - // name - File file = warPath.toFile(); - File unpackedFile = new File(this.unpackedDirectory, file.getName()); - // unpack the war - ZipUtils.unzip(file, unpackedFile); - - // now scan the directory - scanDirectory(unpackedFile.toPath()); - } - - /** scan the given inputstream */ - protected void scanInputStream(InputStream inputStream) throws IOException { - FindDynaModuleVisitor findDynaModuleVisitor = new FindDynaModuleVisitor(); - new ClassReader(inputStream).accept(findDynaModuleVisitor, 0); - if (findDynaModuleVisitor.isDynaModule()) { - matchingClasses.add(findDynaModuleVisitor.getClassname()); - } - } - - /** - * Gets the list of all classes annotated by {@link org.eclipse.che.inject.DynaModule} - * - * @return the list of stringified name of classes - */ - public Set getDynaModuleClasses() { - return matchingClasses; - } - - public void setAdditionalSkipResources(String[] additionalSkipResources) { - if (additionalSkipResources != null && additionalSkipResources.length > 0) { - this.skipResources.addAll(Arrays.asList(additionalSkipResources)); - } - } - - public void setUnpackedDirectory(File unpackedDirectory) { - this.unpackedDirectory = unpackedDirectory; - } - - public void setScanJarInWarDependencies(boolean scanJarInWarDependencies) { - this.scanJarInWarDependencies = scanJarInWarDependencies; - } - - public static class UrlTime implements Comparable { - - private final URL url; - private final long time; - - public UrlTime(URL url, long time) { - this.url = url; - this.time = time; - } - - /** Allow to sort the URLs from max time to analyze to min time. */ - @Override - public int compareTo(UrlTime o) { - return Long.valueOf(o.time).compareTo(Long.valueOf(this.time)); - } - } - - /** Display statistics on the time required to parse the JAR files. */ - public void stats() { - Collections.sort(times); - times.forEach( - urlTime -> LOGGER.debug("Scan of URL {} done in {} ms", urlTime.url, urlTime.time)); - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/FindDynaModuleVisitor.java b/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/FindDynaModuleVisitor.java deleted file mode 100644 index 773d28b8243..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/main/java/org/eclipse/che/plugin/dynamodule/scanner/FindDynaModuleVisitor.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule.scanner; - -import org.eclipse.che.inject.DynaModule; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.Type; - -/** ASM visitor used to search the {@link DynaModule} annotations in the classes. */ -public final class FindDynaModuleVisitor extends ClassVisitor { - - /** Descriptor object of the DynaModule annotation. */ - public static final String DYNAMODULE_DESCRIPTOR = Type.getDescriptor(DynaModule.class); - - /** Name of the class scanned */ - private String classname; - - /** true if {@link DynaModule} is found */ - private boolean found; - - /** Default constructor. */ - public FindDynaModuleVisitor() { - super(Opcodes.ASM7); - } - - /** - * visit the class and keep the name of the class. - * - * @param version the version - * @param access access (public, ...) - * @param name class name - * @param signature signature - * @param superName super class name - * @param interfaces implemented interfaces name - */ - @Override - public void visit( - final int version, - final int access, - final String name, - final String signature, - final String superName, - final String[] interfaces) { - classname = name.replace("/", "."); - } - - /** - * If we visit the matched {@Link DynaModule} annotation, keep it. - * - * @param name annotation name - * @param visible annotation visibility - * @return a visitor - */ - @Override - public AnnotationVisitor visitAnnotation(final String name, final boolean visible) { - if (DYNAMODULE_DESCRIPTOR.equals(name) && visible) { - found = true; - } - return null; - } - - /** - * It's true if the class is annotated with {@link DynaModule} - * - * @return true if annotated, else false - */ - public boolean isDynaModule() { - return found; - } - - /** - * Gets the name of the class that has been visited - * - * @return the name of the class - */ - public String getClassname() { - return classname; - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/AnotherCustomModule.java b/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/AnotherCustomModule.java deleted file mode 100644 index 980a47091be..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/AnotherCustomModule.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import com.google.inject.AbstractModule; -import org.eclipse.che.inject.DynaModule; - -/** @author Florent Benoit */ -@DynaModule -public class AnotherCustomModule extends AbstractModule { - - @Override - protected void configure() {} -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoTest.java b/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoTest.java deleted file mode 100644 index b0287b9d1f9..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/DynaModuleListGeneratorMojoTest.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import static java.util.stream.Collectors.toList; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.runners.MethodSorters.NAME_ASCENDING; - -import com.google.inject.Module; -import java.io.File; -import java.net.URL; -import java.net.URLClassLoader; -import java.nio.file.Files; -import java.util.Iterator; -import java.util.List; -import java.util.ServiceLoader; -import java.util.Set; -import org.apache.maven.plugin.testing.MojoRule; -import org.apache.maven.plugin.testing.resources.TestResources; -import org.eclipse.che.inject.ModuleFinder; -import org.junit.FixMethodOrder; -import org.junit.Rule; -import org.junit.Test; - -/** - * Test the generation of the class and the serviceloader SPI. - * - * @author Florent Benoit - */ -@FixMethodOrder(NAME_ASCENDING) -public class DynaModuleListGeneratorMojoTest { - - /** Rule to manage the mojo (inject, get variables from mojo) */ - @Rule public MojoRule rule = new MojoRule(); - - /** Resources of each test mapped on the name of the method */ - @Rule public TestResources resources = new TestResources(); - - /** - * Helper method used to inject data in mojo - * - * @param mojo the mojo - * @param baseDir root dir on which we extract files - * @throws IllegalAccessException if unable to set variables - */ - protected void configure(DynaModuleListGeneratorMojo mojo, File baseDir) throws Exception { - this.rule.setVariableValueToObject( - mojo, "targetDirectory", this.resources.getBasedir("project")); - this.rule.setVariableValueToObject(mojo, "useClassPath", true); - } - - /** Check that the ModuleList class is generated and contains the expected modules. */ - @Test - public void testModuleListGenerated() throws Exception { - - File projectCopy = this.resources.getBasedir("project"); - File pom = new File(projectCopy, "pom.xml"); - assertNotNull(pom); - assertTrue(pom.exists()); - - DynaModuleListGeneratorMojo mojo = - (DynaModuleListGeneratorMojo) this.rule.lookupMojo("build", pom); - configure(mojo, projectCopy); - mojo.execute(); - - File generatedModuleFile = mojo.getGuiceGeneratedModuleFile(); - // Check file has been generated - assertTrue(generatedModuleFile.exists()); - - Class moduleFinderClass = - (Class) - new CustomClassLoader() - .defineClass( - "org.eclipse.che.dynamodule.MyDynamoduleTestModule", - Files.readAllBytes(generatedModuleFile.toPath())); - - ModuleFinder moduleFinder = moduleFinderClass.getDeclaredConstructor().newInstance(); - List moduleList = moduleFinder.getModules(); - org.testng.Assert.assertEquals(moduleList.size(), 2); - - assertTrue(moduleList.stream().anyMatch(item -> item.getClass().equals(MyCustomModule.class))); - assertTrue( - moduleList.stream().anyMatch(item -> item.getClass().equals(AnotherCustomModule.class))); - } - - /** Check that the ServiceLoader is generated and working */ - @Test - public void testServiceLoaderGenerated() throws Exception { - - File projectCopy = this.resources.getBasedir("project"); - File pom = new File(projectCopy, "pom.xml"); - assertNotNull(pom); - assertTrue(pom.exists()); - - DynaModuleListGeneratorMojo mojo = - (DynaModuleListGeneratorMojo) this.rule.lookupMojo("build", pom); - configure(mojo, projectCopy); - mojo.execute(); - - URL url = new File(projectCopy + File.separator + "classes").toURI().toURL(); - - URLClassLoader urlClassLoader = new URLClassLoader(new URL[] {url}); - - ServiceLoader moduleFinderServiceLoader = - ServiceLoader.load(ModuleFinder.class, urlClassLoader); - Iterator iterator = moduleFinderServiceLoader.iterator(); - assertTrue(iterator.hasNext()); - ModuleFinder moduleFinder = iterator.next(); - List moduleList = moduleFinder.getModules(); - org.testng.Assert.assertEquals(moduleList.size(), 2); - - assertTrue(moduleList.stream().anyMatch(item -> item.getClass().equals(MyCustomModule.class))); - assertTrue( - moduleList.stream().anyMatch(item -> item.getClass().equals(AnotherCustomModule.class))); - assertFalse(iterator.hasNext()); - } - - /** Check that the plugin is able to scan war files */ - @Test - public void testWarFiles() throws Exception { - - File projectCopy = this.resources.getBasedir("project"); - File pom = new File(projectCopy, "pom.xml"); - assertNotNull(pom); - assertTrue(pom.exists()); - - DynaModuleListGeneratorMojo mojo = - (DynaModuleListGeneratorMojo) this.rule.lookupMojo("build", pom); - configure(mojo, projectCopy); - this.rule.setVariableValueToObject(mojo, "scanWarDependencies", true); - this.rule.setVariableValueToObject(mojo, "scanJarInWarDependencies", true); - mojo.execute(); - Set findClasses = - mojo.getDynaModuleListGenerator().getDynaModuleScanner().getDynaModuleClasses(); - assertTrue( - findClasses - .stream() - .filter(className -> className.contains("org.eclipse.che.wsagent")) - .collect(toList()) - .size() - > 2); - - // this dependency is inside the wsagent-core file. - assertTrue( - findClasses - .stream() - .filter(className -> className.contains("org.eclipse.che.wsagent.server.")) - .collect(toList()) - .size() - >= 2); - } - - private static class CustomClassLoader extends ClassLoader { - public Class defineClass(String name, byte[] b) { - return defineClass(name, b, 0, b.length); - } - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/MyCustomModule.java b/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/MyCustomModule.java deleted file mode 100644 index 7518ddd7c09..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/MyCustomModule.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule; - -import com.google.inject.AbstractModule; -import org.eclipse.che.inject.DynaModule; - -/** @author Florent Benoit */ -@DynaModule -public class MyCustomModule extends AbstractModule { - - @Override - protected void configure() {} -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScannerTest.java b/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScannerTest.java deleted file mode 100644 index d37c8722cec..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/scanner/DynaModuleScannerTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule.scanner; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; - -import java.net.URL; -import org.junit.Test; -import org.mockito.Mockito; - -/** - * Check some methods od the DynaModuleScanner - * - * @author Florent Benoit - */ -public class DynaModuleScannerTest { - - /** - * First, check that a file is scanned and then check that if a file is excluded, it is not - * scanned. - * - * @throws Exception - */ - @Test - public void checkSkipJars() throws Exception { - DynaModuleScanner dynaModuleScanner = new DynaModuleScanner(); - dynaModuleScanner = Mockito.spy(dynaModuleScanner); - - doNothing().when(dynaModuleScanner).performScan(any(URL.class)); - - // first check that URL is scanned - URL testUrl = new URL("file:///my-file.jar"); - dynaModuleScanner.scan(testUrl); - verify(dynaModuleScanner).performScan(testUrl); - - dynaModuleScanner.setAdditionalSkipResources(new String[] {".*I-want-to-exclude-this.jar"}); - URL testExcludedUrl = new URL("file:///my-file-I-want-to-exclude-this.jar"); - dynaModuleScanner.scan(testExcludedUrl); - verify(dynaModuleScanner, never()).performScan(testExcludedUrl); - } - - /** - * First, check that a file is scanned and then check that if a file is excluded, it is not - * scanned. - * - * @throws Exception - */ - @Test - public void checkSkipClass() throws Exception { - DynaModuleScanner dynaModuleScanner = new DynaModuleScanner(); - dynaModuleScanner = Mockito.spy(dynaModuleScanner); - - doNothing().when(dynaModuleScanner).performScan(any(URL.class)); - - // first check that URL is scanned - URL testUrl = new URL("file:///my-file.class"); - dynaModuleScanner.scan(testUrl); - verify(dynaModuleScanner).performScan(testUrl); - - dynaModuleScanner.setAdditionalSkipResources(new String[] {".*I-want-to-exclude-this.class"}); - URL testExcludedUrl = new URL("file:///my-file-I-want-to-exclude-this.class"); - dynaModuleScanner.scan(testExcludedUrl); - verify(dynaModuleScanner, never()).performScan(testExcludedUrl); - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/stub/DynaModuleListGeneratorMojoProjectStub.java b/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/stub/DynaModuleListGeneratorMojoProjectStub.java deleted file mode 100644 index a2e7a7a7163..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/java/org/eclipse/che/plugin/dynamodule/stub/DynaModuleListGeneratorMojoProjectStub.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.dynamodule.stub; - -import static org.mockito.Mockito.when; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.model.Build; -import org.apache.maven.model.Dependency; -import org.apache.maven.model.Model; -import org.apache.maven.model.io.xpp3.MavenXpp3Reader; -import org.apache.maven.plugin.testing.stubs.MavenProjectStub; -import org.codehaus.plexus.util.ReaderFactory; -import org.mockito.Mockito; - -/** - * Stub for the pom.xml file - * - * @author Florent Benoit - */ -public class DynaModuleListGeneratorMojoProjectStub extends MavenProjectStub { - - /** {@inheritDoc} */ - @Override - public File getBasedir() { - return new File(super.getBasedir() + "/src/test/projects/project"); - } - - private List dependencies; - - /** Default constructor */ - public DynaModuleListGeneratorMojoProjectStub() { - MavenXpp3Reader pomReader = new MavenXpp3Reader(); - Model model; - try { - model = pomReader.read(ReaderFactory.newXmlReader(new File(getBasedir(), "pom.xml"))); - setModel(model); - } catch (Exception e) { - throw new RuntimeException(e); - } - - setGroupId(model.getGroupId()); - setArtifactId(model.getArtifactId()); - setVersion(model.getVersion()); - setName(model.getName()); - setUrl(model.getUrl()); - setPackaging(model.getPackaging()); - setDependencies(model.getDependencies()); - - Build build = new Build(); - build.setFinalName(model.getArtifactId()); - build.setDirectory(getBasedir() + "/target"); - build.setSourceDirectory(getBasedir() + "/src/main/java"); - build.setOutputDirectory(getBasedir() + "/target/classes"); - build.setTestSourceDirectory(getBasedir() + "/src/test/java"); - build.setTestOutputDirectory(getBasedir() + "/target/test-classes"); - setBuild(build); - - List compileSourceRoots = new ArrayList(); - compileSourceRoots.add(getBasedir() + "/src/main/java"); - setCompileSourceRoots(compileSourceRoots); - - List testCompileSourceRoots = new ArrayList(); - testCompileSourceRoots.add(getBasedir() + "/src/test/java"); - setTestCompileSourceRoots(testCompileSourceRoots); - } - - /** Use of mockito artifact */ - @Override - public Artifact getArtifact() { - Artifact artifact = Mockito.mock(Artifact.class); - when(artifact.getArtifactId()).thenReturn(getModel().getArtifactId()); - when(artifact.getGroupId()).thenReturn(getModel().getGroupId()); - when(artifact.getVersion()).thenReturn(getModel().getVersion()); - when(artifact.getVersionRange()) - .thenReturn(VersionRange.createFromVersion(getModel().getVersion())); - return artifact; - } - - @Override - public Set getDependencyArtifacts() { - Artifact artifact = Mockito.mock(Artifact.class); - when(artifact.getArtifactId()).thenReturn(getDependencies().get(0).getArtifactId()); - when(artifact.getGroupId()).thenReturn(getDependencies().get(0).getGroupId()); - when(artifact.getVersion()).thenReturn(System.getProperty("currentVersion")); - when(artifact.getType()).thenReturn(getDependencies().get(0).getType()); - HashSet hashSet = new HashSet(); - hashSet.add(artifact); - return hashSet; - } - - @Override - public List getDependencies() { - return dependencies; - } - - @Override - public void setDependencies(List dependencies) { - this.dependencies = dependencies; - } -} diff --git a/core/che-core-dynamodule-maven-plugin/src/test/projects/project/pom.xml b/core/che-core-dynamodule-maven-plugin/src/test/projects/project/pom.xml deleted file mode 100644 index a8b793ef9d9..00000000000 --- a/core/che-core-dynamodule-maven-plugin/src/test/projects/project/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - - org.eclipse.che.test - my-dynamodule-test-module - 1.0.0-SNAPSHOT - pom - Test of Eclipse Che DynaModule plugin - - - - org.eclipse.che.core - che-wsagent-core - war - - - - - - - org.eclipse.che.core - che-core-dynamodule-maven-plugin - - ${localRepository} - - value1 - - - - true - - - - - - - diff --git a/core/che-core-gwt-maven-plugin/pom.xml b/core/che-core-gwt-maven-plugin/pom.xml deleted file mode 100644 index bc78da09880..00000000000 --- a/core/che-core-gwt-maven-plugin/pom.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - 4.0.0 - - che-core-parent - org.eclipse.che.core - 7.0.0-rc-4.0-SNAPSHOT - - che-core-gwt-maven-plugin - maven-plugin - Che Core :: IDE :: GWT Maven Plugin - - - org.apache.commons - commons-compress - - - org.apache.maven - maven-artifact - - - org.apache.maven - maven-core - - - jsr250-api - javax.annotation - - - - - org.apache.maven - maven-plugin-api - - - org.apache.maven.plugin-tools - maven-plugin-annotations - - - org.codehaus.plexus - plexus-utils - - - junit - junit - test - - - org.apache.maven - maven-compat - test - - - org.apache.maven - maven-model - test - - - org.apache.maven.plugin-testing - maven-plugin-testing-harness - test - - - org.eclipse.che.core - che-ide-full - test - - - org.eclipse.che.plugin - che-plugin-help-ext-client - test - - - org.mockito - mockito-core - test - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${project.version} - - - - - org.apache.maven.plugins - maven-plugin-plugin - - - mojo-descriptor - - descriptor - - - - help-goal - - helpmojo - - - - - true - - - - net.ltgt.gwt.maven - gwt-maven-plugin - true - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies-for-tests - generate-test-resources - - copy - - - - - org.eclipse.che.core - che-ide-full - ${project.version} - che-ide-full-${project.version}.jar - ${project.build.directory}/local-repo/org/eclipse/che/core/che-ide-full/${project.version} - - - org.eclipse.che.plugin - che-plugin-help-ext-client - ${project.version} - che-plugin-help-ext-client-${project.version}.jar - ${project.build.directory}/local-repo/org/eclipse/che/plugin/che-plugin-help-ext-client/${project.version} - - - - - - - - - diff --git a/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojo.java b/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojo.java deleted file mode 100644 index 87e91b3cf66..00000000000 --- a/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojo.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.gwt; - -import static java.lang.String.format; -import static java.nio.charset.StandardCharsets.UTF_8; -import static org.eclipse.che.plugin.gwt.Utils.getFileContent; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; -import java.io.Writer; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.zip.ZipFile; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; -import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.maven.project.MavenProject; -import org.apache.maven.repository.RepositorySystem; -import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; -import org.codehaus.plexus.util.xml.XMLWriter; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.Xpp3DomWriter; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -/** - * Detects if Full IDE dependency with excluded plugins declared in pom.xml and modifies the IDE GWT - * module to avoid inheriting modules of the excluded plugins. - */ -@Mojo( - name = "process-excludes", - defaultPhase = LifecyclePhase.PROCESS_RESOURCES, - requiresDependencyResolution = ResolutionScope.COMPILE) -public class ProcessExcludesMojo extends AbstractMojo { - - public static final String FULL_IDE_ARTIFACT_ID = "che-ide-full"; - public static final String FULL_IDE_GWT_MODULE_SUFFIX = "-with-excludes"; - - @Component private RepositorySystem repositorySystem; - - /** The local repository to use for the artifacts resolution. */ - @Parameter(defaultValue = "${localRepository}", required = true, readonly = true) - private ArtifactRepository localRepository; - - /** The remote repositories to use for the artifacts resolution. */ - @Parameter( - defaultValue = "${project.remoteArtifactRepositories}", - required = true, - readonly = true) - private List remoteRepositories; - - @Parameter(defaultValue = "${project.build.outputDirectory}", required = true) - private File outputDirectory; - - @Parameter(defaultValue = "${project}", required = true, readonly = true) - private MavenProject project; - - /** Full IDE maven artifact. */ - private Artifact fullIdeArtifact; - - /** Name of the Full IDE GWT module. */ - private String fullIdeGwtModule; - - @Override - public void execute() throws MojoExecutionException { - if (!init()) { - getLog().debug(format("No dependency on '%s'. Skipping the execution", FULL_IDE_ARTIFACT_ID)); - return; - } - - getLog().debug("Detected dependency on " + fullIdeArtifact.getArtifactId()); - - try { - Set excludedModules = detectExcludedGwtModules(); - - if (excludedModules.isEmpty()) { - getLog().debug("No excluded GWT modules detected. Skipping the execution"); - return; - } - - createFullIdeModuleWithExcludes(excludedModules); - patchGwtModule(); - } catch (XmlPullParserException | IOException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - } - - /** - * Initializes mojo with the essential information about Full IDE dependency. - * - * @return {@code true} if there is a dependency on Full IDE in pom.xml; otherwise - {@code false} - * @throws IllegalStateException if error occurs during getting Full IDE dependency information - */ - private boolean init() { - Optional fullIdeArtifactOpt = - project - .getDependencyArtifacts() - .stream() - .filter(artifact -> FULL_IDE_ARTIFACT_ID.equals(artifact.getArtifactId())) - .findAny(); - - if (!fullIdeArtifactOpt.isPresent()) { - return false; - } - - fullIdeArtifact = fullIdeArtifactOpt.get(); - - try { - fullIdeGwtModule = readGwtModuleName(fullIdeArtifact); - } catch (IOException e) { - throw new IllegalStateException(e.getMessage(), e); - } - - return true; - } - - /** - * Detects the GWT modules that should be excluded from the IDE GWT app. - * - * @return detected GWT modules - */ - private Set detectExcludedGwtModules() throws IOException { - Set modules = new HashSet<>(); - - ArtifactFilter dependencyFilter = fullIdeArtifact.getDependencyFilter(); - - if (dependencyFilter instanceof ExcludesArtifactFilter) { - ExcludesArtifactFilter excludesDependencyFilter = (ExcludesArtifactFilter) dependencyFilter; - - for (String pattern : excludesDependencyFilter.getPatterns()) { - String[] split = pattern.split(":"); - String groupId = split[0]; - String artifactId = split[1]; - String version = fullIdeArtifact.getBaseVersion(); - - Artifact artifact = repositorySystem.createArtifact(groupId, artifactId, version, "jar"); - String gwtModule = readGwtModuleName(artifact); - - modules.add(gwtModule); - - getLog().info("Detected GWT module to exclude: " + gwtModule); - } - } - - return modules; - } - - /** Creates copy of the Full.gwt.xml with removed '' for the excluded GWT modules. */ - private void createFullIdeModuleWithExcludes(Set modulesToExclude) - throws XmlPullParserException, IOException { - String fullIdeGwtModulePath = fullIdeGwtModule.replace('.', '/') + ".gwt.xml"; - String fullIdeGwtModuleContent = - getFileContent(new ZipFile(fullIdeArtifact.getFile()), fullIdeGwtModulePath); - - InputStream in = new ByteArrayInputStream(fullIdeGwtModuleContent.getBytes(UTF_8.name())); - Xpp3Dom module = Xpp3DomBuilder.build(in, UTF_8.name()); - - for (int i = module.getChildCount() - 1; i >= 0; i--) { - Xpp3Dom child = module.getChild(i); - - if ("inherits".equals(child.getName())) { - String moduleName = child.getAttribute("name"); - - if (modulesToExclude.contains(moduleName)) { - module.removeChild(i); - } - } - } - - String moduleRelPath = - fullIdeGwtModulePath.replace(".gwt.xml", FULL_IDE_GWT_MODULE_SUFFIX + ".gwt.xml"); - - Path modulePath = Paths.get(outputDirectory.getPath(), moduleRelPath); - - try (Writer writer = new StringWriter()) { - XMLWriter xmlWriter = new PrettyPrintXMLWriter(writer); - Xpp3DomWriter.write(xmlWriter, module); - Files.write(modulePath, writer.toString().getBytes()); - } - } - - /** - * Patches the IDE GWT module by replacing inheritance of Full.gwt.xml by - * Full-with-excludes.gwt.xml. - */ - private void patchGwtModule() throws XmlPullParserException, IOException { - String gwtModuleFileRelPath = getGwtModule().replace('.', '/') + ".gwt.xml"; - Path gwtModuleFilePath = Paths.get(outputDirectory.getPath(), gwtModuleFileRelPath); - - Xpp3Dom module = Xpp3DomBuilder.build(Files.newInputStream(gwtModuleFilePath), UTF_8.name()); - - for (int i = module.getChildCount() - 1; i >= 0; i--) { - Xpp3Dom child = module.getChild(i); - - if ("inherits".equals(child.getName())) { - String moduleName = child.getAttribute("name"); - - if (moduleName.equals(fullIdeGwtModule)) { - child.setAttribute("name", fullIdeGwtModule + FULL_IDE_GWT_MODULE_SUFFIX); - break; - } - } - } - - try (Writer writer = new StringWriter()) { - XMLWriter xmlWriter = new PrettyPrintXMLWriter(writer); - Xpp3DomWriter.write(xmlWriter, module); - Files.write(gwtModuleFilePath, writer.toString().getBytes()); - } - } - - /** Returns GWT module name specified in the configuration of the gwt-maven-plugin. */ - private String getGwtModule() { - Xpp3Dom configuration = - project.getGoalConfiguration("net.ltgt.gwt.maven", "gwt-maven-plugin", null, null); - - return configuration.getChild("moduleName").getValue(); - } - - /** Reads name of GWT module from the given artifact. */ - private String readGwtModuleName(Artifact artifact) throws IOException { - if (artifact.getFile() == null) { - resolveArtifact(artifact); - } - - return getFileContent(new ZipFile(artifact.getFile()), "META-INF/gwt/mainModule"); - } - - /** - * Resolves the given artifact from a repository. - * - * @param artifact artifact to resolve - * @throws IllegalStateException if unable to resolve artifact - */ - private void resolveArtifact(Artifact artifact) { - ArtifactResolutionRequest resolutionRequest = - new ArtifactResolutionRequest() - .setLocalRepository(localRepository) - .setRemoteRepositories(remoteRepositories) - .setArtifact(artifact); - - ArtifactResolutionResult resolutionResult = repositorySystem.resolve(resolutionRequest); - - if (!resolutionResult.isSuccess()) { - throw new IllegalStateException("Unable to resolve artifact " + artifact.toString()); - } - } -} diff --git a/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/Utils.java b/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/Utils.java deleted file mode 100644 index 473f75e27e9..00000000000 --- a/core/che-core-gwt-maven-plugin/src/main/java/org/eclipse/che/plugin/gwt/Utils.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.gwt; - -import static java.lang.String.format; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Enumeration; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; -import org.apache.commons.compress.utils.IOUtils; - -public class Utils { - - private Utils() {} - - /** - * Reads content of the file from ZIP archive. - * - * @param zipFile ZIP file - * @param path path of the file to read content - * @return content of the file with the given path - * @throws IOException if error occurs while reading - * @throws IllegalArgumentException if file not found in ZIP archive - */ - public static String getFileContent(ZipFile zipFile, String path) throws IOException { - Enumeration entries = zipFile.entries(); - - while (entries.hasMoreElements()) { - ZipEntry entry = entries.nextElement(); - - if (path.equals(entry.getName())) { - try (InputStream in = zipFile.getInputStream(entry)) { - byte[] bytes = IOUtils.toByteArray(in); - - return new String(bytes); - } - } - } - - throw new IllegalArgumentException( - format("Cannot find file '%s' in '%s'", path, zipFile.getName())); - } -} diff --git a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojoTest.java b/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojoTest.java deleted file mode 100644 index ad31532c25b..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/ProcessExcludesMojoTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.gwt; - -import static org.eclipse.che.plugin.gwt.ProcessExcludesMojo.FULL_IDE_GWT_MODULE_SUFFIX; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import org.apache.maven.plugin.testing.MojoRule; -import org.apache.maven.plugin.testing.resources.TestResources; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; -import org.junit.Rule; -import org.junit.Test; - -public class ProcessExcludesMojoTest { - - /** Rule to manage the mojo (set/get values of variables of mojo). */ - @Rule public MojoRule rule = new MojoRule(); - - /** Resources of each test mapped on the name of the method. */ - @Rule public TestResources resources = new TestResources(); - - /** - * Injects data in mojo. - * - * @param mojo the mojo - * @param baseDir root dir on which we extract files - * @throws IllegalAccessException if unable to set variables - */ - private void configureMojo(ProcessExcludesMojo mojo, File baseDir) throws Exception { - rule.setVariableValueToObject(mojo, "outputDirectory", new File(baseDir, "classes")); - } - - /** - * Tests the ability of the plugin to process IDE GWT module (IDE.gwt.xml) to prevent inheriting - * the GWT modules of the excluded IDE plugins. - */ - @Test - public void testProcessingExcludes() throws Exception { - File projectCopy = resources.getBasedir("project"); - File pom = new File(projectCopy, "pom.xml"); - assertTrue(pom.exists()); - - ProcessExcludesMojo mojo = (ProcessExcludesMojo) rule.lookupMojo("process-excludes", pom); - assertNotNull(mojo); - - configureMojo(mojo, projectCopy); - mojo.execute(); - - File fullGwtXml = - new File( - projectCopy, - "classes/org/eclipse/che/ide/Full" + FULL_IDE_GWT_MODULE_SUFFIX + ".gwt.xml"); - assertTrue(fullGwtXml.exists()); - - String fullGwtXmlContent = FileUtils.fileRead(fullGwtXml); - assertFalse(fullGwtXmlContent.contains("org.eclipse.che.ide.ext.help.HelpAboutExtension")); - - File ideGwtXml = new File(projectCopy, "classes/org/eclipse/che/ide/IDE.gwt.xml"); - assertTrue(ideGwtXml.exists()); - - String ideGwtXmlContent = FileUtils.fileRead(ideGwtXml); - assertFalse(ideGwtXmlContent.contains("")); - assertTrue( - ideGwtXmlContent.contains( - "")); - } - - /** - * Tests that plugins doesn't modify the IDE GWT module (IDE.gwt.xml) if there are no excluded - * plugins. - */ - @Test - public void testWithoutExcludes() throws Exception { - File projectCopy = resources.getBasedir("project-without-exclusions"); - File pom = new File(projectCopy, "pom.xml"); - assertTrue(pom.exists()); - - ProcessExcludesMojo mojo = (ProcessExcludesMojo) rule.lookupMojo("process-excludes", pom); - assertNotNull(mojo); - - configureMojo(mojo, projectCopy); - mojo.execute(); - - File outputDirectory = (File) rule.getVariableValueFromObject(mojo, "outputDirectory"); - File expected = - new File( - "src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml"); - File actual = new File(outputDirectory, "org/eclipse/che/ide/IDE.gwt.xml"); - - assertEquals( - "IDE.gwt.xml is changed but it shouldn't.", - StringUtils.getNestedString(FileUtils.fileRead(expected), ""), - StringUtils.getNestedString(FileUtils.fileRead(actual), "")); - } -} diff --git a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectStub.java b/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectStub.java deleted file mode 100644 index 33c44f2bfe0..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectStub.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.gwt.stub; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter; -import org.apache.maven.model.Build; -import org.apache.maven.model.Dependency; -import org.apache.maven.model.Model; -import org.apache.maven.model.Plugin; -import org.apache.maven.model.io.xpp3.MavenXpp3Reader; -import org.apache.maven.plugin.testing.ArtifactStubFactory; -import org.apache.maven.plugin.testing.stubs.MavenProjectStub; -import org.codehaus.plexus.util.ReaderFactory; -import org.codehaus.plexus.util.xml.Xpp3Dom; - -public class ProjectStub extends MavenProjectStub { - - public ProjectStub() { - MavenXpp3Reader pomReader = new MavenXpp3Reader(); - Model model; - try { - model = pomReader.read(ReaderFactory.newXmlReader(new File(getBasedir(), "pom.xml"))); - setModel(model); - } catch (Exception e) { - throw new RuntimeException(e); - } - - setGroupId(model.getGroupId()); - setArtifactId(model.getArtifactId()); - setVersion(model.getVersion()); - setName(model.getName()); - setUrl(model.getUrl()); - setPackaging(model.getPackaging()); - - List compileSourceRoots = new ArrayList<>(); - compileSourceRoots.add(getBasedir() + "/src/main/java"); - setCompileSourceRoots(compileSourceRoots); - - List testCompileSourceRoots = new ArrayList<>(); - testCompileSourceRoots.add(getBasedir() + "/src/test/java"); - setTestCompileSourceRoots(testCompileSourceRoots); - - setupBuild(model); - setupDependencyArtifacts(model); - } - - private void setupDependencyArtifacts(Model model) { - Set artifacts = new HashSet<>(); - ArtifactStubFactory artifactStubFactory = new ArtifactStubFactory(); - - for (Dependency dependency : model.getDependencies()) { - Artifact artifact; - - try { - artifact = - artifactStubFactory.createArtifact( - dependency.getGroupId(), - dependency.getArtifactId(), - System.getProperty("currentVersion")); - } catch (IOException e) { - throw new RuntimeException(e); - } - - List patterns = - dependency - .getExclusions() - .stream() - .map(exclusion -> exclusion.getGroupId() + ":" + exclusion.getArtifactId()) - .collect(Collectors.toList()); - - artifact.setDependencyFilter(new ExcludesArtifactFilter(patterns)); - artifacts.add(artifact); - } - - setDependencyArtifacts(artifacts); - } - - private void setupBuild(Model model) { - Build build = new Build(); - - build.setFinalName(model.getArtifactId()); - build.setDirectory(getBasedir() + "/target"); - build.setSourceDirectory(getBasedir() + "/src/main/java"); - build.setOutputDirectory(getBasedir() + "/target/classes"); - build.setTestSourceDirectory(getBasedir() + "/src/test/java"); - build.setTestOutputDirectory(getBasedir() + "/target/test-classes"); - build.setPlugins(model.getBuild().getPlugins()); - - setBuild(build); - } - - @Override - public File getBasedir() { - return new File(super.getBasedir() + "/src/test/projects/" + getProjectFolder()); - } - - @Override - public Xpp3Dom getGoalConfiguration( - String pluginGroupId, String pluginArtifactId, String executionId, String goalId) { - Plugin plugin = getPlugin(pluginGroupId + ':' + pluginArtifactId); - Object configuration = plugin.getConfiguration(); - - return (Xpp3Dom) configuration; - } - - protected String getProjectFolder() { - return "project"; - } -} diff --git a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectWithoutExclusionsStub.java b/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectWithoutExclusionsStub.java deleted file mode 100644 index e5ed7ae19ba..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/java/org/eclipse/che/plugin/gwt/stub/ProjectWithoutExclusionsStub.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.plugin.gwt.stub; - -public class ProjectWithoutExclusionsStub extends ProjectStub { - - @Override - protected String getProjectFolder() { - return "project-without-exclusions"; - } -} diff --git a/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml b/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml deleted file mode 100644 index c3ecc508715..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/pom.xml b/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/pom.xml deleted file mode 100644 index a29bda467d8..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/projects/project-without-exclusions/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - org.eclipse.che.test - test-module - 1.0.0-SNAPSHOT - pom - Test Maven project for Che GWT Maven plugin - - - org.eclipse.che.core - che-ide-full - - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - - org.eclipse.che.ide.IDE - - - - org.eclipse.che.core - che-core-gwt-maven-plugin - - - ${localRepository} - - true - - - - diff --git a/core/che-core-gwt-maven-plugin/src/test/projects/project/classes/org/eclipse/che/ide/IDE.gwt.xml b/core/che-core-gwt-maven-plugin/src/test/projects/project/classes/org/eclipse/che/ide/IDE.gwt.xml deleted file mode 100644 index c3ecc508715..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/projects/project/classes/org/eclipse/che/ide/IDE.gwt.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/core/che-core-gwt-maven-plugin/src/test/projects/project/pom.xml b/core/che-core-gwt-maven-plugin/src/test/projects/project/pom.xml deleted file mode 100644 index 80f61d6b0a9..00000000000 --- a/core/che-core-gwt-maven-plugin/src/test/projects/project/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - 4.0.0 - org.eclipse.che.test - test-module - 1.0.0-SNAPSHOT - pom - Test Maven project for Che GWT Maven plugin - - - org.eclipse.che.core - che-ide-full - - - che-plugin-help-ext-client - org.eclipse.che.plugin - - - - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - - org.eclipse.che.ide.IDE - - - - org.eclipse.che.core - che-core-gwt-maven-plugin - - - ${localRepository} - - true - - - - diff --git a/core/pom.xml b/core/pom.xml index 2744e843ef1..441113dd5f7 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,8 +29,6 @@ che-core-api-dto che-core-api-dto-maven-plugin che-core-typescript-dto-maven-plugin - che-core-dynamodule-maven-plugin - che-core-gwt-maven-plugin che-core-api-core che-core-api-model che-core-db diff --git a/cypress-tests/README.md b/cypress-tests/README.md deleted file mode 100644 index 45e25395ab1..00000000000 --- a/cypress-tests/README.md +++ /dev/null @@ -1,26 +0,0 @@ -This module contains tests based on using "Cypress" framework. - -### Build project -For obtaining required dependencies open terminal, go to ```"cypress-tests"``` folder -and perform ```"npm install"``` command - -### Prerequisites -Launching requires valid ```"baseUrl"``` which may be configured by next way: - - by **"cypress.json"** - open ```"cypress.json"``` file placed in the ```"cypress-tests"``` folder, - change the "baseUrl" value to the valid URL. - - - by **CLI** - perform ```"export CYPRESS_baseUrl="``` in the terminal - - -### Launching - -- Launch testrunner with dashboard: - - go to the ```"cypress-tests"``` folder and perform ```"npm run cypress:open"``` in the terminal - -- Launch tests by "CLI" in the hidden mode: - - go to the ```"cypress-tests"``` folder and perform ```"npm run cypress:run-hidden "``` (particular test) - or ```"npm run cypress:run-hidden"``` (all tests) in the terminal - -- Launch tests by "CLI" in the browser mode: - - go to the ```"cypress-tests"``` folder and perform ```"npm run cypress:run "``` (particular test) - or ```"npm run cypress:run"``` (all tests) in the terminal diff --git a/cypress-tests/cypress.json b/cypress-tests/cypress.json deleted file mode 100644 index db456db2f8f..00000000000 --- a/cypress-tests/cypress.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "numTestsKeptInMemory": 0, - "video": true, - "videoUploadOnPasses": true, - "videoCompression": 45, - "trashAssetsBeforeRuns": true, - - - "defaultCommandTimeout": 20000, - "viewportWidth": 1920, - "viewportHeight": 1080, - "baseUrl": "http://sample-url", - - "env": { - "ProjectTree.waitProjectImportedAttempts": 5, - "ProjectTree.delayBetweenAttempts": 30000, - "ProjectTree.delayBeforeItemCheck": 10000, - - "TestWorkspaceUtil.waitRunningStatusAttempts": 90, - "TestWorkspaceUtil.waitRunningStatusPollingEvery": 10000, - - "test_user_name": "admin", - "test_user_password": "admin", - "load_page_timeout": 120000, - "start_workspace_timeout": 240000, - "language_server_initialization_timeout": 180000 - } -} diff --git a/cypress-tests/cypress/fixtures/workspace/che-7-preview.json b/cypress-tests/cypress/fixtures/workspace/che-7-preview.json deleted file mode 100644 index d40e310118c..00000000000 --- a/cypress-tests/cypress/fixtures/workspace/che-7-preview.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "defaultEnv": "default", - "environments": { - "default": { - "recipe": { - "contentType": "application/x-yaml", - "type": "kubernetes", - "content": "kind: List\nitems:\n - \n apiVersion: v1\n kind: Pod\n metadata:\n name: ws\n spec:\n containers:\n - \n image: 'eclipse/che-dev:nightly'\n name: dev\n resources:\n limits:\n memory: 512Mi\n" - }, - "machines": { - "ws/dev": { - "env": {}, - "servers": {}, - "installers": [], - "volumes": { - "projects": { - "path": "/projects" - } - }, - "attributes": { - "memoryLimitBytes": "536870912" - } - } - } - } - }, - "projects": [], - "commands": [], - "name": "wksp-ncvb", - "attributes": { - "editor": "eclipse/che-theia/1.0.0", - "plugins": "eclipse/che-machine-exec-plugin/0.0.1" - }, - "links": [] - } diff --git a/cypress-tests/cypress/integration/WorkspaceCreationAndLanguageServerInitialization.spec.ts b/cypress-tests/cypress/integration/WorkspaceCreationAndLanguageServerInitialization.spec.ts deleted file mode 100644 index 2bcbaf95747..00000000000 --- a/cypress-tests/cypress/integration/WorkspaceCreationAndLanguageServerInitialization.spec.ts +++ /dev/null @@ -1,167 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/** - * In this testcase is implemented next scenario: - * - * 1. Open dashboard - * 2. Create new workspace using dashboard and open it - * 3. Wait IDE and open file - * 4. Check Language Server initialization - * 5. Delete workspace using dashboard - */ -import { Dashboard } from "../pageobjects/dashboard/Dashboard"; -import { Workspaces } from "../pageobjects/dashboard/Workspaces"; -import { NewWorkspace } from "../pageobjects/dashboard/NewWorkspace"; -import { Ide } from "../pageobjects/ide/Ide"; -import { ProjectTree } from "../pageobjects/ide/ProjectTree"; -import { Editor } from "../pageobjects/ide/Editor"; -import { NameGenerator } from "../utils/NameGenerator"; -import { ILoginPage } from "../pageobjects/dashboard/interfaces/ILoginPage"; -import { e2eContainer } from "../inversifyJS/inversify.config"; -import { TYPES } from "../inversifyJS/types"; -import { WorkspaceDetails } from "../pageobjects/dashboard/workspace-details/WorkspaceDetails"; -import { WorkspaceDetailsPlugins } from "../pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins"; - -const workspaceName: string = NameGenerator.generate("wksp-test-", 5); -const namespace: string = "che"; -const sampleName: string = "console-java-simple"; - -const loginPage: ILoginPage = e2eContainer.get(TYPES.ILoginPage); -const dashboard: Dashboard = new Dashboard(); -const workspaces: Workspaces = new Workspaces(); -const newWorkspace: NewWorkspace = new NewWorkspace(); -const ide: Ide = new Ide(); -const projectTree: ProjectTree = new ProjectTree(); -const editor: Editor = new Editor(); -const workspaceDetails: WorkspaceDetails = new WorkspaceDetails(); -const workspaceDetailsPlugins: WorkspaceDetailsPlugins = new WorkspaceDetailsPlugins(); - - -describe("E2E test", () => { - - context("Prepare dashboard", () => { - it("Open dashboard", () => { - loginPage.login(); - dashboard.waitLoaderPage(); - dashboard.waitLoaderPageAbcence() - dashboard.waitDashboard(); - }) - - }) - - context("Create workspace and open it in IDE", () => { - - it("Go to \"New Workspace\" page", () => { - dashboard.clickWorkspacesButton(); - workspaces.clickAddWorkspaceButton(); - }) - - it(`Create a \"${workspaceName}\" workspace`, () => { - newWorkspace.typeWorkspaceName(workspaceName); - newWorkspace.clickOnChe7Stack(); - newWorkspace.waitChe7StackSelected(); - newWorkspace.clickOnAddOrImportProjectButton(); - newWorkspace.enableSampleCheckbox(sampleName); - newWorkspace.clickOnAddButton(); - newWorkspace.waitProjectAdding(sampleName); - - newWorkspace.selectCreateWorkspaceAndProceedEditing(); - }) - - it("Add 'Java Language Support' plugin to workspace", () => { - const javaPluginName: string = "Language Support for Java(TM)"; - const execPlugin: string = "Che machine-exec Service"; - - workspaceDetails.waitPage(workspaceName); - workspaceDetails.waitTabSelected('Overview') - workspaceDetails.clickOnTab('Plugins') - workspaceDetails.waitTabSelected('Plugins') - - workspaceDetailsPlugins.waitPluginEnabling(execPlugin) - workspaceDetailsPlugins.waitPluginDisabling(javaPluginName) - workspaceDetailsPlugins.clickOnPluginListItemSwitcher(javaPluginName) - workspaceDetailsPlugins.waitPluginEnabling(javaPluginName) - - workspaceDetails.waitSaveButton() - workspaceDetails.clickOnSaveButton() - workspaceDetails.waitSaveButtonDisappearance() - - workspaceDetails.clickOnOpenButton() - }) - - - it("Wait IDE availability", () => { - ide.waitWorkspaceAndIdeInIframe(namespace, workspaceName); - ide.openIdeWithoutFrames(workspaceName); - ide.waitWorkspaceAndIde(namespace, workspaceName); - }) - - }) - - context("Work with IDE", () => { - let fileFolderPath: string = `${sampleName}/src/main/java/org/eclipse/che/examples`; - let tabTitle: string = "HelloWorld.java"; - let filePath: string = `${fileFolderPath}/${tabTitle}` - - it("Open project tree container", () => { - projectTree.openProjectTreeContainer(); - projectTree.waitProjectTreeContainer(); - projectTree.waitProjectImported(sampleName, "src") - }) - - it("Expand project and open file in editor", () => { - projectTree.expandPathAndOpenFile(fileFolderPath, tabTitle); - }) - - //unskip after resolving issue https://github.com/eclipse/che/issues/12904 - it.skip("Check \"Java Language Server\" initialization by statusbar", () => { - ide.waitStatusBarContains("Starting Java Language Server") - ide.waitStatusBarContains("100% Starting Java Language Server") - ide.waitStatusBarTextAbcence("Starting Java Language Server") - }) - - //unskip after resolving issue https://github.com/eclipse/che/issues/12904 - it.skip("Check \"Java Language Server\" initialization by suggestion invoking", () => { - editor.waitEditorAvailable(filePath, tabTitle); - editor.clickOnTab(filePath); - editor.waitEditorAvailable(filePath, tabTitle); - - editor.setCursorToLineAndChar(15, 33); - editor.performControlSpaceCombination(); - editor.waitSuggestionContainer(); - editor.waitSuggestion("getContentType()"); - }) - - }) - - context("Stop and remove workspace", () => { - it("Stop workspace", () => { - dashboard.openDashboard() - dashboard.clickWorkspacesButton() - workspaces.waitPage() - workspaces.waitWorkspaceListItem(workspaceName) - workspaces.waitWorkspaceWithRunningStatus(workspaceName) - workspaces.clickOnStopWorkspaceButton(workspaceName) - workspaces.waitWorkspaceWithStoppedStatus(workspaceName) - }) - - it("Delete workspace", () => { - workspaces.waitPage() - workspaces.waitWorkspaceListItem(workspaceName) - workspaces.clickWorkspaceListItem(workspaceName); - workspaces.clickDeleteButtonOnWorkspaceDetails(); - workspaces.clickConfirmDeletionButton(); - workspaces.waitPage() - workspaces.waitWorkspaceListItemAbcence(workspaceName); - }) - }) - -}) diff --git a/cypress-tests/cypress/inversifyJS/inversify.config.ts b/cypress-tests/cypress/inversifyJS/inversify.config.ts deleted file mode 100644 index d59debb0f54..00000000000 --- a/cypress-tests/cypress/inversifyJS/inversify.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Container } from "inversify"; -import { ILoginPage } from "../pageobjects/dashboard/interfaces/ILoginPage"; -import { TYPES } from "./types"; -import { LoginPageSingleUser } from "../pageobjects/dashboard/LoginPageSingleUser"; - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -const e2eContainer = new Container(); - -e2eContainer.bind(TYPES.ILoginPage).to(LoginPageSingleUser) - - -export {e2eContainer} diff --git a/cypress-tests/cypress/inversifyJS/types.ts b/cypress-tests/cypress/inversifyJS/types.ts deleted file mode 100644 index 2830f761c3e..00000000000 --- a/cypress-tests/cypress/inversifyJS/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -export const TYPES = { - ILoginPage: Symbol.for("ILoginPage") -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/Dashboard.ts b/cypress-tests/cypress/pageobjects/dashboard/Dashboard.ts deleted file mode 100644 index 5dfa0c3cc2f..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/Dashboard.ts +++ /dev/null @@ -1,60 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -export class Dashboard { - private static readonly PAGE_LOAD_TIMEOUT: number = Cypress.env("load_page_timeout"); - - private static readonly DASHBOARD_BUTTON: string = "#dashboard-item"; - private static readonly WORKSPACES_BUTTON: string = "#workspaces-item"; - private static readonly STACKS_BUTTON: string = "#stacks-item"; - private static readonly FACTORIES_BUTTON: string = "#factories-item"; - private static readonly LOADER_PAGE: string = ".main-page-loader" - - - - openDashboard() { - cy.visit("/"); - } - - waitDashboard() { - [Dashboard.DASHBOARD_BUTTON, Dashboard.WORKSPACES_BUTTON, Dashboard.STACKS_BUTTON, Dashboard.FACTORIES_BUTTON] - .forEach(buttonLocator => { - cy.get(buttonLocator, { timeout: Dashboard.PAGE_LOAD_TIMEOUT }) - .should('be.visible'); - }) - } - - clickDashboardButton() { - cy.get(Dashboard.DASHBOARD_BUTTON).should('be.visible').click() - } - - clickWorkspacesButton() { - cy.get(Dashboard.WORKSPACES_BUTTON).should('be.visible').click() - } - - clickStacksButton() { - cy.get(Dashboard.STACKS_BUTTON).should('be.visible').click() - } - - clickFactoriesButton() { - cy.get(Dashboard.FACTORIES_BUTTON).should('be.visible').click() - } - - waitLoaderPage() { - cy.get(Dashboard.LOADER_PAGE, { timeout: Dashboard.PAGE_LOAD_TIMEOUT }).should('be.visible') - } - - waitLoaderPageAbcence() { - cy.get(Dashboard.LOADER_PAGE, { timeout: Dashboard.PAGE_LOAD_TIMEOUT }).should('not.be.visible') - } - -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/LoginPageMultiUser.ts b/cypress-tests/cypress/pageobjects/dashboard/LoginPageMultiUser.ts deleted file mode 100644 index 3ab7533680a..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/LoginPageMultiUser.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ILoginPage } from "./interfaces/ILoginPage"; -import { Dashboard } from "./Dashboard"; -import { injectable, inject } from "inversify"; -import "reflect-metadata"; - - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -@injectable() -export class LoginPageMultiUser implements ILoginPage { - private static readonly LOAD_PAGE_TIMEOUT: number = Cypress.env('load_page_timeout'); - private static readonly TEST_USER_NANE: string = Cypress.env('test_user_name'); - private static readonly TEST_USER_PASSWORD: string = Cypress.env('test_user_password'); - - private readonly dashboard: Dashboard = new Dashboard(); - - - private static readonly USERNAME_FIELD: string = "#username"; - private static readonly PASSWORD_FIELD: string = "#password"; - private static readonly LOGIN_BUTTON: string = "[name='login']"; - - private typeToInputField(text: string, fieldLocator: string) { - cy.get(fieldLocator) - .click() - .focus() - .type(text); - } - - private visitLoginPage() { - cy.visit("/"); - } - - private typeUsername(username: string) { - this.typeToInputField(username, LoginPageMultiUser.USERNAME_FIELD); - } - - private typePassword(password: string) { - this.typeToInputField(password, LoginPageMultiUser.PASSWORD_FIELD); - } - - private clickOnLoginButton() { - cy.get(LoginPageMultiUser.LOGIN_BUTTON) - .click(); - } - - private waitPage() { - [LoginPageMultiUser.LOGIN_BUTTON, LoginPageMultiUser.USERNAME_FIELD, LoginPageMultiUser.PASSWORD_FIELD] - .forEach(elementLocator => { - cy.get(elementLocator, { timeout: LoginPageMultiUser.LOAD_PAGE_TIMEOUT }) - .should('be.visible'); - }) - } - - private waitPageAbcence() { - [LoginPageMultiUser.LOGIN_BUTTON, LoginPageMultiUser.USERNAME_FIELD, LoginPageMultiUser.PASSWORD_FIELD] - .forEach(elementLocator => { - cy.get(elementLocator, { timeout: LoginPageMultiUser.LOAD_PAGE_TIMEOUT }) - .should('not.be.visible'); - }) - } - - login() { - this.visitLoginPage(); - this.waitPage(); - this.typeUsername(LoginPageMultiUser.TEST_USER_NANE); - this.typePassword(LoginPageMultiUser.TEST_USER_PASSWORD); - this.clickOnLoginButton(); - this.waitPageAbcence(); - } - -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/LoginPageSingleUser.ts b/cypress-tests/cypress/pageobjects/dashboard/LoginPageSingleUser.ts deleted file mode 100644 index 016c359826c..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/LoginPageSingleUser.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { injectable } from "inversify"; -import "reflect-metadata"; -import { ILoginPage } from "./interfaces/ILoginPage"; - - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - - -@injectable() -export class LoginPageSingleUser implements ILoginPage { - login(){ - cy.visit("/"); - } -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/NewWorkspace.ts b/cypress-tests/cypress/pageobjects/dashboard/NewWorkspace.ts deleted file mode 100644 index 1cac8c9c2bd..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/NewWorkspace.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { ElementStateChecker } from "../../utils/ElementStateChecker"; - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -export class NewWorkspace { - private static readonly CHE_7_STACK: string = "div[data-stack-id='che7-preview']"; - private static readonly SELECTED_CHE_7_STACK: string = ".stack-selector-item-selected[data-stack-id='che7-preview']" - private static readonly CREATE_AND_OPEN_BUTTON: string = "che-button-save-flat[che-button-title='Create & Open']>button" - private static readonly CREATE_AND_EDIT_BUTTON: string = "#dropdown-toggle button[name='dropdown-toggle']" - private static readonly ADD_OR_IMPORT_PROJECT_BUTTON: string = ".add-import-project-toggle-button"; - private static readonly ADD_BUTTON: string = "button[aria-disabled='false'][name='addButton']"; - private static readonly NAME_FIELD: string = "#workspace-name-input"; - - private readonly elementStateChecker: ElementStateChecker = new ElementStateChecker(); - - - selectCreateWorkspaceAndProceedEditing() { - const createAndProceedDropDown: string = "che-button-dropdown.create-workspace-header-button ul.area-dropdown" - - // open drop down list - cy.get(NewWorkspace.CREATE_AND_EDIT_BUTTON) - .should('be.visible') - .click() - - // wait until drop down container is not animated - cy.get(createAndProceedDropDown) - .should('not.have.class', 'animating') - .should('be.visible') - - // click on "Create & Proceed Editing" item in the drop down list - cy.contains('Create & Proceed Editing') - .should('be.visible') - .click() - } - - typeWorkspaceName(workspaceName: string) { - cy.get(NewWorkspace.NAME_FIELD) - .clear() - .should('have.value', "") - .type(workspaceName) - .should('have.value', workspaceName); - } - - clickOnChe7Stack() { - cy.get(NewWorkspace.CHE_7_STACK) - .click(); - } - - waitChe7StackSelected() { - cy.get(NewWorkspace.SELECTED_CHE_7_STACK) - .should('be.visible'); - } - - clickOnCreateAndOpenButton() { - let ideFrameLocator: string = "ide-iframe#ide-iframe-window"; - - cy.get(NewWorkspace.CREATE_AND_OPEN_BUTTON) - .first() - .should('be.visible') - .click(); - - //check that the workspace has started to boot - cy.get(ideFrameLocator) - .should('have.attr', 'aria-hidden', 'false') - } - - clickOnAddOrImportProjectButton() { - cy.get(NewWorkspace.ADD_OR_IMPORT_PROJECT_BUTTON) - .should('be.visible') - .click(); - } - - enableSampleCheckbox(sampleName: string) { - cy.get(`#sample-${sampleName}>md-checkbox>div`) - .first() - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - .click({ force: true }); - - this.waitSampleCheckboxEnabling(sampleName) - } - - waitSampleCheckboxEnabling(sampleName: string) { - cy.get(`#sample-${sampleName}>md-checkbox[aria-checked='true']`) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }); - } - - waitProjectAdding(projectName: string) { - cy.get(`#project-source-selector toggle-single-button#${projectName}`) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - } - - waitProjectAbsence(projectName: string) { - cy.get(`#project-source-selector toggle-single-button#${projectName}`) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.false - }) - } - - clickOnAddButton() { - cy.get(NewWorkspace.ADD_BUTTON) - .should('be.visible') - .click(); - } - -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/Workspaces.ts b/cypress-tests/cypress/pageobjects/dashboard/Workspaces.ts deleted file mode 100644 index 0ad791a8c8b..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/Workspaces.ts +++ /dev/null @@ -1,66 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -export class Workspaces { - private static readonly TITLE: string = ".che-toolbar-title-label"; - private static readonly ADD_WORKSPACE_BUTTON: string = "#add-item-button"; - private static readonly START_STOP_WORKSPACE_TIMEOUT: number = Cypress.env("load_page_timeout") - - - private getWorkspaceListItemLocator(workspaceName: string): string { - return `#ws-name-${workspaceName}` - } - - waitPage() { - cy.get(Workspaces.ADD_WORKSPACE_BUTTON).should('be.visible'); - } - - clickAddWorkspaceButton() { - cy.get(Workspaces.ADD_WORKSPACE_BUTTON).should('be.visible').click(); - } - - waitWorkspaceListItem(workspaceName: string) { - cy.get(this.getWorkspaceListItemLocator(workspaceName)) - } - - clickOnStopWorkspaceButton(workspaceName: string) { - cy.get(`#ws-name-${workspaceName} .workspace-status[uib-tooltip="Stop workspace"]`) - .click({ force: true }) - } - - waitWorkspaceWithRunningStatus(workspaceName: string) { - cy.get(this.getWorkspaceListItemLocator(workspaceName), { timeout: Workspaces.START_STOP_WORKSPACE_TIMEOUT }) - .should('have.attr', 'data-ws-status', 'RUNNING') - } - - waitWorkspaceWithStoppedStatus(workspaceName: string) { - cy.get(this.getWorkspaceListItemLocator(workspaceName), { timeout: Workspaces.START_STOP_WORKSPACE_TIMEOUT }) - .should('have.attr', 'data-ws-status', 'STOPPED') - } - - clickWorkspaceListItem(workspaceName: string) { - cy.get(`div[id='ws-full-name-che/${workspaceName}']`).click({ force: true }); - } - - clickDeleteButtonOnWorkspaceDetails() { - cy.get("che-button-danger[che-button-title='Delete']").should('be.visible').click(); - } - - waitWorkspaceListItemAbcence(workspaceName: string) { - cy.get(`div[id='ws-full-name-che/${workspaceName}']`).should('not.be.visible') - } - - clickConfirmDeletionButton() { - cy.get('#ok-dialog-button').should('be.visible').click(); - } - -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/interfaces/ILoginPage.ts b/cypress-tests/cypress/pageobjects/dashboard/interfaces/ILoginPage.ts deleted file mode 100644 index faa4b967573..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/interfaces/ILoginPage.ts +++ /dev/null @@ -1,13 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - - export interface ILoginPage{ - login():void; - } diff --git a/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts b/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts deleted file mode 100644 index 52ff11e684c..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +++ /dev/null @@ -1,115 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - - - -export class WorkspaceDetails { - - private static readonly RUN_BUTTON: string = "#run-workspace-button[che-button-title='Run']"; - private static readonly OPEN_BUTTON: string = "#open-in-ide-button[che-button-title='Open']"; - private static readonly TAB_BUTTONS: string = "md-tabs-canvas[role='tablist'] md-tab-item"; - private static readonly SELECTED_TAB_BUTTON: string = "md-tabs-canvas[role='tablist'] md-tab-item[aria-selected='true']"; - private static readonly SAVE_BUTTON: string = "button[name='save-button']"; - private static readonly ENABLED_SAVE_BUTTON: string = "button[name='save-button'][aria-disabled='false']"; - private static readonly WORKSPACE_DETAILS_LOADER: string = "workspace-details-overview md-progress-linear"; - private static readonly LOAD_PAGE_TIMEOUT: number = Cypress.env("load_page_timeout"); - - private getWorkspaceTitleLocator(workspaceName: string): string { - return `che-row-toolbar[che-title='${workspaceName}']` - } - - waitLoaderDisappearance() { - cy.get(WorkspaceDetails.WORKSPACE_DETAILS_LOADER, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('not.be.visible') - } - - waitSaveButton() { - cy.get(WorkspaceDetails.ENABLED_SAVE_BUTTON) - .should('be.visible') - } - - waitSaveButtonDisappearance() { - cy.get(WorkspaceDetails.SAVE_BUTTON) - .should('not.be.visible') - } - - clickOnSaveButton() { - cy.get(WorkspaceDetails.ENABLED_SAVE_BUTTON) - .should('be.visible') - .click() - } - - waitPage(workspaceName: string) { - cy.log("**wait page**").then(() => { - this.waitWorkspaceTitle(workspaceName); - this.waitOpenButton(); - this.waitRunButton(); - this.waitTabsPresence(); - this.waitLoaderDisappearance(); - }) - - } - - waitWorkspaceTitle(workspaceName: string) { - cy.get(this.getWorkspaceTitleLocator(workspaceName), { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - } - - waitRunButton() { - cy.get(WorkspaceDetails.RUN_BUTTON, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - } - - clickOnRunButton() { - cy.get(WorkspaceDetails.RUN_BUTTON, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - .click() - } - - waitOpenButton() { - cy.get(WorkspaceDetails.OPEN_BUTTON, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - } - - clickOnOpenButton() { - cy.get(WorkspaceDetails.OPEN_BUTTON, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - .click() - } - - waitTabsPresence() { - ["Overview", "Projects", "Containers", "Servers", "Env Variables", "Volumes", "Config", "SSH", "Plugins", "Editors"] - .forEach(tabTitle => { - cy.get(WorkspaceDetails.TAB_BUTTONS, { timeout: WorkspaceDetails.LOAD_PAGE_TIMEOUT }) - .contains(tabTitle) - .should('be.visible') - }) - } - - clickOnTab(tabTitle: string) { - cy.get(WorkspaceDetails.TAB_BUTTONS) - .contains(tabTitle) - .should('be.visible') - .click() - } - - waitTabSelected(tabTitle: string) { - cy.log("**wait tab selected**").then(() => { - this.waitTabsPresence() - - cy.get(WorkspaceDetails.SELECTED_TAB_BUTTON) - .should(selectedTab => { - expect(selectedTab).to.be.visible - expect(selectedTab[0].innerText.toString()).to.be.equal(tabTitle) - }) - }) - } - -} diff --git a/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts b/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts deleted file mode 100644 index c8bf6376363..00000000000 --- a/cypress-tests/cypress/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ElementStateChecker } from "../../../utils/ElementStateChecker"; - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - - -export class WorkspaceDetailsPlugins{ - private readonly elementStateChecker: ElementStateChecker = new ElementStateChecker(); - - - private getPluginListItemLocator(pluginName: string): string { - return `.plugin-item div[plugin-item-name='${pluginName}']` - } - - private getPluginListItemSwitcherLocator(pluginName: string): string { - return `${this.getPluginListItemLocator(pluginName)} md-switch` - } - - waitPluginListItem(pluginName: string) { - cy.get(this.getPluginListItemLocator(pluginName)) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - } - - clickOnPluginListItemSwitcher(pluginName: string) { - cy.get(this.getPluginListItemSwitcherLocator(pluginName)) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - .click({ force: true }) - } - - waitPluginEnabling(pluginName: string) { - cy.get(this.getPluginListItemSwitcherLocator(pluginName)) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - .should('have.attr', 'aria-checked', 'true') - } - - waitPluginDisabling(pluginName: string) { - cy.get(this.getPluginListItemSwitcherLocator(pluginName)) - .should(element => { - expect(this.elementStateChecker.isVisible(element)).to.be.true - }) - .should('have.attr', 'aria-checked', 'false') - } - -} diff --git a/cypress-tests/cypress/pageobjects/ide/Editor.ts b/cypress-tests/cypress/pageobjects/ide/Editor.ts deleted file mode 100644 index 3ec325e00ab..00000000000 --- a/cypress-tests/cypress/pageobjects/ide/Editor.ts +++ /dev/null @@ -1,247 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - - -export class Editor { - - private static readonly EDITOR_LINES: string = ".lines-content .view-line"; - private static readonly EDITOR_BODY: string = "#theia-main-content-panel .lines-content"; - private static readonly SUGGESTION_WIDGET_BODY: string = "div[widgetId='editor.widget.suggestWidget']" - private static readonly SUGGESTION_WIDGET_ROW: string = "div[widgetId='editor.widget.suggestWidget'] .monaco-list-row"; - - - waitSuggestionContainer() { - cy.get(Editor.SUGGESTION_WIDGET_BODY).should('be.visible'); - } - - waitSuggestionContainerClosed() { - cy.get(Editor.SUGGESTION_WIDGET_BODY).should('be.not.visible'); - } - - clickOnSuggestion(suggestion: string) { - cy.get(Editor.SUGGESTION_WIDGET_ROW) - .contains(suggestion) - .first() - .click(); - } - - waitSuggestion(suggestion: string) { - cy.get(Editor.SUGGESTION_WIDGET_ROW) - .contains(suggestion) - } - - private getTabLocator(itemPath: string) { - return `li[title='${itemPath}'] .p-TabBar-tabLabel`; - } - - waitTab(itemPath: string, editorTabTitle: string) { - cy.get(this.getTabLocator(itemPath)) - .contains(editorTabTitle); - } - - waitTabDisappearance(itemPath: string) { - cy.get(this.getTabLocator(itemPath)) - .should('not.exist'); - } - - clickOnTab(itemPath: string) { - cy.get(this.getTabLocator(itemPath)).should('be.visible').click(); - } - - waitTabFocused(itemPath: string) { - cy.get(`li[title='${itemPath}'].theia-mod-active`).should('be.visible').wait(2000); - } - - closeTab(itemPath: string) { - cy.get(this.getTabLocator(itemPath)).should('be.visible') - .children('.p-TabBar-tabCloseIcon').should('be.visible') - .click(); - } - - waitEditorOpened() { - cy.get(Editor.EDITOR_BODY).should('be.visible'); - cy.get(Editor.EDITOR_LINES).first().should('be.visible'); - } - - waitEditorAvailable(itemPath: string, tabTitle: string) { - this.waitTab(itemPath, tabTitle); - this.waitEditorOpened(); - } - - private extractPixelCoordinate(element: JQuery): number { - let lineCoordinate: number; - - cy.wrap(element).invoke('attr', 'style').then(style => { - let styleValue: string = "" + style; - - let valueArray: string[] = styleValue.split(';'); - let pixelsCoordinate: string = valueArray[0]; - pixelsCoordinate = pixelsCoordinate.replace(/top:/gi, ""); - pixelsCoordinate = pixelsCoordinate.replace(/px/gi, ""); - - lineCoordinate = + pixelsCoordinate; - }) - - return lineCoordinate; - } - - public addAttributeToLines(): PromiseLike { - return new Cypress.Promise((resolve:any, reject:any) => { - let elementsArray: Array> = new Array(); - - cy.get(Editor.EDITOR_LINES) - .each((el, index, list) => { - elementsArray.push(el) - }).then(() => { - elementsArray = elementsArray.sort((element1, element2) => { - return this.extractPixelCoordinate(element1) - this.extractPixelCoordinate(element2); - }) - }).then(() => { - elementsArray.forEach((element, index) => { - element[0].setAttribute("data-cy", `editor-line-${index + 1}`) - }) - }).then(() => { - resolve(elementsArray.length); - }) - }) - } - - public getEditorLines(checkFunction: (lines: Array) => void) { - let linesText: Array = new Array(); - - cy.get('body').then(() => { - this.addAttributeToLines().then(linesCapacity => { - let i: number; - - for (i = 1; i <= linesCapacity; i++) { - cy.get(`div[data-cy='editor-line-${i}']`).invoke('text').then(text => { - linesText.push("" + text); - }) - } - }) - }).should(() => { - checkFunction(linesText); - }) - - } - - checkTextPresence(regexp: string) { - let isTextPresent = (editorLines: Array) => { - assert - .isTrue( - editorLines.join('\n') - .search(new RegExp(regexp)) > 0, "Have no string matches with provided regexp in the editor"); - } - - this.getEditorLines(isTextPresent); - } - - checkTextAbsence(regexp: string) { - let isTextAbsent = (editorLines: Array) => { - assert - .isTrue( - editorLines.join('\n').search(new RegExp(regexp)) < 1, "At least one match with provided regexp has been found in the editor" - ) - } - - this.getEditorLines(isTextAbsent); - } - - checkLineTextContains(lineNumber: number, regexp: string) { - let isTextPresentInLine = (editorLines: Array) => { - let lineText: string = editorLines[lineNumber - 1]; - let re = new RegExp(regexp); - - assert - .isTrue( - lineText.search(re) > 0, `Have no string matches with provided regexp in the \"${lineNumber}\ " \"${lineText}\" editor line` - ); - } - - this.getEditorLines(isTextPresentInLine); - } - - checkLineTextAbsence(lineNumber: number, regexp: string) { - let isTextAbsentInLine = (editorLines: Array) => { - let lineText: string = editorLines[lineNumber - 1]; - let re = new RegExp(regexp); - - assert - .isTrue( - lineText.search(re) < 1, `At least one match with provided regexp has been found in the \"${lineNumber}\ " \"${lineText}\" editor line` - ); - } - - this.getEditorLines(isTextAbsentInLine); - } - - setCursorToLineAndChar(lineNumber: number, charNumber: number) { - this.waitEditorOpened() - - //set cursor to the first line - cy.get('#theia-main-content-panel') - .should('be.visible') - .trigger("keydown", { keyCode: 40, which: 40 }) - .trigger("keydown", { keyCode: 40, which: 40 }) - .trigger("keydown", { keyCode: 36, which: 36, ctrlKey: true }) - .then(() => { - //move cursor to specified line - let lineIndex; - - for (lineIndex = 1; lineIndex < lineNumber; lineIndex++) { - cy.get('#theia-main-content-panel').trigger("keydown", { keyCode: 40, which: 40 }) - } - }).then(() => { - //move cursor to specified char - let charIndex; - - for (charIndex = 1; charIndex < charNumber; charIndex++) { - cy.get('#theia-main-content-panel').trigger("keydown", { keyCode: 39, which: 39 }) - } - }); - - } - - performControlSpaceCombination() { - this.waitEditorOpened() - - cy.get('#theia-main-content-panel') - .should('be.visible') - .trigger("keydown", { keyCode: 32, which: 32, ctrlKey: true }) - } - - private getLineLocator(lineNumber: number): string { - return `div[data-cy='editor-line-${lineNumber}']>span`; - } - - typeToLine(lineNumber: number, text: string) { - //workaround for avoiding random cursor placement - this.addAttributeToLines() - .then(linesCapacity => { - cy.get(this.getLineLocator(1)) - .then(element => { - element[0].setAttribute('contenteditable', ''); - }) - .type("{leftarrow}") - }) - .then(() => { - this.addAttributeToLines().then(linesCapacity => { - cy.get(this.getLineLocator(lineNumber)) - .then(element => { - element[0].setAttribute('contenteditable', ''); - }) - .type(text, { force: true }); - }) - }) - } - -} diff --git a/cypress-tests/cypress/pageobjects/ide/Ide.ts b/cypress-tests/cypress/pageobjects/ide/Ide.ts deleted file mode 100644 index de5e6e32ab3..00000000000 --- a/cypress-tests/cypress/pageobjects/ide/Ide.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { TestWorkspaceUtil } from "../../utils/workspace/TestWorkspaceUtil"; - -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - - -export class Ide { - - private static readonly START_WORKSPACE_TIMEOUT: number = Cypress.env("start_workspace_timeout"); - private static readonly LANGUAGE_SERVER_INITIALIZATION_TIMEOUT: number = Cypress.env("language_server_initialization_timeout"); - private static readonly LOAD_PAGE_TIMEOUT: number = Cypress.env("load_page_timeout"); - - private static readonly TOP_MENU_PANEL: string = "#theia-app-shell #theia-top-panel .p-MenuBar-content"; - private static readonly LEFT_CONTENT_PANEL: string = "#theia-left-content-panel"; - public static readonly EXPLORER_BUTTON: string = ".theia-app-left .p-TabBar-content li[title='Explorer']"; - private static readonly PRELOADER: string = ".theia-preload"; - private static readonly IDE_IFRAME: string = "iframe#ide-application-iframe"; - - - private readonly testWorkspaceUtil: TestWorkspaceUtil = new TestWorkspaceUtil(); - - - - waitNotification(notificationMessage: string) { - let notificationLocator: string = `div[id='notification-container-3-${notificationMessage}-|']` - - cy.get(notificationLocator, { timeout: Ide.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - } - - waitNotificationDisappearance(notificationMessage: string) { - let notificationLocator: string = `div[id='notification-container-3-${notificationMessage}-|']` - - cy.get(notificationLocator, { timeout: Ide.LOAD_PAGE_TIMEOUT }) - .should('not.be.visible') - } - - waitWorkspaceAndIdeInIframe(workspaceNamespace: string, workspaceName: string) { - cy.log("**=> Ide.waitWorkspaceAndIdeInIframe**") - .then(() => { - cy.log("**Wait until workspace is started**") - }) - .then(() => { - this.testWorkspaceUtil.waitWorkspaceRunning(workspaceNamespace, workspaceName) - }) - .then(() => { - cy.log("**Wait until defined parts of IDE are visible**") - }) - .then(() => { - [Ide.TOP_MENU_PANEL, Ide.LEFT_CONTENT_PANEL, Ide.EXPLORER_BUTTON] - .forEach(idePartLocator => { - cy.get(Ide.IDE_IFRAME, { timeout: Ide.LOAD_PAGE_TIMEOUT }) - .should(iframe => { - expect(iframe.contents().find(idePartLocator)).to.have.length(1) - expect(iframe.contents().find(idePartLocator)).to.be.visible - }) - }) - }) - } - - waitWorkspaceAndIde(workspaceNamespace: string, workspaceName: string) { - cy.log("**=> Ide.waitWorkspaceAndIde**") - .then(() => { - this.testWorkspaceUtil.waitWorkspaceRunning(workspaceNamespace, workspaceName) - }) - .then(() => { - [Ide.TOP_MENU_PANEL, Ide.LEFT_CONTENT_PANEL, Ide.EXPLORER_BUTTON] - .forEach(idePart => { - cy.get(idePart, { timeout: Ide.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - }) - }); - } - - waitIde() { - [Ide.TOP_MENU_PANEL, Ide.LEFT_CONTENT_PANEL, Ide.EXPLORER_BUTTON] - .forEach(idePart => { - cy.get(idePart, { timeout: Ide.LOAD_PAGE_TIMEOUT }) - .should('be.visible') - }) - } - - openIdeWithoutFrames(workspaceName: string) { - cy.log("**=> Ide.openIdeWithoutFrames**") - .then(() => { - let workspaceUrl: string = `/che/${workspaceName}` - - cy.visit(workspaceUrl); - }) - } - - waitExplorerButton() { - cy.get(Ide.EXPLORER_BUTTON) - .should('be.visible'); - } - - clickOnExplorerButton() { - cy.get(Ide.EXPLORER_BUTTON) - .first() - .click(); - } - - waitTopMenuPanel() { - cy.get(Ide.TOP_MENU_PANEL) - .should('be.visible'); - } - - waitLeftContentPanel() { - cy.get(Ide.LEFT_CONTENT_PANEL) - .should('be.visible'); - } - - waitPreloaderAbsent() { - cy.get(Ide.PRELOADER) - .should('not.be.visible'); - } - - waitStatusBarContains(expectedText: string) { - cy.get("div[id='theia-statusBar']", { timeout: Ide.LANGUAGE_SERVER_INITIALIZATION_TIMEOUT }) - .should(elem => { - let elementText: string = elem[0].innerText.toString(); - - expect(elementText).contain(expectedText); - }) - - } - - waitStatusBarTextAbcence(expectedText: string) { - cy.get("div[id='theia-statusBar']", { timeout: Ide.LANGUAGE_SERVER_INITIALIZATION_TIMEOUT }) - .should(elem => { - let elementText: string = elem[0].innerText.toString(); - - expect(elementText).not.contain(expectedText); - }) - } - -} diff --git a/cypress-tests/cypress/pageobjects/ide/ProjectTree.ts b/cypress-tests/cypress/pageobjects/ide/ProjectTree.ts deleted file mode 100644 index 2de63f422e2..00000000000 --- a/cypress-tests/cypress/pageobjects/ide/ProjectTree.ts +++ /dev/null @@ -1,221 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -import { Ide } from "./Ide"; -import { ElementStateChecker } from "../../utils/ElementStateChecker"; - -export class ProjectTree { - - private readonly ide: Ide = new Ide(); - private readonly elementStateChecker: ElementStateChecker = new ElementStateChecker(); - private static readonly PROJECT_TREE_CONTAINER: string = "#theia-left-side-panel .theia-TreeContainer"; - private static readonly DELAY_BETWEEN_ATTEMPTS: number = Cypress.env("ProjectTree.delayBetweenAttempts"); - - private getItemId(itemPath: string): string { - return `div[id='/projects:/projects/${itemPath}']`; - } - - private getCollapsedItemLocator(itemPath: string): string { - return `${this.getExpandIconLocator(itemPath)}.theia-mod-collapsed`; - } - - private getExpandedItemLocator(itemPath: string): string { - return `${this.getExpandIconLocator(itemPath)}:not(.theia-mod-collapsed)`; - } - - openProjectTreeContainer() { - cy.get(Ide.EXPLORER_BUTTON) - .should('be.visible') - .then(filesButton => { - let isProjectTreeContainerOpened: boolean = filesButton.hasClass("p-mod-current"); - - //if project tree container is not opened click on "Files" button - if (!isProjectTreeContainerOpened) { - this.ide.clickOnExplorerButton(); - } - }).then(() => { - this.waitProjectTreeContainer(); - }) - } - - waitItemExpanded(itemPath: string) { - cy.get(this.getExpandedItemLocator(itemPath)).should('be.visible'); - } - - waitItemCollapsed(itemPath: string) { - cy.get(this.getCollapsedItemLocator(itemPath)).should('be.visible'); - } - - waitProjectTreeContainer() { - cy.get(ProjectTree.PROJECT_TREE_CONTAINER) - .should('be.visible') - .should('not.have.class', 'animating') - .wait(1000); - } - - waitProjectTreeContainerClosed() { - cy.get(ProjectTree.PROJECT_TREE_CONTAINER).should('not.be.visible'); - } - - waitItemDisappearance(itemPath: string) { - cy.get(this.getItemId(itemPath)).should('not.be.visible'); - } - - clickOnItem(itemPath: string) { - cy.get(this.getItemId(itemPath)) - .should('be.visible') - .click(); - - this.waitItemSelected(itemPath); - } - - doubleClickOnItem(itemPath: string) { - cy.get(this.getItemId(itemPath)) - .should('be.visible') - .dblclick(); - - this.waitItemSelected(itemPath); - } - - waitItemSelected(itemPath: string) { - let selectedItemLocator: string = `div[title='/projects/${itemPath}'].theia-mod-selected.theia-mod-focus`; - - cy.get(selectedItemLocator).should('be.visible'); - } - - private getExpandIconLocator(itemPath: string) { - return `div[data-node-id='/projects:/projects${itemPath}']`; - } - - private getTreeItemLocator(itemPath: string) { - return `.theia-TreeNode[title='/projects${itemPath}']` - } - - expandItem(itemPath: string) { - let expandIconLocator: string = this.getExpandIconLocator(itemPath); - let treeItemLocator: string = this.getTreeItemLocator(itemPath); - - cy.get(expandIconLocator) - .should('be.visible') - .then(expandIcon => { - // if item collapsed click and expand it - if (expandIcon.hasClass('theia-mod-collapsed')) { - cy.get(treeItemLocator) - .should('be.visible') - .click(); - } - }) - .then(() => { - this.waitItemExpanded(itemPath); - }) - - } - - collapseItem(itemPath: string) { - let expandIconLocator: string = this.getExpandIconLocator(itemPath); - let treeItemLocator: string = this.getTreeItemLocator(itemPath); - - cy.get(expandIconLocator) - .should('be.visible') - .then(expandIcon => { - // if item expanded click and collapse it - if (!expandIcon.hasClass('theia-mod-collapsed')) { - cy.get(treeItemLocator) - .should('be.visible') - .click(); - } - }) - .then(() => { - this.waitItemCollapsed(itemPath); - }) - - } - - expandPathAndOpenFile(pathToItem: string, fileName: string) { - let currentPath: string = ""; - let paths: Array = new Array(); - - // make direct path for each project tree item - pathToItem.split('/').forEach(item => { - currentPath = `${currentPath}/${item}`; - paths.push(currentPath); - }) - - //expand each project tree item - paths.forEach(path => { - this.expandItem(path) - }) - - //open file - this.clickOnItem(`${pathToItem}/${fileName}`) - } - - waitProjectImported(projectName: string, rootSubitem: string) { - cy.log("**=> ProjectTree.waitProjectImported**") - .then(() => { - let attempts: number = Cypress.env("ProjectTree.waitProjectImportedAttempts"); - let currentAttempt: number = 1; - - this.doWaitProjectImported(projectName, rootSubitem, attempts, currentAttempt, ProjectTree.DELAY_BETWEEN_ATTEMPTS) - }) - } - - private doWaitProjectImported(projectName: string, rootSubitem: string, attempts: number, currentAttempt: number, pollingEvery: number): PromiseLike { - return new Cypress.Promise((resolve: any, reject: any) => { - const rootItem: string = `/${projectName}`; - const rootItemLocator: string = this.getTreeItemLocator(`/${projectName}`); - const rootSubitemLocator: string = this.getTreeItemLocator(`/${projectName}/${rootSubitem}`); - const delayBeforeItemCheck: number = Cypress.env("ProjectTree.delayBeforeItemCheck"); - - cy.log(`**ProjectTree.waitProjectImported the ${currentAttempt} try**`) - .then(() => { - if (currentAttempt >= attempts) { - assert.isOk(false, "Exceeded the maximum number of checking attempts, project has not been imported") - } - }) - .then(() => { - cy.wait(delayBeforeItemCheck) - - if (!this.elementStateChecker.isVisibleByLocator(rootItemLocator)) { - cy.log(`Root item '${rootItem}' has not been found, reload page and try again`) - cy.log(`Attempt ${currentAttempt} of ${attempts}`) - - currentAttempt++ - cy.reload() - this.ide.waitIde() - this.openProjectTreeContainer() - cy.wait(ProjectTree.DELAY_BETWEEN_ATTEMPTS) - this.doWaitProjectImported(projectName, rootSubitem, attempts, currentAttempt, pollingEvery) - } - }) - .then(() => { - this.expandItem(rootItem) - this.waitItemExpanded(rootItem) - }) - .then(() => { - cy.wait(delayBeforeItemCheck) - - if (!this.elementStateChecker.isVisibleByLocator(rootSubitemLocator)) { - cy.log(`Root sub item '${rootSubitem}' has not been found, reload page and try again`) - cy.log(`Attempt ${currentAttempt} of ${attempts}`) - - currentAttempt++ - cy.reload() - this.ide.waitIde() - this.openProjectTreeContainer() - cy.wait(ProjectTree.DELAY_BETWEEN_ATTEMPTS) - this.doWaitProjectImported(projectName, rootSubitem, attempts, currentAttempt, pollingEvery) - } - }) - }) - } -} diff --git a/cypress-tests/cypress/plugins/index.js b/cypress-tests/cypress/plugins/index.js deleted file mode 100644 index e252a98b0d0..00000000000 --- a/cypress-tests/cypress/plugins/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const webpack = require('@cypress/webpack-preprocessor') -module.exports = on => { - const options = { - // send in the options from your webpack.config.js, so it works the same - // as your app's code - webpackOptions: require('../../webpack.config'), - watchOptions: {} - } - - on('file:preprocessor', webpack(options)) -} diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js deleted file mode 100644 index c1f5a772e2b..00000000000 --- a/cypress-tests/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/cypress-tests/cypress/support/index.js b/cypress-tests/cypress/support/index.js deleted file mode 100644 index 90109930214..00000000000 --- a/cypress-tests/cypress/support/index.js +++ /dev/null @@ -1,22 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -require('cypress-xpath') - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/cypress-tests/cypress/utils/ElementStateChecker.ts b/cypress-tests/cypress/utils/ElementStateChecker.ts deleted file mode 100644 index 77c753df773..00000000000 --- a/cypress-tests/cypress/utils/ElementStateChecker.ts +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -export class ElementStateChecker { - - public isVisible(element: JQuery): boolean { - if (element === null || element === undefined) { - return false; - } - - return element[0].offsetWidth > 0 && - element[0].offsetHeight > 0 && - element[0].getClientRects().length > 0 - } - - public isVisibleByLocator(elementLocator: string): boolean { - return Cypress.$('body').find(elementLocator).length > 0 - } - - public waitVisibility(elementLocator: string, maximumAttempts: number, polling: number): PromiseLike { - let attempt: number = 1 - return this.doWaitVisibility(elementLocator, attempt, maximumAttempts, polling) - } - - - private doWaitVisibility(elementLocator: string, attempt: number, maximumAttempts: number, polling: number): PromiseLike { - return new Cypress.Promise((resolve: any, reject: any) => { - let isElementVisible: boolean = this.isVisibleByLocator(elementLocator); - - if (isElementVisible) { - resolve(true) - return - } - - if (maximumAttempts >= attempt && !isElementVisible) { - cy.log(`The "${elementLocator}" is not visible, wait ${polling} miliseconds and try again`) - cy.log(`Attempt ${attempt} of ${maximumAttempts}`) - attempt++ - cy.wait(polling) - this.doWaitVisibility(elementLocator, attempt, maximumAttempts, polling) - } - - if (attempt > maximumAttempts) { - cy.log(`Exceeded the maximum number of checking attempts, the "${elementLocator}" is not visible`) - resolve(false) - return - } - }) - } -} diff --git a/cypress-tests/cypress/utils/NameGenerator.ts b/cypress-tests/cypress/utils/NameGenerator.ts deleted file mode 100644 index 8c8d099f2c1..00000000000 --- a/cypress-tests/cypress/utils/NameGenerator.ts +++ /dev/null @@ -1,26 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -export class NameGenerator { - public static generate(prefix: string, randomLength: number): string { - let possibleCharacters: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - let i: number; - let randomPart: string = ""; - - for (i = 0; i < randomLength; i++) { - let currentRandomIndex: number = Math.floor(Math.random() * Math.floor(52)); - - randomPart += possibleCharacters[currentRandomIndex]; - } - - return prefix + randomPart; - } - -} diff --git a/cypress-tests/cypress/utils/workspace/TestWorkspace.ts b/cypress-tests/cypress/utils/workspace/TestWorkspace.ts deleted file mode 100644 index 48310941745..00000000000 --- a/cypress-tests/cypress/utils/workspace/TestWorkspace.ts +++ /dev/null @@ -1,66 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - -export class TestWorkspace { - private static readonly API_ENDPOINT: string = Cypress.config().baseUrl + "/api/"; - private static readonly WORKSPACE_API_URL: string = TestWorkspace.API_ENDPOINT + "workspace"; - - private workspaceName: string = ""; - private workspaceId: string = ""; - private workspaceIdeUrl: string = ""; - - constructor(workspaceName: string) { - this.workspaceName = workspaceName; - this.createWorkspace(workspaceName); - } - - private createWorkspace(workspaceName: string) { - cy.fixture('workspace/che-7-preview.json').then(workspaceJson => { - workspaceJson.name = workspaceName; - cy.request('POST', TestWorkspace.WORKSPACE_API_URL, workspaceJson); - }).then(response => { - let responceData = response.body; - this.workspaceId = responceData.id; - this.workspaceIdeUrl = responceData.links.ide; - }).then(() => { - this.startWorkspace(); - }) - - }; - - getName(): string { - return this.workspaceName; - } - - getId(): string { - return this.workspaceId; - } - - getIdeUrl(): string { - return this.workspaceIdeUrl; - } - - startWorkspace() { - let workspaceApiUrl: string = `${TestWorkspace.API_ENDPOINT}workspace/${this.getId()}/runtime`; - cy.request('POST', workspaceApiUrl); - } - - openWorkspaceIde() { - cy.visit(this.workspaceIdeUrl); - } - - deleteWorkspace() { - let workspaceApiUrl: string = `${TestWorkspace.API_ENDPOINT}workspace/${this.getId()}`; - cy.request('DELETE', workspaceApiUrl); - } - -} diff --git a/cypress-tests/cypress/utils/workspace/TestWorkspaceUtil.ts b/cypress-tests/cypress/utils/workspace/TestWorkspaceUtil.ts deleted file mode 100644 index dc18f0d750d..00000000000 --- a/cypress-tests/cypress/utils/workspace/TestWorkspaceUtil.ts +++ /dev/null @@ -1,72 +0,0 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -/// - - -export class TestWorkspaceUtil { - - private waitRunningStatus(workspaceNamespace: string, workspaceName: string, attempt: number): PromiseLike { - const maximumAttempts: number = Cypress.env("TestWorkspaceUtil.waitRunningStatusAttempts"); - const delayBetweenAttempts: number = Cypress.env("TestWorkspaceUtil.waitRunningStatusPollingEvery"); - const runningWorkspaceStatus: string = 'RUNNING'; - const stoppedWorkspaceStatus: string = 'STOPPED'; - const startingWorkspaceStatus: string = 'STARTING'; - - - return new Cypress.Promise((resolve:any, reject:any) => { - let isWorkspaceStarting: boolean = false; - - cy.request('GET', `/api/workspace/${workspaceNamespace}:${workspaceName}`) - .then(response => { - - if (attempt > maximumAttempts) { - assert.isOk(false, "Exceeded the maximum number of checking attempts, workspace has not been run") - } - - if (response.status != 200) { - cy.log(`**Request attempt has responce code '${response.status}' diferent to '200'**`) - cy.log(`**Attempt ${attempt} of ${maximumAttempts}**`) - cy.wait(delayBetweenAttempts); - attempt++ - this.waitRunningStatus(workspaceNamespace, workspaceName, attempt) - } - - let workspaceStatus: string = response.body.status - - if (workspaceStatus === runningWorkspaceStatus) { - return; - } - - if(workspaceStatus === startingWorkspaceStatus){ - isWorkspaceStarting = true; - } - - if((workspaceStatus === stoppedWorkspaceStatus) && isWorkspaceStarting){ - assert.isOk(false, "Workspace starting process is crushed") - } - - cy.log(`**Request attempt has workspace status '${response.body.status}' diferent to '${runningWorkspaceStatus}'**`) - cy.log(`**Attempt ${attempt} of ${maximumAttempts}**`) - cy.wait(delayBetweenAttempts); - attempt++ - this.waitRunningStatus(workspaceNamespace, workspaceName, attempt) - - }) - }) - } - - - waitWorkspaceRunning(workspaceNamespace: string, workspaceName: string): PromiseLike { - let attempt: number = 1; - return this.waitRunningStatus(workspaceNamespace, workspaceName, attempt) - } - -} diff --git a/cypress-tests/package-lock.json b/cypress-tests/package-lock.json deleted file mode 100644 index fc01cfe9c15..00000000000 --- a/cypress-tests/package-lock.json +++ /dev/null @@ -1,6594 +0,0 @@ -{ - "name": "cypress-tests", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/core": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.2.2.tgz", - "integrity": "sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==", - "dev": true, - "optional": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", - "@babel/helpers": "^7.2.0", - "@babel/parser": "^7.2.2", - "@babel/template": "^7.2.2", - "@babel/traverse": "^7.2.2", - "@babel/types": "^7.2.2", - "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.10", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - } - } - }, - "@babel/generator": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz", - "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==", - "dev": true, - "requires": { - "@babel/types": "^7.3.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.10", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-call-delegate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz", - "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-hoist-variables": "^7.0.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-define-map": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz", - "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.0.0", - "lodash": "^4.17.10" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", - "dev": true, - "optional": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz", - "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", - "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.2.2", - "@babel/types": "^7.2.2", - "lodash": "^4.17.10" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "dev": true - }, - "@babel/helper-regex": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz", - "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-wrap-function": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-replace-supers": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", - "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.2.3", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", - "dev": true, - "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.2.0" - } - }, - "@babel/helpers": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", - "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==", - "dev": true, - "optional": true, - "requires": { - "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.5", - "@babel/types": "^7.3.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz", - "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==", - "dev": true - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0", - "@babel/plugin-syntax-async-generators": "^7.2.0" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", - "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.2.0" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.2.tgz", - "integrity": "sha512-DjeMS+J2+lpANkYLLO+m6GjoTMygYglKmRe6cDTbFv3L9i6mmiE8fe6B8MtCSLZpVXscD5kn7s6SgtHrDoBWoA==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz", - "integrity": "sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.2.0" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", - "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", - "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", - "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz", - "integrity": "sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", - "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz", - "integrity": "sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.10" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz", - "integrity": "sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.1.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", - "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", - "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz", - "integrity": "sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.1.3" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", - "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", - "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz", - "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz", - "integrity": "sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", - "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", - "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz", - "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz", - "integrity": "sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-hoist-variables": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", - "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz", - "integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==", - "dev": true, - "optional": true, - "requires": { - "regexp-tree": "^0.1.0" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz", - "integrity": "sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz", - "integrity": "sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-call-delegate": "^7.1.0", - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz", - "integrity": "sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw==", - "dev": true, - "optional": true, - "requires": { - "regenerator-transform": "^0.13.3" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", - "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", - "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", - "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", - "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", - "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz", - "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.1.3" - } - }, - "@babel/preset-env": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.1.tgz", - "integrity": "sha512-FHKrD6Dxf30e8xgHQO0zJZpUPfVZg+Xwgz5/RdSWCbza9QLNk4Qbp40ctRoqDxml3O8RMzB1DU55SXeDG6PqHQ==", - "dev": true, - "optional": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.2.0", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.2.0", - "@babel/plugin-transform-classes": "^7.2.0", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.2.0", - "@babel/plugin-transform-dotall-regex": "^7.2.0", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.2.0", - "@babel/plugin-transform-function-name": "^7.2.0", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.2.0", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", - "@babel/plugin-transform-new-target": "^7.0.0", - "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.2.0", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.2.0", - "browserslist": "^4.3.4", - "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", - "semver": "^5.3.0" - } - }, - "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2" - } - }, - "@babel/traverse": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", - "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.3", - "@babel/types": "^7.2.2", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz", - "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.10", - "to-fast-properties": "^2.0.0" - } - }, - "@cypress/listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-p3SS9LEdzHxEajSz4ochr9M8ZCo=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "@cypress/webpack-preprocessor": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@cypress/webpack-preprocessor/-/webpack-preprocessor-4.0.3.tgz", - "integrity": "sha512-gw6QNif0UaMW1FDl5tej14isvDWbONib9t1iXGlWUaz0/pEdIvp6ik7mnOaph/IixkQXtmeOJ8CWj+995Pj47w==", - "dev": true, - "requires": { - "@babel/core": "^7.0.1", - "@babel/preset-env": "^7.0.0", - "babel-loader": "^8.0.2", - "bluebird": "3.5.0", - "debug": "3.1.0", - "lodash.clonedeep": "4.5.0" - } - }, - "@cypress/xvfb": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.3.tgz", - "integrity": "sha512-yYrK+/bgL3hwoRHMZG4r5fyLniCy1pXex5fimtewAY6vE/jsVs8Q37UsEO03tFlcmiLnQ3rBNMaZBYTi/+C1cw==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "lodash.once": "^4.1.1" - } - }, - "@types/blob-util": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/blob-util/-/blob-util-1.3.3.tgz", - "integrity": "sha512-4ahcL/QDnpjWA2Qs16ZMQif7HjGP2cw3AGjHabybjw7Vm1EKu+cfQN1D78BaZbS1WJNa1opSMF5HNMztx7lR0w==", - "dev": true - }, - "@types/bluebird": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.18.tgz", - "integrity": "sha512-OTPWHmsyW18BhrnG5x8F7PzeZ2nFxmHGb42bZn79P9hl+GI5cMzyPgQTwNjbem0lJhoru/8vtjAFCUOu3+gE2w==", - "dev": true - }, - "@types/chai": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.0.8.tgz", - "integrity": "sha512-m812CONwdZn/dMzkIJEY0yAs4apyTkTORgfB2UsMOxgkUbC205AHnm4T8I0I5gPg9MHrFc1dJ35iS75c0CJkjg==", - "dev": true - }, - "@types/chai-jquery": { - "version": "1.1.35", - "resolved": "https://registry.npmjs.org/@types/chai-jquery/-/chai-jquery-1.1.35.tgz", - "integrity": "sha512-7aIt9QMRdxuagLLI48dPz96YJdhu64p6FCa6n4qkGN5DQLHnrIjZpD9bXCvV2G0NwgZ1FAmfP214dxc5zNCfgQ==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/jquery": "*" - } - }, - "@types/jquery": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.6.tgz", - "integrity": "sha512-403D4wN95Mtzt2EoQHARf5oe/jEPhzBOBNrunk+ydQGW8WmkQ/E8rViRAEB1qEt/vssfGfNVD6ujP4FVeegrLg==", - "dev": true - }, - "@types/lodash": { - "version": "4.14.87", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.87.tgz", - "integrity": "sha512-AqRC+aEF4N0LuNHtcjKtvF9OTfqZI0iaBoe3dA6m/W+/YZJBZjBmW/QIZ8fBeXC6cnytSY9tBoFBqZ9uSCeVsw==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mocha": { - "version": "2.2.44", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.44.tgz", - "integrity": "sha512-k2tWTQU8G4+iSMvqKi0Q9IIsWAp/n8xzdZS4Q4YVIltApoMA00wFBFdlJnmoaK1/z7B0Cy0yPe6GgXteSmdUNw==", - "dev": true - }, - "@types/sinon": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.0.tgz", - "integrity": "sha512-kcYoPw0uKioFVC/oOqafk2yizSceIQXCYnkYts9vJIwQklFRsMubTObTDrjQamUyBRd47332s85074cd/hCwxg==", - "dev": true - }, - "@types/sinon-chai": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.2.tgz", - "integrity": "sha512-5zSs2AslzyPZdOsbm2NRtuSNAI2aTWzNKOHa/GRecKo7a5efYD7qGcPxMZXQDayVXT2Vnd5waXxBvV31eCZqiA==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "acorn": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", - "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", - "dev": true - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.4.0.tgz", - "integrity": "sha1-SZAgDxjqW4N8LMT4wDGmmFw4VhE=", - "dev": true, - "requires": { - "lodash": "^4.14.0" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "babel-loader": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", - "integrity": "sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw==", - "dev": true, - "optional": true, - "requires": { - "find-cache-dir": "^2.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "util.promisify": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", - "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", - "dev": true - }, - "bluebird": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", - "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", - "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", - "dev": true, - "optional": true, - "requires": { - "caniuse-lite": "^1.0.30000929", - "electron-to-chromium": "^1.3.103", - "node-releases": "^1.1.3" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cachedir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-1.3.0.tgz", - "integrity": "sha512-O1ji32oyON9laVPJL1IZ5bmwd2cB46VfpxkDequezH+15FDzzVddEyrGEeX4WusDSqKxdyFdDQDEG1yo1GoWkg==", - "dev": true, - "requires": { - "os-homedir": "^1.0.1" - } - }, - "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", - "dev": true, - "optional": true - }, - "caniuse-lite": { - "version": "1.0.30000936", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000936.tgz", - "integrity": "sha512-orX4IdpbFhdNO7bTBhSbahp1EBpqzBc+qrvTRVUFfZgA4zta7TdM6PN5ZxkEUgDnz36m+PfWGcdX7AVfFWItJw==", - "dev": true, - "optional": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", - "dev": true - }, - "chokidar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.1.tgz", - "integrity": "sha512-gfw3p2oQV2wEt+8VuMlNsPjCxDxvvgnm/kz+uATu805mWVF8IJN7uz9DN7iBz+RMJISmiVbCOBFs9qBGMjtPfQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.0" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", - "dev": true - }, - "cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "optional": true, - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "optional": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "optional": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", - "dev": true, - "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "optional": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "optional": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", - "dev": true, - "optional": true - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, - "common-tags": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.4.0.tgz", - "integrity": "sha1-EYe+Tz1M8MBCfUP3Tu8fc1AWFMA=", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0" - } - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-js": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz", - "integrity": "sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "cypress": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.1.5.tgz", - "integrity": "sha512-jzYGKJqU1CHoNocPndinf/vbG28SeU+hg+4qhousT/HDBMJxYgjecXOmSgBX/ga9/TakhqSrIrSP2r6gW/OLtg==", - "dev": true, - "requires": { - "@cypress/listr-verbose-renderer": "0.4.1", - "@cypress/xvfb": "1.2.3", - "@types/blob-util": "1.3.3", - "@types/bluebird": "3.5.18", - "@types/chai": "4.0.8", - "@types/chai-jquery": "1.1.35", - "@types/jquery": "3.3.6", - "@types/lodash": "4.14.87", - "@types/minimatch": "3.0.3", - "@types/mocha": "2.2.44", - "@types/sinon": "7.0.0", - "@types/sinon-chai": "3.2.2", - "bluebird": "3.5.0", - "cachedir": "1.3.0", - "chalk": "2.4.1", - "check-more-types": "2.24.0", - "commander": "2.11.0", - "common-tags": "1.4.0", - "debug": "3.1.0", - "execa": "0.10.0", - "executable": "4.1.1", - "extract-zip": "1.6.6", - "fs-extra": "4.0.1", - "getos": "3.1.0", - "glob": "7.1.2", - "is-ci": "1.0.10", - "is-installed-globally": "0.1.0", - "lazy-ass": "1.6.0", - "listr": "0.12.0", - "lodash": "4.17.11", - "log-symbols": "2.2.0", - "minimist": "1.2.0", - "moment": "2.22.2", - "ramda": "0.24.1", - "request": "2.87.0", - "request-progress": "0.3.1", - "supports-color": "5.1.0", - "tmp": "0.0.31", - "url": "0.11.0", - "yauzl": "2.8.0" - } - }, - "cypress-xpath": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/cypress-xpath/-/cypress-xpath-1.3.0.tgz", - "integrity": "sha512-ANum2Oe7WZlf20cmTzploBMKozB3ar0hcJS3pb3yXxu2HXwxD0KILIGUW+F6638PMwGtSj0yN3JupZ8ZVPOCyQ==", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "electron-to-chromium": { - "version": "1.3.113", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz", - "integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==", - "dev": true, - "optional": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "optional": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "optional": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "requires": { - "pify": "^2.2.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extract-zip": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.6.tgz", - "integrity": "sha1-EpDt6NINCHK0Kf0/NRyhKOxe+Fw=", - "dev": true, - "requires": { - "concat-stream": "1.6.0", - "debug": "2.6.9", - "mkdirp": "0.5.0", - "yauzl": "2.4.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "dev": true, - "requires": { - "fd-slicer": "~1.0.1" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", - "dev": true - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz", - "integrity": "sha1-f8DGyJV/mD9X8waiTlud3Y0N2IA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true, - "optional": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getos": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.1.0.tgz", - "integrity": "sha512-i9vrxtDu5DlLVFcrbqUqGWYlZN/zZ4pGMICCAcZoYsX3JA54nYp8r5EThw5K+m2q3wszkx4Th746JstspB0H4Q==", - "dev": true, - "requires": { - "async": "2.4.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true, - "optional": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "optional": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "inversify": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.1.tgz", - "integrity": "sha512-Ieh06s48WnEYGcqHepdsJUIJUXpwH5o5vodAX+DK2JA/gjy4EbEcQZxw+uFfzysmKjiLXGYwNG3qDZsKVMcINQ==" - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true, - "optional": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-ci": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", - "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", - "dev": true, - "requires": { - "ci-info": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true, - "optional": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "optional": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "optional": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "optional": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "listr": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", - "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.2.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.0.0-beta.11", - "stream-to-observable": "^0.1.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true - }, - "listr-update-renderer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz", - "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true - }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - } - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "optional": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "optional": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", - "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", - "dev": true, - "optional": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", - "dev": true - }, - "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", - "dev": true, - "requires": { - "mime-db": "~1.37.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true, - "optional": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", - "dev": true - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "nan": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "0.0.4" - } - }, - "node-releases": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.7.tgz", - "integrity": "sha512-bKdrwaqJUPHqlCzDD7so/R+Nk0jGv9a11ZhLrD9f6i947qGLrGAhU3OxRENa19QQmwzGy/g6zCDEuLGDO8HPvA==", - "dev": true, - "optional": true, - "requires": { - "semver": "^5.3.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", - "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "optional": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "ora": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "optional": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "dependencies": { - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "optional": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "optional": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true, - "optional": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", - "dev": true, - "optional": true - }, - "p-limit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", - "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true - }, - "pako": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz", - "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parse-asn1": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.3.tgz", - "integrity": "sha512-VrPoetlz7B/FqjBLD2f5wBVZvsZVLnRUrxVLfRYhGXCODa/NWE4p3Wp+6+aV3ZPL3KM7/OZmxDIwwijD7yuucg==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true, - "optional": true - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true, - "optional": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "ramda": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", - "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", - "dev": true - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", - "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regenerator-transform": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.3.tgz", - "integrity": "sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA==", - "dev": true, - "optional": true, - "requires": { - "private": "^0.1.6" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp-tree": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.1.tgz", - "integrity": "sha512-HwRjOquc9QOwKTgbxvZTcddS5mlNlwePMQ3NFL8broajMLD5CXDAqas8Y5yxJH5QtZp5iRor3YCILd5pz71Cgw==", - "dev": true, - "optional": true, - "requires": { - "cli-table3": "^0.5.0", - "colors": "^1.1.2", - "yargs": "^12.0.5" - } - }, - "regexpu-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", - "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^7.0.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.0.2" - } - }, - "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", - "dev": true - }, - "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "request-progress": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-0.3.1.tgz", - "integrity": "sha1-ByHBBdipasayzossia4tXs/Pazo=", - "dev": true, - "requires": { - "throttleit": "~0.0.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "optional": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true, - "optional": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "optional": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "dependencies": { - "ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true, - "optional": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "stream-to-observable": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", - "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - } - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - }, - "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", - "dev": true - }, - "terser": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", - "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1", - "source-map-support": "~0.5.9" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", - "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "ts-loader": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.3.tgz", - "integrity": "sha512-KwF1SplmOJepnoZ4eRIloH/zXL195F51skt7reEsS6jvDqzgc/YSbz9b8E07GxIUwLXdcD4ssrJu6v8CwaTafA==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3.tgz", - "integrity": "sha512-Y21Xqe54TBVp+VDSNbuDYdGw0BpoR/Q6wo/+35M8PAU0vipahnyduJWirxxdxjsAkS7hue53x2zp8gz7F05u0A==", - "dev": true - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", - "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", - "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "optional": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "webpack": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.3.tgz", - "integrity": "sha512-xPJvFeB+8tUflXFq+OgdpiSnsCD5EANyv56co5q8q8+YtEasn5Sj3kzY44mta+csCIEB0vneSxnuaHkOL2h94A==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^1.0.0", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - }, - "dependencies": { - "ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true, - "optional": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "optional": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "optional": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "optional": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yauzl": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", - "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.0.1" - } - } - } -} diff --git a/cypress-tests/package.json b/cypress-tests/package.json deleted file mode 100644 index 08a4fd203f5..00000000000 --- a/cypress-tests/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "cypress-tests", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "cypress:open": "cypress open", - "cypress:run-hidden": "cypress run --browser electron", - "cypress:run": "cypress run --headed" - }, - "author": "", - "license": "ISC", - "devDependencies": { - "@cypress/webpack-preprocessor": "^4.0.3", - "cypress": "^3.1.5", - "cypress-xpath": "^1.3.0", - "ts-loader": "^5.3.3", - "typescript": "^3.3.3", - "webpack": "^4.29.3" - }, - "dependencies": { - "inversify": "^5.0.1", - "reflect-metadata": "^0.1.13" - } -} diff --git a/cypress-tests/tsconfig.json b/cypress-tests/tsconfig.json deleted file mode 100644 index 4f69c203b97..00000000000 --- a/cypress-tests/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./dist/", - "noImplicitAny": true, - "module": "es6", - "target": "es5", - "lib": ["es6", "dom"], - "jsx": "react", - "allowJs": true, - "moduleResolution": "node", - "types": ["cypress", "reflect-metadata"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true - } - } diff --git a/cypress-tests/webpack.config.js b/cypress-tests/webpack.config.js deleted file mode 100644 index 958c0258348..00000000000 --- a/cypress-tests/webpack.config.js +++ /dev/null @@ -1,21 +0,0 @@ -const path = require('path') - -module.exports = { - entry: './src/index.ts', - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - } - ] - }, - resolve: { - extensions: ['.tsx', '.ts', '.js'] - }, - output: { - filename: 'bundle.js', - path: path.resolve(__dirname, 'dist') - } -} diff --git a/deploy/docker/Readme.md b/deploy/docker/Readme.md deleted file mode 100644 index 96aea9410e9..00000000000 --- a/deploy/docker/Readme.md +++ /dev/null @@ -1 +0,0 @@ -Docs are located at [https://www.eclipse.org/che/docs/6/che/docs/docker-single-user.html](https://www.eclipse.org/che/docs/6/che/docs/docker-single-user.html). diff --git a/dockerfiles/che/entrypoint.sh b/dockerfiles/che/entrypoint.sh index 8cb45cf8733..efd25da767b 100755 --- a/dockerfiles/che/entrypoint.sh +++ b/dockerfiles/che/entrypoint.sh @@ -275,11 +275,6 @@ init() { rm -rf "${CHE_DATA}"/stacks fi - # replace samples.json each run to make sure that we are using corrent samples from the assembly. - # also it allows users to store their own samples which should not be touched by us. - mkdir -p "${CHE_DATA}"/templates - rm -rf "${CHE_DATA}"/templates/samples.json - cp -rf "${CHE_HOME}"/templates/* "${CHE_DATA}"/templates # A che property, which names the Docker network used for che + ws to communicate if [ -z "$CHE_DOCKER_NETWORK" ]; then diff --git a/ide/README.md b/ide/README.md deleted file mode 100644 index 84df5959744..00000000000 --- a/ide/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# Che IDE - -- [Making a GWT library for the IDE GWT app](#making-a-gwt-library-for-the-ide-gwt-app) - * [pom.xml](#pomxml) - * [*.gwt.xml](#gwtxml) - * [Consuming the shared libraries](#consuming-the-shared-libraries) -- [Including an IDE plugin to the IDE GWT app](#including-an-ide-plugin-to-the-ide-gwt-app) -- [GWT Super DevMode](#gwt-super-devmode) -- [Extending IDE GWT app](#extending-ide-gwt-app) - -## Making a GWT library for the IDE GWT app -GWT library it's a JAR that contains compiled classes, project's (re-)sources, GWT module descriptor (*.gwt.xml) and possibly other GWT-specific files. - -### pom.xml -To make a GWT library (e.g., IDE plugin) for using it in IDE GWT app just do the two steps in your pom.xml: -- add the `gwt-maven-plugin` configuring GWT module name: - ```xml - - net.ltgt.gwt.maven - gwt-maven-plugin - true - - org.eclipse.che.plugin.python.Python - - - ``` -- set packaging to `gwt-lib` which triggers a Maven lifecycle that will build a `gwt-lib` artifact. - -### *.gwt.xml -Project's `*.gwt.xml` file is generated within the `gwt-lib` Maven lifecycle and contains: -- the declarations for the default source folders: - ```xml - - - - ``` -- `` directives for the project's *direct* dependencies which were packaged as a `gwt-lib`. - -*Optional* template may be provided in `src/main/module.gwt.xml` for generating project's `*.gwt.xml` file. -The most common cases when you may require a template: -- need to override the default source folders, like [here](https://github.com/eclipse/che/blob/f15fbf1cb1248d18acc3ee6fdc41766946ea4a3b/plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/module.gwt.xml#L18); -- need to add `` directive for a GWT lib that isn't packaged as a `gwt-lib` artifact (doesn't contain GWT-specific meta information). - -### Consuming the shared libraries -The shared libraries don't require any GWT-specific files or configuration in pom.xml to be consumed by a GWT library. - -To use shared code in a GWT library: -- declare a dependency on the "normal" artifact (JAR with compiled classes); -- declare a dependency on the "sources" artifact (with `sources`). - -See an example [here](https://github.com/eclipse/che/blob/19f5fd1f5ae8f165b7306e71cb0d58c2082fafab/plugins/plugin-python/che-plugin-python-lang-ide/pom.xml#L49-L57). - -## Including an IDE plugin to the IDE GWT app -Just add a Maven dependency on the appropriate artifact (gwt-lib) to the `che-ide-gwt-app`'s pom.xml. - -In case the added artifact represents Che's sub-project, dependency should be declared with `gwt-lib` or `sources` to be able to use it with Super DevMode. - -## GWT Super DevMode -There are two options available to launch GWT Super DevMode, depending on the state of the Che sources: whether it's built or not since a lot of sources are generated during the Maven build. -- Case 1: Che sources have been already built. Use the following command: - -`mvn gwt:codeserver -pl :che-ide-gwt-app -am -Dmaven.main.skip -Dmaven.resources.skip -Dche.dto.skip -Dskip-enforce -Dskip-validate-sources` - -- Case 2: Che sources haven't been built, e.g. freshly cloned or after executing `mvn clean` or you just don't need to build the whole project. Use the following command: - -`mvn gwt:codeserver -pl :che-ide-gwt-app -am -Dskip-enforce -Dskip-validate-sources` - -The second one requires *more time* to launch GWT CodeServer since the second one it executes `process-classes` build phase for each maven module. So using the first command is preferable. - -**Note**, both commands have to be performed in the root folder of the Che project. - -## Extending IDE GWT app -There're two GWT libraries provided which allows you to easily extend IDE GWT app: Basic IDE and Full IDE. - -Basic IDE represents IDE without any plugins. It allows you to compile IDE GWT app with your own IDE plugins only, e.g.: - ```xml - - - org.eclipse.che.core - che-ide-core - - - my.ide.plugin - my-ide-plugin - - - ``` -Full IDE represents IDE with full set of the standard plugins. It allows you to compile IDE GWT app excluding some of the standard plugins and/or including your own IDE plugins, e.g.: - ```xml - - - org.eclipse.che.core - che-ide-full - - - che-plugin-product-info - org.eclipse.che.plugin - - - - - my.ide.plugin - my-ide-plugin - - - - - - org.eclipse.che.core - che-core-gwt-maven-plugin - ${project.version} - - - - process-excludes - - - - - - - ``` -Note that `che-core-gwt-maven-plugin` have to be added in order to correctly process the IDE plugins exclusions. diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml b/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml deleted file mode 100644 index f7cd427531f..00000000000 --- a/ide/che-core-dyna-provider-generator-maven-plugin/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - che-core-ide-parent - org.eclipse.che.core - 7.0.0-rc-4.0-SNAPSHOT - - che-core-dyna-provider-generator-maven-plugin - maven-plugin - che-core-dyna-provider-generator-maven-plugin Maven Mojo - http://maven.apache.org - - - com.google.guava - guava - - - org.antlr - ST4 - - - org.eclipse.che.core - che-core-commons-gwt - - - org.reflections - reflections - - - org.apache.maven - maven-artifact - provided - - - org.apache.maven - maven-model - provided - - - org.apache.maven - maven-plugin-api - provided - - - org.apache.maven.plugin-tools - maven-plugin-annotations - provided - - - org.eclipse.sisu - org.eclipse.sisu.plexus - provided - - - jsr250-api - javax.annotation - - - - - junit - junit - test - - - org.apache.maven - maven-compat - test - - - org.apache.maven.plugin-testing - maven-plugin-testing-harness - test - - - org.codehaus.plexus - plexus-utils - test - - - org.mockito - mockito-core - test - - - - - - org.apache.maven.plugins - maven-plugin-plugin - - - mojo-descriptor - - descriptor - - - - - true - - - - - diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/ClassModel.java b/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/ClassModel.java deleted file mode 100644 index 989e8ee9172..00000000000 --- a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/ClassModel.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.providers; - -/** - * Data class for generator. Holds class name and variable name for class. - * - * @author Evgen Vidolob - */ -public class ClassModel { - - private String name; - - private String varName; - - public ClassModel(Class clazz) { - name = clazz.getName(); - varName = clazz.getName().replaceAll("\\.", "_"); - } - - public String getName() { - return name; - } - - public String getVarName() { - return varName; - } -} diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderGenerator.java b/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderGenerator.java deleted file mode 100644 index 2fd2ed89d98..00000000000 --- a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderGenerator.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.providers; - -import static java.nio.charset.StandardCharsets.UTF_8; - -import com.google.common.io.Resources; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import org.reflections.Reflections; -import org.reflections.scanners.SubTypesScanner; -import org.reflections.scanners.TypeAnnotationsScanner; -import org.reflections.util.ClasspathHelper; -import org.reflections.util.ConfigurationBuilder; -import org.stringtemplate.v4.ST; - -/** - * Generate implementation for {@link DynaProvider}. Find all types annotated with {@link - * DynaObject} and add {@link com.google.inject.Provider} for them to {@link DynaProvider} - * implementation. - * - * @author Evgen Vidolob - */ -public class DynaProviderGenerator { - - private static final String TEMPLATE_PATH = - "/" - .concat(DynaProviderGenerator.class.getPackage().getName().replace(".", "/")) - .concat("/DynaProvider.st"); - - /** String template instance used */ - private ST st; - - private final String packageName; - private final String className; - private final List classpath; - private List dynaClasses; - - public DynaProviderGenerator(String packageName, String className, List classpath) { - this.packageName = packageName; - this.className = className; - this.classpath = classpath; - } - - public String generate() throws IOException { - dynaClasses = new ArrayList<>(); - findDynaObjects(); - - ST st = getTemplate(); - st.add("packageName", packageName); - st.add("className", className); - st.add("classes", dynaClasses); - return st.render(); - } - - private void findDynaObjects() throws IOException { - ConfigurationBuilder configuration = new ConfigurationBuilder(); - - List urls = new ArrayList<>(); - for (String element : classpath) { - urls.add(new File(element).toURI().toURL()); - } - - ClassLoader contextClassLoader = - URLClassLoader.newInstance( - urls.toArray(new URL[urls.size()]), Thread.currentThread().getContextClassLoader()); - Thread.currentThread().setContextClassLoader(contextClassLoader); - configuration.setUrls(ClasspathHelper.forClassLoader(contextClassLoader)); - configuration.setScanners(new SubTypesScanner(), new TypeAnnotationsScanner()); - Reflections reflection = new Reflections(configuration); - - Set> classes = reflection.getTypesAnnotatedWith(DynaObject.class); - for (Class clazz : classes) { - // accept only classes - if (clazz.isEnum() || clazz.isInterface() || clazz.isAnnotation()) { - continue; - } - dynaClasses.add(new ClassModel(clazz)); - System.out.println(String.format("New Dyna Object Found: %s", clazz.getCanonicalName())); - } - System.out.println(String.format("Found: %d Dyna Objects", dynaClasses.size())); - } - - /** - * Get the template for provider - * - * @return the String Template - */ - protected ST getTemplate() { - if (st == null) { - URL url = Resources.getResource(DynaProviderGenerator.class, TEMPLATE_PATH); - try { - st = new ST(Resources.toString(url, UTF_8)); - } catch (IOException e) { - throw new IllegalArgumentException("Unable to read template", e); - } - } - return st; - } -} diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderMojo.java b/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderMojo.java deleted file mode 100644 index 986e8df2726..00000000000 --- a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/java/org/eclipse/che/providers/DynaProviderMojo.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.providers; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.nio.file.Files; -import java.util.List; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; - -/** - * Mojo for generation implementation of DynaProvider interface. - * - * @author Evgen Vidolob - */ -@Mojo(name = "generate", requiresDependencyResolution = ResolutionScope.COMPILE) -public class DynaProviderMojo extends AbstractMojo { - @Parameter(property = "outputDir", required = true) - private String outputDirectory; - - @Parameter(property = "typeName", defaultValue = "org.eclipse.che.providers.DynaProviderImpl") - private String typeName; - - @Parameter(property = "project.compileClasspathElements", required = true, readonly = true) - private List classpath; - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - File outFile = new File(outputDirectory, typeName.replace('.', File.separatorChar) + ".java"); - String packageName = typeName.substring(0, typeName.lastIndexOf('.')); - String className = typeName.substring(typeName.lastIndexOf('.') + 1, typeName.length()); - - DynaProviderGenerator generator = new DynaProviderGenerator(packageName, className, classpath); - - try { - Files.createDirectories(outFile.toPath().getParent()); - } catch (IOException e) { - throw new MojoExecutionException("Can't create packages folders", e); - } - try (BufferedWriter writer = new BufferedWriter(new FileWriter(outFile))) { - writer.write(generator.generate()); - } catch (IOException e) { - throw new MojoExecutionException("Can't write file content", e); - } - } -} diff --git a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/resources/org/eclipse/che/providers/DynaProvider.st b/ide/che-core-dyna-provider-generator-maven-plugin/src/main/resources/org/eclipse/che/providers/DynaProvider.st deleted file mode 100644 index d2797bc3492..00000000000 --- a/ide/che-core-dyna-provider-generator-maven-plugin/src/main/resources/org/eclipse/che/providers/DynaProvider.st +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2016 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package ; - -import com.google.inject.Provider; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Map; -import java.util.HashMap; - -// File has been generated automatically by Eclipse Che Dyna provider generator plugin -@Singleton -@SuppressWarnings("unchecked") -public class implements org.eclipse.che.providers.DynaProvider { - - private final Map\> providers = new HashMap\<>(); - - @Override - public \ Provider\ getProvider(String className) { - return (Provider\)providers.get(className); - } - - @Inject - public ( - > }; separator=",\n">) { - - ", );}; separator="\n"> - } - -} diff --git a/ide/che-core-ide-api/pom.xml b/ide/che-core-ide-api/pom.xml deleted file mode 100644 index af6b76bb5d7..00000000000 --- a/ide/che-core-ide-api/pom.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - 4.0.0 - - che-core-ide-parent - org.eclipse.che.core - 7.0.0-rc-4.0-SNAPSHOT - - che-core-ide-api - gwt-lib - Che Core :: IDE :: API - - ${project.build.directory}/generated-sources/gen - false - - - - com.google.guava - guava - - - com.google.gwt - gwt-elemental - - - com.google.inject - guice - - - com.google.inject.extensions - guice-assistedinject - - - javax.inject - javax.inject - - - javax.validation - validation-api - - - org.eclipse.che - che-exec-agent-shared - - - org.eclipse.che - che-exec-agent-shared - sources - - - org.eclipse.che.core - che-core-api-auth-shared - - - org.eclipse.che.core - che-core-api-auth-shared - sources - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-core - sources - - - org.eclipse.che.core - che-core-api-debug-shared - - - org.eclipse.che.core - che-core-api-debug-shared - sources - - - org.eclipse.che.core - che-core-api-dto - - - org.eclipse.che.core - che-core-api-factory-shared - - - org.eclipse.che.core - che-core-api-factory-shared - sources - - - org.eclipse.che.core - che-core-api-git-shared - - - org.eclipse.che.core - che-core-api-git-shared - sources - - - org.eclipse.che.core - che-core-api-model - - - org.eclipse.che.core - che-core-api-model - sources - - - org.eclipse.che.core - che-core-api-project-shared - - - org.eclipse.che.core - che-core-api-project-shared - sources - - - org.eclipse.che.core - che-core-api-project-templates-shared - - - org.eclipse.che.core - che-core-api-project-templates-shared - sources - - - org.eclipse.che.core - che-core-api-ssh-shared - - - org.eclipse.che.core - che-core-api-ssh-shared - sources - - - org.eclipse.che.core - che-core-api-user-shared - - - org.eclipse.che.core - che-core-api-user-shared - sources - - - org.eclipse.che.core - che-core-api-workspace-shared - - - org.eclipse.che.core - che-core-api-workspace-shared - sources - - - org.eclipse.che.core - che-core-commons-annotations - - - org.eclipse.che.core - che-core-commons-gwt - - - org.vectomatic - lib-gwt-svg - - - com.google.gwt - gwt-user - provided - - - com.google.gwt - gwt-dev - test - - - com.google.gwt.gwtmockito - gwtmockito - test - - - javax.ws.rs - javax.ws.rs-api - test - - - junit - junit - test - - - org.easytesting - fest-assert - test - - - org.hamcrest - hamcrest-core - test - - - org.mockito - mockito-core - test - - - - - - src/main/resources - - - ${dto-generator-out-directory} - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - true - - org.eclipse.che.ide.Api - - - - org.codehaus.mojo - build-helper-maven-plugin - - - 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 - - - process-sources - - generate - - - - - - org.eclipse.che.core - che-core-ide-api - ${project.version} - - - - - org.eclipse.che.api.auth - org.eclipse.che.api.core - org.eclipse.che.api.factory - org.eclipse.che.api.git - org.eclipse.che.api.project - org.eclipse.che.api.project.templates - org.eclipse.che.api.machine - org.eclipse.che.api.workspace - org.eclipse.che.api.ssh - org.eclipse.che.api.user - org.eclipse.che.api.debug.shared.dto - org.eclipse.che.ide.api.debug.dto - org.eclipse.che.agent.exec.shared.dto - - ${dto-generator-out-directory} - org.eclipse.che.ide.api.dto.DtoClientImpls - client - - - - com.mycila - license-maven-plugin - - - **/ide/api/editor/text/TypedPosition.java - **/ide/api/editor/text/rules/**/*.* - **/org/eclipse/che/ide/api/editor/reconciler/DirtyRegion.java - **/org/eclipse/che/ide/api/editor/reconciler/DirtyRegionQueue.java - **/org/eclipse/che/ide/api/editor/annotation/AnnotationModelEvent.java - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - analyze - - - - org.eclipse.che.core:che-core-api-auth-shared - org.eclipse.che.core:che-core-api-factory-shared - org.eclipse.che.core:che-core-api-core - org.eclipse.che.core:che-core-api-model - org.eclipse.che.core:che-core-api-git-shared - org.eclipse.che.core:che-core-api-workspace-shared - org.eclipse.che.core:che-core-api-project-shared - org.eclipse.che.core:che-core-api-user-shared - org.eclipse.che.core:che-core-api-project-templates-shared - org.eclipse.che.core:che-core-api-debug-shared - org.eclipse.che.core:che-core-api-ssh-shared - org.eclipse.che.core:che-core-gwt-logger - org.eclipse.che:che-exec-agent-shared - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProvider.java deleted file mode 100644 index ac3f398cd3a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api; - -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * This class contains important product information (product name, logo, browser tab title, support - * url etc.) which should be displayed in the user interface. This is information can be different - * for every product implementation. - * - * @author Alexander Andrienko - */ -public interface ProductInfoDataProvider { - /** @return product name */ - String getName(); - - /** @return url to support resource */ - String getSupportLink(); - - /** @return document title for browser tab */ - String getDocumentTitle(); - - /** - * Get document title with current {@code workspaceName}. - * - * @param workspaceName name of the current running workspace - * @return document title - */ - String getDocumentTitle(String workspaceName); - - /** @return logo SVG resource */ - SVGResource getLogo(); - - /** @return waterMark logo */ - SVGResource getWaterMarkLogo(); - - /** @return title for support action which displayed in Help menu. */ - String getSupportTitle(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProviderImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProviderImpl.java deleted file mode 100644 index e5c73ed36bb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ProductInfoDataProviderImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api; - -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Vitalii Parfonov */ -public class ProductInfoDataProviderImpl implements ProductInfoDataProvider { - @Override - public String getName() { - return "Che"; - } - - @Override - public String getSupportLink() { - return ""; - } - - @Override - public String getDocumentTitle() { - return ""; - } - - @Override - public String getDocumentTitle(String workspaceName) { - return workspaceName; - } - - @Override - public SVGResource getLogo() { - return null; - } - - @Override - public SVGResource getWaterMarkLogo() { - return null; - } - - @Override - public String getSupportTitle() { - return ""; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionEvent.java deleted file mode 100755 index 61c51a7f86a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionEvent.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api; - -import com.google.gwt.event.shared.GwtEvent; -import com.google.gwt.user.client.Window; - -/** - * Event that describes the fact that Che browser's tab has been closed or closing now. - * - * @author Artem Zatsarynnyi - */ -public class WindowActionEvent extends GwtEvent { - - /** Type class used to register this event. */ - public static Type TYPE = new Type<>(); - - /** Set of possible Window Actions. */ - public enum WindowAction { - CLOSING, - CLOSED - } - - private final WindowAction windowAction; - private final Window.ClosingEvent event; - - /** Creates a Window Closing Event. */ - public static WindowActionEvent createWindowClosingEvent(Window.ClosingEvent event) { - return new WindowActionEvent(event, WindowAction.CLOSING); - } - - /** Creates a Window Closed Event. */ - public static WindowActionEvent createWindowClosedEvent() { - return new WindowActionEvent(null, WindowAction.CLOSED); - } - - protected WindowActionEvent(Window.ClosingEvent event, WindowAction windowAction) { - this.event = event; - this.windowAction = windowAction; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** - * Makes sense only for {@link WindowAction#CLOSING}. - * - *

Please note, that custom messages are not supported any more. See - * https://bugs.chromium.org/p/chromium/issues/detail?id=587940 and - * https://www.chromestatus.com/feature/5349061406228480 - * - * @see com.google.gwt.user.client.Window.ClosingEvent#setMessage(java.lang.String) - */ - public void setMessage(String message) { - event.setMessage(message); - } - - @Override - protected void dispatch(WindowActionHandler handler) { - switch (windowAction) { - case CLOSING: - handler.onWindowClosing(this); - break; - case CLOSED: - handler.onWindowClosed(this); - break; - default: - break; - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionHandler.java deleted file mode 100755 index 6052d3d629a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/WindowActionHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handles {@link WindowActionEvent}. - * - * @author Artem Zatsarynnyi - */ -public interface WindowActionHandler extends EventHandler { - /** - * Fired just before the Codenvy browser's tab closes or navigates to a different site. - * - * @param event {@link WindowActionEvent} - */ - void onWindowClosing(WindowActionEvent event); - - /** - * Fired after the Codenvy browser's tab closed or navigated to a different site. - * - * @param event {@link WindowActionEvent} - */ - void onWindowClosed(WindowActionEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AbstractPerspectiveAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AbstractPerspectiveAction.java deleted file mode 100644 index 83aec1b4dab..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AbstractPerspectiveAction.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import com.google.inject.Inject; -import java.util.List; -import javax.inject.Provider; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.core.model.workspace.Workspace; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * The class contains general business logic for all actions displaying of which depend on current - * perspective.All actions must extend this class if their displaying depend on changing of - * perspective. - * - * @author Dmitry Shnurenko - */ -public abstract class AbstractPerspectiveAction extends BaseAction { - - /** - * A list of perspectives in which the action is enabled. Null or empty list means the action is - * enabled everywhere. - */ - private final List perspectives; - - @Inject protected Provider appContext; - @Inject protected Provider perspectiveManager; - - /** - * Creates a new action with the specified text. - * - * @param perspectives list of perspective action IDs - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item. - */ - public AbstractPerspectiveAction(@Nullable List perspectives, @NotNull String text) { - this(perspectives, text, null, null, null); - } - - /** - * Constructs a new action with the specified text, description. - * - * @param perspectives list of perspective action IDs - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item - * @param description Describes current action, this description will appear on the status bar - * when presentation has focus - */ - public AbstractPerspectiveAction( - @Nullable List perspectives, @NotNull String text, @NotNull String description) { - this(perspectives, text, description, null, null); - } - - public AbstractPerspectiveAction( - @Nullable List perspectives, - @NotNull String text, - @NotNull String description, - @Nullable String htmlResource) { - this(perspectives, text, description, null, htmlResource); - } - - public AbstractPerspectiveAction( - @Nullable List perspectives, - @NotNull String text, - @NotNull String description, - @Nullable SVGResource svgResource) { - this(perspectives, text, description, svgResource, null); - } - - public AbstractPerspectiveAction( - @Nullable List perspectives, - @NotNull String text, - @NotNull String description, - @Nullable SVGResource svgResource, - @Nullable String htmlResource) { - super(text, description, svgResource, htmlResource); - this.perspectives = perspectives; - } - - /** {@inheritDoc} */ - @Override - public final void update(@NotNull ActionEvent event) { - - Presentation presentation = event.getPresentation(); - - boolean isWorkspaceRunning = false; - - if (appContext.get() != null) { - Workspace workspace = appContext.get().getWorkspace(); - isWorkspaceRunning = - workspace != null && WorkspaceStatus.RUNNING.equals(workspace.getStatus()); - } - - boolean inPerspective = - perspectives == null || perspectives.isEmpty() - ? true - : perspectives.contains(perspectiveManager.get().getPerspectiveId()); - - presentation.setEnabledAndVisible(inPerspective && isWorkspaceRunning); - - if (inPerspective && isWorkspaceRunning) { - updateInPerspective(event); - } - } - - /** - * Updates displaying of action within current perspective. - * - * @param event update action - */ - public abstract void updateInPerspective(@NotNull ActionEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Action.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Action.java deleted file mode 100644 index 83a69a72a36..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Action.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * Represents an entity that has a state, a presentation and can be performed. - * - *

For an action to be useful, you need to implement {@link BaseAction#actionPerformed} and - * optionally to override {@link BaseAction#update}. By overriding the {@link BaseAction#update} - * method you can dynamically change action's presentation. - * - *

The same action can have various presentations. - * - * @author Yevhen Vydolob - */ -public interface Action { - - /** - * Updates the state of the action. Default implementation does nothing. Override this method to - * provide the ability to dynamically change action's state and(or) presentation depending on the - * context (For example when your action state depends on the selection you can check for - * selection and change the state accordingly). This method can be called frequently, for - * instance, if an action is added to a toolbar, it will be updated twice a second. This means - * that this method is supposed to work really fast, no real work should be done at this phase. - * For example, checking selection in a tree or a list, is considered valid, but working with a - * file system is not. If you cannot understand the state of the action fast you should do it in - * the {@link #actionPerformed(ActionEvent)} method and notify the user that action cannot be - * executed if it's the case. - * - * @param e Carries information on the invocation place and data available - */ - void update(ActionEvent e); - - /** - * Returns a template presentation that will be used as a template for created presentations. - * - * @return template presentation - */ - Presentation getTemplatePresentation(); - - /** - * Implement this method to provide your action handler. - * - * @param e Carries information on the invocation place - */ - void actionPerformed(ActionEvent e); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionEvent.java deleted file mode 100644 index 049e7c49ed0..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionEvent.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Container for the information necessary to execute or update an {@link BaseAction}. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public class ActionEvent { - private final ActionManager actionManager; - private final Presentation presentation; - private final Map parameters; - - /** - * Create new action event. - * - * @param presentation the presentation which represents the action in the place from where it is - * invoked or updated - * @param actionManager the manager for actions - */ - public ActionEvent(@NotNull Presentation presentation, @NotNull ActionManager actionManager) { - this(presentation, actionManager, null); - } - - /** - * Create new action event. - * - * @param presentation the presentation which represents the action in the place from where it is - * invoked or updated - * @param actionManager the manager for actions - * @param parameters the parameters with which the action is invoked or updated - */ - public ActionEvent( - @NotNull Presentation presentation, - @NotNull ActionManager actionManager, - @Nullable Map parameters) { - this.actionManager = actionManager; - this.presentation = presentation; - this.parameters = parameters; - } - - /** - * Returns the presentation which represents the action in the place from where it is invoked or - * updated. - * - * @return the presentation instance - */ - public Presentation getPresentation() { - return presentation; - } - - /** - * Returns the parameters with which the action is invoked or updated. - * - * @return action's parameters - */ - @Nullable - public Map getParameters() { - return parameters; - } - - public ActionManager getActionManager() { - return actionManager; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionGroup.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionGroup.java deleted file mode 100644 index 234b87f4c7c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionGroup.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Evgen Vidolob */ -public abstract class ActionGroup extends BaseAction { - - private boolean popup; - - /** - * Creates a new ActionGroup with shortName set to null and popup set to - * false. - */ - public ActionGroup() { - this(null, false); - } - - /** - * Creates a new ActionGroup with the specified shortName and popup. - * - * @param shortName Text that represents a short name for this action group - * @param popup true if this group is a popup, false otherwise - */ - public ActionGroup(String shortName, boolean popup) { - super(shortName); - setPopup(popup); - } - - public ActionGroup(String text, String description, SVGResource svgIcon) { - super(text, description, svgIcon); - } - - /** This method can be called in popup menus if {@link #canBePerformed()} is true */ - @Override - public void actionPerformed(ActionEvent e) {} - - @Override - public void update(ActionEvent e) { - super.update(e); - } - - /** @return true if {@link #actionPerformed(ActionEvent)} should be called */ - public boolean canBePerformed() { - return false; - } - - /** - * Returns the type of the group. - * - * @return true if the group is a popup, false otherwise - */ - public boolean isPopup() { - return popup; - } - - /** - * Sets the type of the group. - * - * @param popup If true the group will be shown as a popup in menus - */ - public final void setPopup(boolean popup) { - this.popup = popup; - } - - /** - * Returns the children of the group. - * - * @return An array representing children of this group. All returned children must be not - * null. - */ - public abstract Action[] getChildren(ActionEvent e); - - public boolean hideIfNoVisibleChildren() { - return false; - } - - public boolean disableIfNoVisibleChildren() { - return true; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionManager.java deleted file mode 100644 index 42ffdf18790..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionManager.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.extension.SDK; -import org.eclipse.che.ide.util.Pair; - -/** - * A manager for actions. Used to register and unregister actions, also contains utility methods to - * easily fetch action by id and id by action. - * - * @author Evgen Vidolob - * @see BaseAction - */ -@SDK(title = "ide.api.ui.action") -public interface ActionManager { - - /** - * Returns action associated with the specified actionId. - * - * @param actionId Id of the registered action - * @return Action associated with the specified actionId, null if there is no actions - * associated with the specified actionId - * @throws java.lang.IllegalArgumentException if actionId is null - */ - Action getAction(String actionId); - - /** - * Returns actionId associated with the specified action. - * - * @return id associated with the specified action, null if action is not registered - * @throws java.lang.IllegalArgumentException if action is null - */ - String getId(Action action); - - /** - * Registers the specified action with the specified id. Note that IDE keymaps processing deals - * only with registered actions. - * - * @param actionId Id to associate with the action - * @param action Action to register - */ - void registerAction(String actionId, Action action); - - /** - * Registers the specified action with the specified id. - * - * @param actionId Id to associate with the action - * @param action Action to register - * @param extensionId Identifier of the extension owning the action. Used to show the actions in - * the correct place under the "Plugins" node in the "Keymap" settings pane and similar - * dialogs. - */ - void registerAction(String actionId, Action action, String extensionId); - - /** - * Unregisters the action with the specified actionId. - * - * @param actionId Id of the action to be unregistered - */ - void unregisterAction(String actionId); - - /** - * Returns the list of all registered action IDs with the specified prefix. - * - * @return all action ids which have the specified prefix. - */ - String[] getActionIds(String idPrefix); - - /** - * Checks if the specified action ID represents an action group and not an individual action. - * Calling this method does not cause instantiation of a specific action class corresponding to - * the action ID. - * - * @param actionId the ID to check. - * @return true if the ID represents an action group, false otherwise. - */ - boolean isGroup(String actionId); - - /** - * Performs the given actions and returns {@link Promise}. The purpose of the returned {@link - * Promise} is to allow for interested parties to be notified when performing given {@code - * actions} has completed or rejected. - * - * @param actions sequence of actions to perform. May contains {@link PromisableAction}. - * @param breakOnFail if {@code true} - returned promise will be rejected when first {@link - * PromisableAction} (from the given {@code actions}) is rejected;
- * if {@code false} - all the given actions will try to perform in despite of rejecting any - * {@link PromisableAction} - * @return {@link Promise} that will be fulfilled immediately after all the given {@code actions} - * are performed. If any {@link PromisableAction} in the given {@code actions} is rejected the - * returned promise is rejected as well. - * @see PromisableAction - */ - Promise performActions(List> actions, boolean breakOnFail); - - /** - * Performs registered action by given id. - * - *

Note that if either action is not registered or actionId is null then nothing will be done - * - * @param actionId the id of action that will be performed - * @param parameters the parameters which are used for the action invocation - */ - void performAction(String actionId, Map parameters); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionSelectedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionSelectedHandler.java deleted file mode 100644 index 700c3bb2c40..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ActionSelectedHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** @author Vitaliy Gulyy */ -public interface ActionSelectedHandler { - - /** - * Do some actions when menu item will be selected. - * - * @param action selected Action - */ - void onActionSelected(Action action); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AppCloseActionEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AppCloseActionEvent.java deleted file mode 100644 index 6a1da07f49e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/AppCloseActionEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Container for the information necessary to execute {@link BaseAction} and cancel closing of - * application. - * - * @author Sergii Leschenko - */ -public class AppCloseActionEvent extends ActionEvent { - private String cancelMessage; - - public AppCloseActionEvent( - @NotNull Presentation presentation, @NotNull ActionManager actionManager) { - super(presentation, actionManager); - } - - public AppCloseActionEvent( - @NotNull Presentation presentation, - @NotNull ActionManager actionManager, - @Nullable Map parameters) { - super(presentation, actionManager, parameters); - } - - /** - * @return message that should be displayed in confirmation window on closing of application or - * {@code null} if confirmation window should not be displayed - */ - @Nullable - public String getCancelMessage() { - return cancelMessage; - } - - /** Sets message that will be displayed in confirmation window on closing of application */ - public void setCancelMessage(String cancelMessage) { - this.cancelMessage = cancelMessage; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/BaseAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/BaseAction.java deleted file mode 100644 index ea5ae99b60f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/BaseAction.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Represents an entity that has a state, a presentation and can be performed. - * - *

For an action to be useful, you need to implement {@link Action#actionPerformed} and - * optionally to override {@link Action#update}. By overriding the {@link Action#update} method you - * can dynamically change action's presentation. - * - *

The same action can have various presentations. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Vitaliy Guliy - */ -public abstract class BaseAction implements Action { - - private final Presentation presentation = new Presentation(); - - /** Creates a new action with its text, description and icon set to null. */ - public BaseAction() { - this(null, null, null, null); - } - - /** - * Creates a new action with the specified text. Description and icon are set to null - * . - * - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item. - */ - public BaseAction(String text) { - this(text, null, null, null); - } - - /** - * Constructs a new action with the specified text, description. - * - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item - * @param description Describes current action, this description will appear on the status bar - * when presentation has focus - */ - public BaseAction(String text, String description) { - this(text, description, null, null); - } - - /** - * Constructs a new action with the specified text, description. - * - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item - * @param description Describes current action, this description will appear on the status bar - * when presentation has focus - * @param svgResource Action's SVG icon - */ - public BaseAction(String text, String description, SVGResource svgResource) { - this(text, description, svgResource, null); - } - - /** - * Constructs a new action with the specified text, description. - * - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item - * @param description Describes current action, this description will appear on the status bar - * when presentation has focus - * @param htmlResource HTML representation of icon - */ - public BaseAction(String text, String description, String htmlResource) { - this(text, description, null, htmlResource); - } - - /** - * Constructs a new action with the specified text, description and icon. - * - * @param text Serves as a tooltip when the presentation is a button and the name of the menu item - * when the presentation is a menu item - * @param description Describes current action, this description will appear on the status bar - * when presentation has focus - * @param svgResource Action's SVG icon - * @param htmlResource HTML representation of icon - */ - public BaseAction(String text, String description, SVGResource svgResource, String htmlResource) { - presentation.setText(text); - presentation.setDescription(description); - if (svgResource != null) { - presentation.setImageElement(new SVGImage(svgResource).getElement()); - } - presentation.setHTMLResource(htmlResource); - } - - @Override - public void update(ActionEvent e) {} - - @Override - public final Presentation getTemplatePresentation() { - return presentation; - } - - @Override - public String toString() { - return getTemplatePresentation().toString(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/CustomComponentAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/CustomComponentAction.java deleted file mode 100644 index 924533a6ed8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/CustomComponentAction.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import com.google.gwt.user.client.ui.Widget; - -/** - * @author Evgen Vidolob - * @version $Id: - */ -public interface CustomComponentAction { - - String CUSTOM_COMPONENT_PROPERTY = "customComponent"; - - /** - * @return custom Widget that represents action in UI. You (as a client/implementor) or this - * interface do not allow to invoke this method directly. Only action system can invoke it! - *
- *
- * The component should not be stored in the action instance because it may be shown on - * several toolbars simultaneously. CustomComponentAction.CUSTOM_COMPONENT_PROPERTY can be - * used to retrieve current component from a Presentation in AnAction#update() method. - */ - Widget createCustomComponent(Presentation presentation); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/DefaultActionGroup.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/DefaultActionGroup.java deleted file mode 100644 index 737b2fc2044..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/DefaultActionGroup.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.constraints.Anchor; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.util.loging.Log; - -/** - * A default implementation of {@link ActionGroup}. Provides the ability to add children actions and - * separators between them. In most of the cases you will be using this implementation but note that - * there are cases where children are determined on rules different than just positional - * constraints, that's when you need to implement your own ActionGroup. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public class DefaultActionGroup extends ActionGroup { - private static final Action[] EMPTY_ACTIONS = new Action[0]; - - /** Contains actions */ - private final List actionList = new ArrayList<>(); - - /** Contains constraints */ - private final List constraintsList = new ArrayList<>(); - - /** Contains instances of sorted Actions */ - private Action[] sortedActions; - - private ActionManager actionManager; - - // TODO: think about removing this field - private boolean needSorting = false; - - public DefaultActionGroup(ActionManager actionManager) { - this(null, false, actionManager); - } - - /** - * Creates an action group containing the specified actions. - * - * @param actions the actions to add to the group - */ - public DefaultActionGroup(ActionManager actionManager, Action... actions) { - this(null, false, actionManager); - for (Action action : actions) { - add(action); - } - } - - public DefaultActionGroup(String shortName, boolean popup, ActionManager actionManager) { - super(shortName, popup); - this.actionManager = actionManager; - } - - private static int findIndex(String actionId, List actions, ActionManager actionManager) { - for (int i = 0; i < actions.size(); i++) { - Action action = actions.get(i); - if (action != null) { - String id = actionManager.getId(action); - if (id != null && id.equals(actionId)) { - return i; - } - } - } - return -1; - } - - /** - * Adds the specified action to the tail. - * - * @param action Action to be added - * @param actionManager ActionManager instance - */ - public final void add(Action action, ActionManager actionManager) { - add(action, Constraints.LAST, actionManager); - } - - public final void add(Action action) { - addAction(action, Constraints.LAST); - } - - public final void addAction(Action action) { - addAction(action, Constraints.LAST); - } - - /** Adds a separator to the tail. */ - public final void addSeparator() { - add(Separator.getInstance()); - } - - public final void add(Action action, Constraints constraint) { - add(action, constraint, actionManager); - } - - public final void addAction(Action action, Constraints constraint) { - addAction(action, constraint, actionManager); - } - - /** - * Adds the specified action with the specified constraint. - * - * @param action Action to be added; cannot be null - * @param constraint Constraint to be used for determining action's position; cannot be null - * @throws IllegalArgumentException in case when: - *

  • action is null - *
  • constraint is null - *
  • action is already in the group - */ - public final void add(Action action, Constraints constraint, ActionManager actionManager) { - addAction(action, constraint, actionManager); - } - - public final void addAction(Action action, Constraints constraint, ActionManager actionManager) { - if (action == this) { - throw new IllegalArgumentException("Cannot add a group to itself"); - } - - // Check that action isn't already registered - if (!(action instanceof Separator)) { - for (Action actionInList : actionList) { - if (action.equals(actionInList)) { - Log.error(getClass(), "Can not add an action twice: " + action); - return; - } - } - } - actionList.add(action); - constraintsList.add(constraint); - - needSorting = true; - } - - /** - * Removes specified action from group. - * - * @param actionToRemove Action to be removed - */ - public final void remove(Action actionToRemove) { - int index; - for (Action action : actionList) { - if (action.equals(actionToRemove)) { - index = actionList.indexOf(action); - - actionList.remove(action); - constraintsList.remove(index); - - needSorting = true; - return; - } - } - } - - /** Removes all children actions (separators as well) from the group. */ - public final void removeAll() { - actionList.clear(); - constraintsList.clear(); - needSorting = true; - } - - /** - * Returns group's children in the order determined by constraints. - * - * @param e not used - * @return An array of children actions - */ - @Override - public final Action[] getChildren(ActionEvent e) { - - if (needSorting) { - sortedActions = getSortedActions(); - needSorting = false; - } - return sortedActions == null ? EMPTY_ACTIONS : sortedActions; - } - - /** - * Sorts actions depending on their constraints and their input order. - * - * @return An array of sorted actions - */ - // TODO: to complicate - private Action[] getSortedActions() { - List result = new ArrayList<>(); - Map unsortedMap = new LinkedHashMap<>(); - - for (int i = 0; i < actionList.size(); i++) { - - Action action = actionList.get(i); - Constraints constraints = constraintsList.get(i); - - // if action is added to result list, it needs to call - // checkUnsorted method to look for another actions, that must be - // before or after this action - if (constraints.myAnchor.equals(Anchor.FIRST)) { - result.add(0, action); - checkUnsorted(unsortedMap, action, result); - } else if (constraints.myAnchor.equals(Anchor.LAST)) { - result.add(action); - checkUnsorted(unsortedMap, action, result); - } else { - // find related action in result list, if found, add action - // before or after it. If not, add to unsorted map - int index = findIndex(constraints.relativeId, result, actionManager); - if (index == -1) { - unsortedMap.put(action, constraints); - } else { - if (constraints.myAnchor.equals(Anchor.BEFORE)) { - result.add(index, action); - checkUnsorted(unsortedMap, action, result); - } else if (constraints.myAnchor.equals(Anchor.AFTER)) { - result.add(index + 1, action); - checkUnsorted(unsortedMap, action, result); - } - } - } - } - // append left unsorted actions to the end - result.addAll(unsortedMap.keySet()); - return result.toArray(new Action[result.size()]); - } - - /** - * This method checks unsorted map for actions, that depend on action, received in parameter. If - * found ones, adds it - * - * @param unsortedMap - map with unsorted actions - * @param action - action, that is a condition for actions in unsorted list - * @param result - result list - */ - private void checkUnsorted( - Map unsortedMap, Action action, List result) { - Iterator> itr = unsortedMap.entrySet().iterator(); - while (itr.hasNext()) { - Map.Entry entry = itr.next(); - - String actionId = actionManager.getId(action); - - Action relatedAction = entry.getKey(); - Constraints relatedConstraints = entry.getValue(); - - // if dependant action constraints match depends on our action - // add it to result and remove from unsorted list - if (relatedConstraints.relativeId.equals(actionId)) { - if (relatedConstraints.myAnchor.equals(Anchor.BEFORE)) { - result.add(result.indexOf(action), relatedAction); - } else if (relatedConstraints.myAnchor.equals(Anchor.AFTER)) { - result.add(result.indexOf(action) + 1, relatedAction); - } - itr.remove(); - // recursive call of this method, but now passing the 'relatedAction' - // to find another actions, that related to 'relatedAction - checkUnsorted(unsortedMap, relatedAction, result); - } - } - } - - /** - * Returns the number of contained children (including separators). - * - * @return number of children in the group - */ - public final int getChildrenCount() { - return actionList.size(); - } - - public final Action[] getChildActionsOrStubs() { - return sortedActions == null ? EMPTY_ACTIONS : sortedActions; - } - - public final void addAll(ActionGroup group) { - for (Action each : group.getChildren(null)) { - add(each); - } - } - - public final void addAll(Collection actionList) { - for (Action each : actionList) { - add(each); - } - } - - public final void addAll(Action... actions) { - for (Action each : actions) { - add(each); - } - } - - public void addSeparator(String separatorText) { - add(new Separator(separatorText)); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/IdeActions.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/IdeActions.java deleted file mode 100644 index e4e47149fcd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/IdeActions.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -public interface IdeActions { - - String GROUP_MAIN_MENU = "mainMenu"; - String GROUP_WORKSPACE = "workspaceGroup"; - String GROUP_PROJECT = "projectGroup"; - String GROUP_EDIT = "editGroup"; - String GROUP_ASSISTANT = "assistantGroup"; - String TOOL_WINDOWS_GROUP = "toolWindows"; - String GROUP_RUN = "runGroup"; - String GROUP_PROFILE = "profileGroup"; - String GROUP_FILE_NEW = "newGroup"; - String GROUP_WINDOW = "windowGroup"; - String GROUP_HELP = "helpGroup"; - String GROUP_RECENT_FILES = "recentFiles"; - - String GROUP_MAIN_TOOLBAR = "mainToolBar"; - String GROUP_CENTER_TOOLBAR = "centerToolBar"; - String GROUP_RIGHT_TOOLBAR = "rightToolBar"; - - String GROUP_MAIN_CONTEXT_MENU = "mainContextMenu"; - String GROUP_RUN_CONTEXT_MENU = "runGroupContextMenu"; - String GROUP_DEBUG_CONTEXT_MENU = "debugGroupContextMenu"; - String GROUP_PROJECT_EXPLORER_CONTEXT_MENU = "projectExplorerContextMenu"; - String GROUP_EDITOR_TAB_CONTEXT_MENU = "editorTabContextMenu"; - String GROUP_CONSOLES_TREE_CONTEXT_MENU = "consolesTreeContextMenu"; - String GROUP_COMMAND_EXPLORER_CONTEXT_MENU = "commandExplorerContextMenu"; - String GROUP_EDITOR_CONTEXT_MENU = "editorContextMenu"; - - String GROUP_PART_MENU = "partMenu"; - String GROUP_TOOLBAR_CONTROLLER = "toolbarController"; - - String GROUP_OTHER_MENU = "otherMenu"; - String GROUP_LEFT_MAIN_MENU = "leftMainMenu"; - @Deprecated String GROUP_RIGHT_MAIN_MENU = "rightMainMenu"; - - String GROUP_CENTER_STATUS_PANEL = "centerStatusPanelGroup"; - String GROUP_LEFT_STATUS_PANEL = "leftStatusPanelGroup"; - String GROUP_RIGHT_STATUS_PANEL = "rightStatusPanelGroup"; - - String NAVIGATE_TO_FILE = "navigateToFile"; - String FULL_TEXT_SEARCH = "fullTextSearch"; - String FIND_ACTION = "findActionAction"; - String FORMAT = "format"; - String COPY = "copy"; - String CUT = "cut"; - String PASTE = "paste"; - String SWITCH_LEFT_TAB = "switchLeftTab"; - String SWITCH_RIGHT_TAB = "switchRightTab"; - String OPEN_RECENT_FILES = "openRecentFiles"; - String DELETE_ITEM = "deleteItem"; - String NEW_FILE = "newFile"; - String CREATE_PROJECT = "createProject"; - String IMPORT_PROJECT = "importProject"; - String CLOSE_ACTIVE_EDITOR = "closeActiveEditor"; - String SIGNATURE_HELP = "signatureHelp"; - String RENAME = "renameResource"; - String SHOW_REFERENCE = "showReference"; -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Presentation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Presentation.java deleted file mode 100644 index 58627b6e961..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Presentation.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import com.google.gwt.dom.client.Element; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.util.ListenerManager; - -/** - * The presentation of an action in a specific place in the user interface. - * - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -public final class Presentation { - - /** Defines tool tip for button at tool bar or text for element at menu value: String */ - public static final String PROP_TEXT = "text"; - /** value: String */ - public static final String PROP_DESCRIPTION = "description"; - /** value: Icon */ - public static final String PROP_ICON = "icon"; - /** value: Boolean */ - public static final String PROP_VISIBLE = "visible"; - /** The actual value is a Boolean. */ - public static final String PROP_ENABLED = "enabled"; - - private Map userMap = new HashMap<>(); - private ListenerManager myChangeSupport; - private String text; - private String myDescription; - - private Element imageElement; - private String htmlResource; - - private boolean visible; - private boolean enabled; - - public Presentation() { - myChangeSupport = ListenerManager.create(); - visible = true; - enabled = true; - } - - public Presentation(final String text) { - this(); - this.text = text; - } - - public void addPropertyChangeListener(PropertyChangeListener l) { - myChangeSupport.add(l); - } - - public void removePropertyChangeListener(PropertyChangeListener l) { - myChangeSupport.remove(l); - } - - public String getText() { - return text; - } - - public void setText(String text) { - String oldText = this.text; - this.text = text; - firePropertyChange(PROP_TEXT, oldText, text); - } - - public String getDescription() { - return myDescription; - } - - public void setDescription(String description) { - String oldDescription = myDescription; - myDescription = description; - firePropertyChange(PROP_DESCRIPTION, oldDescription, myDescription); - } - - /** - * Returns SVG image resource. - * - * @return svg image resource - */ - public Element getImageElement() { - return imageElement == null ? null : (Element) imageElement.cloneNode(true); - } - - /** - * Sets icon image element. - * - * @param imageElement icon image element - */ - public void setImageElement(Element imageElement) { - Element oldElement = this.imageElement; - this.imageElement = imageElement; - firePropertyChange(PROP_ICON, oldElement, imageElement); - } - - /** - * Returns icon HTML resource. - * - * @return html resource - */ - public String getHTMLResource() { - return htmlResource; - } - - /** - * Sets icon HTML resource. - * - * @param htmlResource html resource - */ - public void setHTMLResource(String htmlResource) { - String oldHTMLResource = htmlResource; - this.htmlResource = htmlResource; - firePropertyChange(PROP_ICON, oldHTMLResource, htmlResource); - } - - public boolean isVisible() { - return visible; - } - - public void setVisible(boolean visible) { - if (this.visible == visible) { - return; - } - - this.visible = visible; - - if (visible) { - firePropertyChange(PROP_VISIBLE, Boolean.FALSE, Boolean.TRUE); - } else { - firePropertyChange(PROP_VISIBLE, Boolean.TRUE, Boolean.FALSE); - } - } - - /** - * Returns the state of this action. - * - * @return true if action is enabled, false otherwise - */ - public boolean isEnabled() { - return enabled; - } - - /** - * Sets whether the action enabled or not. If an action is disabled, {@link - * Action#actionPerformed} won't be called. In case when action represents a button or a menu - * item, the representing button or item will be greyed out. - * - * @param enabled true if you want to enable action, false otherwise - */ - public void setEnabled(boolean enabled) { - if (this.enabled == enabled) { - return; - } - - this.enabled = enabled; - - if (enabled) { - firePropertyChange(PROP_ENABLED, Boolean.FALSE, Boolean.TRUE); - } else { - firePropertyChange(PROP_ENABLED, Boolean.TRUE, Boolean.FALSE); - } - } - - public final void setEnabledAndVisible(boolean enabled) { - setEnabled(enabled); - setVisible(enabled); - } - - public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { - final PropertyChangeEvent event = - new PropertyChangeEvent(this, propertyName, oldValue, newValue); - myChangeSupport.dispatch(listener -> listener.onPropertyChange(event)); - } - - public Presentation clone() { - Presentation presentation = new Presentation(getText()); - presentation.myDescription = myDescription; - presentation.enabled = enabled; - presentation.visible = visible; - presentation.imageElement = imageElement; - if (imageElement != null) { - presentation.imageElement = imageElement.cloneNode(true).cast(); - } - presentation.htmlResource = htmlResource; - return presentation; - } - - public void putClientProperty(@NotNull String key, @Nullable Object value) { - Object oldValue = userMap.get(key); - userMap.put(key, value); - firePropertyChange(key, oldValue, value); - } - - /** - * Return user client property by specified key. - * - * @param key user client property key - * @return object, stored by property key - */ - public Object getClientProperty(String key) { - if (key == null) { - return null; - } - - return userMap.get(key); - } - - @Override - public String toString() { - return text + " (" + myDescription + ")"; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ProjectAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ProjectAction.java deleted file mode 100644 index 07c9ab1caf3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ProjectAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.app.AppContext; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Action that make sense only in project scope. This action disables if current project null or - * user has read only rights. - * - * @author Evgen Vidolob - */ -public abstract class ProjectAction extends BaseAction { - - protected AppContext appContext; - - protected ProjectAction() {} - - protected ProjectAction(String text) { - super(text); - } - - protected ProjectAction(String text, String description) { - super(text, description); - } - - protected ProjectAction(String text, String description, SVGResource svgIcon) { - super(text, description, svgIcon); - } - - @Override - public final void update(ActionEvent e) { - if (appContext.getRootProject() == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - updateProjectAction(e); - } - - protected abstract void updateProjectAction(ActionEvent e); - - @Inject - private void injectAppContext(AppContext appContext) { - this.appContext = appContext; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PromisableAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PromisableAction.java deleted file mode 100644 index d03cdf69288..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PromisableAction.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import org.eclipse.che.api.promises.client.Promise; - -/** - * Defines the requirements for an action that gives a {@link Promise} to be performed. The purpose - * of the returned {@link Promise} is to allow for interested parties to be notified when performing - * action has completed or rejected. - * - * @author Artem Zatsarynnyi - */ -public interface PromisableAction { - - /** - * Perform action and returns {@link Promise} to notify about action has performed or it has - * failed to perform. - * - * @param event an {@link ActionEvent} - * @return {@link Promise} that should be fulfilled immediately after action has performed or - * rejected if action has failed to perform - */ - Promise promise(ActionEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeEvent.java deleted file mode 100644 index 8bc7e84c816..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeEvent.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * A "PropertyChange" event gets delivered whenever a bean changes a "bound" or "constrained" - * property. A PropertyChangeEvent object is sent as an argument to the PropertyChangeListener and - * VetoableChangeListener methods. - * - *

    Normally PropertyChangeEvents are accompanied by the name and the old and new value of the - * changed property. If the new value is a primitive type (such as int or boolean) it must be - * wrapped as the corresponding java.lang.* Object type (such as Integer or Boolean). - * - *

    Null values may be provided for the old and the new values if their true values are not known. - * - *

    An event source may send a null object as the name to indicate that an arbitrary set of if its - * properties have changed. In this case the old and new values should also be null. - * - * @author Evgen Vidolob - * @version $Id: - */ -public class PropertyChangeEvent { - - /** The object on which the Event initially occurred. */ - protected Object source; - - /** - * name of the property that changed. May be null, if not known. - * - * @serial - */ - private String propertyName; - - /** - * New value for property. May be null if not known. - * - * @serial - */ - private Object newValue; - - /** - * Previous value for property. May be null if not known. - * - * @serial - */ - private Object oldValue; - - /** - * Constructs a new PropertyChangeEvent. - * - * @param source The bean that fired the event. - * @param propertyName The programmatic name of the property that was changed. - * @param oldValue The old value of the property. - * @param newValue The new value of the property. - */ - public PropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue) { - this.source = source; - this.propertyName = propertyName; - this.newValue = newValue; - this.oldValue = oldValue; - } - - /** - * Gets the programmatic name of the property that was changed. - * - * @return The programmatic name of the property that was changed. May be null if multiple - * properties have changed. - */ - public String getPropertyName() { - return propertyName; - } - - /** - * Gets the new value for the property, expressed as an Object. - * - * @return The new value for the property, expressed as an Object. May be null if multiple - * properties have changed. - */ - public Object getNewValue() { - return newValue; - } - - /** - * Gets the old value for the property, expressed as an Object. - * - * @return The old value for the property, expressed as an Object. May be null if multiple - * properties have changed. - */ - public Object getOldValue() { - return oldValue; - } - - /** - * Returns a string representation of the object. - * - * @return a string representation of the object - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(getClass().getName()); - sb.append("[propertyName=").append(getPropertyName()); - sb.append("; oldValue=").append(getOldValue()); - sb.append("; newValue=").append(getNewValue()); - sb.append("; source=").append(getSource()); - return sb.append("]").toString(); - } - - /** - * The object on which the Event initially occurred. - * - * @return The object on which the Event initially occurred. - */ - public Object getSource() { - return source; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeListener.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeListener.java deleted file mode 100644 index 601c77215e7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/PropertyChangeListener.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * @author Evgen Vidolob - * @version $Id: - */ -public interface PropertyChangeListener { - - /** - * This method gets called when a bound property is changed. - * - * @param event A PropertyChangeEvent object describing the event source and the property that has - * changed. - */ - void onPropertyChange(PropertyChangeEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Separator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Separator.java deleted file mode 100644 index b6d93195096..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Separator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * Represents a separator. - * - * @author Evgen Vidolob - */ -public class Separator extends BaseAction { - private static final Separator ourInstance = new Separator(); - - private String myText; - - public Separator() { - // It is necessary because otherwise we have some problems with myText==null after compiling GWT - this(null); - } - - public Separator(final String text) { - myText = text; - } - - public String getText() { - return myText; - } - - public static Separator getInstance() { - return ourInstance; - } - - @Override - public void actionPerformed(ActionEvent e) { - throw new UnsupportedOperationException(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ToggleAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ToggleAction.java deleted file mode 100644 index 6f728df17b9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/ToggleAction.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import org.eclipse.che.commons.annotation.Nullable; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * An action which has a selected state, and which toggles its selected state when performed. Can be - * used to represent a menu item with a checkbox, or a toolbar button which keeps its pressed state. - * - * @author Evgen Vidolob - * @author Vitaliy Guliy - */ -public abstract class ToggleAction extends BaseAction implements Toggleable { - - public ToggleAction(@Nullable final String text) { - super(text); - } - - public ToggleAction( - @Nullable final String text, - @Nullable final String description, - @Nullable final SVGResource svgIcon) { - super(text, description, svgIcon); - } - - @Override - public final void actionPerformed(final ActionEvent e) { - boolean selected = !isSelected(e); - setSelected(e, selected); - - e.getPresentation() - .firePropertyChange( - SELECTED_PROPERTY, Boolean.valueOf(!selected), Boolean.valueOf(selected)); - } - - /** - * Returns the selected (checked, pressed) state of the action. - * - * @param e the action event representing the place and context in which the selected state is - * queried. - * @return true if the action is selected, false otherwise - */ - public abstract boolean isSelected(ActionEvent e); - - /** - * Sets the selected state of the action to the specified value. - * - * @param e the action event which caused the state change. - * @param state the new selected state of the action. - */ - public abstract void setSelected(ActionEvent e, boolean state); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Toggleable.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Toggleable.java deleted file mode 100644 index e7e21a2e69c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/action/Toggleable.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -/** - * @author Evgen Vidolob - * @version $Id: - */ -public interface Toggleable { - String SELECTED_PROPERTY = "selected"; -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/AppContext.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/AppContext.java deleted file mode 100644 index c751c368d9b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/AppContext.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.app; - -import com.google.common.annotations.Beta; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.eclipse.che.ide.api.factory.model.FactoryImpl; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.resource.Path; - -/** - * Represents current context of the IDE application. - * - * @author Vitaly Parfonov - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - * @author Yevhenii Voevodin - */ -public interface AppContext { - - /** - * Returns the workspace root container, which is holder of registered projects. - * - * @return the workspace root - * @since 4.4.0 - */ - @Beta - Container getWorkspaceRoot(); - - /** - * Returns the registered projects in current workspace. If no projects were registered before, - * then empty array is returned. - * - * @return the registered projects - * @see Container#newProject() - * @since 4.4.0 - */ - @Beta - Project[] getProjects(); - - /** - * Returns the resource which is in current context. By current context means, that resource may - * be in use in specified part if IDE. For example, project part may provide resource which is - * under selection at this moment, editor may provide resource which is open, full text search may - * provide resource which is under selection. - * - *

    If specified part provides more than one resource, then last selected resource is returned. - * - *

    May return {@code null} if there is no resource in context. - * - * @return the resource in context - * @see Resource - * @see #getResources() - * @since 4.4.0 - */ - @Beta - Resource getResource(); - - /** - * Returns the resources which are in current context. By current context means, that resources - * may be in use in specified part if IDE. For example, project part may provide resources which - * are under selection at this moment, editor may provide resource which is open, full text search - * may provide resources which are under selection. - * - *

    If specified part provides more than one resource, then all selected resources are returned. - * - *

    May return {@code null} if there is no resources in context. - * - * @return the resource in context - * @see Resource - * @see #getResource() - * @since 4.4.0 - */ - @Beta - Resource[] getResources(); - - /** - * Returns the root project which is in context. To find out specified sub-project in context, - * method {@link #getResource()} should be called. Resource is bound to own project and to get - * {@link Project} instance from {@link Resource}, method {@link Resource#getRelatedProject()} - * should be called. - * - *

    May return {@code null} if there is no project in context. - * - * @return the root project or {@code null} - * @see Project - * @since 4.4.0 - */ - @Beta - Project getRootProject(); - - /** - * Returns the path where projects are stored on file system. - * - * @return the path to projects root. - * @since 4.2.0 - */ - Path getProjectsRoot(); - - /** - * Returns list of start-up actions with parameters that comes form URL during IDE initialization. - * - * @return the list of actions - * @see StartUpAction - */ - List getStartAppActions(); - - /** - * Returns the current user. - * - * @return current user - */ - CurrentUser getCurrentUser(); - - /** - * Returns list of projects paths which are in importing state. - * - * @return list of project paths - */ - List getImportingProjects(); - - /** - * Adds project path to list of projects which are in importing state. - * - * @param pathToProject project path - */ - void addProjectToImporting(String pathToProject); - - /** - * Removes project path to list of projects which are in importing state. - * - * @param pathToProject project path - */ - void removeProjectFromImporting(String pathToProject); - - /** - * Returns {@link FactoryImpl} instance which id was set on startup, or {@code null} if no factory - * was specified. - * - * @return loaded factory or {@code null} - */ - FactoryImpl getFactory(); - - String getWorkspaceId(); - - /** Returns the current workspace. */ - WorkspaceImpl getWorkspace(); - - /** Returns URL of Che Master API endpoint. */ - String getMasterApiEndpoint(); - - /** - * Returns URL of ws-agent server API endpoint. - * - * @throws RuntimeException if ws-agent server doesn't exist. Normally it may happen when - * workspace is stopped. - */ - String getWsAgentServerApiEndpoint(); - - /** - * Returns web application identifier. Most obvious use - to distinguish web applications on - * server side (e.g. connected via websocket) - * - * @return identifier - */ - Optional getApplicationId(); - - /** - * Sets web application identifier. Most obvious use - to distinguish web applications on server - * side (e.g. connected via websocket) - */ - void setApplicationWebsocketId(String id); - - /** - * Returns context properties, key-value storage that allows to store data in the context for - * plugins and extensions. - * - * @return a modifiable properties map - * @since 5.11.0 - */ - Map getProperties(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/CurrentUser.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/CurrentUser.java deleted file mode 100644 index 672b8ff0e9f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/CurrentUser.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.app; - -import java.util.Map; - -/** Describes the current user. */ -public interface CurrentUser { - - String getId(); - - Map getPreferences(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/StartUpAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/StartUpAction.java deleted file mode 100644 index 1572a80d8fd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/app/StartUpAction.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.app; - -import java.util.Map; - -/** - * Class that contain action id and parsed params form initial URL. - * - * @author Vitalii Parfonov - */ -public class StartUpAction { - - private String actionId; - private Map parameters; - - public StartUpAction(String actionId, Map parameters) { - this.actionId = actionId; - this.parameters = parameters; - } - - public String getActionId() { - return actionId; - } - - public Map getParameters() { - return parameters; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/Credentials.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/Credentials.java deleted file mode 100644 index def9ff8c782..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/Credentials.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.auth; - -/** - * Credentials object for subversion operations. - * - * @author Igor Vinokur - */ -public class Credentials { - private String username; - private String password; - - public Credentials(String username, String password) { - this.username = username; - this.password = password; - } - - /** Returns user name for authentication. */ - public String getUsername() { - return username; - } - - /** Set user name for authentication. */ - public void setUsername(String username) { - this.username = username; - } - - /** Returns password for authentication. */ - public String getPassword() { - return password; - } - - /** Set password for authentication. */ - public void setPassword(String password) { - this.password = password; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/OAuthServiceClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/OAuthServiceClient.java deleted file mode 100644 index fad81b7e69f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/auth/OAuthServiceClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.auth; - -import javax.inject.Inject; -import org.eclipse.che.api.auth.shared.dto.OAuthToken; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.rest.AsyncRequestCallback; -import org.eclipse.che.ide.rest.AsyncRequestFactory; -import org.eclipse.che.ide.rest.DtoUnmarshallerFactory; - -/** - * Serves connections to OauthAuthentication service. Allows to get OAuth tokens via callback or as - * promise. - * - * @author Sergii Leschenko - * @author Max Shaposhnyk - */ -public class OAuthServiceClient { - private final AsyncRequestFactory asyncRequestFactory; - private final String restContext; - private final DtoUnmarshallerFactory unmarshallerFactory; - - @Inject - public OAuthServiceClient( - AppContext appContext, - AsyncRequestFactory asyncRequestFactory, - DtoUnmarshallerFactory unmarshallerFactory) { - this.asyncRequestFactory = asyncRequestFactory; - this.restContext = appContext.getMasterApiEndpoint() + "/oauth"; - this.unmarshallerFactory = unmarshallerFactory; - } - - public void getToken(String oauthProvider, AsyncRequestCallback callback) { - asyncRequestFactory - .createGetRequest(restContext + "/token?oauth_provider=" + oauthProvider) - .send(callback); - } - - public Promise getToken(String oauthProvider) { - return asyncRequestFactory - .createGetRequest(restContext + "/token?oauth_provider=" + oauthProvider) - .send(unmarshallerFactory.newUnmarshaller(OAuthToken.class)); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/BaseCommandGoal.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/BaseCommandGoal.java deleted file mode 100644 index 123c57c855e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/BaseCommandGoal.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import java.util.Objects; - -/** - * Base implementation of the {@link CommandGoal}. - * - * @author Artem Zatsarynnyi - */ -public class BaseCommandGoal implements CommandGoal { - - private final String id; - - public BaseCommandGoal(String id) { - this.id = id; - } - - @Override - public String getId() { - return id; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (!(o instanceof CommandGoal)) { - return false; - } - - CommandGoal other = (CommandGoal) o; - - return Objects.equals(getId(), other.getId()); - } - - @Override - public int hashCode() { - return Objects.hash(id); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandAddedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandAddedEvent.java deleted file mode 100644 index 71ee318612b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandAddedEvent.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event fired when new command has been added. - * - *

    Note: this event is not intended to be fired by clients. - */ -public class CommandAddedEvent extends GwtEvent { - - /** Handler type. */ - private static Type TYPE; - - /** Added command. */ - private final CommandImpl command; - - /** - * Creates new event. - * - *

    Note: this event is not intended to be fired by clients. - */ - public CommandAddedEvent(CommandImpl command) { - this.command = command; - } - - /** - * Gets the type associated with this event. - * - * @return returns the handler type - */ - public static Type getType() { - return TYPE != null ? TYPE : (TYPE = new Type<>()); - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(CommandAddedHandler handler) { - handler.onCommandAdded(this); - } - - /** Returns added command. */ - public CommandImpl getCommand() { - return command; - } - - /** Handler for {@link CommandAddedEvent}. */ - public interface CommandAddedHandler extends EventHandler { - - /** - * Called when new command has been added. - * - * @param event the event - */ - void onCommandAdded(CommandAddedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandExecutor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandExecutor.java deleted file mode 100644 index d355dbb6aa4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandExecutor.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.ide.api.macro.Macro; - -/** Allows to execute a command. */ -public interface CommandExecutor { - - /** - * Sends the the given {@code command} to the specified {@code machine} for execution. - * - *

    Note that all {@link Macro}s will be expanded into real values before sending the - * {@code command} for execution. - * - * @param command command to execute - * @param machineName name of the machine where execute the command - * @see Macro - */ - void executeCommand(Command command, String machineName); - - /** - * Sends the the given {@code command} for execution. - * - *

    If any machine is currently selected it will be used as execution target. Otherwise user - * will be asked for choosing execution target. - * - *

    Note that all {@link Macro}s will be expanded into real values before sending the - * {@code command} for execution. - * - * @param command command to execute - * @see Macro - */ - void executeCommand(CommandImpl command); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoal.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoal.java deleted file mode 100644 index 7974aa04e47..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoal.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -/** - * Contract for command goal. - * - * @author Artem Zatsarynnyi - */ -public interface CommandGoal { - - /** Returns goal ID. */ - String getId(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoalRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoalRegistry.java deleted file mode 100644 index 5201573f23d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandGoalRegistry.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Registry of command goals. - * - * @author Artem Zatsarynnyi - */ -public interface CommandGoalRegistry { - - /** Returns all (predefined and created by user) {@link CommandGoal}s. */ - Set getAllGoals(); - - /** Returns all registered predefined {@link CommandGoal}s. */ - Set getAllPredefinedGoals(); - - /** - * Returns the default command goal which is used for commands which actually doesn't belong to - * any goal. - */ - CommandGoal getDefaultGoal(); - - /** - * Returns an {@code Optional} {@link CommandGoal} by the given ID or {@code Optional.absent()} if - * none was registered. - * - * @param id the ID of the predefined command goal to get - * @return an optional {@link CommandGoal} or {@code Optional.absent()} if none was registered - */ - Optional getPredefinedGoalById(String id); - - /** - * Returns a predefined {@link CommandGoal} by the given ID or the custom (non-predefined) goal if - * none was registered or the default goal if the given {@code id} is {@code null} or empty - * string. - * - * @param id the ID of the command goal - * @return a predefined {@link CommandGoal} with the given ID or the custom (non-predefined) goal - * if none was registered or the default goal if the given {@code id} is {@code null} or empty - * string. Never null. - */ - CommandGoal getGoalForId(@Nullable String id); -} 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 deleted file mode 100644 index 9664e3aec98..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandImpl.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import static java.util.Collections.unmodifiableSet; -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; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.commons.annotation.Nullable; - -/** Data object for {@link Command}. */ -public class CommandImpl implements Command { - - private final String typeId; - private final ApplicableContext context; - private String name; - private String commandLine; - private Map attributes; - - /** Creates new {@link CommandImpl} based on the given data. */ - public CommandImpl(Command command, ApplicableContext context) { - this( - command.getName(), - command.getCommandLine(), - command.getType(), - new HashMap<>(command.getAttributes()), - context); - } - - /** Creates new {@link CommandImpl} based on the provided data. */ - public CommandImpl(String name, String commandLine, String typeId) { - this(name, commandLine, typeId, new HashMap<>()); - } - - /** Creates copy of the given {@link Command}. */ - public CommandImpl(Command command) { - this( - command.getName(), - command.getCommandLine(), - command.getType(), - new HashMap<>(command.getAttributes())); - } - - /** Creates copy of the given {@code command}. */ - public CommandImpl(CommandImpl command) { - this( - command.getName(), - command.getCommandLine(), - command.getType(), - new HashMap<>(command.getAttributes()), - new ApplicableContext(command.getApplicableContext())); - } - - /** Creates new {@link CommandImpl} based on the provided data. */ - public CommandImpl( - String name, String commandLine, String typeId, Map attributes) { - this.name = name; - this.commandLine = commandLine; - this.typeId = typeId; - this.attributes = attributes; - this.context = new ApplicableContext(); - } - - /** Creates new {@link CommandImpl} based on the provided data. */ - public CommandImpl( - String name, - String commandLine, - String typeId, - Map attributes, - ApplicableContext context) { - this.name = name; - this.commandLine = commandLine; - this.typeId = typeId; - this.attributes = attributes; - this.context = context; - } - - @Override - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String getCommandLine() { - return commandLine; - } - - public void setCommandLine(String commandLine) { - this.commandLine = commandLine; - } - - @Override - public String getType() { - return typeId; - } - - @Override - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - - /** Returns ID of the command's goal or {@code null} if none. */ - @Nullable - public String getGoal() { - return getAttributes().get(COMMAND_GOAL_ATTRIBUTE_NAME); - } - - /** Sets command's goal ID. */ - public void setGoal(String goalId) { - 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; - } - - /** - * {@inheritDoc} - * - * @see #equalsIgnoreContext(CommandImpl) - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (!(o instanceof CommandImpl)) { - return false; - } - - CommandImpl other = (CommandImpl) o; - - return Objects.equals(getName(), other.getName()) - && Objects.equals(typeId, other.typeId) - && Objects.equals(commandLine, other.commandLine) - && Objects.equals(getAttributes(), other.getAttributes()) - && Objects.equals(getApplicableContext(), other.getApplicableContext()); - } - - /** - * Compares this {@link CommandImpl} to another {@link CommandImpl}, ignoring applicable context - * considerations. - * - * @param anotherCommand the {@link CommandImpl} to compare this {@link CommandImpl} against - * @return {@code true} if the argument represents an equivalent {@link CommandImpl} ignoring - * applicable context; {@code false} otherwise - */ - public boolean equalsIgnoreContext(CommandImpl anotherCommand) { - if (this == anotherCommand) { - return true; - } - - return Objects.equals(getName(), anotherCommand.getName()) - && Objects.equals(typeId, anotherCommand.typeId) - && Objects.equals(commandLine, anotherCommand.commandLine) - && Objects.equals(getAttributes(), anotherCommand.getAttributes()); - } - - @Override - public int hashCode() { - return Objects.hash(name, typeId, commandLine, getAttributes(), getApplicableContext()); - } - - /** Defines the context in which command is applicable. */ - public static class ApplicableContext { - - private boolean workspaceApplicable; - private Set projects; - - /** Creates new {@link ApplicableContext} which is workspace applicable. */ - public ApplicableContext() { - workspaceApplicable = true; - projects = new HashSet<>(); - } - - /** Creates new {@link ApplicableContext} which is applicable to the single project only. */ - public ApplicableContext(String projectPath) { - projects = new HashSet<>(); - projects.add(projectPath); - } - - /** Creates new {@link ApplicableContext} based on the provided data. */ - public ApplicableContext(boolean workspaceApplicable, Set projects) { - this.workspaceApplicable = workspaceApplicable; - this.projects = projects; - } - - /** Creates copy of the given {@code context}. */ - public ApplicableContext(ApplicableContext context) { - this(context.isWorkspaceApplicable(), new HashSet<>(context.getApplicableProjects())); - } - - /** - * Returns {@code true} if command is applicable to the workspace and {@code false} otherwise. - */ - public boolean isWorkspaceApplicable() { - return workspaceApplicable; - } - - /** Sets whether the command should be applicable to the workspace or not. */ - public void setWorkspaceApplicable(boolean applicable) { - this.workspaceApplicable = applicable; - } - - /** Returns immutable list of the paths of the applicable projects. */ - public Set getApplicableProjects() { - return unmodifiableSet(projects); - } - - /** Adds applicable project's path. */ - public void addProject(String path) { - projects.add(path); - } - - /** Removes applicable project's path. */ - public void removeProject(String path) { - projects.remove(path); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (!(o instanceof ApplicableContext)) { - return false; - } - - ApplicableContext other = (ApplicableContext) o; - - return workspaceApplicable == other.workspaceApplicable - && Objects.equals(projects, other.projects); - } - - @Override - public int hashCode() { - return Objects.hash(workspaceApplicable, projects); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandManager.java deleted file mode 100644 index a7409da461e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandManager.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandImpl.ApplicableContext; - -/** Facade for command management. */ -public interface CommandManager { - - /** Returns all commands. */ - List getCommands(); - - /** Returns optional command by the specified name or {@link Optional#empty()} if none. */ - Optional getCommand(String name); - - /** Returns commands which are applicable to the current IDE context. */ - List getApplicableCommands(); - - /** Checks whether the given {@code command} is applicable to the current IDE context or not. */ - boolean isCommandApplicable(CommandImpl command); - - /** - * Creates new command based on the given data. Command's name and command line will be generated - * automatically. Command will be bound to the workspace. - * - * @param goalId ID of the goal to which created command should belong - * @param typeId ID of the type to which created command should belong - * @return created command - */ - Promise createCommand(String goalId, String typeId); - - /** - * Creates new command based on the given data. Command's name and command line will be generated - * automatically. - * - * @param goalId ID of the goal to which created command should belong - * @param typeId ID of the type to which created command should belong - * @param context command's {@link ApplicableContext} - * @return created command - */ - Promise createCommand(String goalId, String typeId, ApplicableContext context); - - /** - * Creates new command based on the given data. Command will be bound to the workspace. - * - * @param goalId ID of the goal to which created command should belong - * @param typeId ID of the type to which created command should belong - * @param name command's name. Note that actual name may differ from the given - * one in order to prevent duplication. If {@code null}, name will be generated automatically. - * @param commandLine actual command line. If {@code null}, command line will be generated by the - * corresponding command type. - * @param attributes command's attributes - * @return created command - */ - Promise createCommand( - String goalId, - String typeId, - @Nullable String name, - @Nullable String commandLine, - Map attributes); - - /** - * Creates new command based on the given data. - * - * @param goalId ID of the goal to which created command should belong - * @param typeId ID of the type to which created command should belong - * @param name command's name. Note that actual name may differ from the given - * one in order to prevent duplication. If {@code null}, name will be generated automatically. - * @param commandLine actual command line. If {@code null}, command line will be generated by the - * corresponding command type. - * @param attributes command's attributes - * @param context command's {@link ApplicableContext} - * @return created command - */ - Promise createCommand( - String goalId, - String typeId, - @Nullable String name, - @Nullable String commandLine, - Map attributes, - ApplicableContext context); - - /** - * Creates copy of the given {@code command}. - * - *

    Note that name of the created command may differ from the given {@code command}'s - * name in order to prevent name duplication. - */ - Promise createCommand(CommandImpl command); - - /** - * Updates the command with the specified {@code name} by replacing it with the given {@code - * command}. - * - *

    Note that name of the updated command may differ from the name provided by the given - * {@code command} in order to prevent name duplication. - */ - Promise updateCommand(String name, CommandImpl command); - - /** Removes command with the specified {@code commandName}. */ - Promise removeCommand(String commandName); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandPage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandPage.java deleted file mode 100644 index 5f79cf24327..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandPage.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Page allows to edit command. - * - * @author Artem Zatsarynnyi - * @author Valeriy Svydenko - */ -public interface CommandPage extends Presenter { - - /** - * Resets the page with the given {@code command}. - * - *

    Typically, implementors should hold the given {@code command} and edit it directly. - * - *

    This method is called every time when user selects an appropriate command in 'Commands' - * dialog but before the actual displaying of the page. - */ - void resetFrom(CommandImpl command); - - /** - * Called every time when user selects an appropriate command in 'Commands' dialog. - * - *

    Typically, should be used for initializing page. - * - *

    {@inheritDoc} - */ - @Override - void go(AcceptsOneWidget container); - - /** Called when currently edited command has been saved. */ - void onSave(); - - /** - * Whether the page has been changed or not? - * - * @return {@code true} if page is changed, and {@code false} - otherwise - */ - boolean isDirty(); - - /** Sets {@link DirtyStateListener}. */ - void setDirtyStateListener(DirtyStateListener listener); - - /** Sets {@link FieldStateActionDelegate} that should be operated all panels. */ - void setFieldStateActionDelegate(FieldStateActionDelegate delegate); - - interface FieldStateActionDelegate { - /** Sets a state of the visibility for the Preview URL panel. */ - void updatePreviewURLState(boolean isVisible); - } - - /** - * Listener that should be called every time when any modifications on the page has been - * performed. - */ - interface DirtyStateListener { - void onDirtyStateChanged(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandProducer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandProducer.java deleted file mode 100644 index 4057e5c8dd3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandProducer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -/** - * Defines the requirements for a component which can produce the commands from the current context. - * - *

    For every registered {@link CommandProducer} an appropriate action will be added in context - * menus (e.g., explorer, editor tab). - * - *

    Implementations of this interface have to be registered with a GIN multibinder in order to be - * picked-up on application's start-up. - * - * @author Artem Zatsarynnyi - */ -public interface CommandProducer { - - /** Returns the text that should be used as related action's title. */ - String getName(); - - /** - * Whether the command produced by concrete producer is applicable to the current context? - * Returned value is used for regulating visibility of an appropriate action. - */ - boolean isApplicable(); - - /** Creates a command from the current context. Called when user performs corresponded action. */ - CommandImpl createCommand(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandRemovedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandRemovedEvent.java deleted file mode 100644 index 410792eaaba..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandRemovedEvent.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event fired when command has been removed. - * - *

    Note: this event is not intended to be fired by clients. - */ -public class CommandRemovedEvent extends GwtEvent { - - /** Handler type. */ - private static Type TYPE; - - /** Removed command. */ - private final CommandImpl command; - - /** - * Creates new event. - * - *

    Note: this event is not intended to be fired by clients. - */ - public CommandRemovedEvent(CommandImpl command) { - this.command = command; - } - - /** - * Gets the type associated with this event. - * - * @return returns the handler type - */ - public static Type getType() { - return TYPE != null ? TYPE : (TYPE = new Type<>()); - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(CommandRemovedHandler handler) { - handler.onCommandRemoved(this); - } - - /** Returns removed command. */ - public CommandImpl getCommand() { - return command; - } - - /** Handler for {@link CommandRemovedEvent}. */ - public interface CommandRemovedHandler extends EventHandler { - - /** - * Called when command has been removed. - * - * @param event the event - */ - void onCommandRemoved(CommandRemovedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandType.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandType.java deleted file mode 100644 index fcdc71315fb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandType.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import java.util.List; - -/** - * Used for registering new command type and providing all the necessary information and components - * for working with the appropriate command. - * - *

    Implementations of this interface have to be registered using a multibinder in order to be - * picked-up on application's start-up. - * - * @author Artem Zatsarynnyi - */ -public interface CommandType { - - /** Returns unique identifier for this command type. */ - String getId(); - - /** Returns the display name of the command type. */ - String getDisplayName(); - - /** Returns a short description what command of concrete type can do. */ - String getDescription(); - - /** Returns the {@link CommandPage}s for editing command. */ - List getPages(); - - /** - * Returns the command line that should be used for the newly created command when user creates it - * from the 'Commands' dialog. - */ - String getCommandLineTemplate(); - - /** Returns template for preview Url. */ - String getPreviewUrlTemplate(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandTypeRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandTypeRegistry.java deleted file mode 100644 index 781eea08a18..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandTypeRegistry.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import java.util.Optional; -import java.util.Set; - -/** - * Registry for command types. - * - * @author Artem Zatsarynnyi - */ -public interface CommandTypeRegistry { - - /** - * Returns {@code Optional} {@link CommandType} with the specified ID or {@code Optional.empty()} - * if none. - * - * @param id the ID of the command type - * @return {@link CommandType} or {@code Optional.absent()} - */ - Optional getCommandTypeById(String id); - - /** Returns set of all registered {@link CommandType}s. */ - Set getCommandTypes(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandUpdatedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandUpdatedEvent.java deleted file mode 100644 index 83fa3984c55..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandUpdatedEvent.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event fired when command has been updated. - * - *

    Note: this event is not intended to be fired by clients. - */ -public class CommandUpdatedEvent extends GwtEvent { - - /** Handler type. */ - private static Type TYPE; - - /** Initial command. */ - private final CommandImpl initialCommand; - /** Updated command. */ - private final CommandImpl updatedCommand; - - /** - * Creates new event. - * - *

    Note: this event is not intended to be fired by clients. - */ - public CommandUpdatedEvent(CommandImpl initialCommand, CommandImpl updatedCommand) { - this.initialCommand = initialCommand; - this.updatedCommand = updatedCommand; - } - - /** - * Gets the type associated with this event. - * - * @return returns the handler type - */ - public static Type getType() { - return TYPE != null ? TYPE : (TYPE = new Type<>()); - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(CommandUpdatedHandler handler) { - handler.onCommandUpdated(this); - } - - /** Returns initial command. */ - public CommandImpl getInitialCommand() { - return initialCommand; - } - - /** Returns updated command. */ - public CommandImpl getUpdatedCommand() { - return updatedCommand; - } - - /** Handler for {@link CommandUpdatedEvent}. */ - public interface CommandUpdatedHandler extends EventHandler { - - /** - * Called when some command has been updated. - * - * @param event the event - */ - void onCommandUpdated(CommandUpdatedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandsLoadedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandsLoadedEvent.java deleted file mode 100644 index b9736e49eca..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/CommandsLoadedEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Event fired when all commands are loaded. */ -public class CommandsLoadedEvent extends GwtEvent { - - /** Handler type. */ - private static Type TYPE; - - /** - * Gets the type associated with this event. - * - * @return returns the handler type - */ - public static Type getType() { - return TYPE != null ? TYPE : (TYPE = new Type<>()); - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(CommandsLoadedHandler handler) { - handler.onCommandsLoaded(this); - } - - /** Handler for {@link CommandsLoadedEvent}. */ - public interface CommandsLoadedHandler extends EventHandler { - - /** - * Called when all commands are loaded. - * - * @param event the event - */ - void onCommandsLoaded(CommandsLoadedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/AbstractExecAgentEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/AbstractExecAgentEventHandler.java deleted file mode 100644 index 253791eee13..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/AbstractExecAgentEventHandler.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.function.BiConsumer; -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; - -public abstract class AbstractExecAgentEventHandler

    - implements BiConsumer { - - private final Map>> operationRegistry = new HashMap<>(); - - protected void handle(String endpointId, P params) { - int pid = params.getPid(); - String key = endpointId + '@' + pid; - - if (!operationRegistry.containsKey(key)) { - return; - } - - for (Consumer

    consumer : operationRegistry.get(key)) { - consumer.accept(params); - } - } - - public void registerConsumer(String endpointId, int pid, Consumer

    consumer) { - String key = endpointId + '@' + pid; - if (!operationRegistry.containsKey(key)) { - operationRegistry.put(key, new HashSet<>()); - } - - operationRegistry.get(key).add(consumer); - } - - public void unregisterConsumer(String endpointId, int pid, Consumer

    consumer) { - String key = endpointId + '@' + pid; - if (operationRegistry.containsKey(key)) { - operationRegistry.get(key).remove(consumer); - } - } - - public void unregisterConsumers(String endpointId, int pid) { - String key = endpointId + '@' + pid; - operationRegistry.remove(key); - } - - public void unregisterAllConsumers() { - operationRegistry.clear(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ConnectedEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ConnectedEventHandler.java deleted file mode 100644 index 6d3c70e8039..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ConnectedEventHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.function.BiConsumer; -import org.eclipse.che.agent.exec.shared.dto.event.ConnectedEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; - -/** - * Handles 'connected' event, the event is fired when we firstly connect to exec agent. - * - * @author Dmitry Kuleshov - */ -@Singleton -public class ConnectedEventHandler implements BiConsumer { - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("connected") - .paramsAsDto(ConnectedEventDto.class) - .noResult() - .withBiConsumer(this); - } - - @Override - public void accept(String endpointId, ConnectedEventDto params) {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentCommandManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentCommandManager.java deleted file mode 100644 index 34d6e999898..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentCommandManager.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import java.util.List; -import org.eclipse.che.agent.exec.shared.dto.GetProcessLogsResponseDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessResponseDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessesResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessKillResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessStartResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessUnSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.UpdateSubscriptionResponseDto; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; -import org.eclipse.che.api.core.model.workspace.config.Command; - -/** - * Manages calls to exec agent that are related to processes, subscription, etc. - * - * @author Dmitry Kuleshov - */ -public interface ExecAgentCommandManager { - /** - * Call to exec agent to start a process with specified command parameters - * - * @param endpointId endpoint identifier - * @param command command - * @return exec agent promise with appropriate dto - */ - ExecAgentConsumer startProcess(String endpointId, Command command); - - /** - * Call exec agent to kill a process with specified identifier - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @return promise with appropriate dto - */ - JsonRpcPromise killProcess(String endpointId, int pid); - - /** - * Call for a subscription to events related to a specified process after defined timestamp - * represented by a corresponding string (RFC3339Nano e.g. "2016-07-26T09:36:44.920890113+03:00"). - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param eventTypes event types (e.g. stderr, stdout) - * @param after after timestamp - * @return exec agent promise with appropriate dto - */ - ExecAgentConsumer subscribe( - String endpointId, int pid, List eventTypes, String after); - - /** - * Call for a cancellation of a subscription to events related to a specific process after defined - * timestamp represented by a corresponding string (RFC3339Nano e.g. - * "2016-07-26T09:36:44.920890113+03:00"). - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param eventTypes event types (e.g. stderr, stdout) - * @param after after timestamp - * @return promise with appropriate dto - */ - JsonRpcPromise unsubscribe( - String endpointId, int pid, List eventTypes, String after); - - /** - * Call for an update of a subscription to events related to a specific process. - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param eventTypes event types (e.g. stderr, stdout) - * @return promise with appropriate dto - */ - JsonRpcPromise updateSubscription( - String endpointId, int pid, List eventTypes); - - /** - * Call for a report on proess logs of a specific process. - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param from string represented timestamp the beginning of a time segment (RFC3339Nano e.g. - * "2016-07-26T09:36:44.920890113+03:00") - * @param till string represented timestamp the ending of a time segment (RFC3339Nano e.g. - * "2016-07-26T09:36:44.920890113+03:00") - * @param limit the limit of logs in result, the default value is 50 - * @param skip the logs to skip, default value is 0 - * @return promise with appropriate dto - */ - JsonRpcPromise> getProcessLogs( - String endpointId, int pid, String from, String till, int limit, int skip); - - /** - * Call for a process info - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @return promise with appropriate dto - */ - JsonRpcPromise getProcess(String endpointId, int pid); - - /** - * Call for a process info - * - * @param endpointId endpoint identifier - * @param all defines if include already stopped processes, true for all, processes and false for - * running processes - * @return promise with appropriate dto - */ - JsonRpcPromise> getProcesses(String endpointId, boolean all); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentConsumer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentConsumer.java deleted file mode 100644 index 6c692a9e10d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentConsumer.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; - -/** - * Exec agent promise wrapper provides means to register operation for several exec agent events - * (e.g. process started, process died, etc.). Besides that allows to register custom operation with - * DTO instances of type defined in generic parameter T similar to how it is done in classical - * javascript promises. - * - * @author Dmitry Kuleshov - */ -public class ExecAgentConsumer { - private Consumer processDiedEventDtoConsumer; - private Consumer processStartedEventDtoConsumer; - private Consumer processStdErrEventDtoConsumer; - private Consumer processStdOutEventDtoConsumer; - private Consumer consumer; - - /** - * Register an operation which will be performed when a process generates process died event. - * - * @param operation operation to be performed - * @return this instance - */ - public ExecAgentConsumer thenIfProcessDiedEvent(Consumer operation) { - processDiedEventDtoConsumer = operation; - return this; - } - - /** - * Register an operation which will be performed when a process generates process started event. - * - * @param consumer operation to be performed - * @return this instance - */ - public ExecAgentConsumer thenIfProcessStartedEvent(Consumer consumer) { - processStartedEventDtoConsumer = consumer; - return this; - } - - /** - * Register an operation which will be performed when a process generates process standard output - * event. - * - * @param consumer operation to be performed - * @return this instance - */ - public ExecAgentConsumer thenIfProcessStdOutEvent(Consumer consumer) { - processStdOutEventDtoConsumer = consumer; - return this; - } - - /** - * Register an operation which will be performed when a process generates process standard error - * event. - * - * @param consumer operation to be performed - * @return this instance - */ - public ExecAgentConsumer thenIfProcessStdErrEvent(Consumer consumer) { - processStdErrEventDtoConsumer = consumer; - return this; - } - - /** - * Register an operation which will be performed when a request is accepted and response is - * received. process died event. - * - * @param consumer operation to be performed - * @return this instance - */ - public ExecAgentConsumer then(Consumer consumer) { - this.consumer = consumer; - return this; - } - - /** - * Checks if process died event is associated with an operation - * - * @return true if there is an operation, otherwise - false - */ - public boolean hasProcessDiedEventConsumer() { - return processDiedEventDtoConsumer != null; - } - - /** - * Checks if process started event is associated with an operation - * - * @return true if there is an operation, otherwise - false - */ - public boolean hasProcessStartedEventConsumer() { - return processStartedEventDtoConsumer != null; - } - - /** - * Checks if process standard error event is associated with an operation - * - * @return true if there is an operation, otherwise - false - */ - public boolean hasProcessStdErrEventConsumer() { - return processStdErrEventDtoConsumer != null; - } - - /** - * Checks if process standard output event is associated with an operation - * - * @return true if there is an operation, otherwise - false - */ - public boolean hasProcessStdOutEventConsumer() { - return processStdOutEventDtoConsumer != null; - } - - /** - * Checks if response associated with an operation - * - * @return true if there is an operation, otherwise - false - */ - public boolean hasOperation() { - return consumer != null; - } - - public Consumer getProcessDiedEventDtoConsumer() { - return processDiedEventDtoConsumer; - } - - public Consumer getProcessStartedEventDtoConsumer() { - return processStartedEventDtoConsumer; - } - - public Consumer getProcessStdErrEventDtoConsumer() { - return processStdErrEventDtoConsumer; - } - - public Consumer getProcessStdOutEventDtoConsumer() { - return processStdOutEventDtoConsumer; - } - - public Consumer getConsumer() { - return consumer; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentEventManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentEventManager.java deleted file mode 100644 index 4526eed2ea4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ExecAgentEventManager.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; - -/** - * Manages registration of operations related to different kinds of even sent by exec agent - * - * @author Dmitry Kuleshov - */ -public interface ExecAgentEventManager { - /** - * Registers an consumer that is performed when 'process died' event is received - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param consumer consumer to be performed - */ - void registerProcessDiedConsumer( - String endpointId, int pid, Consumer consumer); - - /** - * Registers an consumer that is performed when 'process started' event is received - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param consumer consumer to be performed - */ - void registerProcessStartedConsumer( - String endpointId, int pid, Consumer consumer); - - /** - * Registers an consumer that is performed when 'process standard error' event is received - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param consumer consumer to be performed - */ - void registerProcessStdErrConsumer( - String endpointId, int pid, Consumer consumer); - - /** - * Registers an consumer that is performed when 'process standard output' event is received - * - * @param endpointId endpoint identifier - * @param pid process identifier - * @param consumer consumer to be performed - */ - void registerProcessStdOutConsumer( - String endpointId, int pid, Consumer consumer); - - /** - * Removes all registered event handler operations for the process associated with a PID - * - * @param endpointId endpoint identifier - * @param pid process identifier - */ - void cleanPidConsumer(String endpointId, int pid); - - /** Removes all registered event handler operations. */ - void cleanAllConsumers(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessDiedEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessDiedEventHandler.java deleted file mode 100644 index f7a05e91334..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessDiedEventHandler.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Handles event fired by exec agent when process died - * - * @author Dmitry Kuleshov - */ -@Singleton -public class ProcessDiedEventHandler extends AbstractExecAgentEventHandler { - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("process_died") - .paramsAsDto(ProcessDiedEventDto.class) - .noResult() - .withBiConsumer(this); - } - - @Override - public void accept(String endpointId, ProcessDiedEventDto params) { - Log.debug(getClass(), "Handling process died event. Params: " + params); - handle(endpointId, params); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessFinishedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessFinishedEvent.java deleted file mode 100644 index 061abf14325..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessFinishedEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** @author Dmitry Shnurenko */ -public class ProcessFinishedEvent extends GwtEvent { - - public interface Handler extends EventHandler { - - /** Implement this method to handle ProcessFinishedEvent. */ - void onProcessFinished(ProcessFinishedEvent event); - } - - public static final Type TYPE = new Type<>(); - - private final int processID; - private final String machineName; - - public ProcessFinishedEvent(int processID, String machineName) { - this.processID = processID; - this.machineName = machineName; - } - - public int getProcessID() { - return processID; - } - - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onProcessFinished(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEvent.java deleted file mode 100644 index 836dbb4962a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -public class ProcessStartedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final int processID; - private final String machineName; - - public ProcessStartedEvent(int processID, String machineName) { - this.processID = processID; - this.machineName = machineName; - } - - public int getProcessID() { - return processID; - } - - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onProcessStarted(this); - } - - public interface Handler extends EventHandler { - - void onProcessStarted(ProcessStartedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEventHandler.java deleted file mode 100644 index 78bb9770ec3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStartedEventHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Handles event fired by exec agent when process started - * - * @author Dmitry Kuleshov - */ -@Singleton -public class ProcessStartedEventHandler - extends AbstractExecAgentEventHandler { - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("process_started") - .paramsAsDto(ProcessStartedEventDto.class) - .noResult() - .withBiConsumer(this); - } - - @Override - public void accept(String endpointId, ProcessStartedEventDto params) { - Log.debug(getClass(), "Handling process started event. Params: " + params); - handle(endpointId, params); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdErrEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdErrEventHandler.java deleted file mode 100644 index f711dcab582..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdErrEventHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Handles event fired by exec agent when process sent text to standard error - * - * @author Dmitry Kuleshov - */ -@Singleton -public class ProcessStdErrEventHandler - extends AbstractExecAgentEventHandler { - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("process_stderr") - .paramsAsDto(ProcessStdErrEventDto.class) - .noResult() - .withBiConsumer(this); - } - - @Override - public void accept(String endpointId, ProcessStdErrEventDto params) { - Log.debug(getClass(), "Handling process error output event. Params: " + params); - handle(endpointId, params); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdOutEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdOutEventHandler.java deleted file mode 100644 index 6a44bd2dd47..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/command/exec/ProcessStdOutEventHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.command.exec; - -import com.google.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Handles event fired by exec agent when process sent text to standard event - * - * @author Dmitry Kuleshov - */ -@Singleton -public class ProcessStdOutEventHandler - extends AbstractExecAgentEventHandler { - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("process_stdout") - .paramsAsDto(ProcessStdOutEventDto.class) - .noResult() - .withBiConsumer(this); - } - - @Override - public void accept(String endpointId, ProcessStdOutEventDto params) { - Log.debug(getClass(), "Handling process standard output event. Params: " + params); - handle(endpointId, params); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Anchor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Anchor.java deleted file mode 100644 index 74cf98b97db..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Anchor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.constraints; - -/** - * Defines possible positions of an action relative to another action. - * - * @author Evgen Vidolob - * @version $Id: - */ -public enum Anchor { - /** - * Anchor type that specifies the action to be the first in the list at the moment of addition. - */ - FIRST, - /** Anchor type that specifies the action to be the last in the list at the moment of addition. */ - LAST, - /** Anchor type that specifies the action to be placed before the relative action. */ - BEFORE, - /** Anchor type that specifies the action to be placed after the relative action. */ - AFTER -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Constraints.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Constraints.java deleted file mode 100644 index 9e0e0925aec..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Constraints.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.constraints; - -/** - * Represents constraints for some action. Constraints are used to specify action's position in the - * default group, see {@link org.eclipse.che.ide.api.action.DefaultActionGroup}. - * - * @author Evgen Vidolob - */ -public class Constraints { - public static final Constraints FIRST = new Constraints(Anchor.FIRST, null); - public static final Constraints LAST = new Constraints(Anchor.LAST, null); - /** Anchor. */ - public Anchor myAnchor; - - public Direction direction; - - /** - * Id of the action to be positioned relative to. Used when anchor type is either {@link - * Anchor#AFTER} or {@link Anchor#BEFORE}. - */ - public String relativeId; - - /** - * Creates a new constraints instance with the specified anchor type and id of the relative - * action. - * - * @param anchor anchor - * @param relativeId Id of the relative - */ - public Constraints(Anchor anchor, String relativeId) { - myAnchor = anchor; - this.relativeId = relativeId; - } - - /** - * Creates a new constraints instance with the specified direction type and id of the relative - * item. - * - * @param direction direction - * @param relativeId Id of the relative - */ - public Constraints(Direction direction, String relativeId) { - this.direction = direction; - this.relativeId = relativeId; - } - - public Constraints clone() { - if (myAnchor != null) { - return new Constraints(myAnchor, relativeId); - } else if (direction != null) { - return new Constraints(direction, relativeId); - } - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Direction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Direction.java deleted file mode 100644 index 2ea80e56891..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/constraints/Direction.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.constraints; - -/** - * Defines possible directions of an item relative to another item. - * - * @author Roman Nikitenko - */ -public enum Direction { - - /** Direction type that specifies the item to be the horizontally at the moment of addition. */ - HORIZONTALLY, - - /** Direction type that specifies the item to be the vertically at the moment of addition. */ - VERTICALLY -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManager.java deleted file mode 100644 index e2f424418f5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManager.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import java.util.List; -import org.eclipse.che.api.debug.shared.model.Breakpoint; - -/** - * Breakpoint manager. - * - * @author Anatoliy Bazko - */ -public interface BreakpointManager extends BreakpointManagerObservable { - - /** Toggle / untoggle breakpoint. */ - void changeBreakpointState(int lineNumber); - - /** Indicates if breakpoint is active. */ - boolean isActive(Breakpoint breakpoint); - - /** @return all breakpoints */ - List getAll(); - - /** Removes all breakpoints. */ - void deleteAll(); - - /** Updates the given breakpoint. */ - void update(Breakpoint breakpoint); - - /** Deletes the given breakpoint. */ - void delete(Breakpoint breakpoint); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObservable.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObservable.java deleted file mode 100644 index 9601cee3b82..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObservable.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -/** @author Anatoliy Bazko */ -public interface BreakpointManagerObservable { - - /** Adds observer. */ - void addObserver(BreakpointManagerObserver observer); - - /** Removes observer. */ - void removeObserver(BreakpointManagerObserver observer); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObserver.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObserver.java deleted file mode 100644 index 4eb89997c20..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointManagerObserver.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import org.eclipse.che.api.debug.shared.model.Breakpoint; - -/** @author Anatoliy Bazko */ -public interface BreakpointManagerObserver { - - /** Event happens when breakpoint added. */ - void onBreakpointAdded(Breakpoint breakpoint); - - /** Event happens when breakpoint updated. */ - void onBreakpointUpdated(Breakpoint breakpoint); - - /** Event happens when breakpoint deleted. */ - void onBreakpointDeleted(Breakpoint breakpoint); - - /** Event happens when all breakpoint deleted. */ - void onAllBreakpointsDeleted(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRenderer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRenderer.java deleted file mode 100644 index 220141ea4b8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRenderer.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** Component that handles breakpoints display. */ -public interface BreakpointRenderer { - - /** - * Adds inactive breakpoint mark in the given line. - * - * @param lineNumber the line where the breakpoint is set - */ - void addBreakpointMark(int lineNumber); - - /** - * Adds inactive breakpoint mark in the given line. - * - * @param lineNumber the line where the breakpoint is set - * @param action to line numbering changes - */ - void addBreakpointMark(int lineNumber, LineChangeAction action); - - /** - * Adds a breakpoint mark of the given breakpoint. If the mark exists then it will be changed - * depending on {@code active} state and {@link Breakpoint#getBreakpointConfiguration()}. - * - * @param breakpoint the given breakpoint - * @param active indicates if breakpoint is active or isn't - * @param action to line numbering changes - */ - default void setBreakpointMark(Breakpoint breakpoint, boolean active, LineChangeAction action) {} - - /** - * Removes the breakpoint mark in the gutter on the given line. Does nothing if there is no - * breakpoint on this line. - * - * @param lineNumber the line where the breakpoint is set - */ - void removeBreakpointMark(int lineNumber); - - /** Removes all breakpoint marks. */ - void clearBreakpointMarks(); - - /** - * Adds {@code active} breakpoint mark in the given line. - * - * @param lineNumber the line where the breakpoint is set - */ - void setBreakpointActive(int lineNumber, boolean active); - - /** - * Changes appearance of the line to active/inactive. - * - * @param lineNumber the line - */ - void setLineActive(int lineNumber, boolean active); - - /** - * Tells if the renderer is ready for use. - * - * @return true iff the renderer is ready - */ - boolean isReady(); - - /** Reaction on line numbering changes. */ - interface LineChangeAction { - /** Action taken on change. */ - void onLineChange(VirtualFile file, int firstLine, int linesAdded, int linesRemoved); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRendererFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRendererFactory.java deleted file mode 100644 index 01d26662a5e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointRendererFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.gutter.Gutter; -import org.eclipse.che.ide.api.editor.texteditor.LineStyler; - -/** Factory for {@link BreakpointRenderer} instances. */ -public interface BreakpointRendererFactory { - - /** - * Creates an instance of {@link BreakpointRenderer} that uses both a gutter and a line styler. - * - * @param hasGutter the gutter manager - * @param lineStyler the line style manager - * @param document the document - * @return a {@link BreakpointRenderer} - */ - BreakpointRenderer create( - final Gutter hasGutter, final LineStyler lineStyler, final Document document); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointStorage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointStorage.java deleted file mode 100644 index c49b37b3e08..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/BreakpointStorage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import java.util.List; -import java.util.Optional; -import org.eclipse.che.api.debug.shared.model.Breakpoint; - -/** - * Preserves and loads breakpoints for the active workspace. - * - * @author Anatolii Bazko - */ -public interface BreakpointStorage { - - /** - * Preserves breakpoints into a storage. - * - * @param breakpoints the list of the breakpoints - */ - void addAll(List breakpoints); - - /** - * Preserve a single breakpoints into a storage. - * - * @param breakpoint the breakpoint - */ - void add(Breakpoint breakpoint); - - /** - * Removes breakpoints out of the storage. - * - * @param breakpoint the breakpoint - */ - void delete(Breakpoint breakpoint); - - /** - * Removes breakpoints out of the storage. - * - * @param breakpoints the list of the breakpoints - */ - void deleteAll(List breakpoints); - - /** - * Updates breakpoint. - * - * @param breakpoint - */ - void update(Breakpoint breakpoint); - - /** Clears storage. */ - void clear(); - - /** Gets all breakpoints that are set for given file. */ - List getByPath(String filePath); - - /** Returns breakpoints that is set for given file and at a given line number. */ - Optional get(String filePath, int lineNumber); - - /** - * Loads all breakpoints out of the storage. - * - * @return the list of the breakpoints - */ - List getAll(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfiguration.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfiguration.java deleted file mode 100644 index 77fd5b2ab07..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfiguration.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import java.util.Map; -import java.util.Objects; - -/** - * Represents debug configuration. - * - * @author Artem Zatsarynnyi - */ -public class DebugConfiguration { - - private final DebugConfigurationType type; - private String name; - private String host; - private int port; - private Map connectionProperties; - - /** - * Creates new debug configuration. - * - * @param type type of the configuration - * @param name configuration's name - * @param host debugger host - * @param port debugger port - * @param connectionProperties additional properties for connecting to the debugger - */ - public DebugConfiguration( - DebugConfigurationType type, - String name, - String host, - int port, - Map connectionProperties) { - this.type = type; - this.name = name; - this.host = host; - this.port = port; - this.connectionProperties = connectionProperties; - } - - /** Returns configuration's type. */ - public DebugConfigurationType getType() { - return type; - } - - /** Returns configuration's name. */ - public String getName() { - return name; - } - - /** Sets new name for this configuration. */ - public void setName(String name) { - this.name = name; - } - - /** Returns debugger host. */ - public String getHost() { - return host; - } - - /** Sets host for this configuration. */ - public void setHost(String host) { - this.host = host; - } - - /** Returns debugger port. */ - public int getPort() { - return port; - } - - /** Sets port for this configuration. */ - public void setPort(int port) { - this.port = port; - } - - /** Returns additional connection properties. */ - public Map getConnectionProperties() { - return connectionProperties; - } - - /** Sets additional connection properties. */ - public void setConnectionProperties(Map connectionProperties) { - this.connectionProperties = connectionProperties; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (!(o instanceof DebugConfiguration)) { - return false; - } - - DebugConfiguration other = (DebugConfiguration) o; - - return Objects.equals(getType().getId(), other.getType().getId()) - && Objects.equals(getName(), other.getName()) - && Objects.equals(getHost(), other.getHost()) - && Objects.equals(getPort(), other.getPort()) - && Objects.equals(getConnectionProperties(), other.getConnectionProperties()); - } - - @Override - public int hashCode() { - return Objects.hash( - getName(), getType().getId(), getHost(), getPort(), getConnectionProperties()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationPage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationPage.java deleted file mode 100644 index 1508a89ab8f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationPage.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Page allows to edit debug configuration. - * - * @param type of the debug configuration which this page should edit - * @author Artem Zatsarynnyi - */ -public interface DebugConfigurationPage extends Presenter { - - /** - * Resets the page from the given {@code configuration} which this page should edit. - * - *

    This method is called every time when user selects an appropriate debug configuration in - * 'Debug Configurations' dialog and before actual displaying this page. - */ - void resetFrom(@NotNull T configuration); - - /** - * This method is called every time when user selects an appropriate debug configuration in 'Debug - * Configurations' dialog. - * - *

    {@inheritDoc} - */ - @Override - void go(final AcceptsOneWidget container); - - /** - * Returns whether this page is changed or not. - * - * @return {@code true} if page is changed, and {@code false} - otherwise - */ - boolean isDirty(); - - /** - * Sets {@link DirtyStateListener} that should be called every time when any modifications on the - * page has been performed. - */ - void setDirtyStateListener(DirtyStateListener listener); - - /** Listener that should be called when any modifications on page. */ - interface DirtyStateListener { - void onDirtyStateChanged(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationType.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationType.java deleted file mode 100644 index 816c272e25d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationType.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -/** - * The type of a debug configuration. - * - * @author Artem Zatsarynnyi - */ -public interface DebugConfigurationType { - - /** Returns unique identifier for this debug configuration type. */ - String getId(); - - /** Returns the display name of this debug configuration type. */ - String getDisplayName(); - - /** - * Returns the {@link DebugConfigurationPage} that allows to edit debug configuration of this - * type. - */ - DebugConfigurationPage getConfigurationPage(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationsManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationsManager.java deleted file mode 100644 index f65271fea2b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebugConfigurationsManager.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import com.google.common.base.Optional; -import java.util.List; -import java.util.Map; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Facade for debug configuration related operations. - * - *

    Also holds the current debug configuration. Current means the configuration which should be - * used for connecting to the debugger. - * - * @author Artem Zatsarynnyi - */ -public interface DebugConfigurationsManager { - - /** Returns current debug configuration. */ - Optional getCurrentDebugConfiguration(); - - /** Set current debug configuration. */ - void setCurrentDebugConfiguration(@Nullable DebugConfiguration debugConfiguration); - - /** Returns all debug configurations. */ - List getConfigurations(); - - /** - * Creates new configuration with the given parameters. - * - * @return created {@link DebugConfiguration} - */ - DebugConfiguration createConfiguration( - String typeId, String name, String host, int port, Map connectionProperties); - - /** Remove the given debug configuration. */ - void removeConfiguration(DebugConfiguration configuration); - - /** Add listener to be notified when some debug configuration has been changed. */ - void addConfigurationsChangedListener(ConfigurationChangedListener listener); - - /** Remove the given listener. */ - void removeConfigurationsChangedListener(ConfigurationChangedListener listener); - - /** - * Apply configuration. Establish connection with configured debugger. - * - * @param debugConfiguration the debug configuration to use - */ - void apply(DebugConfiguration debugConfiguration); - - /** Listener that will be called when debug configuration has been changed. */ - interface ConfigurationChangedListener { - void onConfigurationAdded(DebugConfiguration configuration); - - void onConfigurationRemoved(DebugConfiguration configuration); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java deleted file mode 100644 index e409e1d732a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import java.util.List; -import java.util.Map; -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.LocationDto; -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.ThreadStateDto; -import org.eclipse.che.api.debug.shared.dto.VariableDto; -import org.eclipse.che.api.debug.shared.dto.action.ResumeActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StartActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepIntoActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepOverActionDto; -import org.eclipse.che.api.debug.shared.dto.action.SuspendActionDto; -import org.eclipse.che.api.debug.shared.model.ThreadState; -import org.eclipse.che.api.promises.client.Promise; - -/** - * Client for the service to debug application. - * - * @author Vitaly Parfonov - * @author Anatoliy Bazko - */ -public interface DebuggerServiceClient { - - /** - * Establishes connection with debug server. - * - * @param debuggerType the debugger server type, for instance: gdb, jdb etc - * @param connectionProperties the connection properties - */ - Promise connect(String debuggerType, Map connectionProperties); - - /** - * Disconnects from debugger server. - * - * @param id debug session id - */ - Promise disconnect(String id); - - /** - * Suspends the application is being debugged. - * - * @param id debug session id - * @param action the suspend action parameters - */ - Promise suspend(String id, SuspendActionDto action); - - /** - * Gets debug session info. - * - * @param id debug session id - */ - Promise getSessionInfo(String id); - - /** - * Starts debug session when connection is established. Some debug server might not required this - * step. - * - * @param id debug session id - * @param action the start action parameters - */ - Promise start(String id, StartActionDto action); - - /** - * Adds breakpoint. - * - * @param id debug session id - * @param breakpointDto the breakpoint to add - */ - Promise addBreakpoint(String id, BreakpointDto breakpointDto); - - /** - * Deletes breakpoint. - * - * @param id debug session id - * @param locationDto the location of the breakpoint to delete - */ - Promise deleteBreakpoint(String id, LocationDto locationDto); - - /** - * Deletes all breakpoints. - * - * @param id debug session id - */ - Promise deleteAllBreakpoints(String id); - - /** - * Returns all breakpoints. - * - * @param id debug session id - */ - Promise> getAllBreakpoints(String id); - - /** - * Gets the stack frame dump. - * - * @param id debug session id - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getStackFrameDump(String id, long threadId, int frameIndex); - - /** - * Gets thread dump. - * - * @param id debug session id - */ - Promise> getThreadDump(String id); - - /** - * Resumes application. - * - * @param id debug session id - */ - Promise resume(String id, ResumeActionDto action); - - /** - * Returns a value of the variable inside the specific frame. - * - * @param id debug session id - * @param variableDto the variable to get value from - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getValue( - String id, VariableDto variableDto, long threadId, int frameIndex); - - /** - * Sets the new value of the variable inside the specific frame. - * - * @param id debug session id - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise setValue(String id, VariableDto variableDto, long threadId, int frameIndex); - - /** - * Does step into. - * - * @param id debug session id - * @param action the step into action parameters - */ - Promise stepInto(String id, StepIntoActionDto action); - - /** - * Does step over. - * - * @param id debug session id - * @param action the step over action parameters - */ - Promise stepOver(String id, StepOverActionDto action); - - /** - * Does step out. - * - * @param id debug session id - * @param action the step out action parameters - */ - Promise stepOut(String id, StepOutActionDto action); - - /** - * Evaluate the expression inside specific frame. - * - * @param id debug session id - * @param expression the expression to evaluate - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise evaluate(String id, String expression, long threadId, int frameIndex); - - /** - * Gets a location of the resources for the given frame. - * - * @param id debug session id - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getStackFrameLocation(String id, long threadId, int frameIndex); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClientImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClientImpl.java deleted file mode 100644 index 2743be47743..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClientImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import static org.eclipse.che.ide.MimeType.APPLICATION_JSON; -import static org.eclipse.che.ide.rest.HTTPHeader.CONTENT_TYPE; - -import com.google.gwt.http.client.URL; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import java.util.Map; -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.LocationDto; -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.ThreadStateDto; -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.dto.action.ResumeActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StartActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepIntoActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto; -import org.eclipse.che.api.debug.shared.dto.action.StepOverActionDto; -import org.eclipse.che.api.debug.shared.dto.action.SuspendActionDto; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.json.JsonHelper; -import org.eclipse.che.ide.rest.AsyncRequestFactory; -import org.eclipse.che.ide.rest.DtoUnmarshallerFactory; -import org.eclipse.che.ide.rest.StringUnmarshaller; -import org.eclipse.che.ide.ui.loaders.request.LoaderFactory; - -/** - * The implementation of {@link DebuggerServiceClient}. - * - * @author Anatoliy Bazko - */ -@Singleton -public class DebuggerServiceClientImpl implements DebuggerServiceClient { - private final LoaderFactory loaderFactory; - private final AsyncRequestFactory asyncRequestFactory; - private final DtoUnmarshallerFactory dtoUnmarshallerFactory; - private final AppContext appContext; - - @Inject - protected DebuggerServiceClientImpl( - AppContext appContext, - LoaderFactory loaderFactory, - AsyncRequestFactory asyncRequestFactory, - DtoUnmarshallerFactory dtoUnmarshallerFactory) { - this.loaderFactory = loaderFactory; - this.asyncRequestFactory = asyncRequestFactory; - this.dtoUnmarshallerFactory = dtoUnmarshallerFactory; - this.appContext = appContext; - } - - @Override - public Promise connect( - String debuggerType, Map connectionProperties) { - final String requestUrl = getBaseUrl(null) + "?type=" + debuggerType; - return asyncRequestFactory - .createPostRequest(requestUrl, null) - .header(CONTENT_TYPE, APPLICATION_JSON) - .data(JsonHelper.toJson(connectionProperties)) - .send(dtoUnmarshallerFactory.newUnmarshaller(DebugSessionDto.class)); - } - - @Override - public Promise disconnect(String id) { - final String requestUrl = getBaseUrl(id); - return asyncRequestFactory - .createDeleteRequest(requestUrl) - .loader(loaderFactory.newLoader()) - .send(); - } - - @Override - public Promise suspend(String id, SuspendActionDto action) { - return performAction(id, action); - } - - @Override - public Promise getSessionInfo(String id) { - final String requestUrl = getBaseUrl(id); - return asyncRequestFactory - .createGetRequest(requestUrl) - .send(dtoUnmarshallerFactory.newUnmarshaller(DebugSessionDto.class)); - } - - @Override - public Promise start(String id, StartActionDto action) { - return performAction(id, action); - } - - @Override - public Promise addBreakpoint(String id, BreakpointDto breakpointDto) { - final String requestUrl = getBaseUrl(id) + "/breakpoint"; - return asyncRequestFactory.createPostRequest(requestUrl, breakpointDto).send(); - } - - @Override - public Promise> getAllBreakpoints(String id) { - final String requestUrl = getBaseUrl(id) + "/breakpoint"; - return asyncRequestFactory - .createGetRequest(requestUrl) - .send(dtoUnmarshallerFactory.newListUnmarshaller(BreakpointDto.class)); - } - - @Override - public Promise deleteBreakpoint(String id, LocationDto locationDto) { - final String requestUrl = getBaseUrl(id) + "/breakpoint"; - final String params = - "?target=" - + locationDto.getTarget() - + "&line=" - + locationDto.getLineNumber() - + "&project=" - + locationDto.getResourceProjectPath(); - return asyncRequestFactory.createDeleteRequest(requestUrl + params).send(); - } - - @Override - public Promise deleteAllBreakpoints(String id) { - final String requestUrl = getBaseUrl(id) + "/breakpoint"; - return asyncRequestFactory.createDeleteRequest(requestUrl).send(); - } - - @Override - public Promise getStackFrameDump(String id, long threadId, int frameIndex) { - final String requestUrl = - getBaseUrl(id) + "/stackframedump?thread=" + threadId + "&frame=" + frameIndex; - return asyncRequestFactory - .createGetRequest(requestUrl) - .send(dtoUnmarshallerFactory.newUnmarshaller(StackFrameDumpDto.class)); - } - - @Override - public Promise> getThreadDump(String id) { - final String requestUrl = getBaseUrl(id) + "/threaddump"; - return asyncRequestFactory - .createGetRequest(requestUrl) - .send(dtoUnmarshallerFactory.newListUnmarshaller(ThreadStateDto.class)); - } - - @Override - public Promise resume(String id, ResumeActionDto action) { - return performAction(id, action); - } - - @Override - public Promise getValue( - String id, VariableDto variableDto, long threadId, int frameIndex) { - final String requestUrl = getBaseUrl(id) + "/value?thread=" + threadId + "&frame=" + frameIndex; - List path = variableDto.getVariablePath().getPath(); - - StringBuilder params = new StringBuilder(); - for (int i = 0; i < path.size(); i++) { - - params.append("&path"); - params.append(i); - params.append("="); - params.append(path.get(i)); - } - - return asyncRequestFactory - .createGetRequest(requestUrl + params) - .send(dtoUnmarshallerFactory.newUnmarshaller(SimpleValueDto.class)); - } - - @Override - public Promise setValue(String id, VariableDto variableDto, long threadId, int frameIndex) { - final String requestUrl = getBaseUrl(id) + "/value?thread=" + threadId + "&frame=" + frameIndex; - return asyncRequestFactory.createPutRequest(requestUrl, variableDto).send(); - } - - @Override - public Promise stepInto(String id, StepIntoActionDto action) { - return performAction(id, action); - } - - @Override - public Promise stepOver(String id, StepOverActionDto action) { - return performAction(id, action); - } - - @Override - public Promise stepOut(String id, StepOutActionDto action) { - return performAction(id, action); - } - - @Override - public Promise evaluate(String id, String expression, long threadId, int frameIndex) { - String requestUrl = getBaseUrl(id) + "/evaluation?thread=" + threadId + "&frame=" + frameIndex; - String params = "&expression=" + URL.encodeQueryString(expression); - return asyncRequestFactory - .createGetRequest(requestUrl + params) - .loader(loaderFactory.newLoader()) - .send(new StringUnmarshaller()); - } - - @Override - public Promise getStackFrameLocation(String id, long threadId, int frameIndex) { - String requestUrl = getBaseUrl(id) + "/location?thread=" + threadId + "&frame=" + frameIndex; - return asyncRequestFactory - .createGetRequest(requestUrl) - .loader(loaderFactory.newLoader()) - .send(dtoUnmarshallerFactory.newUnmarshaller(LocationDto.class)); - } - - private String getBaseUrl(String id) { - final String url = appContext.getWsAgentServerApiEndpoint() + "/debugger"; - if (id != null) { - return url + "/" + id; - } - return url; - } - - protected Promise performAction(String id, ActionDto actionDto) { - final String requestUrl = getBaseUrl(id); - return asyncRequestFactory.createPostRequest(requestUrl, actionDto).send(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasBreakpointRenderer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasBreakpointRenderer.java deleted file mode 100644 index 7476f5c771a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasBreakpointRenderer.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -public interface HasBreakpointRenderer { - - BreakpointRenderer getBreakpointRenderer(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasLocation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasLocation.java deleted file mode 100644 index a34083c411a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/HasLocation.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.debug; - -import org.eclipse.che.api.debug.shared.model.Location; - -/** - * Marker to indicate that given implementation can deal with debug {@link Location}. - * - * @author Anatolii Bazko - */ -public interface HasLocation { - Location toLocation(int lineNumber); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AbstractEditorPresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AbstractEditorPresenter.java deleted file mode 100644 index cd38a71261f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AbstractEditorPresenter.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.IsWidget; -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorAgent.OpenEditorCallback; -import org.eclipse.che.ide.api.parts.AbstractPartPresenter; - -/** - * Abstract implementation of {@link EditorPartPresenter} that is intended to be used by subclassing - * instead of directly implementing an interface. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public abstract class AbstractEditorPresenter extends AbstractPartPresenter - implements EditorPartPresenter { - protected boolean dirtyState; - protected EditorInput input; - protected final List closeHandlers = new ArrayList<>(); - - /** {@inheritDoc} */ - @Override - public void init(@NotNull EditorInput input, final OpenEditorCallback callback) { - this.input = input; - initializeEditor(callback); - } - - /** Initializes this editor. */ - protected abstract void initializeEditor(final OpenEditorCallback callback); - - /** - * Set dirty state and notify expressions - * - * @param dirty - */ - protected void updateDirtyState(boolean dirty) { - dirtyState = dirty; - firePropertyChange(EditorPartPresenter.TITLE_PROPERTY); - firePropertyChange(PROP_DIRTY); - } - - /** {@inheritDoc} */ - @Override - public IsWidget getView() { - throw new UnsupportedOperationException( - "This method isn't supported in this class " + getClass()); - } - - /** {@inheritDoc} */ - @Override - public boolean isDirty() { - return dirtyState; - } - - /** {@inheritDoc} */ - @Override - public void addCloseHandler(@NotNull EditorPartCloseHandler closeHandler) { - if (!closeHandlers.contains(closeHandler)) { - closeHandlers.add(closeHandler); - } - } - - /** {@inheritDoc} */ - @Override - public EditorInput getEditorInput() { - return input; - } - - protected void handleClose() { - for (EditorPartCloseHandler handler : closeHandlers) { - handler.onClose(this); - } - } - - /** {@inheritDoc} */ - @Override - public void onFileChanged() { - firePropertyChange(TITLE_PROPERTY); - } - - @Override - public void onClosing(AsyncCallback callback) { - callback.onSuccess(null); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AsyncEditorProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AsyncEditorProvider.java deleted file mode 100644 index 238fbe39c1e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/AsyncEditorProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Extension interface for {@link EditorProvider} Add ability to create editor asynchronously. - * {@link EditorAgent} should use this interface to crate editor instance - * - * @author Evgen Vidolob - */ -public interface AsyncEditorProvider { - - /** - * Create promise for creating new editor instance. - * - * @param file the file for which editor should crated - * @return promise - */ - Promise createEditor(VirtualFile file); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/DeletedFilesController.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/DeletedFilesController.java deleted file mode 100644 index 11032c921f3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/DeletedFilesController.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.inject.Singleton; -import java.util.HashSet; -import java.util.Set; - -/** - * Contains the list of paths that correspond to opened files and should not trigger events - * notifications from file system because they are initiated by ourselves (e.g. refactoring, git - * checkout etc.) - * - * @author Valeriy Svydenko - */ -@Singleton -public class DeletedFilesController { - private Set deletedFiles = new HashSet<>(); - - /** - * Adds the path to the file which need to skip. - * - * @param path path to the file - */ - public void add(String path) { - deletedFiles.add(path); - } - - /** - * Removes the path to the file which need to skip. - * - * @param path path to the file - * @return {@code true} if set contains the specified path - */ - public boolean remove(String path) { - return deletedFiles.remove(path); - } - - /** Returns {@code true} if this set contains the specified path. */ - public boolean contains(String path) { - return deletedFiles.contains(path); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorAgent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorAgent.java deleted file mode 100644 index 608077df7bd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorAgent.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.constraints.Direction; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.resource.Path; - -/** - * Editor Agent manages Editors, it allows to open a new editor with given file, retrieve current - * active editor and find all the opened editors. - * - * @author Nikolay Zamosenchuk - */ -public interface EditorAgent { - /** - * Open editor with given file - * - * @param file the file to open - */ - void openEditor(@NotNull final VirtualFile file); - - /** - * Open editor with given file and constraints. Constraints contain info about way how view of - * editor should be displayed. Editor will be opened in the current {@link EditorPartStack} if - * {@code constraints} is {@code null}, otherwise view of relative Editor Part will be split - * corresponding to {@code constraints} on two areas and editor will be added into created area. - * In the latter case you need to specify {@link Direction} and ID of relative {@link EditorTab}. - * - * @param file the file to open - * @param constraints contains info about way how view of the editor should be opened - */ - void openEditor(@NotNull final VirtualFile file, Constraints constraints); - - /** - * Close editor part - * - * @param editorPart the part to close - */ - void closeEditor(EditorPartPresenter editorPart); - - /** - * Open editor with given file, call callback when editor fully loaded and initialized. - * - * @param file the file to open - * @param callback - */ - void openEditor(@NotNull VirtualFile file, @NotNull OpenEditorCallback callback); - - /** - * Sets editor as active(switch tabs and pace cursor) - * - * @param editor the editor that must be active - */ - void activateEditor(@NotNull EditorPartPresenter editor); - - /** - * Returns array of EditorPartPresenters whose content have changed since the last save operation. - * - * @return Array - */ - List getDirtyEditors(); - - /** - * Get all opened editors - * - * @return list with all opened editors - */ - @NotNull - List getOpenedEditors(); - - /** - * Get all opened editors for given {@link EditorPartStack} - * - * @param editorPartStack editor part stack for searching opened editors - * @return list with all opened editors for {@code editorPartStack} - */ - @NotNull - List getOpenedEditorsFor(EditorPartStack editorPartStack); - - /** - * Get opened editor by related file path for current {@link EditorPartStack} - * - * @param path path of the file opened in editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getOpenedEditor(Path path); - - /** - * Saves all opened files whose content have changed since the last save operation - * - * @param callback - */ - void saveAll(AsyncCallback callback); - - /** - * Current active editor - * - * @return the current active editor - */ - @Nullable - EditorPartPresenter getActiveEditor(); - - /** - * Get next opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate next opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getNextFor(EditorPartPresenter editorPart); - - /** - * Get previous opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate previous opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart); - - interface OpenEditorCallback { - void onEditorOpened(EditorPartPresenter editor); - - void onEditorActivated(EditorPartPresenter editor); - - void onInitializationFailed(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInitException.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInitException.java deleted file mode 100644 index 3cdee433b96..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInitException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -/** - * A checked exception indicating a editor cannot be initialized correctly. The message text - * provides a further description of the problem. - * - * @author Evgen Vidolob - * @version $Id: - */ -public class EditorInitException extends Exception { - - /** */ - private static final long serialVersionUID = 1L; - - /** - * @param message - * @param cause - */ - public EditorInitException(String message, Throwable cause) { - super(message, cause); - } - - /** @param message */ - public EditorInitException(String message) { - super(message); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInput.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInput.java deleted file mode 100644 index 08b085dfea9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorInput.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * EditorInput is a light weight descriptor of editor input, like a file name but more - * abstract. It is not a model. It is a description of the model source for an Editor. - * - *

    An editor input is passed to an editor via the EditorPartPresenter.init method. - * - * @author Evgen Vidolob - */ -public interface EditorInput { - - /** - * Returns the image descriptor for this input. - * - * @return the SVG image resource for this input. - */ - @NotNull - SVGResource getSVGResource(); - - /** - * Returns the name of this editor input for display purposes. - * - *

    For instance, when the input is from a file, the return value would ordinarily be just the - * file name. - * - * @return the name string; never null; - */ - @NotNull - String getName(); - - /** - * Returns the tool tip text for this editor input. This text is used to differentiate between two - * input with the same name. For instance, MyClass.java in folder X and MyClass.java in folder Y. - * The format of the text varies between input types. - * - * @return the tool tip text; never null. - */ - @NotNull - String getToolTipText(); - - /** - * Return the file of this input - * - * @return the File; never null - */ - @NotNull - VirtualFile getFile(); - - /** - * Sets file of this input. - * - * @param file - */ - void setFile(@NotNull VirtualFile file); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorLocalizationConstants.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorLocalizationConstants.java deleted file mode 100644 index 25453b39916..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorLocalizationConstants.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n Constants for the Editor module. - * - * @author "Mickaël Leduque" - */ -public interface EditorLocalizationConstants extends Messages { - - @DefaultMessage("Close") - String askWindowCloseTitle(); - - @DefaultMessage("{0} has been modified. Save changes?") - String askWindowSaveChangesMessage(String name); - - @DefaultMessage( - "An error occurred while initializing the editor.\nReloading the page may be necessary.") - String editorInitErrorMessage(); - - @DefaultMessage("An error occurred while loading the file.") - String editorFileErrorMessage(); - - @DefaultMessage("Finishing editor initialization") - String waitEditorInitMessage(); - - @DefaultMessage("Failed to update content of file(s)") - String failedToUpdateContentOfFiles(); - - @DefaultMessage("Tabs") - String tabsPropertiesSection(); - - @DefaultMessage("Edit") - String tabsEditSection(); - - @DefaultMessage("Typing") - String typingPropertiesSection(); - - @DefaultMessage("White spaces") - String whiteSpacesPropertiesSection(); - - @DefaultMessage("Rulers") - String rulersPropertiesSection(); - - @DefaultMessage("Language tools") - String languageToolsPropertiesSection(); - - @DefaultMessage("Expand Tab") - String propertyExpandTab(); - - @DefaultMessage("Tab Size") - String propertyTabSize(); - - @DefaultMessage("Soft Wrap") - String propertySoftWrap(); - - @DefaultMessage("Enable Autosave") - String propertyAutoSave(); - - @DefaultMessage("Autopair (Parentheses)") - String propertyAutoPairParentheses(); - - @DefaultMessage("Autopair Braces") - String propertyAutoPairBraces(); - - @DefaultMessage("Autopair [Square] Brackets") - String propertyAutoPairSquareBrackets(); - - @DefaultMessage("Autopair Brackets") - String propertyAutoPairAngelBrackets(); - - @DefaultMessage("Autopair \"Quotations\"") - String propertyAutoPairQuotations(); - - @DefaultMessage("Autocomplete /** Block Comments */") - String propertyAutoCompleteComments(); - - @DefaultMessage("Smart Indentation") - String propertySmartIndentation(); - - @DefaultMessage("Show Whitespace Characters") - String propertyShowWhitespaces(); - - @DefaultMessage("Show Annotation Ruler") - String propertyShowAnnotationRuler(); - - @DefaultMessage("Show Line Number Ruler") - String propertyShowLineNumberRuler(); - - @DefaultMessage("Show Folding Ruler") - String propertyShowFoldingRuler(); - - @DefaultMessage("Show Overview Ruler") - String propertyShowOverviewRuler(); - - @DefaultMessage("Show Zoom Ruler") - String propertyShowZoomRuler(); - - @DefaultMessage("Show Occurrences") - String propertyShowOccurrences(); - - @DefaultMessage("Show Content Assist automatically") - String propertyShowContentAssistAutomatically(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEvent.java deleted file mode 100755 index 926e17cf535..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Event that describes the fact that editor is opened. - * - * @author Anatoliy Bazko - */ -public class EditorOpenedEvent extends GwtEvent { - - public static Type TYPE = new Type<>(); - - private final VirtualFile file; - private final EditorPartPresenter editor; - - /** - * Creates new {@link EditorOpenedEvent}. - * - * @param file an affected file - * @param editor a visual component - */ - public EditorOpenedEvent(VirtualFile file, EditorPartPresenter editor) { - this.file = file; - this.editor = editor; - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** @return an affected file */ - public VirtualFile getFile() { - return file; - } - - /** @return a visual component */ - public EditorPartPresenter getEditor() { - return editor; - } - - @Override - protected void dispatch(EditorOpenedEventHandler handler) { - handler.onEditorOpened(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEventHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEventHandler.java deleted file mode 100755 index 947f2f955b9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorOpenedEventHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handles {@link EditorOpenedEvent}. - * - * @author Anatoliy Bazko - */ -public interface EditorOpenedEventHandler extends EventHandler { - - /** - * On editor opened. - * - * @param event the event - */ - void onEditorOpened(EditorOpenedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorPartPresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorPartPresenter.java deleted file mode 100644 index 7f86327f2da..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorPartPresenter.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorAgent.OpenEditorCallback; -import org.eclipse.che.ide.api.parts.PartPresenter; - -/** - * An editor is a visual component. It is typically used to edit or browse a document or input - * object. The input is identified using an EditorInput. Modifications made in an - * editor part follow an open-save-close lifecycle model - * - *

    An editor is document or input-centric. Each editor has an input, and only one editor can - * exist for each editor input within a page. - * - * @author Evgen Vidolob - */ -public interface EditorPartPresenter extends PartPresenter { - - interface EditorPartCloseHandler { - void onClose(EditorPartPresenter editor); - } - - /** The property id for isDirty. */ - int PROP_DIRTY = 0x101; - - /** The property id for editor input changed. */ - int PROP_INPUT = 0x102; - - /** - * Initializes this editor with the given input. - * - *

    This method is automatically called shortly after the part is instantiated. It marks the - * start of the part's lifecycle. - * - *

    Implementors of this method must examine the editor input object type to determine if it is - * understood. If not, the implementor must throw a PartInitException - * - * @param input the editor input - * @param callback callback with actions which should be performed when editor was initialized - */ - void init(@NotNull EditorInput input, OpenEditorCallback callback); - - /** - * Returns the input for this editor. If this value changes the part must fire a property listener - * event with PROP_INPUT. - * - * @return the editor input - */ - @NotNull - EditorInput getEditorInput(); - - /** Saves the contents of this editor. */ - void doSave(); - - /** - * Saves the contents of this editor. - * - * @param callback the callback for save operation - */ - void doSave(@NotNull AsyncCallback callback); - - /** Saves the contents of this part to another object. */ - void doSaveAs(); - - /** Perform action on file changed (e.g. renamed). */ - void onFileChanged(); - - /** - * Returns whether the contents of this part have changed since the last save operation. - * - * @return true if the contents have been modified and need saving, and false - * if they have not changed since the last save - */ - boolean isDirty(); - - /** - * Add EditorPart close handler. - * - * @param closeHandler the instance of CloseHandler - */ - void addCloseHandler(@NotNull EditorPartCloseHandler closeHandler); - - /** Call this method then editor became visible */ - void activate(); - - /** - * Closes this text editor after optionally saving changes. - * - * @param save true if unsaved changed should be saved, and false if - * unsaved changed should be discarded - */ - void close(boolean save); - - /** - * Called when part is going to closing. Part can deny closing, by calling {@code - * callback#onFailure}. - * - * @param callback callback to allow or deny closing the part - */ - void onClosing(AsyncCallback callback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorProvider.java deleted file mode 100644 index 44ab0c70724..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -/** - * Provider interface for creating new instance of {@link EditorPartPresenter}. - * - * @author Evgen Vidolob - */ -public interface EditorProvider { - /** @return the id of this editor */ - String getId(); - - /** @return the description of this editor */ - String getDescription(); - - /** - * Every call this method should return new instance. - * - * @return new instance of {@link EditorPartPresenter} - */ - EditorPartPresenter getEditor(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorRegistry.java deleted file mode 100644 index ecb9145fbd5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorRegistry.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.filetypes.FileType; - -/** - * Editor Registry allows to register new Editor for given FileType. This editor will be used as - * default to open such kind of Files. - * - * @author Nikolay Zamosenchuk - * @author Evgen Vidolob - */ -public interface EditorRegistry { - /** - * Register editor provider for file type. - * - * @param fileType - * @param provider - */ - void register(@NotNull FileType fileType, @NotNull EditorProvider provider); - - /** - * Register default editor. - * - * @param fileType the file type - * @param provider the provider - */ - void registerDefaultEditor(@NotNull FileType fileType, @NotNull EditorProvider provider); - - /** - * Remove Editor Provider from registry for given file type. - * - * @param fileType the file type - * @param provider the provider to removing - */ - void unRegister(FileType fileType, EditorProvider provider); - - /** - * Get editor provide assigned for file type; - * - * @param fileType resource file type - * @return editor provider - */ - @NotNull - EditorProvider getEditor(@NotNull FileType fileType); - - /** - * Gets all editors for file type. - * - * @param fileType the file type - * @return the all editors for file type - */ - @NotNull - List getAllEditorsForFileType(@NotNull FileType fileType); - - /** - * Search editor provider by his id. Should return default editor provider if provider with that - * id cannot be found. - * - * @param id the provider id - * @return the editor provider - */ - @NotNull - EditorProvider findEditorProviderById(@NotNull String id); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithAutoSave.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithAutoSave.java deleted file mode 100644 index f971504115c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithAutoSave.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -/** - * Editor auto save functionality. It's supports enable/disable auto save. - * - * @author Evgen Vidolob - */ -public interface EditorWithAutoSave { - - /** Return true if auto save is enabled, false otherwise. */ - boolean isAutoSaveEnabled(); - - /** Enable auto save. If editor doesn't support auto save do nothing. */ - void enableAutoSave(); - - /** Disable auto save. If editor doesn't support auto save do nothing. */ - void disableAutoSave(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithErrors.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithErrors.java deleted file mode 100644 index 3555fd8670c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/EditorWithErrors.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -/** - * Extension interface to editor. Add indication if editor has errors or warnings. May use for - * change icons in editor tab. - * - * @author Evgen Vidolob - */ -public interface EditorWithErrors { - int ERROR_STATE = 0x110; - - EditorState getErrorState(); - - void setErrorState(EditorState errorState); - - public enum EditorState { - ERROR, - WARNING, - NONE - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/OpenEditorCallbackImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/OpenEditorCallbackImpl.java deleted file mode 100644 index b62402a97d3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/OpenEditorCallbackImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -/** - * Empty implementation of the {@link org.eclipse.che.ide.api.editor.EditorAgent.OpenEditorCallback} - * - * @author Alexander Andrienko - */ -public class OpenEditorCallbackImpl implements EditorAgent.OpenEditorCallback { - - @Override - public void onEditorOpened(EditorPartPresenter editor) {} - - @Override - public void onEditorActivated(EditorPartPresenter editor) {} - - @Override - public void onInitializationFailed() {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroup.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroup.java deleted file mode 100644 index b56bb91f1f2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroup.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import elemental.dom.Element; -import java.util.List; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; - -/** A display for an annotation group (on the same line). */ -public interface AnnotationGroup { - - /** - * Add an annotation to the group. - * - * @param annotation the annotation description - * @param offset the position offset for the annotation - */ - void addAnnotation(Annotation annotation, int offset); - - /** - * Remove an annotation for the group. - * - * @param annotation the annotation to remove - * @param offset the offset for the annotation - */ - void removeAnnotation(Annotation annotation, int offset); - - /** - * Return the annotation group DOM element. - * - * @return the element - */ - Element getElement(); - - /** - * Return all annotation messages for this group. - * - * @return the messages - */ - List getMessages(); - - /** - * Returns the number of annotations in the group. - * - * @return the number of annotations - */ - int getAnnotationCount(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroupImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroupImpl.java deleted file mode 100644 index 2f6839397f1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationGroupImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import static elemental.css.CSSStyleDeclaration.Position.ABSOLUTE; -import static elemental.css.CSSStyleDeclaration.Position.STATIC; - -import elemental.css.CSSStyleDeclaration; -import elemental.dom.Element; -import elemental.dom.Node; -import elemental.html.DivElement; -import elemental.html.HTMLCollection; -import elemental.util.Mappable; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.util.dom.Elements; - -/** - * A composite of one or more annotation displays.
    - * All annotation are positioned at the same place and the one that is visible is determined by - * their relative "layer" ( {@link Annotation#getLayer()}).
    - * All annotation texts ({@link Annotation#getText()}) are aggregated and shown in the annotation - * tooltip. - */ -class AnnotationGroupImpl implements AnnotationGroup { - - private static final String ELEMENT_ROLE_VALUE_ANNOTATION = "annotation"; - private static final String ELEMENT_ROLE_DATA_PROPERTY = "eltRole"; - /* - * This implementation - relies on z-index to display the higher priority annotation - uses data-* attribute (dataset) to store the - * tooltips - */ - private static final String MESSAGE_DATASET_NAME = "annotationMessage"; - private static final String TYPE_DATASET_NAME = "annotationType"; - private static final String LAYER_DATASET_NAME = "annotationLayer"; - private static final String OFFSET_DATASET_NAME = "annotationOffset"; - - private elemental.dom.Element mainElement; - - public static final AnnotationGroupImpl create() { - final AnnotationGroupImpl result = new AnnotationGroupImpl(); - final DivElement element = Elements.createDivElement(); - element.getStyle().setPosition(STATIC); - result.mainElement = element; - element.getDataset().setAt(ELEMENT_ROLE_DATA_PROPERTY, ELEMENT_ROLE_VALUE_ANNOTATION); - return result; - } - - public static final AnnotationGroupImpl create(final Element existingElement) { - final AnnotationGroupImpl result = new AnnotationGroupImpl(); - result.mainElement = existingElement; - return result; - } - - public elemental.dom.Element asElemental() { - return this.mainElement; - } - - @Override - public final void addAnnotation(final Annotation annotation, int offset) { - asElemental().appendChild(buildIncludedElement(annotation, offset)); - updateIconVisibility(); - } - - @Override - public final void removeAnnotation(final Annotation annotation, int offset) { - final HTMLCollection children = asElemental().getChildren(); - for (int i = 0; i < children.length(); i++) { - final Node child = (Node) children.at(i); - if (child instanceof elemental.dom.Element) { - final elemental.dom.Element element = (elemental.dom.Element) child; - final Mappable dataset = element.getDataset(); - if (compareStrings(getMessage(dataset), annotation.getText()) - && getOffset(dataset) == offset - && getLayer(dataset) == annotation.getLayer() - && compareStrings(getType(dataset), annotation.getType())) { - // we may not strictly be on the same annotation instance, but it is not discernible - asElemental().removeChild(element); - updateIconVisibility(); - break; - } - } - } - } - - private elemental.dom.Element buildIncludedElement(Annotation annotation, int offset) { - final elemental.dom.Element element = annotation.getImageElement(); - final CSSStyleDeclaration style = element.getStyle(); - int layer = annotation.getLayer(); - style.setZIndex(layer); - style.setPosition(ABSOLUTE); - style.setTop("0"); - style.setLeft("0"); - style.setRight("0"); - style.setBottom("0"); - - element.getDataset().setAt(MESSAGE_DATASET_NAME, annotation.getText()); - element.getDataset().setAt(TYPE_DATASET_NAME, annotation.getType()); - element.getDataset().setAt(LAYER_DATASET_NAME, Integer.toString(layer)); - element.getDataset().setAt(OFFSET_DATASET_NAME, Integer.toString(offset)); - - return element; - } - - private void updateIconVisibility() { - int maxLayer = 0; - final HTMLCollection children = asElemental().getChildren(); - for (int i = 0; i < children.length(); i++) { - final Node child = (Node) children.at(i); - if (child instanceof elemental.dom.Element) { - final elemental.dom.Element element = (elemental.dom.Element) child; - final Mappable dataset = element.getDataset(); - final int layer = getLayer(dataset); - if (maxLayer < layer) { - maxLayer = layer; - } - } - } - - for (int i = 0; i < children.length(); i++) { - final Node child = (Node) children.at(i); - if (child instanceof elemental.dom.Element) { - final elemental.dom.Element element = (elemental.dom.Element) child; - final Mappable dataset = element.getDataset(); - final int layer = getLayer(dataset); - if (layer >= maxLayer) { - element.getStyle().removeProperty("display"); - } else { - element.getStyle().setDisplay("none"); - } - } - } - } - - @Override - public Element getElement() { - return asElemental(); - } - - @Override - public List getMessages() { - final List result = new ArrayList<>(); - - final HTMLCollection children = asElemental().getChildren(); - for (int i = 0; i < children.length(); i++) { - final Node child = (Node) children.at(i); - if (child instanceof elemental.dom.Element) { - final elemental.dom.Element element = (elemental.dom.Element) child; - final Mappable dataset = element.getDataset(); - final String message = getMessage(dataset); - if (message != null) { - result.add(message); - } - } - } - return result; - } - - @Override - public int getAnnotationCount() { - final HTMLCollection children = asElemental().getChildren(); - return children.getLength(); - } - - /** - * Null-safe string comparison for equality. - * - * @param s1 first string to compare - * @param s2 second string to compare - * @return true iff both strings are equal - */ - private static boolean compareStrings(final String s1, final String s2) { - if (s1 == s2) { - return true; - } - if (s1 == null) { - return false; - } - return s1.equals(s2); - } - - /** - * Read the offset value stored in the dataset. - * - * @param dataset the dataset - * @return the offset value or -1 if no valid value is found - */ - private static int getOffset(final Mappable dataset) { - final String asString = (String) dataset.at(OFFSET_DATASET_NAME); - if (asString == null) { - return -1; - } - try { - return Integer.parseInt(asString); - } catch (final NumberFormatException e) { - return -1; - } - } - - /** - * Read the layer value stored in the dataset. - * - * @param dataset the dataset - * @return the layer value or -1 if no valid value is found - */ - private static int getLayer(final Mappable dataset) { - final String asString = (String) dataset.at(LAYER_DATASET_NAME); - if (asString == null) { - return -1; - } - try { - return Integer.parseInt(asString); - } catch (final NumberFormatException e) { - return -1; - } - } - - /** - * Read the type value stored in the dataset. - * - * @param dataset the dataset - * @return the type value - */ - private static String getType(final Mappable dataset) { - return (String) dataset.at(TYPE_DATASET_NAME); - } - - /** - * Read the message value stored in the dataset. - * - * @param dataset the dataset - * @return the message value - */ - private static String getMessage(final Mappable dataset) { - return (String) dataset.at(MESSAGE_DATASET_NAME); - } - - /** - * Checks if the element has the annotation marker set. - * - * @param element the element to check - * @return true if the element is marked as 'annotation' - */ - public static final boolean isAnnotation(final Element element) { - if (element == null) { - return false; - } - final Object role = element.getDataset().at(ELEMENT_ROLE_DATA_PROPERTY); - return ELEMENT_ROLE_VALUE_ANNOTATION.equals(role); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModel.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModel.java deleted file mode 100644 index 18b78cdc8fd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModel.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.Iterator; -import java.util.Map; -import org.eclipse.che.ide.api.editor.document.UseDocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedHandler; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; - -/** - * This interface defines the model for managing annotations attached to a document. The model - * maintains a set of annotations for a given document and notifies registered annotation model - * listeners about annotation model changes. It also provides methods for querying the current - * position of an annotation managed by this model.
    - * The following events are produced: - * - *

      - *
    • {@link AnnotationModelEvent} when the {@link AnnotationModel} changes (the changes are - * batched) - *
    • {@link ClearAnnotationModelEvent} when he {@link AnnotationModel} is cleared - *
    - * - * The model handles the following events: - * - *
      - *
    • {@link QueryAnnotationsEvent} where a component requests a list of annotations in a given - * range and the model answers using the callback. - *
    - */ -public interface AnnotationModel - extends UseDocumentHandle, DocumentChangedHandler, QueryAnnotationsHandler { - - /** - * Adds a annotation to this annotation model. The annotation is associated with with the given - * position which describes the range covered by the annotation. All registered annotation model - * listeners are informed about the change. If the model is connected to a document, the position - * is automatically updated on document changes. If the annotation is already managed by this - * annotation model or is not a valid position in the connected document nothing happens. - * - * @param annotation the annotation to add, may not be null - * @param position the position describing the range covered by this annotation, may not be - * null - */ - void addAnnotation(Annotation annotation, Position position); - - /** - * Removes the given annotation from the model. I.e. the annotation is no longer managed by this - * model. The position associated with the annotation is no longer updated on document changes. If - * the annotation is not managed by this model, nothing happens. - * - * @param annotation the annotation to be removed from this model, may not be null - */ - void removeAnnotation(Annotation annotation); - - /** - * Returns all annotations managed by this model. - * - * @return all annotations managed by this model (element type: {@link Annotation}) - */ - Iterator getAnnotationIterator(); - - /** - * Returns an iterator over all annotations managed by this model that are inside the given - * region. - * - * @param offset the start position of the region, must be >= 0 - * @param length the length of the region, must be >= 0 - * @param canStartBefore if true then annotations are included which start before the - * region if they end at or after the region's start - * @param canEndAfter if true then annotations are included which end after the - * region if they start at or before the region's end - * @return all annotations inside the region managed by this model (element type: {@link - * Annotation}) - */ - Iterator getAnnotationIterator( - int offset, int length, boolean canStartBefore, boolean canEndAfter); - - /** - * Returns the position associated with the given annotation. - * - * @param annotation the annotation whose position should be returned - * @return the position of the given annotation or null if no associated annotation - * exists - */ - Position getPosition(Annotation annotation); - - /** - * Returns decorations (CSS styles) mapped to Annotation type - * - * @return all decorations - */ - Map getAnnotationDecorations(); - - /** - * Returns styles (CSS styles) mapped to Annotation type - * - * @return all decorations - */ - Map getAnnotationStyle(); - - /** Clear the annotation model. */ - void clear(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelEvent.java deleted file mode 100644 index 92e66b7fa3b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelEvent.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2008 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.GwtEvent; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Specification of changes applied to annotation models. The event carries the changed annotation - * model as well as added, removed, and modified annotations. - * - *

    An event can be sealed. Afterwards it can not be modified. Thus, the normal process is that an - * empty event is created, filled with the changed information, and before it is sent to the - * listeners, the event is sealed. - */ -public class AnnotationModelEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - /** The model this event refers to. */ - private final AnnotationModel annotationModel; - - /** The added annotations. */ - private final Set addedAnnotations = new HashSet(); - - /** The removed annotations. */ - private final Map removedAnnotations = new HashMap(); - - /** The changed annotations. */ - private final Set changedAnnotations = new HashSet(); - - /** - * Creates a new annotation model event for the given model. - * - * @param model the model - */ - public AnnotationModelEvent(AnnotationModel model) { - this.annotationModel = model; - } - - /** - * Returns the model this event refers to. - * - * @return the model this events belongs to - */ - public AnnotationModel getAnnotationModel() { - return annotationModel; - } - - /** - * Adds the given annotation to the set of annotations that are reported as being added from the - * model. If this event is considered a world change, it is no longer so after this method has - * successfully finished. - * - * @param annotation the added annotation - */ - public void annotationAdded(Annotation annotation) { - addedAnnotations.add(annotation); - } - - /** - * Returns the added annotations. - * - * @return the added annotations - */ - public List getAddedAnnotations() { - return new ArrayList<>(addedAnnotations); - } - - /** - * Adds the given annotation to the set of annotations that are reported as being removed from the - * model. If this event is considered a world change, it is no longer so after this method has - * successfully finished. - * - * @param annotation the removed annotation - */ - public void annotationRemoved(Annotation annotation) { - annotationRemoved(annotation, null); - } - - /** - * Adds the given annotation to the set of annotations that are reported as being removed from the - * model. If this event is considered a world change, it is no longer so after this method has - * successfully finished. - * - * @param annotation the removed annotation - * @param position the position of the removed annotation - */ - public void annotationRemoved(Annotation annotation, Position position) { - removedAnnotations.put(annotation, position); - } - - /** - * Returns the removed annotations. - * - * @return the removed annotations - */ - public List getRemovedAnnotations() { - return new ArrayList<>(removedAnnotations.keySet()); - } - - /** - * Returns the position of the removed annotation at that point in time when the annotation has - * been removed. - * - * @param annotation the removed annotation - * @return the position of the removed annotation or null - */ - public Position getPositionOfRemovedAnnotation(Annotation annotation) { - return removedAnnotations.get(annotation); - } - - /** - * Adds the given annotation to the set of annotations that are reported as being changed from the - * model. If this event is considered a world change, it is no longer so after this method has - * successfully finished. - * - * @param annotation the changed annotation - */ - public void annotationChanged(Annotation annotation) { - changedAnnotations.add(annotation); - } - - /** - * Returns the changed annotations. - * - * @return the changed annotations - */ - public List getChangedAnnotations() { - return new ArrayList<>(this.changedAnnotations); - } - - /** - * Returns whether this annotation model event is empty or not. If this event represents a world - * change, this method returns false although the event does not carry any added, - * removed, or changed annotations. - * - * @return true if this event is empty - */ - public boolean isEmpty() { - - final boolean result = - addedAnnotations.isEmpty() && removedAnnotations.isEmpty() && changedAnnotations.isEmpty(); - Log.debug(getClass(), "result", result); - - return result; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final AnnotationModelHandler handler) { - handler.onAnnotationModel(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelHandler.java deleted file mode 100644 index 670b61e1d8a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.EventHandler; - -public interface AnnotationModelHandler extends EventHandler { - - void onAnnotationModel(AnnotationModelEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelImpl.java deleted file mode 100644 index 4099a488678..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationModelImpl.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMap; -import org.eclipse.che.ide.api.editor.text.BadLocationException; -import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.util.loging.Log; - -/** Default implementation of {@link AnnotationModel} */ -public class AnnotationModelImpl implements AnnotationModel { - - /** The list of managed annotations */ - protected Map annotations; - - /** The map which maps {@link Position} to {@link Annotation}. */ - private final IdentityHashMap positions; - - /** The current annotation model event. */ - private AnnotationModelEvent modelEvent; - - private DocumentHandle docHandle; - - private boolean documentChanged; - - private final DocumentPositionMap documentPositionMap; - - private PositionHolder positionHolder; - - public AnnotationModelImpl(final DocumentPositionMap docPositionMap) { - this.annotations = new HashMap<>(10); - this.positions = new IdentityHashMap<>(10); - this.documentPositionMap = docPositionMap; - } - - @Override - public void addAnnotation(final Annotation annotation, final Position position) { - addAnnotation(annotation, position, true); - } - - protected void addAnnotation( - final Annotation annotation, final Position position, final boolean fireEvent) { - annotations.put(annotation, position); - positions.put(position, annotation); - try { - addPosition(position); - } catch (BadLocationException ignore) { - Log.error(getClass(), "BadLocation for " + annotation); - // ignore invalid location - } - getAnnotationModelEvent().annotationAdded(annotation); - if (fireEvent) { - fireModelChanged(); - } - } - - private void addPosition(Position position) throws BadLocationException { - if (positionHolder != null) { - positionHolder.addPosition(position); - } - } - - /** - * Returns the current annotation model event. This is the event that will be sent out when - * calling fireModelChanged. - */ - protected final AnnotationModelEvent getAnnotationModelEvent() { - if (this.modelEvent == null) { - this.modelEvent = createAnnotationModelEvent(); - } - return this.modelEvent; - } - - /** - * Creates and returns a new annotation model event. Subclasses may override. - * - * @return a new and empty annotation model event - */ - protected AnnotationModelEvent createAnnotationModelEvent() { - return new AnnotationModelEvent(this); - } - - /** - * Informs all annotation model listeners that this model has been changed as described in the - * annotation model event. - */ - protected void fireModelChanged() { - final boolean empty = getAnnotationModelEvent().isEmpty(); - if (empty) { - return; - } - if (getDocumentHandle() == null || getDocumentHandle().getDocEventBus() == null) { - return; - } - getDocumentHandle().getDocEventBus().fireEvent(this.modelEvent); - } - - @Override - public void removeAnnotation(final Annotation annotation) { - if (this.annotations.containsKey(annotation)) { - - Position pos = this.annotations.get(annotation); - - this.annotations.remove(annotation); - positions.remove(pos); - - getAnnotationModelEvent().annotationRemoved(annotation, pos); - - fireModelChanged(); - } - } - - @Override - public Iterator getAnnotationIterator() { - return this.annotations.keySet().iterator(); - } - - @Override - public Iterator getAnnotationIterator( - final int offset, final int length, final boolean canStartBefore, final boolean canEndAfter) { - return getRegionAnnotationIterator(offset, length, canStartBefore, canEndAfter); - } - - private Iterator getRegionAnnotationIterator( - int offset, int length, boolean canStartBefore, boolean canEndAfter) { - - cleanup(true); - - try { - List positions = - positionHolder.getPositions(offset, length, canStartBefore, canEndAfter); - return new AnnotationsIterator(positions, this.positions); - - } catch (BadPositionCategoryException e) { - // can happen if e.g. the document doesn't contain such a category, or when removed in a - // different thread - return Collections.emptyList().iterator(); - } - } - - /** - * Removes all annotations from the model whose associated positions have been deleted. If - * requested inform all model listeners about the change. If requested a new thread is created for - * the notification of the model listeners. - * - * @param fireModelChanged indicates whether to notify all model listeners - */ - private void cleanup(final boolean fireModelChanged) { - if (documentChanged) { - documentChanged = false; - - final List deleted = new ArrayList(); - final Iterator e = getAnnotationIterator(); - while (e.hasNext()) { - final Annotation annotation = e.next(); - final Position pos = annotations.get(annotation); - if (pos == null || pos.isDeleted()) { - deleted.add(annotation); - } - } - - if (fireModelChanged) { - removeAnnotations(deleted, false); - if (modelEvent != null) { - Scheduler.get() - .scheduleDeferred( - new ScheduledCommand() { - - @Override - public void execute() { - fireModelChanged(); - } - }); - } - } else { - removeAnnotations(deleted, fireModelChanged); - } - } - } - - /** - * Removes the given annotations from this model. If requested all annotation model listeners will - * be informed about this change. modelInitiated indicates whether the deletion has - * been initiated by this model or by one of its clients. - * - * @param annotations the annotations to be removed - * @param fireModelChanged indicates whether to notify all model listeners - */ - protected void removeAnnotations( - final List annotations, final boolean fireModelChanged) { - if (!annotations.isEmpty()) { - final Iterator e = annotations.iterator(); - while (e.hasNext()) { - removeAnnotation(e.next(), false); - } - - if (fireModelChanged) { - fireModelChanged(); - } - } - } - - /** - * Removes the given annotation from the annotation model. If requested inform all model change - * listeners about this change. - * - * @param annotation the annotation to be removed - * @param fireModelChanged indicates whether to notify all model listeners - */ - protected void removeAnnotation(final Annotation annotation, final boolean fireModelChanged) { - if (annotations.containsKey(annotation)) { - - Position pos = null; - pos = annotations.get(annotation); - - annotations.remove(annotation); - positions.remove(pos); - getAnnotationModelEvent().annotationRemoved(annotation, pos); - - if (fireModelChanged) { - fireModelChanged(); - } - } - } - - @Override - public Position getPosition(final Annotation annotation) { - final Position position = annotations.get(annotation); - return position; - } - - @Override - public Map getAnnotationDecorations() { - return new HashMap<>(); - } - - @Override - public Map getAnnotationStyle() { - return new HashMap<>(); - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) { - this.documentChanged = true; - } - - @Override - public void setDocumentHandle(final DocumentHandle handle) { - this.docHandle = handle; - this.positionHolder = new PositionHolder(handle.getDocument()); - } - - @Override - public DocumentHandle getDocumentHandle() { - return this.docHandle; - } - - // TODO evaluate: keep? - public void forgetLines(final int fromLine, final int count) { - forgetLines(fromLine, count, true); - } - - // TODO evaluate: keep? - public void forgetLines(int fromLine) { - forgetLines(fromLine, 0, false); - } - - // TODO evaluate: keep? - private void forgetLines(final int fromLine, final int count, final boolean checkCount) { - // use an iterator to have remove() - final Iterator> iterator = this.annotations.entrySet().iterator(); - while (iterator.hasNext()) { - final Entry entry = iterator.next(); - final Position position = entry.getValue(); - final TextPosition textPos = - docHandle.getDocument().getPositionFromIndex(position.getOffset()); - final int line = textPos.getLine(); - if (line >= fromLine && (!checkCount || line < fromLine + count)) { - iterator.remove(); - } - } - } - - // TODO evaluate: keep? - public void shiftLines(final int fromLine, final int lineDelta, final int charDelta) { - final Map modified = new IdentityHashMap<>(); - for (final Entry entry : this.annotations.entrySet()) { - final Position position = entry.getValue(); - final TextPosition textPos = - docHandle.getDocument().getPositionFromIndex(position.getOffset()); - - int horizontal; - if (textPos.getLine() == fromLine) { - horizontal = charDelta; - } else if (textPos.getLine() >= fromLine) { - horizontal = 0; - } else { - continue; - } - final TextPosition newTextPos = - new TextPosition(fromLine + lineDelta, textPos.getCharacter() + horizontal); - final int newOffset = docHandle.getDocument().getIndexFromPosition(newTextPos); - final Position newPos = new Position(newOffset, position.getLength()); - modified.put(entry.getKey(), newPos); - } - // merge changes in the annotartion map - this.annotations.putAll(modified); - } - - @Override - public void clear() { - this.annotations.clear(); - this.positions.clear(); - this.modelEvent = new AnnotationModelEvent(this); - this.docHandle.getDocEventBus().fireEvent(new ClearAnnotationModelEvent(this)); - } - - @Override - public void onQueryAnnotations(final QueryAnnotationsEvent event) { - final QueryAnnotationsEvent.QueryCallback callback = event.getCallback(); - if (callback == null) { - return; - } - final LinearRange range = event.getRange(); - Iterator iterator; - if (range == null) { - iterator = getAnnotationIterator(); - } else { - iterator = getAnnotationIterator(range.getStartOffset(), range.getLength(), true, true); - } - final QueryAnnotationsEvent.AnnotationFilter filter = event.getAdditionalFilter(); - - final Map result = new HashMap<>(); - while (iterator.hasNext()) { - final Annotation annotation = iterator.next(); - if (filter.accept(annotation)) { - result.put(annotation, this.annotations.get(annotation)); - } - } - callback.respond(result); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationsIterator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationsIterator.java deleted file mode 100644 index dc20538ae7f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/AnnotationsIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; - -/** - * An iterator iteration over a Positions and mapping positions to annotations using a provided map - * if the provided map contains the element. - */ -final class AnnotationsIterator implements Iterator { - - private Annotation next; - - private final List positions; - - private int index; - - private final Map map; - - /** - * @param positions positions to iterate over - * @param map - */ - public AnnotationsIterator(final List positions, final Map map) { - this.positions = positions; - this.index = 0; - this.map = map; - next = findNext(); - } - - @Override - public boolean hasNext() { - return next != null; - } - - @Override - public Annotation next() { - final Annotation result = next; - next = findNext(); - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - private Annotation findNext() { - while (index < positions.size()) { - final Position position = positions.get(index); - index++; - if (map.containsKey(position)) { - return map.get(position); - } - } - - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelEvent.java deleted file mode 100644 index 8c791eb3efd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.GwtEvent; - -/** Event triggered when the annotation model is cleared. */ -public class ClearAnnotationModelEvent extends GwtEvent { - - /** The type instance of the event. */ - public static final Type TYPE = new Type<>(); - - /** The model being cleared. */ - private final AnnotationModel annotationModel; - - /** - * Creates a new annotation model event for the given model. - * - * @param model the model - */ - public ClearAnnotationModelEvent(AnnotationModel model) { - this.annotationModel = model; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final ClearAnnotationModelHandler handler) { - handler.onClearModel(this); - } - - /** - * Return the model being cleared. - * - * @return the model - */ - public AnnotationModel getAnnotationModel() { - return annotationModel; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelHandler.java deleted file mode 100644 index 165f5b76f33..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ClearAnnotationModelHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.EventHandler; - -public interface ClearAnnotationModelHandler extends EventHandler { - - void onClearModel(ClearAnnotationModelEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/GutterAnnotationRenderer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/GutterAnnotationRenderer.java deleted file mode 100644 index e666fedbfff..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/GutterAnnotationRenderer.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import static org.eclipse.che.ide.api.editor.gutter.Gutters.ANNOTATION_GUTTER; - -import elemental.dom.Element; -import elemental.events.Event; -import elemental.events.EventListener; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Logger; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.gutter.Gutter; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.menu.PositionController; -import org.eclipse.che.ide.util.loging.Log; - -/** Renderer for annotation marks in gutter (on the left margin of the text). */ -public class GutterAnnotationRenderer - implements AnnotationModelHandler, ClearAnnotationModelHandler { - - /** The logger. */ - private static Logger LOG = Logger.getLogger(GutterAnnotationRenderer.class.getName()); - - /** The component responsible for gutter handling. */ - private Gutter hasGutter; - - /** The document. */ - private Document document; - - /** - * Sets the component responsible for gutter handling. - * - * @param hasGutter the component - */ - public void setHasGutter(final Gutter hasGutter) { - this.hasGutter = hasGutter; - } - - @Override - public void onAnnotationModel(final AnnotationModelEvent event) { - // remove removed and changed annotations - for (final Annotation annotation : event.getRemovedAnnotations()) { - LOG.fine("Remove annotation: " + annotation); - removeAnnotationItem(event, annotation); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - LOG.fine("Remove changed annotation: " + annotation); - removeAnnotationItem(event, annotation); - } - // add new and changed (new version) annotation - for (final Annotation annotation : event.getAddedAnnotations()) { - LOG.fine("Add annotation: " + annotation); - addAnnotationItem(event.getAnnotationModel(), annotation); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - LOG.fine("Add back changed annotation: " + annotation); - addAnnotationItem(event.getAnnotationModel(), annotation); - } - } - - private void removeAnnotationItem(final AnnotationModelEvent event, final Annotation annotation) { - final Position position = event.getPositionOfRemovedAnnotation(annotation); - final TextPosition textPosition = this.document.getPositionFromIndex(position.getOffset()); - final Element annotationItem = - this.hasGutter.getGutterItem(textPosition.getLine(), ANNOTATION_GUTTER); - if (AnnotationGroupImpl.isAnnotation(annotationItem)) { - final AnnotationGroup group = AnnotationGroupImpl.create(annotationItem); - group.removeAnnotation(annotation, position.getOffset()); - if (group.getAnnotationCount() != 0) { - return; - } - } - // else - this.hasGutter.removeGutterItem(textPosition.getLine(), ANNOTATION_GUTTER); - } - - private void addAnnotationItem(final AnnotationModel model, final Annotation annotation) { - final Position position = model.getPosition(annotation); - if (position == null) { - Log.warn(GutterAnnotationRenderer.class, "No position for annotation " + annotation); - return; - } - final TextPosition textPosition = this.document.getPositionFromIndex(position.getOffset()); - - final Element annotationItem = - this.hasGutter.getGutterItem(textPosition.getLine(), ANNOTATION_GUTTER); - - AnnotationGroup annotationGroup; - if (!AnnotationGroupImpl.isAnnotation(annotationItem)) { - LOG.fine("Create new annotation group for line " + textPosition.getLine()); - final AnnotationGroup newGroup = AnnotationGroupImpl.create(); - newGroup - .getElement() - .addEventListener( - Event.MOUSEOVER, - new EventListener() { - @Override - public void handleEvent(final Event evt) { - showToolTip(newGroup, textPosition.getLine()); - } - }, - false); - - this.hasGutter.addGutterItem( - textPosition.getLine(), ANNOTATION_GUTTER, newGroup.getElement()); - annotationGroup = newGroup; - } else { - LOG.fine("Reuse annotation group for line " + textPosition.getLine()); - annotationGroup = AnnotationGroupImpl.create(annotationItem); - } - annotationGroup.addAnnotation(annotation, position.getOffset()); - } - - private void showToolTip(AnnotationGroup item, int line) { - final List messages = new ArrayList<>(); - for (final String message : item.getMessages()) { - messages.add(message); - } - - Tooltip tooltip = null; - if (messages.size() == 1) { - tooltip = - Tooltip.create( - item.getElement(), - PositionController.VerticalAlign.MIDDLE, - PositionController.HorizontalAlign.RIGHT, - messages.get(0)); - - } else if (messages.size() > 1) { - String[] messagesArray = new String[messages.size()]; - messagesArray = messages.toArray(messagesArray); - tooltip = - ListTooltipFactory.create( - item.getElement(), - "Multiple markers on this line:", - PositionController.VerticalAlign.MIDDLE, - PositionController.HorizontalAlign.RIGHT, - messagesArray); - } - if (tooltip != null) { - tooltip.show(); - } - } - - public void setDocument(final Document document) { - this.document = document; - } - - @Override - public void onClearModel(final ClearAnnotationModelEvent event) { - this.hasGutter.clearGutter(ANNOTATION_GUTTER); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/HasAnnotationRendering.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/HasAnnotationRendering.java deleted file mode 100644 index d82391da746..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/HasAnnotationRendering.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import org.eclipse.che.ide.api.editor.document.DocumentHandle; - -/** - * Interface for objects that may render annotations. - * - * @author Evgen Vidolob - */ -public interface HasAnnotationRendering { - - void configure(AnnotationModel model, DocumentHandle document); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/InlineAnnotationRenderer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/InlineAnnotationRenderer.java deleted file mode 100644 index ae6bb2c9a24..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/InlineAnnotationRenderer.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.IdentityHashMap; -import java.util.Map; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.TextRange; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.api.editor.texteditor.HasTextMarkers; -import org.eclipse.che.ide.api.editor.texteditor.HasTextMarkers.MarkerRegistration; -import org.eclipse.che.ide.util.loging.Log; - -/** Render the inline marks on the text. */ -public class InlineAnnotationRenderer - implements AnnotationModelHandler, ClearAnnotationModelHandler { - - /** The currently show markers. */ - private final IdentityHashMap markers = new IdentityHashMap<>(); - - /** The component that handles markers. */ - private HasTextMarkers hasTextMarkers; - - /** The document. */ - private Document document; - - /** - * Sets the component that handles markers. - * - * @param hasTextMarkers the new component - */ - public void setHasTextMarkers(final HasTextMarkers hasTextMarkers) { - this.hasTextMarkers = hasTextMarkers; - } - - @Override - public void onAnnotationModel(final AnnotationModelEvent event) { - // remove removed and changed annotations - for (final Annotation annotation : event.getRemovedAnnotations()) { - removeAnnotationItem(annotation); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - removeAnnotationItem(annotation); - } - - // add new and changed (new version) annotation - - final Map decorations = event.getAnnotationModel().getAnnotationDecorations(); - - for (final Annotation annotation : event.getAddedAnnotations()) { - addAnnotationItem(event.getAnnotationModel(), annotation, decorations); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - addAnnotationItem(event.getAnnotationModel(), annotation, decorations); - } - } - - /** - * Add an inline annotation. - * - * @param annotationModel the annotation model - * @param annotation the annotation to add - * @param decorations the available decorations - */ - private void addAnnotationItem( - AnnotationModel annotationModel, Annotation annotation, Map decorations) { - if (this.hasTextMarkers != null) { - final String className = decorations.get(annotation.getType()); - if (className == null) { - return; - } - - final Position position = annotationModel.getPosition(annotation); - if (position == null) { - Log.warn(InlineAnnotationRenderer.class, "Can't add annotation with no position"); - return; - } - - final TextPosition from = this.document.getPositionFromIndex(position.getOffset()); - final TextPosition to = - this.document.getPositionFromIndex(position.getOffset() + position.getLength()); - - final MarkerRegistration registration = - this.hasTextMarkers.addMarker(new TextRange(from, to), className); - if (registration != null) { - this.markers.put(annotation, registration); - } - } - } - - /** - * Remove an annotation. - * - * @param annotation the annotation to remove - */ - private void removeAnnotationItem(final Annotation annotation) { - final MarkerRegistration marker = this.markers.get(annotation); - if (marker != null) { - marker.clearMark(); - } else { - Log.warn(InlineAnnotationRenderer.class, "Inline marker with no handle: " + annotation); - } - } - - /** - * Sets the document. - * - * @param document the new value - */ - public void setDocument(final Document document) { - this.document = document; - } - - @Override - public void onClearModel(final ClearAnnotationModelEvent event) { - for (final MarkerRegistration registration : this.markers.values()) { - registration.clearMark(); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ListTooltipFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ListTooltipFactory.java deleted file mode 100644 index bb9f5032be2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/ListTooltipFactory.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import elemental.dom.Element; -import elemental.html.LIElement; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.Tooltip.Builder; -import org.eclipse.che.ide.ui.Tooltip.TooltipPositionerBuilder; -import org.eclipse.che.ide.ui.Tooltip.TooltipRenderer; -import org.eclipse.che.ide.ui.menu.PositionController; -import org.eclipse.che.ide.ui.menu.PositionController.Positioner; -import org.eclipse.che.ide.ui.menu.PositionController.PositionerBuilder; -import org.eclipse.che.ide.util.dom.Elements; - -/** Factory for a tooltip that shows list of messages. */ -public final class ListTooltipFactory { - - private ListTooltipFactory() {} - - /** Static factory method for creating a list tooltip. */ - public static Tooltip create( - final Element targetElement, - final String header, - final PositionController.VerticalAlign vAlign, - final PositionController.HorizontalAlign hAlign, - final String... tooltipText) { - final PositionerBuilder positionrBuilder = - new TooltipPositionerBuilder().setVerticalAlign(vAlign).setHorizontalAlign(hAlign); - final Positioner positioner = positionrBuilder.buildAnchorPositioner(targetElement); - final Builder builder = new Builder(targetElement, positioner); - builder.setTooltipRenderer(new ListRenderer(header, tooltipText)); - - return builder.build(); - } - - private static class ListRenderer implements TooltipRenderer { - private final String header; - private final String[] tooltipText; - - ListRenderer(final String header, final String... tooltipText) { - this.tooltipText = tooltipText; - this.header = header; - } - - @Override - public Element renderDom() { - final Element content = Elements.createSpanElement(); - content.setInnerText(header); - final Element list = Elements.createUListElement(); - for (final String tooltip : tooltipText) { - final LIElement item = Elements.createLiElement(); - item.appendChild(Elements.createTextNode(tooltip)); - list.appendChild(item); - } - content.appendChild(list); - return content; - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/MinimapAnnotationRenderer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/MinimapAnnotationRenderer.java deleted file mode 100644 index cf07651f4b2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/MinimapAnnotationRenderer.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.logging.Logger; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.minimap.Minimap; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.eclipse.che.ide.util.loging.Log; - -/** Renderer for annotation marks in the minimap (on the right margin of the text). */ -public class MinimapAnnotationRenderer - implements AnnotationModelHandler, ClearAnnotationModelHandler { - - /** The logger. */ - private static Logger LOG = Logger.getLogger(MinimapAnnotationRenderer.class.getName()); - - /** The component responsible for minimap handling. */ - private Minimap minimap; - - /** The document. */ - private Document document; - - /** - * Sets the component responsible for minimap handling. - * - * @param minimap the component - */ - public void setMinimap(final Minimap minimap) { - this.minimap = minimap; - } - - @Override - public void onAnnotationModel(final AnnotationModelEvent event) { - // annotation is mutable, not easy to use a set - final Map> toRestore = new HashMap<>(); - // remove removed and changed annotations - for (final Annotation annotation : event.getRemovedAnnotations()) { - LOG.fine("Remove annotation: " + annotation); - removeAnnotationItem(event, annotation, toRestore); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - LOG.fine("Remove changed annotation: " + annotation); - removeAnnotationItem(event, annotation, toRestore); - } - - final Map decorations = event.getAnnotationModel().getAnnotationStyle(); - // restore annotations that were deleted but shouldn't have - for (final List annotations : toRestore.values()) { - for (final Annotation annotation : annotations) { - addAnnotationItem(event.getAnnotationModel(), annotation, decorations); - } - } - // add new and changed (new version) annotation - for (final Annotation annotation : event.getAddedAnnotations()) { - LOG.fine("Add annotation: " + annotation); - addAnnotationItem(event.getAnnotationModel(), annotation, decorations); - } - for (final Annotation annotation : event.getChangedAnnotations()) { - LOG.fine("Add back changed annotation: " + annotation); - addAnnotationItem(event.getAnnotationModel(), annotation, decorations); - } - } - - private void removeAnnotationItem( - final AnnotationModelEvent event, - final Annotation annotation, - final Map> toRestore) { - final Position position = event.getPositionOfRemovedAnnotation(annotation); - final TextPosition textPosition = this.document.getPositionFromIndex(position.getOffset()); - final int line = textPosition.getLine(); - // remove all marks on the line - this.minimap.removeMarks(line, line); - // restore marks that are not removed - final LinearRange rangeForLine = this.document.getLinearRangeForLine(line); - - final AnnotationModel model = event.getAnnotationModel(); - final Iterator it = - model.getAnnotationIterator( - rangeForLine.getStartOffset(), rangeForLine.getLength(), false, true); - while (it.hasNext()) { - final Annotation current = it.next(); - List lineAnnotations = toRestore.get(line); - if (!current.equals(annotation)) { - if (lineAnnotations == null) { - lineAnnotations = new ArrayList<>(); - toRestore.put(line, lineAnnotations); - } - lineAnnotations.add(current); - } else { - if (lineAnnotations != null) { - lineAnnotations.removeAll(Collections.singletonList(current)); - if (lineAnnotations.isEmpty()) { - toRestore.remove(line); - } - } - } - } - } - - private void addAnnotationItem( - final AnnotationModel model, - final Annotation annotation, - final Map decorations) { - final Position position = model.getPosition(annotation); - if (position == null) { - Log.warn(MinimapAnnotationRenderer.class, "No position for annotation " + annotation); - return; - } - // final TextPosition textPosition = - // this.document.getPositionFromIndex(position.getOffset()); - // final int line = textPosition.getLine(); - - final String style = decorations.get(annotation.getType()); - this.minimap.addMark(position.getOffset(), style, annotation.getLayer(), annotation.getText()); - } - - @Override - public void onClearModel(final ClearAnnotationModelEvent event) { - this.minimap.clearMarks(); - } - - public void setDocument(final Document document) { - this.document = document; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/PositionHolder.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/PositionHolder.java deleted file mode 100644 index 31fef65d7e4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/PositionHolder.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.BadLocationException; -import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.runtime.Assert; - -/** */ -final class PositionHolder { - - private final Document document; - private List positions = new ArrayList<>(); - - public PositionHolder(Document document) { - this.document = document; - } - - public void addPosition(Position position) throws BadLocationException { - if ((0 > position.offset) - || (0 > position.length) - || (position.offset + position.length > document.getContentsCharCount())) - throw new BadLocationException(); - - positions.add(computeIndexInPositionList(positions, position.offset, true), position); - } - - /** - * Computes the index in the list of positions at which a position with the given position would - * be inserted. The position to insert is supposed to become the first in this list of all - * positions with the same position. - * - * @param positions the list in which the index is computed - * @param offset the offset for which the index is computed - * @param orderedByOffset true if ordered by offset, false if ordered by end position - * @return the computed index - * @since 3.4 - */ - protected int computeIndexInPositionList( - List positions, int offset, boolean orderedByOffset) { - if (positions.size() == 0) return 0; - - int left = 0; - int right = positions.size() - 1; - int mid = 0; - Position p = null; - - while (left < right) { - - mid = (left + right) / 2; - - p = positions.get(mid); - int pOffset = getOffset(orderedByOffset, p); - if (offset < pOffset) { - if (left == mid) right = left; - else right = mid - 1; - } else if (offset > pOffset) { - if (right == mid) left = right; - else left = mid + 1; - } else if (offset == pOffset) { - left = right = mid; - } - } - - int pos = left; - p = positions.get(pos); - int pPosition = getOffset(orderedByOffset, p); - if (offset > pPosition) { - // append to the end - pos++; - } else { - // entry will become the first of all entries with the same offset - do { - --pos; - if (pos < 0) break; - p = positions.get(pos); - pPosition = getOffset(orderedByOffset, p); - } while (offset == pPosition); - ++pos; - } - - Assert.isTrue(0 <= pos && pos <= positions.size()); - - return pos; - } - - private int getOffset(boolean orderedByOffset, Position position) { - if (orderedByOffset || position.getLength() == 0) return position.getOffset(); - return position.getOffset() + position.getLength() - 1; - } - - public List getPositions( - int offset, int length, boolean canStartBefore, boolean canEndAfter) - throws BadPositionCategoryException { - if (canStartBefore && canEndAfter || (!canStartBefore && !canEndAfter)) { - List documentPositions; - if (canStartBefore && canEndAfter) { - if (offset < getLength() / 2) { - documentPositions = getStartingPositions(0, offset + length); - } else { - documentPositions = getEndingPositions(offset, getLength() - offset + 1); - } - } else { - documentPositions = getStartingPositions(offset, length); - } - - ArrayList list = new ArrayList<>(documentPositions.size()); - - Position region = new Position(offset, length); - - for (Iterator iterator = documentPositions.iterator(); iterator.hasNext(); ) { - Position position = iterator.next(); - if (isWithinRegion(region, position, canStartBefore, canEndAfter)) { - list.add(position); - } - } - - return list; - } else if (canStartBefore) { - List list = getEndingPositions(offset, length); - return list; - } else { - Assert.isLegal(canEndAfter && !canStartBefore); - - List list = getStartingPositions(offset, length); - return list; - } - } - - private boolean isWithinRegion( - Position region, Position position, boolean canStartBefore, boolean canEndAfter) { - if (canStartBefore && canEndAfter) { - return region.overlapsWith(position.getOffset(), position.getLength()); - } else if (canStartBefore) { - return region.includes(position.getOffset() + position.getLength() - 1); - } else if (canEndAfter) { - return region.includes(position.getOffset()); - } else { - int start = position.getOffset(); - return region.includes(start) && region.includes(start + position.getLength() - 1); - } - } - - private List getStartingPositions(int offset, int length) - throws BadPositionCategoryException { - - int indexStart = computeIndexInPositionList(positions, offset, true); - int indexEnd = computeIndexInPositionList(positions, offset + length, true); - - return positions.subList(indexStart, indexEnd); - } - - private List getEndingPositions(int offset, int length) - throws BadPositionCategoryException { - - int indexStart = computeIndexInPositionList(positions, offset, false); - int indexEnd = computeIndexInPositionList(positions, offset + length, false); - - return positions.subList(indexStart, indexEnd); - } - - private int getLength() { - return document.getContentsCharCount(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsEvent.java deleted file mode 100644 index f792e9ee326..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsEvent.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.GwtEvent; -import java.util.Map; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; - -/** Event triggered when the annotation model is cleared. */ -public class QueryAnnotationsEvent extends GwtEvent { - - /** The type instance of the event. */ - public static final Type TYPE = new Type<>(); - - /** Default filter, that accepts any annotation. */ - public static final AnnotationFilter YES_FILTER = - new AnnotationFilter() { - @Override - public boolean accept(final Annotation annotation) { - return true; - } - }; - - /** The callback to call with the result. */ - private final QueryCallback callback; - - /** An optional additional filter. */ - private final AnnotationFilter additionalFilter; - - /** The text range for the query. */ - private final LinearRange range; - - /** - * Creates a new annotation model event for the given model. - * - * @param model the model - * @param callback the callback to give the results - * @param an additional filter to choose the annotations - */ - private QueryAnnotationsEvent( - final LinearRange range, - final QueryCallback callback, - final AnnotationFilter additionalFilter) { - this.callback = callback; - this.range = range; - this.additionalFilter = additionalFilter; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final QueryAnnotationsHandler handler) { - handler.onQueryAnnotations(this); - } - - /** - * Returns the callback used to anwser the query. - * - * @return the callback - */ - public QueryCallback getCallback() { - return callback; - } - - /** - * Return the range of the query. - * - * @return the range - */ - public LinearRange getRange() { - return range; - } - - /** - * Returns the annotation filter. - * - * @return the filter. May be null - */ - @Nullable - public AnnotationFilter getAdditionalFilter() { - return additionalFilter; - } - - /** A callback interface used to answer the query. */ - public interface QueryCallback { - - /** The callback method. */ - void respond(Map annotations); - } - - /** A filter for annotations in the query result. */ - public interface AnnotationFilter { - - /** - * Whether the annotation will be handed. - * - * @param annotation the annotation to examine - * @return true accepts the annotation, false rejects it - */ - boolean accept(Annotation annotation); - } - - /** Builder for {@link QueryAnnotationsEvent} instances. */ - public static final class Builder { - /** The range for the query. */ - private LinearRange range; - /** The callback for the query. */ - private QueryCallback callback; - /** The filter for the query. */ - private AnnotationFilter filter = YES_FILTER; - - /** - * Sets the range. - * - * @param range the range - * @return this object - */ - public Builder withRange(final LinearRange range) { - this.range = range; - return this; - } - - /** - * Sets the cllback. - * - * @param callback the callback - * @return this object - */ - public Builder withCallback(final QueryCallback callback) { - this.callback = callback; - return this; - } - - /** - * Sets the filter. - * - * @param filter the filter - * @return this object - */ - public Builder withFilter(AnnotationFilter filter) { - this.filter = filter; - return this; - } - - /** - * Builds the {@link QueryAnnotationsEvent}. - * - * @return the created instance - */ - public QueryAnnotationsEvent build() { - return new QueryAnnotationsEvent(this.range, this.callback, this.filter); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsHandler.java deleted file mode 100644 index ce6b5f0da5d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import com.google.gwt.event.shared.EventHandler; - -/** Handler for {@link QueryAnnotationsEvent} events. */ -public interface QueryAnnotationsHandler extends EventHandler { - - /** The handler method. */ - void onQueryAnnotations(QueryAnnotationsEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/RegionIterator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/RegionIterator.java deleted file mode 100644 index 548c2a4f7a2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/RegionIterator.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.annotation; - -import java.util.Iterator; -import java.util.NoSuchElementException; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; - -/** Iterator that returns the annotations for a given region. */ -final class RegionIterator implements Iterator { - - private final Iterator parentIterator; - - private final boolean canEndAfter; - - private final boolean canStartBefore; - - private final AnnotationModel model; - - private Annotation next; - - private final Position region; - - /** - * Iterator that returns all annotations from the parent iterator which have a position in the - * given model inside the given region. - * - * @param parentIterator iterator containing all annotations - * @param model the model to use to retrieve positions from for each annotation - * @param offset start position of the region - * @param length length of the region - * @param canStartBefore include annotations starting before region - * @param canEndAfter include annotations ending after region - */ - public RegionIterator( - Iterator parentIterator, - AnnotationModel model, - int offset, - int length, - boolean canStartBefore, - boolean canEndAfter) { - this.parentIterator = parentIterator; - this.model = model; - this.region = new Position(offset, length); - this.canEndAfter = canEndAfter; - this.canStartBefore = canStartBefore; - next = findNext(); - } - - @Override - public boolean hasNext() { - return next != null; - } - - @Override - public Annotation next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - - final Annotation result = next; - next = findNext(); - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - private Annotation findNext() { - while (parentIterator.hasNext()) { - final Annotation next = parentIterator.next(); - final Position position = model.getPosition(next); - if (position != null) { - final int offset = position.getOffset(); - if (isWithinRegion(offset, position.getLength())) { - return next; - } - } - } - return null; - } - - private boolean isWithinRegion(int start, int length) { - if (canStartBefore && canEndAfter) { - return region.overlapsWith(start, length); - } else if (canStartBefore) { - return region.includes(start + length - (length > 0 ? 1 : 0)); - } else if (canEndAfter) { - return region.includes(start); - } else { - return region.includes(start) && region.includes(start + length - (length > 0 ? 1 : 0)); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/autosave/AutoSaveMode.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/autosave/AutoSaveMode.java deleted file mode 100644 index 400bda2b0f6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/autosave/AutoSaveMode.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.autosave; - -import org.eclipse.che.ide.api.editor.document.UseDocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedHandler; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * Editor content auto save functionality. - * - * @author Roman Nikitenko - */ -public interface AutoSaveMode extends DocumentChangedHandler, UseDocumentHandle { - - /** Installs auto save mode on the given editor. */ - void install(TextEditor editor); - - /** Removes auto save mode from editor. */ - void uninstall(); - - /** Suspends auto save mode for editor content. */ - void suspend(); - - /** - * Resumes auto save mode for editor content and sets mode corresponding to 'Enable Autosave' - * option in editor preferences. - */ - void resume(); - - /** Return true if auto save mode is activated, false otherwise. */ - boolean isActivated(); - - enum Mode { - /** - * The state when auto save mode of editor content is turned on. Corresponds to the case when - * the 'Enable Autosave' option in editor preferences is enabled. - */ - ACTIVATED, - - /** - * Corresponds to the state when auto save mode is suspended for processing some operations - * (java refactoring, for example) - */ - SUSPENDED, - - /** - * The state when auto save mode of editor content is turned off. Corresponds to the case when - * the 'Enable Autosave' option in editor preferences is disabled. - */ - DEACTIVATED - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/ChangeInterceptorProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/ChangeInterceptorProvider.java deleted file mode 100644 index 114cfd8e67c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/ChangeInterceptorProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.changeintercept; - -import java.util.List; - -/** Component that associates {@link TextChangeInterceptor}s to a content type. */ -public interface ChangeInterceptorProvider { - - /** - * Returns the change interceptors for the content type. - * - * @param contentType the content type - * @return the change interceptors - */ - List getInterceptors(String contentType); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/CloseCStyleCommentChangeInterceptor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/CloseCStyleCommentChangeInterceptor.java deleted file mode 100644 index 175182f7190..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/CloseCStyleCommentChangeInterceptor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.changeintercept; - -import com.google.gwt.regexp.shared.MatchResult; -import com.google.gwt.regexp.shared.RegExp; -import org.eclipse.che.ide.api.editor.document.ReadOnlyDocument; - -/** Automatic insertion of c-style /* and /** comment end. */ -public final class CloseCStyleCommentChangeInterceptor implements TextChangeInterceptor { - - @Override - public TextChange processChange(final TextChange change, ReadOnlyDocument document) { - final RegExp regex = RegExp.compile("^\n(\\s*)\\*\\s*$"); - final MatchResult matchResult = regex.exec(change.getNewText()); - // either must be on the first line or be just after a line break (regexp) - if (matchResult != null) { - final String line = document.getLineContent(change.getFrom().getLine()); - // matches a line containing only whitespaces followed by either /** or /* and then optionally - // whitespaces again - if (!line.matches("^\\s*\\/\\*\\*?\\s*$")) { - return null; - } - - final String whitespaces = matchResult.getGroup(1); - - final String modifiedInsert = "\n" + whitespaces + "* \n" + whitespaces + "*/"; - - return new TextChange.Builder() - .from(change.getFrom()) - .to(change.getFrom()) - .insert(modifiedInsert) - .build(); - } else { - return null; - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChange.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChange.java deleted file mode 100644 index 402db4ac96e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChange.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.changeintercept; - -import org.eclipse.che.ide.api.editor.text.TextPosition; - -/** - * The description of a change to be examined and processed through {@link TextChangeInterceptor}s. - */ -public final class TextChange { - - /** The start of the change. */ - private final TextPosition from; - /** The end of the change. */ - private final TextPosition to; - /** The new content. */ - private final String newText; - - /** - * Constructor for {@link TextChange}.
    - * It is private, {@link TextChange} instances should be created using {@link Builder}. - * - * @param from the start of the change - * @param to the end of the change - * @param inserted the new content - */ - private TextChange(final TextPosition from, final TextPosition to, final String inserted) { - this.from = from; - this.to = to; - this.newText = inserted; - } - - /** - * Returns the start of the change. - * - * @return the start of the change. - */ - public TextPosition getFrom() { - return this.from; - } - - /** - * Returns the end of the change. - * - * @return the end of the change. - */ - public TextPosition getTo() { - return this.to; - } - - /** - * Returns the new content. - * - * @return the new content. - */ - public String getNewText() { - return this.newText; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder - .append("TextChange [from=") - .append(from) - .append(", to=") - .append(to) - .append(", newText=") - .append(newText) - .append("]"); - return builder.toString(); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((from == null) ? 0 : from.hashCode()); - result = prime * result + ((newText == null) ? 0 : newText.hashCode()); - result = prime * result + ((to == null) ? 0 : to.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - TextChange other = (TextChange) obj; - if (from == null) { - if (other.from != null) { - return false; - } - } else if (!from.equals(other.from)) { - return false; - } - if (newText == null) { - if (other.newText != null) { - return false; - } - } else if (!newText.equals(other.newText)) { - return false; - } - if (to == null) { - if (other.to != null) { - return false; - } - } else if (!to.equals(other.to)) { - return false; - } - return true; - } - - /** Builder for {@link TextChange}. */ - public static final class Builder { - - /** The start of the change. */ - private TextPosition from; - /** The end of the change. */ - private TextPosition to; - /** The new content. */ - private String newText; - - /** - * Sets the start position of the change. - * - * @param from the new value - * @return this object (builder) - */ - public Builder from(final TextPosition from) { - this.from = from; - return this; - } - - /** - * Sets the end position of the change. - * - * @param from the new value - * @return this object (builder) - */ - public Builder to(final TextPosition to) { - this.to = to; - return this; - } - - /** - * Sets the new text for the change. - * - * @param from the new value - * @return this object (builder) - */ - public Builder insert(final String inserted) { - this.newText = inserted; - return this; - } - - /** - * Creates the instance of {@link TextChange} using the values that where provided. - * - * @return the {@link TextChange} - */ - public TextChange build() { - return new TextChange(this.from, this.to, this.newText); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChangeInterceptor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChangeInterceptor.java deleted file mode 100644 index b5215a33a2d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/changeintercept/TextChangeInterceptor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.changeintercept; - -import org.eclipse.che.ide.api.editor.document.ReadOnlyDocument; - -/** - * Interface for components that modify changes in the text.
    - * The interceptor should only modify the content using its return value (meaning it should not - * directly access the odcument or editor to do changes). - */ -public interface TextChangeInterceptor { - - /** - * Process a change in the editor text. - * - * @param change the incoming change - * @param the read-only version of the document - * @return the new version of the change (null doesn't modify the change) - */ - TextChange processChange(TextChange change, ReadOnlyDocument document); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AdditionalInfoCallback.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AdditionalInfoCallback.java deleted file mode 100644 index 98e3c9f2cfe..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AdditionalInfoCallback.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import elemental.dom.Element; - -/** Action triggered when completion proposal additional info must be displayed. */ -public interface AdditionalInfoCallback { - - /** - * Display the proposal additional info. - * - * @param pixelX the x coordinate - * @param pixelY the y coordinate - * @param info the info message to show - * @return the element used to display the information - */ - Element onAdditionalInfoNeeded(float pixelX, float pixelY, Element infoWidget); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AutoCompleteResources.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AutoCompleteResources.java deleted file mode 100644 index 261e71f92e4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/AutoCompleteResources.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import com.google.gwt.resources.client.CssResource; -import org.eclipse.che.ide.ui.Popup; -import org.eclipse.che.ide.ui.list.SimpleList; - -/** Resource that defines the appearance of autocomplete popups. */ -public interface AutoCompleteResources extends SimpleList.Resources, Popup.Resources { - - @Source({"AutocompleteComponent.css", "org/eclipse/che/ide/api/ui/style.css"}) - Css autocompleteComponentCss(); - - interface Css extends CssResource { - - String proposalIcon(); - - String proposalLabel(); - - String proposalGroup(); - - String container(); - - String items(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistCallback.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistCallback.java deleted file mode 100644 index c0bee3dd6c3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistCallback.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import java.util.List; - -/** Callback interface for code assistant requests. */ -public interface CodeAssistCallback { - /** Called when the completion proposals are computed. */ - void proposalComputed(List proposals); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistProcessor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistProcessor.java deleted file mode 100644 index 08715408d69..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistProcessor.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * A code assist processor proposes completions for a particular content type. - * - *

    This interface must be implemented by clients. Implementers should be registered with a code - * assistant in order to get involved in the assisting process. - * - * @author Evgen Vidolob - */ -public interface CodeAssistProcessor { - - /** - * Returns a list of completion proposals based on the specified location within the document that - * corresponds to the current cursor position within the text view. - * - * @param editor the editor whose document is used to compute the proposals - * @param offset an offset within the document for which completions should be computed - * @param triggered if triggered by the content assist key binding - * @return an array of completion proposals or null if no proposals are possible - */ - void computeCompletionProposals( - TextEditor editor, int offset, boolean triggered, CodeAssistCallback callback); - - /** - * Returns the reason why this content assist processor was unable to produce any completion - * proposals or context information. - * - * @return an error message or null if no error occurred - */ - String getErrorMessage(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistant.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistant.java deleted file mode 100644 index 80c48c20bdd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistant.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -/** - * An CodeAssistant provides support on interactive content completion. - * - *

    A content assistant has a list of {@link CodeAssistProcessor} objects each of which is - * registered for a particular document content type. The content assistant uses the processors to - * react on the request of completing documents or presenting context information. - */ -public interface CodeAssistant { - - /** - * Returns the code assist processor to be used for the given content type. - * - * @param contentType the type of the content for which this content assistant is to be requested - * @return an instance code assist processor or null if none exists for the specified - * content type - */ - CodeAssistProcessor getCodeAssistProcessor(String contentType); - - /** - * Registers a content processor for the given content type. - * - * @param contentType the content type - * @param processor the processor - */ - void setCodeAssistantProcessor(String contentType, CodeAssistProcessor processor); - - /** - * Returns the code assist processor for the content type of the specified document position. - * - * @param offset a offset within the document - * @return a code-assist processor or null if none exists - */ - CodeAssistProcessor getProcessor(int offset); - - /** - * Computes completion proposals computed based on the specified document position. The position - * is used to determine the appropriate content assist processor to invoke. - * - * @param offset a document offset - * @param triggered if triggered by the content assist key binding - * @param callback the callback to use once completions are ready - */ - void computeCompletionProposals(int offset, boolean triggered, CodeAssistCallback callback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantFactory.java deleted file mode 100644 index df184ded8a9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** Factory for {@link CodeAssistant} objects. */ -public interface CodeAssistantFactory { - - /** - * Create a {@link CodeAssistant} for the given editor. - * - * @param textEditor the editor - * @param partitioner the partitioner - * @return a {@link CodeAssistant} - */ - CodeAssistant create(TextEditor textEditor, DocumentPartitioner partitioner); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantImpl.java deleted file mode 100644 index 130614ada57..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CodeAssistantImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; - -import com.google.gwt.core.client.GWT; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.notification.NotificationManager; - -/** Implementation of CodeAssistant. */ -public class CodeAssistantImpl implements CodeAssistant { - - private final Map processors; - private final TextEditor textEditor; - private final DocumentPartitioner partitioner; - private final NotificationManager notificationManager; - private String lastErrorMessage; - - public static final AutoCompleteResources res = GWT.create(AutoCompleteResources.class); - - @AssistedInject - public CodeAssistantImpl( - @Assisted final DocumentPartitioner partitioner, - @Assisted TextEditor textEditor, - NotificationManager notificationManager) { - this.notificationManager = notificationManager; - processors = new HashMap<>(); - res.defaultSimpleListCss().ensureInjected(); - res.autocompleteComponentCss().ensureInjected(); - res.popupCss().ensureInjected(); - this.partitioner = partitioner; - this.textEditor = textEditor; - } - - @Override - public void computeCompletionProposals( - final int offset, final boolean triggered, final CodeAssistCallback callback) { - this.lastErrorMessage = "processing"; - - final CodeAssistProcessor processor = getProcessor(offset); - if (processor != null) { - processor.computeCompletionProposals(textEditor, offset, triggered, callback); - this.lastErrorMessage = processor.getErrorMessage(); - if (this.lastErrorMessage != null) { - notificationManager.notify("", lastErrorMessage, FAIL, EMERGE_MODE); - this.textEditor.showMessage(this.lastErrorMessage); - } - } else { - final CodeAssistProcessor fallbackProcessor = getFallbackProcessor(); - if (fallbackProcessor != null) { - fallbackProcessor.computeCompletionProposals(textEditor, offset, triggered, callback); - this.lastErrorMessage = fallbackProcessor.getErrorMessage(); - if (this.lastErrorMessage != null) { - this.textEditor.showMessage(this.lastErrorMessage); - } - } - } - } - - @Override - public CodeAssistProcessor getProcessor(final int offset) { - final String contentType = this.textEditor.getContentType(); - if (contentType == null) { - return null; - } - - final String type = this.partitioner.getContentType(offset); - return getCodeAssistProcessor(type); - } - - private CodeAssistProcessor getFallbackProcessor() { - final CodeAssistProcessor emptyTypeProcessor = getCodeAssistProcessor(""); - if (emptyTypeProcessor != null) { - return emptyTypeProcessor; - } - return getCodeAssistProcessor(null); - } - - @Override - public CodeAssistProcessor getCodeAssistProcessor(final String contentType) { - return processors.get(contentType); - } - - @Override - public void setCodeAssistantProcessor( - final String contentType, final CodeAssistProcessor processor) { - processors.put(contentType, processor); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/Completion.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/Completion.java deleted file mode 100644 index bb8c6bad791..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/Completion.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.LinearRange; - -/** Interface for completion objects. */ -public interface Completion { - - /** - * Inserts the proposed completion into the given document. - * - * @param document the document into which to insert the proposed completion - */ - void apply(Document document); - - /** - * Returns the new selection after the proposal has been applied to the given document in absolute - * document coordinates. If it returns null, no new selection is set. - * - *

    A document change can trigger other document changes, which have to be taken into account - * when calculating the new selection. Typically, this would be done by installing a document - * listener or by using a document position during {@link #apply(Document)}. - * - * @param document the document into which the proposed completion has been inserted - * @return the new selection in absolute document coordinates - */ - LinearRange getSelection(Document document); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposal.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposal.java deleted file mode 100644 index e7eaa2d9910..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposal.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.Widget; -import org.eclipse.che.ide.api.icon.Icon; - -/** - * The interface of completion proposals generated by content assist processors. A completion - * proposal contains information used to present the proposed completion to the user, to insert the - * completion should the user select it, and to present context information for the chosen - * completion once it has been inserted. - * - *

    This interface can be implemented by clients - */ -public interface CompletionProposal { - - /** - * Returns optional additional information about the proposal. The additional information will be - * presented to assist the user in deciding if the selected proposal is the desired choice. - * - * @param callback a callback to return a widget with additional information - */ - void getAdditionalProposalInfo(AsyncCallback callback); - - /** - * Returns the string to be displayed in the list of completion proposals. - * - * @return the string to be displayed - */ - String getDisplayString(); - - /** - * Returns the image to be displayed in the list of completion proposals. The image would - * typically be shown to the left of the display string. - * - * @return the image to be shown or null if no image is desired - */ - Icon getIcon(); - - void getCompletion(CompletionCallback callback); - - /** Callback called when the completion is applied. */ - interface CompletionCallback { - void onCompletion(Completion completion); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposalExtension.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposalExtension.java deleted file mode 100644 index 895c9bb64d9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionProposalExtension.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal.CompletionCallback; - -/** - * Extends {@link CompletionProposal} with the following function: - * - *

      - *
    • Allow computation of the Completion with replacing or inserting text . - *
    - * - * @author Evgen Vidolob - */ -public interface CompletionProposalExtension { - - void getCompletion(boolean insert, CompletionCallback callback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionReadyCallback.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionReadyCallback.java deleted file mode 100644 index cb7f9817e11..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionReadyCallback.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import java.util.List; - -/** Callback used to be called when the completion proposals are computed. */ -public interface CompletionReadyCallback { - /** - * Callback used to be called when the completion proposals are computed. - * - * @param proposals the proposals - */ - void onCompletionReady(List proposals); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionsSource.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionsSource.java deleted file mode 100644 index d60c19f1812..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/CompletionsSource.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -/** Interface for an asynchronous source of completions. */ -public interface CompletionsSource { - - /** - * Compute completion proposals. - * - * @param callback what to do when the completions are ready - */ - void computeCompletions(CompletionReadyCallback callback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/DefaultChainedCodeAssistProcessor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/DefaultChainedCodeAssistProcessor.java deleted file mode 100644 index 2e48233afc1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/DefaultChainedCodeAssistProcessor.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * Allows to chain code assist processor for the default given content type. It will delegate to sub - * processors. - * - * @author Florent Benoit - */ -public abstract class DefaultChainedCodeAssistProcessor implements CodeAssistProcessor { - - /** Delegate code assist processors. */ - private Set codeAssistProcessors; - - /** - * Allow to set processors. - * - * @param codeAssistProcessors the expected processors - */ - protected void setProcessors(final Set codeAssistProcessors) { - this.codeAssistProcessors = codeAssistProcessors; - } - - @Override - public void computeCompletionProposals( - final TextEditor textEditor, - final int offset, - final boolean triggered, - final CodeAssistCallback callback) { - if (!this.codeAssistProcessors.isEmpty()) { - final List proposalList = new ArrayList<>(); - final List expected = new ArrayList<>(); - for (final CodeAssistProcessor processor : this.codeAssistProcessors) { - expected.add(processor); - processor.computeCompletionProposals( - textEditor, - offset, - triggered, - new CodeAssistCallback() { - @Override - public void proposalComputed(final List processorProposals) { - expected.remove(processor); - if (processorProposals == null || processorProposals.isEmpty()) { - return; - } - proposalList.addAll(processorProposals); - - // all processors have computed their result - if (expected.isEmpty()) { - callback.proposalComputed(proposalList); - } - } - }); - } - } - } - - @Override - public String getErrorMessage() { - String errorMessage = null; - if (!this.codeAssistProcessors.isEmpty()) { - for (final CodeAssistProcessor processor : this.codeAssistProcessors) { - final String processorErrorMessage = processor.getErrorMessage(); - if (processorErrorMessage != null) { - if (errorMessage == null) { - errorMessage = processorErrorMessage; - } else { - errorMessage = errorMessage.concat(processorErrorMessage); - } - } - } - } - return errorMessage; - } - - /** - * Returns the injected processors. - * - * @return injected processors - */ - public Set getProcessors() { - return this.codeAssistProcessors; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/HasCompletionInformation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/HasCompletionInformation.java deleted file mode 100644 index 2b14598fded..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/codeassist/HasCompletionInformation.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.codeassist; - -/** @author Evgen Vidolob */ -public interface HasCompletionInformation { - void showCompletionInformation(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/AbstractTextEditorProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/AbstractTextEditorProvider.java deleted file mode 100644 index f211c88f2dd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/AbstractTextEditorProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.defaulteditor; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.editor.EditorProvider; -import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; -import org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.util.loging.Log; - -/** - * This class provides an abstract implementation of the {@link EditorProvider} interface to - * minimize the effort required to implement this interface. - * - *

    To implement an editor provider, the programmer needs only to extend this class and provide an - * implementation for the {@link #getId()} and {@link #getDescription()} methods. - * - *

    The method {@link #getEditor()} returns {@link TextEditor} that is initialized by - * configuration returned by {@link #getEditorConfiguration()} method. - * - *

    The method {@link #getEditorConfiguration()} returns {@link DefaultTextEditorConfiguration} - * instance and may be overridden in order to provide another configuration for the editor which is - * returned by {@link #getEditor()} method. - * - * @author Artem Zatsarynnyi - */ -public abstract class AbstractTextEditorProvider implements EditorProvider { - - @Inject private EditorBuilder editorBuilder; - - /** Returns configuration for initializing an editor returned by {@link #getEditor()} method. */ - protected TextEditorConfiguration getEditorConfiguration() { - return new DefaultTextEditorConfiguration(); - } - - @Override - public TextEditor getEditor() { - if (editorBuilder == null) { - Log.debug( - AbstractTextEditorProvider.class, - "No builder registered for default editor type - giving up."); - return null; - } - - final TextEditor editor = editorBuilder.buildEditor(); - editor.initialize(getEditorConfiguration()); - return editor; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/DefaultTextEditorProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/DefaultTextEditorProvider.java deleted file mode 100644 index 629d433f29d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/DefaultTextEditorProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.defaulteditor; - -public class DefaultTextEditorProvider extends AbstractTextEditorProvider { - - @Override - public String getId() { - return "cheDefaultEditor"; - } - - @Override - public String getDescription() { - return "Che Default Editor"; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/EditorBuilder.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/EditorBuilder.java deleted file mode 100644 index 0f6889540b6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/defaulteditor/EditorBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.defaulteditor; - -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -public interface EditorBuilder { - - TextEditor buildEditor(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/AbstractDocument.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/AbstractDocument.java deleted file mode 100644 index ae71a0068b8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/AbstractDocument.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.TextRange; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** An abstract implementation of {@link Document}. */ -public abstract class AbstractDocument implements Document, DocumentHandle { - - /** The document event bus. */ - private final DocumentEventBus eventBus = new DocumentEventBus(); - - /** The file holding the document. */ - private VirtualFile file; - - @Override - public DocumentEventBus getDocEventBus() { - return this.eventBus; - } - - @Override - public boolean isSameAs(final DocumentHandle document) { - return (this.equals(document)); - } - - @Override - public Document getDocument() { - return this; - } - - @Override - public DocumentHandle getDocumentHandle() { - return this; - } - - @Override - public void replace(int startLine, int startChar, int endLine, int endChar, String text) { - // does nothing by default - } - - @Override - public void setFile(VirtualFile fileNode) { - this.file = fileNode; - } - - @Override - public VirtualFile getFile() { - return this.file; - } - - @Override - public ReadOnlyDocument getReadOnlyDocument() { - return this; - } - - @Override - public void setSelectedRange(final TextRange range) { - setSelectedRange(range, false); - } - - @Override - public void setSelectedRange(final TextRange range, final boolean show) { - // does nothing by default - } - - @Override - public void setSelectedRange(final LinearRange range) { - setSelectedRange(range, false); - } - - @Override - public void setSelectedRange(final LinearRange range, final boolean show) { - // does nothing by default - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/Document.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/Document.java deleted file mode 100644 index 94360904806..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/Document.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import com.google.web.bindery.event.shared.HandlerRegistration; -import org.eclipse.che.ide.api.editor.events.CursorActivityHandler; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.TextRange; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * An abstraction over the editor representation of the document. - * - * @author "Mickaël Leduque" - */ -public interface Document extends ReadOnlyDocument { - - /** - * Changes the cursor position. - * - * @param position the new position - */ - void setCursorPosition(TextPosition position); - - /** - * Change the selected range. - * - * @param range the new selected range - */ - void setSelectedRange(TextRange range); - - /** - * Returns the line index at the given character offset. The valid offsets are 0 to char count - * inclusive. The line index for char count is line count - 1. Returns -1 - * if the offset is out of range. - * - * @param offset a character offset. - * @return line index or -1 if out of range. - */ - int getLineAtOffset(int offset); - - /** - * Returns the start character offset for the given line. - * - *

    The valid indices are 0 to line count exclusive. Returns -1 if the index is out - * of range. - * - * @param lineIndex index of the line. - * @return the line start offset or -1 if out of range. - */ - int getLineStart(int lineIndex); - - /** - * Change the selected range and optionally move the viewport to show the new selection. - * - * @param range the new selected range - * @param show true iff the viewport is moved to show the selection - */ - void setSelectedRange(TextRange range, boolean show); - - /** - * Change the selected range. - * - * @param range the new selected range - */ - void setSelectedRange(LinearRange range); - - /** - * Change the selected range and optionally move the viewport to show the new selection. - * - * @param range the new selected range - * @param show true iff the viewport is moved to show the selection - */ - void setSelectedRange(LinearRange range, boolean show); - - /** - * Returns the document handle. - * - * @return the document handle - */ - DocumentHandle getDocumentHandle(); - - /** - * Adds a cursor handler. - * - * @param handler the added handler - * @return a handle to remove the handler - */ - HandlerRegistration addCursorHandler(CursorActivityHandler handler); - - /** - * Replaces the text range with the given replacement contents. - * - * @param offset start of the range - * @param length en of the range - * @param text the replacement text - */ - void replace(int offset, int length, String text); - - /** - * Replaces the text range with the given replacement contents. - * - * @param startLine start line of the range - * @param startChar start char of the range - * @param endLine end line of the range - * @param endChar end char of the range - * @param text the replacement text - */ - void replace(int startLine, int startChar, int endLine, int endChar, String text); - - void setFile(VirtualFile file); - - VirtualFile getFile(); - - /** - * Returns a {@link ReadOnlyDocument} that refers to the same document. - * - * @return a read-only document - */ - ReadOnlyDocument getReadOnlyDocument(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentEventBus.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentEventBus.java deleted file mode 100644 index 4231c21d980..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentEventBus.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import com.google.web.bindery.event.shared.SimpleEventBus; - -/** - * EventBus dedicated to a document.
    - * Sub-classed to provide strong-typing: this is a dedicated channel. - */ -public class DocumentEventBus extends SimpleEventBus {} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentHandle.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentHandle.java deleted file mode 100644 index 46ab080592e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentHandle.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -/** Handle on an editor document. */ -public interface DocumentHandle { - - /** - * tells if the handles point to the same document. - * - * @param documentHandle the other document handle to compare - * @return true iff the pointed document is the same. - */ - boolean isSameAs(DocumentHandle documentHandle); - - /** - * Returns the private event bus for the pointed editor. - * - * @return the private event bus - */ - DocumentEventBus getDocEventBus(); - - /** - * Returns the pointed document - * - * @return the document - */ - Document getDocument(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorage.java deleted file mode 100644 index 414eb04b882..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorage.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.ImplementedBy; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** Interface for file retrieval and storage operations. */ -@ImplementedBy(DocumentStorageImpl.class) -public interface DocumentStorage { - - /** - * Retrieves the file content. - * - * @param file the file - * @param callback operation to do when the content is ready - */ - void getDocument(@NotNull VirtualFile file, @NotNull final DocumentCallback callback); - - /** - * Retrieves the file content. - * - * @param file the file - * @return the promise which should return content - */ - @NotNull - Promise getDocument(@NotNull VirtualFile file); - - /** - * Saves the file content. - * - * @param editorInput the editor input - * @param document the document - * @param overwrite - * @param callback operation to do when the content is ready - */ - void saveDocument( - @Nullable final EditorInput editorInput, - @NotNull Document document, - boolean overwrite, - @NotNull final AsyncCallback callback); - - /** - * Action taken when the document is closed. - * - * @param document the document - */ - void documentClosed(@NotNull Document document); - - /** Action taken when retrieve action is successful. */ - interface DocumentCallback { - /** - * Action taken when retrieve action is successful. - * - * @param content the content that was received - */ - void onDocumentReceived(String content); - - /** - * Action taken when retrieve action fails. - * - * @param caught the exception - */ - void onDocumentLoadFailure(Throwable caught); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorageImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorageImpl.java deleted file mode 100644 index c6061ad4c94..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/DocumentStorageImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -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.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.events.FileEvent; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.util.loging.Log; - -/** Implementation of {@link DocumentStorage}. */ -public class DocumentStorageImpl implements DocumentStorage { - - private final EventBus eventBus; - - @Inject - public DocumentStorageImpl(final EventBus eventBus) { - this.eventBus = eventBus; - } - - @Override - public void getDocument( - @NotNull final VirtualFile file, @NotNull final DocumentCallback callback) { - file.getContent() - .then( - new Operation() { - @Override - public void apply(String result) throws OperationException { - Log.debug( - DocumentStorageImpl.class, "Document retrieved (" + file.getLocation() + ")."); - try { - callback.onDocumentReceived(result); - } catch (final Exception e) { - Log.warn( - DocumentStorageImpl.class, - "Exception during doc retrieve success callback: ", - e); - } - } - }) - .catchError( - new Operation() { - @Override - public void apply(PromiseError arg) throws OperationException { - try { - callback.onDocumentLoadFailure(arg.getCause()); - } catch (final Exception e) { - Log.warn( - DocumentStorageImpl.class, - "Exception during doc retrieve failure callback: ", - e); - } - Log.error( - DocumentStorageImpl.class, - "Could not retrieve document (" + file.getLocation() + ").", - arg.getCause()); - } - }); - } - - @Override - public Promise getDocument(@NotNull VirtualFile file) { - return file.getContent(); - } - - @Override - public void saveDocument( - final EditorInput editorInput, - @NotNull final Document document, - final boolean overwrite, - @NotNull final AsyncCallback callback) { - final VirtualFile file = editorInput.getFile(); - - file.updateContent(document.getContents()) - .then( - new Operation() { - @Override - public void apply(Void arg) throws OperationException { - Log.debug( - DocumentStorageImpl.class, "Document saved (" + file.getLocation() + ")."); - DocumentStorageImpl.this.eventBus.fireEvent(FileEvent.createFileSavedEvent(file)); - try { - callback.onSuccess(editorInput); - } catch (final Exception e) { - Log.warn( - DocumentStorageImpl.class, "Exception during save success callback: ", e); - } - } - }) - .catchError( - new Operation() { - @Override - public void apply(PromiseError arg) throws OperationException { - Log.error( - DocumentStorageImpl.class, - "Document save failed (" + file.getLocation() + ").", - arg.getCause()); - try { - callback.onFailure(arg.getCause()); - } catch (final Exception e) { - Log.warn( - DocumentStorageImpl.class, "Exception during save failure callback: ", e); - } - } - }); - } - - @Override - public void documentClosed(final Document document) {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/ReadOnlyDocument.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/ReadOnlyDocument.java deleted file mode 100644 index 0a1989ba105..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/ReadOnlyDocument.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.TextRange; - -public interface ReadOnlyDocument { - - /** - * Returns a line/character position for the given offset position. - * - * @param index the position from the start in the document - * @return the line/character position - */ - TextPosition getPositionFromIndex(int index); - - /** - * Get linear position in the editor from a line/character position. - * - * @param position the line/character position - * @return the offset from the document start - */ - int getIndexFromPosition(TextPosition position); - - /** - * Returns the cursor position in the editor. - * - * @return the cursor position - */ - TextPosition getCursorPosition(); - - /** - * Returns the cursor position as an offset from the start. - * - * @return the cursor position - */ - int getCursorOffset(); - - /** - * Returns the selection range as a {@link TextRange} (i.e. two line, char objects: start en end). - * - * @return the selection range - */ - TextRange getSelectedTextRange(); - - /** - * Returns the selection range as a {@link LinearRange} (ie.e a start offset and a length). - * - * @return the selection range - */ - LinearRange getSelectedLinearRange(); - - /** - * Returns the number of lines in the document. - * - * @return the number of lines - */ - int getLineCount(); - - /** - * Returns the contents of the editor. - * - * @return the contents - */ - String getContents(); - - /** - * Returns the text content in the given range.
    - * Lines are separated by \n - * - * @param offset the start of the range - * @param length the length of the range - * @return the range content - */ - String getContentRange(int offset, int length); - - /** - * Returns the text content in the given range.
    - * Lines are separated by \n - * - * @param range the range - * @return the range content - */ - String getContentRange(TextRange range); - - /** - * Returns the line content (without delimiter). - * - * @param line the line index - * @return the content of the line - */ - String getLineContent(int line); - - /** - * Returns the {@link TextRange} that defines the line. - * - * @param line line index - * @return the text range - */ - TextRange getTextRangeForLine(int line); - - /** - * Returns the {@link LinearRange} (offset, length) that defines the line. - * - * @param line line index - * @return the offset range - */ - LinearRange getLinearRangeForLine(int line); - - /** - * Returns the document text size. - * - * @return the document size - */ - int getContentsCharCount(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/UseDocumentHandle.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/UseDocumentHandle.java deleted file mode 100644 index d68c7f64ba3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/document/UseDocumentHandle.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.document; - -/** - * Interface for components that use a document handle.
    - * note: this is for component that use, not produce handles. - */ -public interface UseDocumentHandle { - - /** - * Set the document handle. - * - * @param handle the handle - */ - void setDocumentHandle(DocumentHandle handle); - - /** - * Returns the document handle. - * - * @return the handle - */ - DocumentHandle getDocumentHandle(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/AutoSaveTextEditorConfiguration.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/AutoSaveTextEditorConfiguration.java deleted file mode 100644 index 7954046d5f5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/AutoSaveTextEditorConfiguration.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.editorconfig; - -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.reconciler.Reconciler; -import org.eclipse.che.ide.api.editor.reconciler.ReconcilerWithAutoSave; - -/** @author Evgen Vidolob */ -public class AutoSaveTextEditorConfiguration extends DefaultTextEditorConfiguration { - - private ReconcilerWithAutoSave reconcilerWithAutoSave = - new ReconcilerWithAutoSave(DocumentPartitioner.DEFAULT_CONTENT_TYPE, getPartitioner()); - - @Override - public Reconciler getReconciler() { - return reconcilerWithAutoSave; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/DefaultTextEditorConfiguration.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/DefaultTextEditorConfiguration.java deleted file mode 100644 index f29935e1516..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/DefaultTextEditorConfiguration.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.editorconfig; - -import static org.eclipse.che.ide.api.editor.partition.DocumentPartitioner.DEFAULT_CONTENT_TYPE; - -import java.util.Map; -import org.eclipse.che.ide.api.editor.annotation.AnnotationModel; -import org.eclipse.che.ide.api.editor.changeintercept.ChangeInterceptorProvider; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistProcessor; -import org.eclipse.che.ide.api.editor.formatter.ContentFormatter; -import org.eclipse.che.ide.api.editor.partition.ConstantPartitioner; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMap; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistProcessor; -import org.eclipse.che.ide.api.editor.reconciler.DefaultReconciler; -import org.eclipse.che.ide.api.editor.reconciler.Reconciler; -import org.eclipse.che.ide.api.editor.signature.SignatureHelpProvider; - -/** Default implementation of the {@link TextEditorConfiguration}. */ -public class DefaultTextEditorConfiguration implements TextEditorConfiguration { - - private DefaultReconciler reconciler; - private ConstantPartitioner partitioner; - - @Override - public int getTabWidth() { - return 3; - } - - @Override - public ContentFormatter getContentFormatter() { - return null; - } - - @Override - public Map getContentAssistantProcessors() { - return null; - } - - @Override - public Reconciler getReconciler() { - return reconciler == null - ? reconciler = new DefaultReconciler(DEFAULT_CONTENT_TYPE, getPartitioner()) - : reconciler; - } - - @Override - public DocumentPartitioner getPartitioner() { - return partitioner == null ? partitioner = new ConstantPartitioner() : partitioner; - } - - @Override - public AnnotationModel getAnnotationModel() { - return null; - } - - @Override - public DocumentPositionMap getDocumentPositionMap() { - return null; - } - - @Override - public QuickAssistProcessor getQuickAssistProcessor() { - return null; - } - - @Override - public ChangeInterceptorProvider getChangeInterceptorProvider() { - return null; - } - - @Override - public SignatureHelpProvider getSignatureHelpProvider() { - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/EditorUpdateAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/EditorUpdateAction.java deleted file mode 100644 index e843bb2d346..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/EditorUpdateAction.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.editorconfig; - -/** Interface for update operations on the editor. */ -public interface EditorUpdateAction { - - /** Refresh action. */ - void doRefresh(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/TextEditorConfiguration.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/TextEditorConfiguration.java deleted file mode 100644 index c5ac044c9c0..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/editorconfig/TextEditorConfiguration.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.editorconfig; - -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.annotation.AnnotationModel; -import org.eclipse.che.ide.api.editor.changeintercept.ChangeInterceptorProvider; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistProcessor; -import org.eclipse.che.ide.api.editor.formatter.ContentFormatter; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMap; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistProcessor; -import org.eclipse.che.ide.api.editor.reconciler.Reconciler; -import org.eclipse.che.ide.api.editor.signature.SignatureHelpProvider; - -/** Configure extended functions of the editor. */ -public interface TextEditorConfiguration { - - /** - * Returns the visual width of the tab character. This implementation always returns 3. - * - * @return the tab width - */ - int getTabWidth(); - - /** - * Returns the content formatter. - * - * @return the content formatter - */ - @Nullable - ContentFormatter getContentFormatter(); - - /** - * Returns the content assistant (completion) processors. - * - * @return the code assist processors - */ - @Nullable - Map getContentAssistantProcessors(); - - /** - * Returns the reconciler. - * - * @return the reconciler - */ - @Nullable - Reconciler getReconciler(); - - /** - * Returns the document partitioner. - * - * @return the document partitioner - */ - @NotNull - DocumentPartitioner getPartitioner(); - - /** - * Return the document position model. - * - * @return the position model - */ - @Nullable - DocumentPositionMap getDocumentPositionMap(); - - /** - * Return the annotation model. - * - * @return the annotation model - */ - @Nullable - AnnotationModel getAnnotationModel(); - - /** - * Return the Quickassist assistant processor. - * - * @return the quickassist assistant processor - */ - @Nullable - QuickAssistProcessor getQuickAssistProcessor(); - - /** - * Return the {@link ChangeInterceptorProvider}.
    - * - * @return the change interceptors - */ - @Nullable - ChangeInterceptorProvider getChangeInterceptorProvider(); - - /** - * Return the {@link SignatureHelpProvider} - * - * @return the signature help provider - */ - @Nullable - SignatureHelpProvider getSignatureHelpProvider(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeEvent.java deleted file mode 100644 index 1f36c743b9a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeEvent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Events triggered just before the selection changes (allows to modify selection on the fly). - * - * @author "Mickaël Leduque" - */ -public class BeforeSelectionChangeEvent extends GwtEvent { - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final BeforeSelectionChangeHandler handler) { - handler.onBeforeSelectionChange(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeHandler.java deleted file mode 100644 index f700a22f4f9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/BeforeSelectionChangeHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for {@link BeforeSelectionChangeEvent}. - * - * @author "Mickaël Leduque" - */ -public interface BeforeSelectionChangeHandler extends EventHandler { - void onBeforeSelectionChange(BeforeSelectionChangeEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestEvent.java deleted file mode 100644 index 6671e5b6cf8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestEvent.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; - -/** Events that correspond to external completion requests. */ -public class CompletionRequestEvent extends GwtEvent { - - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final CompletionRequestHandler handler) { - handler.onCompletionRequest(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestHandler.java deleted file mode 100644 index 49bb22083ab..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CompletionRequestHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** Handler for {@link CompletionRequestEvent} events. */ -public interface CompletionRequestHandler extends EventHandler { - - /** - * Method called when reacting to the event. - * - * @param event the event - */ - void onCompletionRequest(CompletionRequestEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityEvent.java deleted file mode 100644 index ecb042c7e38..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityEvent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event type for cursor activity. - * - * @author "Mickaël Leduque" - */ -public class CursorActivityEvent extends GwtEvent { - /** Type instance for the event. */ - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final CursorActivityHandler handler) { - handler.onCursorActivity(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityHandler.java deleted file mode 100644 index ee52706f798..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/CursorActivityHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for {@link CursorActivityEvent}. - * - * @author "Mickaël Leduque" - */ -public interface CursorActivityHandler extends EventHandler { - - /** - * Action triggered by the event. - * - * @param event the event - */ - void onCursorActivity(CursorActivityEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedEvent.java deleted file mode 100644 index 2da28b36ba1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedEvent.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; - -public class DocumentChangedEvent extends GwtEvent { - - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - /** The document handle */ - private final DocumentHandle document; - - /** The document offset */ - private final int offset; - - /** Length of the replaced document text */ - private final int length; - - /** Text inserted into the document */ - private final String text; - - private final int removedCharCount; - - public DocumentChangedEvent( - final DocumentHandle document, - final int offset, - final int length, - final String text, - int removedCharCount) { - this.offset = offset; - this.length = length; - this.text = text; - this.document = document; - this.removedCharCount = removedCharCount; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final DocumentChangedHandler handler) { - handler.onDocumentChanged(this); - } - - public int getOffset() { - return offset; - } - - public int getLength() { - return length; - } - - public String getText() { - return text; - } - - public DocumentHandle getDocument() { - return document; - } - - public int getRemoveCharCount() { - return removedCharCount; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedHandler.java deleted file mode 100644 index dac83fbb078..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangedHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -public interface DocumentChangedHandler extends EventHandler { - - void onDocumentChanged(DocumentChangedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingEvent.java deleted file mode 100644 index c1a449d8dc3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingEvent.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; - -public class DocumentChangingEvent extends GwtEvent { - - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - /** The document handle */ - private final DocumentHandle document; - - /** The document offset */ - private final int offset; - - /** Length of the replaced document text */ - private final int length; - - /** Text inserted into the document */ - private final String text; - - private final int removedCharCount; - - public DocumentChangingEvent( - final DocumentHandle document, - final int offset, - final int length, - final String text, - int removedCharCount) { - this.offset = offset; - this.length = length; - this.text = text; - this.document = document; - this.removedCharCount = removedCharCount; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final DocumentChangingHandler handler) { - handler.onDocumentChanging(this); - } - - public int getOffset() { - return offset; - } - - public int getLength() { - return length; - } - - public String getText() { - return text; - } - - public DocumentHandle getDocument() { - return document; - } - - public int getRemoveCharCount() { - return removedCharCount; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingHandler.java deleted file mode 100644 index 55dd9027be9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentChangingHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -public interface DocumentChangingHandler extends EventHandler { - - void onDocumentChanging(DocumentChangingEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyEvent.java deleted file mode 100644 index 2c6fcea4edd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyEvent.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.editor.document.Document; - -/** Event will be fired then document fully initialized in editor */ -public class DocumentReadyEvent extends GwtEvent { - - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - /** The document. */ - private final Document document; - - /** @param document the related initialized document */ - public DocumentReadyEvent(final Document document) { - this.document = document; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final DocumentReadyHandler handler) { - handler.onDocumentReady(this); - } - - public Document getDocument() { - return document; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyHandler.java deleted file mode 100644 index 52afaee3f41..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** Handle event then editor fully initialized */ -public interface DocumentReadyHandler extends EventHandler { - - void onDocumentReady(DocumentReadyEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedEvent.java deleted file mode 100644 index db4161a2708..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Fires by editor when change dirty state(content modified or saved) - * - * @author Evgen Vidolob - * @version $Id: - */ -public class EditorDirtyStateChangedEvent extends GwtEvent { - - public static final GwtEvent.Type TYPE = - new Type(); - - private EditorPartPresenter editor; - - /** @param editor */ - public EditorDirtyStateChangedEvent(EditorPartPresenter editor) { - super(); - this.editor = editor; - } - - /** {@inheritDoc} */ - @Override - public com.google.gwt.event.shared.GwtEvent.Type - getAssociatedType() { - return TYPE; - } - - /** {@inheritDoc} */ - @Override - protected void dispatch(EditorDirtyStateChangedHandler handler) { - handler.onEditorDirtyStateChanged(this); - } - - /** @return the editor */ - public EditorPartPresenter getEditor() { - return editor; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedHandler.java deleted file mode 100644 index 9ec99637490..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorDirtyStateChangedHandler.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handle {@link EditorDirtyStateChangedEvent} - * - * @author Evgen Vidolob - * @version $Id: - */ -public interface EditorDirtyStateChangedHandler extends EventHandler { - - /** - * Editor became dirty, containing unsaved changes, or got saved - * - * @param event - */ - void onEditorDirtyStateChanged(EditorDirtyStateChangedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorSettingsChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorSettingsChangedEvent.java deleted file mode 100644 index 6562f4736d2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/EditorSettingsChangedEvent.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event fired when editor's settings has been changed. - * - * @author Roman Nikitenko - */ -public class EditorSettingsChangedEvent - extends GwtEvent { - - /** Handles Editor Settings Changed Event */ - public interface EditorSettingsChangedHandler extends EventHandler { - /** - * Perform actions when editor's settings has been changed. - * - * @param event editor's settings changed event - */ - void onEditorSettingsChanged(EditorSettingsChangedEvent event); - } - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(EditorSettingsChangedHandler handler) { - handler.onEditorSettingsChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateEvent.java deleted file mode 100644 index d02a3c777e9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; - -/** Event that notifies of file content changes. */ -public class FileContentUpdateEvent extends GwtEvent { - /** The event type. */ - public static Type TYPE = new Type<>(); - - /** The path to the file that is updated. */ - private final String filePath; - - /** Encoded content. */ - private String modificationStamp; - - /** - * Constructor. - * - * @param filePath the path of the file that changed - */ - public FileContentUpdateEvent(final String filePath) { - this.filePath = filePath; - } - - public FileContentUpdateEvent(final String filePath, final String contentStamp) { - this.filePath = filePath; - this.modificationStamp = contentStamp; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(FileContentUpdateHandler handler) { - handler.onFileContentUpdate(this); - } - - /** - * Returns the path to the file that had changes. - * - * @return the path - */ - public String getFilePath() { - return filePath; - } - - /** - * Returns content's stamp of the file that had changes. - * - * @return the path - */ - public String getModificationStamp() { - return modificationStamp; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateHandler.java deleted file mode 100644 index 1762cb9c40e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileContentUpdateHandler.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** Handles file content change events. */ -public interface FileContentUpdateHandler extends EventHandler { - /** - * The file content has changed/ - * - * @param event the event - */ - void onFileContentUpdate(FileContentUpdateEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileEvent.java deleted file mode 100755 index d42b3e8f23b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/FileEvent.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import static org.eclipse.che.ide.api.editor.events.FileEvent.FileOperation.CLOSE; -import static org.eclipse.che.ide.api.editor.events.FileEvent.FileOperation.OPEN; -import static org.eclipse.che.ide.api.editor.events.FileEvent.FileOperation.SAVE; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Event that describes the fact that file is opened/closed/saved. - * - * @author Nikolay Zamosenchuk - * @author Artem Zatsarynnyi - * @author Roman Nikitenko - */ -public class FileEvent extends GwtEvent { - - public static Type TYPE = new Type<>(); - private VirtualFile file; - private FileOperation fileOperation; - private EditorTab tab; - - /** - * Creates new {@link FileEvent} with info about virtual file. - * - * @param file {@link VirtualFile} that represents an affected file - * @param fileOperation file operation - */ - private FileEvent(VirtualFile file, FileOperation fileOperation) { - this.file = file; - this.fileOperation = fileOperation; - } - - /** - * Creates new {@link FileEvent} with info about editor tab. - * - * @param tab {@link EditorTab} that represents an affected file to perform {@code fileOperation} - * @param fileOperation file operation - */ - private FileEvent(EditorTab tab, FileOperation fileOperation) { - this(tab.getFile(), fileOperation); - this.tab = tab; - } - - /** Creates a event for {@code FileOperation.OPEN}. */ - public static FileEvent createFileOpenedEvent(VirtualFile file) { - return new FileEvent(file, OPEN); - } - - /** - * @deprecated use {@link EditorAgent#openEditor(org.eclipse.che.ide.api.resources.VirtualFile)} - */ - @Deprecated - public static FileEvent createOpenFileEvent(VirtualFile file) { - return new FileEvent(file, OPEN); - } - - /** - * Creates a event for {@code FileOperation.CLOSE}. Note: the pane which contains this {@code tab} - * will be closed when the pane doesn't contains editors anymore. - * - * @param tab tab of the file to close - */ - public static FileEvent createFileClosedEvent(EditorTab tab) { - return new FileEvent(tab, CLOSE); - } - - /** @deprecated use {@link EditorAgent#closeEditor(EditorPartPresenter)} */ - @Deprecated - public static FileEvent createCloseFileEvent(EditorTab tab) { - return new FileEvent(tab, CLOSE); - } - - /** Creates a event for {@code FileOperation.SAVE}. */ - public static FileEvent createFileSavedEvent(VirtualFile file) { - return new FileEvent(file, SAVE); - } - - @Deprecated - public static FileEvent createSaveFileEvent(VirtualFile file) { - return new FileEvent(file, SAVE); - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** @return {@link VirtualFile} that represents an affected file */ - public VirtualFile getFile() { - return file; - } - - /** @return the type of operation performed with file */ - public FileOperation getOperationType() { - return fileOperation; - } - - @Nullable - public EditorTab getEditorTab() { - return tab; - } - - @Override - protected void dispatch(FileEventHandler handler) { - handler.onFileOperation(this); - } - - public enum FileOperation { - OPEN, - SAVE, - CLOSE - } - - /** Handles OpenFileEvent */ - public interface FileEventHandler extends EventHandler { - void onFileOperation(FileEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickEvent.java deleted file mode 100644 index d4e4b3e230a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickEvent.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import elemental.events.MouseEvent; - -/** - * Events for clicks on the gutter element of the editor. - * - * @author "Mickaël Leduque" - */ -public class GutterClickEvent extends GwtEvent { - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - /** The line of the event. */ - private final int lineNumber; - /** the gutter. */ - private final String gutterId; - - private final MouseEvent event; - - /** - * @param lineNumber - * @param gutterId - */ - public GutterClickEvent(final int lineNumber, final String gutterId, final MouseEvent event) { - this.lineNumber = lineNumber; - this.gutterId = gutterId; - this.event = event; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final GutterClickHandler handler) { - handler.onGutterClick(this); - } - - /** - * Returns the line on which the click happened. - * - * @return the line - */ - public int getLineNumber() { - return lineNumber; - } - - /** - * Returns the id of the gutter on which the click happened. - * - * @return the id of the gutter - */ - public String getGutterId() { - return gutterId; - } - - /** - * Returns the mouse event that generated the gutter event. - * - * @return the mouse event - */ - public MouseEvent getEvent() { - return event; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickHandler.java deleted file mode 100644 index c8d26862b4f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/GutterClickHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for {@link GutterClickEvent}. - * - * @author "Mickaël Leduque" - */ -public interface GutterClickHandler extends EventHandler { - void onGutterClick(GutterClickEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasBeforeSelectionChangeHandlers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasBeforeSelectionChangeHandlers.java deleted file mode 100644 index c845835f59e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasBeforeSelectionChangeHandlers.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -/** - * Interface for components which handle {@link BeforeSelectionChangeEvent}. - * - * @author "Mickaël Leduque" - */ -public interface HasBeforeSelectionChangeHandlers extends HasHandlers { - HandlerRegistration addBeforeSelectionChangeHandler(BeforeSelectionChangeHandler handler); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasCursorActivityHandlers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasCursorActivityHandlers.java deleted file mode 100644 index e7d08465a3e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasCursorActivityHandlers.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -/** - * Interface for components that handle {@link CursorActivityEvent}. - * - * @author "Mickaël Leduque" - */ -public interface HasCursorActivityHandlers extends HasHandlers { - /** - * Add a {@link CursorActivityHandler}. - * - * @param handler the handler to add - * @return a handler used to remove the handler - */ - HandlerRegistration addCursorActivityHandler(CursorActivityHandler handler); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasDocumentReadyHandlers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasDocumentReadyHandlers.java deleted file mode 100644 index b371351b099..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasDocumentReadyHandlers.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -/** Interface for components which handle {@link DocumentReadyEvent}. */ -public interface HasDocumentReadyHandlers extends HasHandlers { - HandlerRegistration addDocumentReadyHandler(DocumentReadyHandler handler); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasGutterClickHandlers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasGutterClickHandlers.java deleted file mode 100644 index f671f454e8a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasGutterClickHandlers.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -/** - * Interface for components which handle {@link GutterClickEvent}. - * - * @author "Mickaël Leduque" - */ -public interface HasGutterClickHandlers extends HasHandlers { - HandlerRegistration addGutterClickHandler(GutterClickHandler handler); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasViewPortChangeHandlers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasViewPortChangeHandlers.java deleted file mode 100644 index 6d8c5e8c3d9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/HasViewPortChangeHandlers.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -/** - * Interface for components which handle {@link ViewPortChangeEvent}. - * - * @author "Mickaël Leduque" - */ -public interface HasViewPortChangeHandlers extends HasHandlers { - HandlerRegistration addViewPortChangeHandler(ViewPortChangeHandler handler); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeEvent.java deleted file mode 100644 index 105e76156c8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeEvent.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.changeintercept.TextChange; - -/** An event describing a change in the text of an editor. */ -public class TextChangeEvent extends GwtEvent { - - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - /** The text change. */ - private final TextChange change; - - /** The updater. */ - private final ChangeUpdater updater; - - public TextChangeEvent(@NotNull final TextChange change, @NotNull final ChangeUpdater updater) { - this.change = change; - this.updater = updater; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final TextChangeHandler handler) { - handler.onTextChange(this); - } - - public TextChange getChange() { - return this.change; - } - - public void update(final TextChange updatedChange) { - this.updater.update(updatedChange); - } - - @Override - public String toString() { - return "TextChangeEvent [change=" + change + "]"; - } - - /** Action to update the change event. */ - public interface ChangeUpdater { - void update(TextChange updatedChange); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeHandler.java deleted file mode 100644 index c76242ff22d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/TextChangeHandler.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -public interface TextChangeHandler extends EventHandler { - - void onTextChange(TextChangeEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeEvent.java deleted file mode 100644 index cbd4ea0fd45..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeEvent.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event for change of viewport (visible section) changes. - * - * @author "Mickaël Leduque" - */ -public class ViewPortChangeEvent extends GwtEvent { - /** The type instance for this event. */ - public static final Type TYPE = new Type<>(); - - private final int viewPortStart; - private final int viewPortEnd; - - public ViewPortChangeEvent(int from, int to) { - this.viewPortStart = from; - this.viewPortEnd = to; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final ViewPortChangeHandler handler) { - handler.onViewPortChange(this); - } - - public int getViewPortStart() { - return viewPortStart; - } - - public int getViewPortEnd() { - return viewPortEnd; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeHandler.java deleted file mode 100644 index 5b45d44a7ac..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/ViewPortChangeHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for {@link ViewPortChangeEvent}. - * - * @author "Mickaël Leduque" - */ -public interface ViewPortChangeHandler extends EventHandler { - void onViewPortChange(ViewPortChangeEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/doc/DocReadyWrapper.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/doc/DocReadyWrapper.java deleted file mode 100644 index 74e8b4c9a38..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/doc/DocReadyWrapper.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.events.doc; - -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentReadyEvent; -import org.eclipse.che.ide.api.editor.events.DocumentReadyHandler; - -/** Wrapper around components that need to wait for documents to be ready. */ -public class DocReadyWrapper { - - private DocReadyInit docReadyInit; - private final T wrapped; - private HandlerRegistration docReadyRegistration; - private DocumentHandle documentHandle; - - public DocReadyWrapper(final EventBus generalEventBus, final T wrapped) { - this(generalEventBus, null, wrapped); - } - - public DocReadyWrapper( - final EventBus generalEventBus, @Nullable final DocReadyInit init, final T wrapped) { - this.docReadyInit = init; - this.wrapped = wrapped; - this.docReadyRegistration = - generalEventBus.addHandler( - DocumentReadyEvent.TYPE, - new DocumentReadyHandler() { - - @Override - public void onDocumentReady(final DocumentReadyEvent event) { - if (event == null) { - return; - } - - // stop listening DocReady events - if (docReadyRegistration != null) { - docReadyRegistration.removeHandler(); - } - documentHandle = event.getDocument().getDocumentHandle(); - - final DocReadyInit initializer = DocReadyWrapper.this.docReadyInit; - if (initializer != null) { - initializer.initialize(documentHandle, DocReadyWrapper.this.wrapped); - } - } - }); - } - - /** Remove all active handlers. */ - public void release() { - if (this.docReadyRegistration != null) { - docReadyRegistration.removeHandler(); - docReadyRegistration = null; - } - } - - protected void setDocReadyInit(final DocReadyInit initializer) { - this.docReadyInit = initializer; - } - - /** Interface for initialization that occurs when the document is ready. */ - public interface DocReadyInit { - /** Triggered when the document is ready. */ - public void initialize(DocumentHandle documentHandle, T wrapped); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/DefaultExtensionToMimeTypeMappings.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/DefaultExtensionToMimeTypeMappings.java deleted file mode 100644 index ed1ba0c6316..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/DefaultExtensionToMimeTypeMappings.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import java.util.Collection; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import javax.inject.Singleton; - -/** @author Dmytro Kulieshov */ -@Singleton -public class DefaultExtensionToMimeTypeMappings { - private final Map> mappings = - ImmutableMap.>builder() - .put("c", ImmutableSet.of("text/x-csrc")) - .put("C", ImmutableSet.of("text/x-c++src")) - .put("cc", ImmutableSet.of("text/x-c++src")) - .put("cpp", ImmutableSet.of("text/x-c++src")) - .put("ino", ImmutableSet.of("text/x-c++src")) - .put("h", ImmutableSet.of("text/x-chdr")) - .put("hh", ImmutableSet.of("text/x-c++hdr")) - .put("c++", ImmutableSet.of("text/x-c++src")) - .put("cs", ImmutableSet.of("text/x-csharp")) - .put("m", ImmutableSet.of("text/x-objective-c")) - .put("java", ImmutableSet.of("text/x-java")) - .put("class", ImmutableSet.of("text/x-java")) - .put("scala", ImmutableSet.of("text/x-scala")) - .put("sbt", ImmutableSet.of("text/x-scala")) - .put("clj", ImmutableSet.of("text/x-clojure")) - .put("groovy", ImmutableSet.of("text/x-groovy")) - .put("gvy", ImmutableSet.of("text/x-groovy")) - .put("gy", ImmutableSet.of("text/x-groovy")) - .put("gradle", ImmutableSet.of("text/x-groovy")) - .put("kt", ImmutableSet.of("text/x-kotlin")) - .put("js", ImmutableSet.of("application/javascript", "text/javascript")) - .put("coffee", ImmutableSet.of("text/x-coffeescript")) - .put("json", ImmutableSet.of("application/json")) - .put("ts", ImmutableSet.of("application/javascript", "application/typescript")) - .put("es6", ImmutableSet.of("application/javascript", "text/javascript")) - .put("jsx", ImmutableSet.of("application/javascript", "text/javascript")) - .put("css", ImmutableSet.of("text/css")) - .put("scss", ImmutableSet.of("text/x-scss")) - .put("less", ImmutableSet.of("text/x-less")) - .put("sass", ImmutableSet.of("text/x-sass")) - .put("xml", ImmutableSet.of("application/xml")) - .put("html", ImmutableSet.of("text/html")) - .put("xhtml", ImmutableSet.of("application/xml+xhtml", "text/html")) - .put("htm", ImmutableSet.of("text/html")) - .put("dtd", ImmutableSet.of("application/xml-dtd")) - .put("yaml", ImmutableSet.of("text/x-yaml")) - .put("yml", ImmutableSet.of("text/x-yaml")) - .put("markdown", ImmutableSet.of("text/x-markdown")) - .put("mdown", ImmutableSet.of("text/x-markdown")) - .put("mkdn", ImmutableSet.of("text/x-markdown")) - .put("mkd", ImmutableSet.of("text/x-markdown")) - .put("md", ImmutableSet.of("text/x-markdown")) - .put("mdwn", ImmutableSet.of("text/x-markdown")) - .put("rest", ImmutableSet.of("text/x-rst")) - .put("rst", ImmutableSet.of("text/x-rst")) - .put("tex", ImmutableSet.of("text/x-latex")) - .put("cls", ImmutableSet.of("text/x-latex")) - .put("sty", ImmutableSet.of("text/x-latex")) - .put("py", ImmutableSet.of("text/x-python")) - .put("pyx", ImmutableSet.of("text/x-cython")) - .put("rb", ImmutableSet.of("text/x-ruby")) - .put("erb", ImmutableSet.of("text/html")) - .put("gemspec", ImmutableSet.of("text/x-ruby")) - .put("go", ImmutableSet.of("text/x-go")) - .put("rs", ImmutableSet.of("text/x-rustsrc")) - .put("erl", ImmutableSet.of("text/x-erlang")) - .put("lua", ImmutableSet.of("text/x-lua")) - .put("tcl", ImmutableSet.of("text/x-tcl")) - .put("pl", ImmutableSet.of("text/x-perl")) - .put("pm", ImmutableSet.of("text/x-perl")) - .put("php", ImmutableSet.of("text/x-php")) - .put("phtml", ImmutableSet.of("text/x-php")) - .put("ejs", ImmutableSet.of("application/x-ejs")) - .put("jsp", ImmutableSet.of("application/x-jsp")) - .put("asp", ImmutableSet.of("application/x-aspx")) - .put("aspx", ImmutableSet.of("application/x-aspx")) - .put("slim", ImmutableSet.of("text/x-slim")) - .put("ml", ImmutableSet.of("text/x-ocaml")) - .put("fs", ImmutableSet.of("text/x-fsharp")) - .put("lisp", ImmutableSet.of("text/x-commonlisp")) - .put("cl", ImmutableSet.of("text/x-commonlisp")) - .put("hs", ImmutableSet.of("text/x-haskell")) - .put("scm", ImmutableSet.of("text/x-scheme")) - .put("sql", ImmutableSet.of("text/x-sql")) - .put("properties", ImmutableSet.of("text/x-properties")) - .put("diff", ImmutableSet.of("text/x-diff")) - .put("r", ImmutableSet.of("text/x-rsrc")) - .put("R", ImmutableSet.of("text/x-rsrc")) - .put("csv", ImmutableSet.of("text/csv")) - .put("sh", ImmutableSet.of("text/x-sh")) - .put("pas", ImmutableSet.of("text/x-pascal")) - .put("p", ImmutableSet.of("text/x-pascal")) - .put("fpm", ImmutableSet.of("text/x-pascal")) - .put("st", ImmutableSet.of("text/x-stsrc")) - .put("cob", ImmutableSet.of("text/x-cobol")) - .put("cbl", ImmutableSet.of("text/x-cobol")) - .put("cpy", ImmutableSet.of("text/x-cobol")) - .put("f", ImmutableSet.of("text/x-fortran")) - .put("for", ImmutableSet.of("text/x-fortran")) - .put("f90", ImmutableSet.of("text/x-fortran")) - .put("f95", ImmutableSet.of("text/x-fortran")) - .put("f03", ImmutableSet.of("text/x-fortran")) - .put("vb", ImmutableSet.of("text/x-vb")) - .put("vbs", ImmutableSet.of("text/vbscript")) - .put("pp", ImmutableSet.of("text/x-puppet")) - .put("docker", ImmutableSet.of("text/x-dockerfile")) - .put("jag", ImmutableSet.of("text/jaggery")) - .build(); - - public Set getExtensions() { - return ImmutableSet.copyOf(mappings.keySet()); - } - - public Set getMimeTypes() { - Set mimeTypes = - mappings.values().stream().flatMap(Collection::stream).collect(Collectors.toSet()); - - return ImmutableSet.copyOf(mimeTypes); - } - - public Map> getMappings() { - return mappings; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/ExtensionFileTypeIdentifier.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/ExtensionFileTypeIdentifier.java deleted file mode 100644 index 615ef6d8c6a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/ExtensionFileTypeIdentifier.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import com.google.common.collect.ImmutableList; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.util.loging.Log; - -@Singleton -public class ExtensionFileTypeIdentifier implements FileTypeIdentifier { - - /** The known extensions registry. */ - Map> mappings = new HashMap<>(); - - @Inject - public ExtensionFileTypeIdentifier( - DefaultExtensionToMimeTypeMappings defaultExtensionToMimeTypeMappings) { - defaultExtensionToMimeTypeMappings - .getMappings() - .forEach( - (extension, mimeTypes) -> mappings.put(extension, ImmutableList.copyOf(mimeTypes))); - } - - @Override - public List identifyType(final VirtualFile file) { - final String filename = file.getName(); - if (filename != null) { - final int dotPos = filename.lastIndexOf('.'); - if (dotPos - < 1) { // either -1 (not found) or 0 (first position, for example .project or .che etc. - Log.debug(ExtensionFileTypeIdentifier.class, "File name has no suffix "); - return null; - } - final String suffix = filename.substring(dotPos + 1); - Log.debug(ExtensionFileTypeIdentifier.class, "Looking for a type for suffix " + suffix); - List result = mappings.get(suffix); - Log.debug(ExtensionFileTypeIdentifier.class, "Found mime-types: " + printList(result)); - return result; - } - return null; - } - - public void registerNewExtension(String extension, List contentTypes) { - mappings.put(extension, contentTypes); - } - - /** - * Builds a list from the parameters. - * - * @param strings the elements of the list - * @return the list - */ - private List makeList(final String... strings) { - final List result = new ArrayList<>(); - for (String string : strings) { - result.add(string); - } - return result; - } - - /** - * Format a list of String for logging. - * - * @param strings le list to display - * @return a representation of the list - */ - private String printList(final List strings) { - final StringBuilder sb = new StringBuilder("["); - if (strings != null && !strings.isEmpty()) { - sb.append(strings.get(0)); - - for (String string : strings.subList(1, strings.size())) { - sb.append(", "); - sb.append(string); - } - } - sb.append("]"); - return sb.toString(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileNameFileTypeIdentifier.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileNameFileTypeIdentifier.java deleted file mode 100644 index 995eb1e2838..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileNameFileTypeIdentifier.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * {@link FileTypeIdentifier} that tries to recognize special filenames. - * - * @author "Mickaël Leduque" - */ -@Singleton -public class FileNameFileTypeIdentifier implements FileTypeIdentifier { - - @Override - public List identifyType(final VirtualFile file) { - final String filename = file.getName(); - if ("Rakefile".equals(filename) || "Gemfile".equals(filename)) { - return Collections.singletonList("text/x-ruby"); - } - if (contains(new String[] {"Makefile", "makefile", "GNUmakefile"}, filename)) { - return Collections.singletonList("text/x-makefile"); - } - if (contains(new String[] {"SConstruct", "Sconstruct", "sconstruct"}, filename)) { - return Collections.singletonList("text/x-python"); - } - if (filename != null && "VAGRANTFILE".equals(filename.toUpperCase())) { - return Collections.singletonList("text/x-ruby"); - } - if ("Dockerfile".equals(filename)) { - return Collections.singletonList("text/x-dockerfile"); - } - if ("Chefile".equals(filename)) { - return Arrays.asList("application/javascript", "text/javascript"); - } - - // not a known file name - return null; - } - - private static boolean contains(final String[] reference, final String searched) { - for (final String value : reference) { - if (value != null && value.equals(searched)) { - return true; - } else if (value == null && searched == null) { - return true; - } - } - return false; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileTypeIdentifier.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileTypeIdentifier.java deleted file mode 100644 index 11ad9ee8145..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FileTypeIdentifier.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import java.util.List; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * An interface for a file identification service. - * - * @author "Mickaël Leduque" - */ -public interface FileTypeIdentifier { - - /** - * Returns a list of possible content types for the file. - * - * @param file the file to identify - * @return a list of content type or null if identification failed - */ - List identifyType(VirtualFile file); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FirstLineFileTypeIdentifier.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FirstLineFileTypeIdentifier.java deleted file mode 100644 index 54b38d2a592..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/FirstLineFileTypeIdentifier.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import com.google.gwt.regexp.shared.MatchResult; -import com.google.gwt.regexp.shared.RegExp; -import java.util.Collections; -import java.util.List; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.util.loging.Log; - -/** - * {@link FileTypeIdentifier} that tries to recognize file by looking at the first line content. - * - * @author "Mickaël Leduque" - */ -@Singleton -public class FirstLineFileTypeIdentifier implements FileTypeIdentifier { - - // format: [options]\n - /** Pattern to try to recognize scripts with a shebang. */ - private static final RegExp SHEBANG_PATTERN = - RegExp.compile("^#!([^\\n\\s]+)\\s*([^\\n\\s]+)?.*\\n"); - - @Override - public List identifyType(final VirtualFile file) { - // TODO: file's content retrieved asynchronously - final String content = "" /*file.getContent()*/; - if (isXml(content)) { - Log.debug(FirstLineFileTypeIdentifier.class, "Identified file as XML."); - return Collections.singletonList("application/xml"); - } - final String shebangLoader = getShebang(content); - if (shebangLoader != null) { - final int lastSlash = shebangLoader.lastIndexOf('/'); - // need to consider \ as path separator for a feature that exists mostly on unixes ? - final String basename = shebangLoader.substring(lastSlash + 1); - final String shebangResult = matchShebang(basename); - if (shebangResult != null) { - return Collections.singletonList(shebangResult); - } - } - - return null; - } - - private boolean isXml(final String content) { - return XML_PATTERN.test(content); - } - - private String getShebang(final String content) { - final MatchResult matchResult = SHEBANG_PATTERN.exec(content); - - if (matchResult == null - || matchResult.getGroup(1) == null - || matchResult.getGroup(1).isEmpty()) { - return null; - } - Log.debug(FirstLineFileTypeIdentifier.class, "File may be a script with a shebang."); - String loader = matchResult.getGroup(1); - - // special case for /usr/bin/env - if ("/usr/bin/env".equals(loader)) { - Log.debug( - FirstLineFileTypeIdentifier.class, - "Shebang points to /usr/bin/env. Looking at the parameter."); - // we must use the first option as hint - if (matchResult.getGroup(2) == null || matchResult.getGroup(2).isEmpty()) { - return null; - } - loader = matchResult.getGroup(2); - Log.debug(FirstLineFileTypeIdentifier.class, "Shebang parameter kept: " + loader); - } else { - Log.debug(FirstLineFileTypeIdentifier.class, "Shebang loader kept: " + loader); - } - return loader; - } - - private String matchShebang(final String shebangLoader) { - // the shells that are related to sh - not csh ! - if ("sh".equals(shebangLoader) - || "bash".equals(shebangLoader) - || "dash".equals(shebangLoader) - || "ksh".equals(shebangLoader) - || "zsh".equals(shebangLoader)) { - Log.debug(FirstLineFileTypeIdentifier.class, "File may be a bourne shell script or similar."); - return "text/x-sh"; - } - // python - if (shebangLoader.startsWith("python")) { - Log.debug(FirstLineFileTypeIdentifier.class, "File may be a python script."); - return "text/x-python"; - } - // perl - if (shebangLoader.startsWith("perl")) { - Log.debug(FirstLineFileTypeIdentifier.class, "File may be a perl script."); - return "text/x-perl"; - } - // ruby - if (shebangLoader.startsWith("ruby")) { - Log.debug(FirstLineFileTypeIdentifier.class, "File may be a ruby script."); - return "text/x-ruby"; - } - // are there any other script interpreters commonly used as shebang ? - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/MultipleMethodFileIdentifier.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/MultipleMethodFileIdentifier.java deleted file mode 100644 index 25b83d28984..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/filetype/MultipleMethodFileIdentifier.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.filetype; - -import com.google.inject.Singleton; -import java.util.List; -import javax.inject.Inject; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.util.loging.Log; - -/** - * {@link FileTypeIdentifier} that chains multiples ways to try to recognize file types. - * - * @author "Mickaël Leduque" - */ -@Singleton -public class MultipleMethodFileIdentifier implements FileTypeIdentifier { - - private final FileNameFileTypeIdentifier fileNameFileTypeIdentifier; - private final ExtensionFileTypeIdentifier extensionFileTypeIdentifier; - private final FirstLineFileTypeIdentifier firstLineFileTypeIdentifier; - - @Inject - public MultipleMethodFileIdentifier( - FileNameFileTypeIdentifier fileNameFileTypeIdentifier, - ExtensionFileTypeIdentifier extensionFileTypeIdentifier, - FirstLineFileTypeIdentifier firstLineFileTypeIdentifier) { - this.fileNameFileTypeIdentifier = fileNameFileTypeIdentifier; - this.extensionFileTypeIdentifier = extensionFileTypeIdentifier; - this.firstLineFileTypeIdentifier = firstLineFileTypeIdentifier; - } - - public void registerNewExtension(String extension, List contentTypes) { - extensionFileTypeIdentifier.registerNewExtension(extension, contentTypes); - } - - @Override - public List identifyType(final VirtualFile file) { - Log.debug(MultipleMethodFileIdentifier.class, "Try identification by file name."); - final List firstTry = this.fileNameFileTypeIdentifier.identifyType(file); - if (firstTry != null && !firstTry.isEmpty()) { - return firstTry; - } - Log.debug(MultipleMethodFileIdentifier.class, "Try identification by file name suffix."); - final List secondTry = this.extensionFileTypeIdentifier.identifyType(file); - if (secondTry != null && !secondTry.isEmpty()) { - return secondTry; - } - // try harder - Log.debug(MultipleMethodFileIdentifier.class, "Try identification by looking at the content."); - final List thirdTry = this.firstLineFileTypeIdentifier.identifyType(file); - if (thirdTry != null && !thirdTry.isEmpty()) { - return thirdTry; - } - // other means may be added later - Log.debug(MultipleMethodFileIdentifier.class, "No identification method gave an answer."); - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/formatter/ContentFormatter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/formatter/ContentFormatter.java deleted file mode 100644 index 50e12094a8d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/formatter/ContentFormatter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.formatter; - -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** The interface of a document content formatter. The formatter formats ranges within documents. */ -public interface ContentFormatter { - /** - * Formats the given region of the specified document.The org.eclipse.che.ide.api.editor.formatter - * may safely assume that it is the only subject that modifies the document at this point in time. - * - * @param document the document to be formatted - */ - void format(Document document); - - void install(TextEditor editor); - - /** - * Indicates if the content formatter implementation can format the document at its current state. - * - * @param document the document to be formatted - * @return - */ - default boolean canFormat(Document document) { - return true; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutter.java deleted file mode 100644 index 9fb189f6143..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutter.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.gutter; - -import elemental.dom.Element; - -/** Interface for components that expose a gutter. */ -public interface Gutter { - /** - * Adds a gutter item. - * - * @param line the line for the item - * @param gutterId the gutter identifier - * @param element the (DOM) element to add - */ - void addGutterItem(int line, String gutterId, Element element); - - /** - * Adds a gutter item. - * - * @param lineStart the first line of the item - * @param lineEnd the last line of the item - * @param gutterId the gutter identifier - * @param element the (DOM) element to add - */ - default void addGutterItem(int lineStart, int lineEnd, String gutterId, Element element) { - for (int i = lineStart; i <= lineEnd; i++) { - addGutterItem(i, gutterId, element); - } - } - - /** - * Adds a gutter item. - * - * @param line the line for the item - * @param gutterId the gutter identifier - * @param element the (DOM) element to add - * @param lineCallback callback to call when the line is removed - */ - void addGutterItem( - int line, String gutterId, Element element, LineNumberingChangeCallback lineCallback); - - /** - * Remove a gutter item. - * - * @param line the line of the item - * @param gutterId the gutter - */ - void removeGutterItem(int line, String gutterId); - - /** - * Returns the gutter item at th given line for the given gutter (if present). - * - * @param line the line - * @param gutterId the gutter - * @return the gutter element or null - */ - Element getGutterItem(int line, String gutterId); - - /** - * Clears the given gutter. Removes all gutter items. - * - * @param gutterId the gutter identifier - */ - void clearGutter(String gutterId); - - /** - * Sets a gutter item. If any item exists then it has to be replaced. - * - * @param line the line for the item - * @param gutterId the gutter - * @param element the (DOM) element to add - */ - void setGutterItem(int line, String gutterId, Element element); - - /** Callback to be warned when line numbering changes (lines are removed or inserted). */ - interface LineNumberingChangeCallback { - /** Method called when the line numbering changes. */ - void onLineNumberingChange(int fromLine, int linesRemoved, int linesAdded); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutters.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutters.java deleted file mode 100644 index 34432830fd2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/Gutters.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.gutter; - -public final class Gutters { - - private Gutters() {} - - /** Logical identifer for the breakpoints gutter. */ - public static final String BREAKPOINTS_GUTTER = "breakpoints"; - - /** Logical identifer for the vcs change markers gutter. */ - public static final String VCS_CHANGE_MARKERS_GUTTER = "vcsChangeMarkersGutter"; - - /** Logical identifer for the line number gutter. */ - public static final String LINE_NUMBERS_GUTTER = "lineNumbers"; - - /** Logical identifer for the annotations gutter. */ - public static final String ANNOTATION_GUTTER = "annotation"; -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/HasGutter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/HasGutter.java deleted file mode 100644 index f006fdbc8eb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/gutter/HasGutter.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.gutter; - -/** Interface for components that manage a gutter. */ -public interface HasGutter { - - /** - * Returns the gutter. - * - * @return the gutter - */ - Gutter getGutter(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HasHotKeyItems.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HasHotKeyItems.java deleted file mode 100644 index 824cfedfb07..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HasHotKeyItems.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.hotkeys; - -import java.util.List; - -/** - * Interface for components that return hotKeys list - * - * @author Alexander Andrienko - */ -public interface HasHotKeyItems { - - /** - * Get hotKeys list - * - * @return hotKeys list - */ - List getHotKeys(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HotKeyItem.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HotKeyItem.java deleted file mode 100644 index fa2bebc5f5f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/hotkeys/HotKeyItem.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.hotkeys; - -/** - * Representation hotKey which performs some action - * - * @author Alexander Andrienko - * @author Arnaud Kervern - */ -public class HotKeyItem { - private String actionDescription; - private String hotKey; - private boolean isGlobal; - - public HotKeyItem(String actionDescription, String hotKey) { - this(actionDescription, hotKey, false); - } - - public HotKeyItem(String actionDescription, String hotKey, boolean isGlobal) { - this.actionDescription = actionDescription; - this.hotKey = hotKey; - this.isGlobal = isGlobal; - } - - /** - * Get action description - * - * @return action description - */ - public String getActionDescription() { - return actionDescription; - } - - /** - * Get hotKey - * - * @return readable hotKey line - */ - public String getHotKey() { - return hotKey; - } - - /** Return a boolean to know if the hot key is handled globally or by the selected schema */ - public boolean isGlobal() { - return isGlobal; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBinding.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBinding.java deleted file mode 100644 index 3a35dcc2514..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBinding.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.keymap; - -/** Description of a key binding. */ -public class KeyBinding { - /** Is the control key pressed? */ - private final boolean control; - /** Is the shift key pressed? */ - private final boolean shift; - /** Is the alt key pressed? */ - private final boolean alt; - /** Is the cmd key pressed? */ - private final boolean cmd; - /** The key code of this key binding. */ - private final Integer keyCodeNumber; - /** The character of this key binding. */ - private final String character; - /** The key event type. */ - private final String type; - /** The action taken on the key binding. */ - private final KeyBindingAction action; - - public KeyBinding( - final boolean control, - final boolean shift, - final boolean alt, - final boolean cmd, - final int keycode, - final KeyBindingAction action) { - this.control = control; - this.shift = shift; - this.alt = alt; - this.cmd = cmd; - this.keyCodeNumber = keycode; - this.character = null; - this.action = action; - this.type = "keydown"; - } - - public KeyBinding( - final boolean control, - final boolean shift, - final boolean alt, - final boolean cmd, - final char character, - final KeyBindingAction action) { - this.control = control; - this.shift = shift; - this.alt = alt; - this.cmd = cmd; - this.keyCodeNumber = null; - this.character = String.valueOf(character); - this.action = action; - this.type = "keypress"; - } - - /** - * Whether the control key is hold during the key binding. - * - * @return true iff the binding uses control - */ - public boolean isControl() { - return this.control; - } - - /** - * Whether the shift key is hold during the key binding. - * - * @return true iff the binding uses shift - */ - public boolean isShift() { - return this.shift; - } - - /** - * Whether the alt key is hold during the key binding. - * - * @return true iff the binding uses alt - */ - public boolean isAlt() { - return this.alt; - } - - /** - * Whether the cmd key is hold during the key binding. - * - * @return true iff the binding uses cmd - */ - public boolean isCmd() { - return this.cmd; - } - - /** - * Returns the keycode of the key binding. - * - * @return the keycode - */ - public Integer getKeyCodeNumber() { - return this.keyCodeNumber; - } - - /** - * Returns the keycode of the key binding. - * - * @return the keycode - */ - public String getCharacter() { - return this.character; - } - - /** - * Whether the key binding is character based. - * - * @return true iff the binding uses a character - */ - public boolean isCharacterBinding() { - return getCharacter() != null; - } - - /** - * Returns the event type of the key binding. - * - * @return the event type - */ - public String getType() { - return type; - } - - /** - * Returns the triggered action. - * - * @return the action - */ - public KeyBindingAction getAction() { - return this.action; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBindingAction.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBindingAction.java deleted file mode 100644 index fce9b51cd5e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeyBindingAction.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.keymap; - -/** An action executed on a keybinding in the editor. */ -public interface KeyBindingAction { - - /** The triggered action. */ - boolean action(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/Keymap.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/Keymap.java deleted file mode 100644 index 05659e70465..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/Keymap.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.keymap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Value object for keymaps. - * - * @author "Mickaël Leduque" - */ -public class Keymap { - - /** The editor type key. */ - private final String keymapKey; - /** The name displayed to a user. */ - private final String displayString; - - /** The already built instances. */ - private static final Map instances = new HashMap<>(); - - private Keymap(final String key, final String displayString) { - this.keymapKey = key; - this.displayString = displayString; - } - - /** - * Returns the key for this keymap (among other keymaps for the same editor implementation). - * - * @return the key - */ - public String getKey() { - return this.keymapKey; - } - - /** - * Returns the value displayed to a user. - * - * @return the display value - */ - public String getDisplay() { - return this.displayString; - } - - /** - * Retrieve an keymap instance by its key. - * - * @param key the keymap key - * @return the {@link Keymap} instance - */ - public static Keymap fromKey(final String key) { - if (key == null || key.isEmpty()) { - return null; - } - final Keymap searchResult = instances.get(key); - return searchResult; - } - - /** - * Creates a new keymap instance. - * - * @param key the key (must not already exist) - * @param displayString the name displayed to a user - * @return a new keymap instance - */ - public static Keymap newKeymap(final String key, final String displayString) { - if (key == null) { - throw new IllegalArgumentException("Keymap key can't be null"); - } - if (displayString == null) { - throw new IllegalArgumentException("Keymap display string can't be null"); - } - if (fromKey(key) != null) { - throw new RuntimeException("Keymap with key " + key + " already exists"); - } - - Log.debug(Keymap.class, "Creation of new keymap " + key); - Keymap keymap = new Keymap(key, displayString); - instances.put(key, keymap); - return keymap; - } - - /** - * Return all existing instances of {@link Keymap}. - * - * @return all instances - */ - public static List getInstances() { - return new ArrayList<>(instances.values()); - } - - @Override - public String toString() { - return this.keymapKey; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((keymapKey == null) ? 0 : keymapKey.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Keymap other = (Keymap) obj; - if (keymapKey == null) { - if (other.keymapKey != null) { - return false; - } - } else if (!keymapKey.equals(other.keymapKey)) { - return false; - } - return true; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeEvent.java deleted file mode 100644 index 011e1d5e6fc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.keymap; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event type for change in keymap preference. - * - * @author "Mickaël Leduque" - */ -public class KeymapChangeEvent extends GwtEvent { - /** Type instance for the event. */ - public static final Type TYPE = new Type<>(); - - /** The key of the new keymap. */ - private final String keymapKey; - - /** - * Creates a new keymap change event - * - * @param keymapKey the new keymap - */ - public KeymapChangeEvent(final String keymapKey) { - this.keymapKey = keymapKey; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(final KeymapChangeHandler handler) { - handler.onKeymapChanged(this); - } - - /** - * Returns the keymap key. - * - * @return the keymap key - */ - public String getKeymapKey() { - return keymapKey; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeHandler.java deleted file mode 100644 index a0bae62d7ac..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/keymap/KeymapChangeHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.keymap; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for {@link KeymapChangeEvent}. - * - * @author "Mickaël Leduque" - */ -public interface KeymapChangeHandler extends EventHandler { - - /** - * Action triggered by the event. - * - * @param event the event - */ - void onKeymapChanged(KeymapChangeEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/HasLinkedMode.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/HasLinkedMode.java deleted file mode 100644 index c258d32924c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/HasLinkedMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.link; - -/** - * Interface for editor that supports linked mode - * - * @author Evgen Vidolob - */ -public interface HasLinkedMode { - - LinkedMode getLinkedMode(); - - LinkedModel createLinkedModel(); - - LinkedModelGroup createLinkedGroup(); - - LinkedModelData createLinkedModelData(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedMode.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedMode.java deleted file mode 100644 index f5d747ceb55..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedMode.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.link; - -/** - * Represents linked mode in editor. - * - * @author Evgen Vidolob - */ -public interface LinkedMode { - - /** - * Starts Linked Mode, selects the first position and registers the listeners. - * - * @param model - */ - void enterLinkedMode(LinkedModel model); - - /** - * Exits Linked Mode. Optionally places the caret at linkedMode escapePosition. - * - * @param escapePosition if true, place the caret at the escape position. - */ - void exitLinkedMode(boolean escapePosition); - - /** - * Exits Linked Mode. Optionally places the caret at linkedMode escapePosition. - * - * @param escapePosition if true, place the caret at the escape position. - * @param successful successful or not exit linked mode - */ - void exitLinkedMode(boolean escapePosition, boolean successful); - - void selectLinkedGroup(int index); - - /** - * Add listener for linked mode. - * - * @param listener - */ - void addListener(LinkedModeListener listener); - - /** - * Remove linked mode listener. - * - * @param listener - */ - void removeListener(LinkedModeListener listener); - - /** Listener for LinkedMode */ - interface LinkedModeListener { - /** - * Notifies when linked mode ended. - * - * @param successful true if user press "Enter", false otherwise. - */ - void onLinkedModeExited(boolean successful, int start, int end); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModel.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModel.java deleted file mode 100644 index bce68a737ba..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModel.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.link; - -import java.util.List; - -/** - * The model for linked mode, umbrellas several {@link LinkedModelGroup}s. Once installed, the model - * propagates any changes to a position to all its siblings in the same position group. - * - * @author Evgen Vidolob - */ -public interface LinkedModel { - void setGroups(List groups); - - void setEscapePosition(int offset); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelData.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelData.java deleted file mode 100644 index 36df02ef33a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelData.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.link; - -import java.util.List; - -/** @author Evgen Vidolob */ -public interface LinkedModelData { - void setType(String type); - - void setValues(List values); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelGroup.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelGroup.java deleted file mode 100644 index 5f1e3c0757b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/link/LinkedModelGroup.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.link; - -import java.util.List; -import org.eclipse.che.ide.api.editor.text.Position; - -/** @author Evgen Vidolob */ -public interface LinkedModelGroup { - - void setData(LinkedModelData data); - - void setPositions(List positions); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/HasMinimap.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/HasMinimap.java deleted file mode 100644 index 878fb854177..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/HasMinimap.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.minimap; - -/** Interface for objects that own a minimap. */ -public interface HasMinimap { - - /** - * Returns the minimap instance. - * - * @return - */ - Minimap getMinimap(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/Minimap.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/Minimap.java deleted file mode 100644 index 6d5be5f059f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/minimap/Minimap.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.minimap; - -/** Interface for editor minimaps. */ -public interface Minimap { - - /** - * Add a mark on the minimap.
    - * - * @param offset the offset where the mark is set - * @param style the style of the mark - * @param title the title text - */ - void addMark(int offset, String style, String title); - - /** - * Add a mark on the minimap. - * - * @param offset the offset where the mark is set - * @param style the style of the mark - * @param level the mark priority level - * @param title the title text - */ - void addMark(int offset, String style, int level, String title); - - /** - * Remove the marks on the lines between the two given lines (included). - * - * @param lineStart the beginning of the range - * @param lineEnd the end of the range - */ - void removeMarks(int lineStart, int lineEnd); - - /** Clear all marks on the minimap. */ - void clearMarks(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/CharacterScanner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/CharacterScanner.java deleted file mode 100644 index 33079179c5e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/CharacterScanner.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.List; - -/** - * Defines the interface of a character scanner used by rules. Rules may request the next character - * or ask the character scanner to unread the last read character. - */ -public interface CharacterScanner { - - /** The value returned when this scanner has read EOF. */ - public static final int EOF = -1; - - /** - * Provides rules access to the legal line delimiters. The returned object may not be modified by - * clients. - * - * @return the legal line delimiters - */ - List getLegalLineDelimiters(); - - /** - * Returns the column of the character scanner. - * - * @return the column of the character scanner - */ - int getColumn(); - - /** - * Returns the next character or EOF if end of file has been reached - * - * @return the next character or EOF - */ - int read(); - - /** Rewinds the scanner before the last read character. */ - void unread(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/ConstantPartitioner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/ConstantPartitioner.java deleted file mode 100644 index 6d845f77ad4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/ConstantPartitioner.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.Collections; -import java.util.List; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.text.TypedRegion; -import org.eclipse.che.ide.api.editor.text.TypedRegionImpl; - -/** A no-op partitioner which partitions the document in one single default type partititon. */ -public class ConstantPartitioner implements DocumentPartitioner { - - /** The list with a single content type, the default one. */ - private final List legalContentTypes; - - /** The single content type. */ - private final String contentType; - - /** The full document length. */ - private int documentLength = 0; - - /** Handle on the document. */ - private DocumentHandle documentHandle; - - /** - * Constructor for a {@link ConstantPartitioner} that has a single partition of type ContentType. - * - * @param contentType the single content type - */ - public ConstantPartitioner(final String contentType) { - this.contentType = contentType; - this.legalContentTypes = Collections.singletonList(this.contentType); - } - - /** - * Constructor for a {@link ConstantPartitioner} that has a single partition of type {@link - * DefaultPartitioner#DEFAULT_CONTENT_TYPE}. - */ - public ConstantPartitioner() { - this(DEFAULT_CONTENT_TYPE); - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) { - final int removed = event.getLength(); - int added = 0; - if (event.getText() != null) { - added = event.getText().length(); - } - final int sizeDelta = added - removed; - this.documentLength += sizeDelta; - } - - @Override - public void initialize() { - this.documentLength = getDocumentHandle().getDocument().getContentsCharCount(); - } - - @Override - public List getLegalContentTypes() { - return legalContentTypes; - } - - @Override - public String getContentType(final int offset) { - return this.contentType; - } - - @Override - public List computePartitioning(final int offset, final int length) { - final TypedRegion region = getPartition(offset); - return Collections.singletonList(region); - } - - @Override - public TypedRegion getPartition(final int offset) { - return new TypedRegionImpl(offset, this.documentLength, this.contentType); - } - - @Override - public DocumentHandle getDocumentHandle() { - return documentHandle; - } - - @Override - public void setDocumentHandle(DocumentHandle handle) { - this.documentHandle = handle; - } - - @Override - public void release() {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DefaultPartitioner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DefaultPartitioner.java deleted file mode 100644 index a95cd800c3d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DefaultPartitioner.java +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Logger; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.text.BadLocationException; -import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TypedPosition; -import org.eclipse.che.ide.api.editor.text.TypedRegion; -import org.eclipse.che.ide.api.editor.text.TypedRegionImpl; -import org.eclipse.che.ide.api.editor.text.rules.Token; -import org.eclipse.che.ide.util.loging.Log; - -/** Default implementation of the {@link DocumentPartitioner}. */ -public class DefaultPartitioner implements DocumentPartitioner { - - /** The identifier of the default partitioning. */ - public static final String DEFAULT_PARTITIONING = "__dftl_partitioning"; - - private final PartitionScanner scanner; - private final DocumentPositionMap documentPositionMap; - - private DocumentHandle documentHandle; - - /** The legal content types of this partitioner */ - private final List legalContentTypes; - /** - * The position category this partitioner uses to store the document's partitioning information. - */ - private final String positionCategory; - - public DefaultPartitioner( - final PartitionScanner scanner, - final List legalContentTypes, - final DocumentPositionMap documentPositionMap) { - this.legalContentTypes = new ArrayList<>(legalContentTypes); - this.scanner = scanner; - this.documentPositionMap = documentPositionMap; - this.positionCategory = DocumentPositionMap.Categories.DEFAULT_CATEGORY; - } - - @Override - public void initialize() { - this.documentPositionMap.addPositionCategory(this.positionCategory); - this.documentPositionMap.setContentLength( - this.documentHandle.getDocument().getContentsCharCount()); - } - - private void updatePositions() { - // set before the scan as the scan uses the content length - this.documentPositionMap.setContentLength(getContentLength()); - this.documentPositionMap.resetPositions(); - - Position current = null; - try { - Token token = scanner.nextToken(); - while (!token.isEOF()) { - - final String contentType = getTokenContentType(token); - - if (isSupportedContentType(contentType)) { - final TypedPosition position = - new TypedPosition(scanner.getTokenOffset(), scanner.getTokenLength(), contentType); - current = position; - this.documentPositionMap.addPosition(this.positionCategory, position); - } - - token = scanner.nextToken(); - } - } catch (final BadLocationException x) { - Log.error( - DefaultPartitioner.class, - "Invalid position: " + String.valueOf(current) + " (max:" + getContentLength() + ").", - x); - } catch (final BadPositionCategoryException x) { - Log.error(DefaultPartitioner.class, "Invalid position category: " + this.positionCategory, x); - } - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) { - this.scanner.setScannedString(event.getDocument().getDocument().getContents()); - updatePositions(); - } - - @Override - public List getLegalContentTypes() { - return new ArrayList<>(this.legalContentTypes); - } - - @Override - public String getContentType(final int offset) { - final TypedPosition position = findClosestPosition(offset); - if (position != null && position.includes(offset)) { - return position.getType(); - } - - return DEFAULT_CONTENT_TYPE; - } - - @Override - public final List computePartitioning(final int offset, final int length) { - return computePartitioning(offset, length, false); - } - - private List computePartitioning( - final int offset, final int length, final boolean includeZeroLengthPartitions) { - final List result = new ArrayList<>(); - - final int contentLength = getContentLength(); - try { - - final int endOffset = offset + length; - - final List category = getPositions(); - - TypedPosition previous = null; - TypedPosition current = null; - int start, end, gapOffset; - final Position gap = new Position(0); - - final int startIndex = getFirstIndexEndingAfterOffset(category, offset); - final int endIndex = getFirstIndexStartingAfterOffset(category, endOffset); - for (int i = startIndex; i < endIndex; i++) { - - current = category.get(i); - - gapOffset = (previous != null) ? previous.getOffset() + previous.getLength() : 0; - gap.setOffset(gapOffset); - gap.setLength(current.getOffset() - gapOffset); - if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) - || (gap.getLength() > 0 && gap.overlapsWith(offset, length))) { - start = Math.max(offset, gapOffset); - end = Math.min(endOffset, gap.getOffset() + gap.getLength()); - result.add(new TypedRegionImpl(start, end - start, DEFAULT_CONTENT_TYPE)); - } - - if (current.overlapsWith(offset, length)) { - start = Math.max(offset, current.getOffset()); - end = Math.min(endOffset, current.getOffset() + current.getLength()); - result.add(new TypedRegionImpl(start, end - start, current.getType())); - } - - previous = current; - } - - if (previous != null) { - gapOffset = previous.getOffset() + previous.getLength(); - gap.setOffset(gapOffset); - gap.setLength(contentLength - gapOffset); - if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) - || (gap.getLength() > 0 && gap.overlapsWith(offset, length))) { - start = Math.max(offset, gapOffset); - end = Math.min(endOffset, contentLength); - result.add(new TypedRegionImpl(start, end - start, DEFAULT_CONTENT_TYPE)); - } - } - - if (result.isEmpty()) { - result.add(new TypedRegionImpl(offset, length, DEFAULT_CONTENT_TYPE)); - } - - } catch (final BadPositionCategoryException ex) { - Logger.getLogger(DefaultPartitioner.class.getName()) - .fine("Bad position in computePartitioning."); - } catch (final RuntimeException ex) { - Logger.getLogger(DefaultPartitioner.class.getName()).warning("computePartitioning failed."); - throw ex; - } - - return result; - } - - @Override - public TypedRegion getPartition(final int offset) { - final int contentLength = getContentLength(); - - List category = null; - try { - category = getPositions(); - } catch (final BadPositionCategoryException e) { - Log.warn(DefaultPartitioner.class, "Invalid position cateory... with default category! ", e); - return defaultRegion(); - } - - if (category == null || category.size() == 0) { - return defaultRegion(); - } - - Integer index = null; - try { - index = this.documentPositionMap.computeIndexInCategory(positionCategory, offset); - } catch (final BadLocationException e) { - Log.warn( - DefaultPartitioner.class, "Invalid location " + offset + " (max=" + contentLength + ")."); - return defaultRegion(); - } catch (final BadPositionCategoryException e) { - Log.warn( - DefaultPartitioner.class, - "Invalid position cateory... with default category " + positionCategory + "!", - e); - return defaultRegion(); - } - if (index == null) { - return defaultRegion(); - } - - if (index < category.size()) { - - final TypedPosition next = category.get(index); - - if (offset == next.offset) { - return new TypedRegionImpl(next.getOffset(), next.getLength(), next.getType()); - } - - if (index == 0) { - return new TypedRegionImpl(0, next.offset, DEFAULT_CONTENT_TYPE); - } - - final TypedPosition previous = category.get(index - 1); - if (previous.includes(offset)) { - return new TypedRegionImpl(previous.getOffset(), previous.getLength(), previous.getType()); - } - - final int endOffset = previous.getOffset() + previous.getLength(); - return new TypedRegionImpl(endOffset, next.getOffset() - endOffset, DEFAULT_CONTENT_TYPE); - } - - final TypedPosition previous = category.get(category.size() - 1); - if (previous.includes(offset)) { - return new TypedRegionImpl(previous.getOffset(), previous.getLength(), previous.getType()); - } - - final int endOffset = previous.getOffset() + previous.getLength(); - return new TypedRegionImpl(endOffset, contentLength - endOffset, DEFAULT_CONTENT_TYPE); - } - - private TypedRegionImpl defaultRegion() { - return new TypedRegionImpl(0, getContentLength(), DEFAULT_CONTENT_TYPE); - } - - /** - * Returns true if the given ranges overlap with or touch each other. - * - * @param gap the first range - * @param offset the offset of the second range - * @param length the length of the second range - * @return true if the given ranges overlap with or touch each other - */ - private static boolean overlapsOrTouches(Position gap, int offset, int length) { - return gap.getOffset() <= offset + length && offset <= gap.getOffset() + gap.getLength(); - } - - /** - * Returns the index of the first position which ends after the given offset. - * - * @param positions the positions in linear order - * @param offset the offset - * @return the index of the first position which ends after the offset - */ - private static int getFirstIndexEndingAfterOffset( - final List positions, final int offset) { - int i = -1; - int j = positions.size(); - while (j - i > 1) { - final int k = (i + j) >> 1; - final Position p = positions.get(k); - if (p.getOffset() + p.getLength() > offset) { - j = k; - } else { - i = k; - } - } - return j; - } - - /** - * Returns the index of the first position which starts at or after the given offset. - * - * @param positions the positions in linear order - * @param offset the offset - * @return the index of the first position which starts after the offset - */ - private static int getFirstIndexStartingAfterOffset(List positions, int offset) { - int i = -1; - int j = positions.size(); - while (j - i > 1) { - final int k = (i + j) >> 1; - final Position p = positions.get(k); - if (p.getOffset() >= offset) { - j = k; - } else { - i = k; - } - } - return j; - } - - /** - * Returns a content type encoded in the given token. If the token's data is not null - * and a string it is assumed that it is the encoded content type. - * - *

    May be replaced or extended by subclasses. - * - * @param token the token whose content type is to be determined - * @return the token's content type - */ - protected static String getTokenContentType(Token token) { - final Object data = token.getData(); - if (data instanceof String) { - return (String) data; - } - return null; - } - - /** - * Returns whether the given type is one of the legal content types. - * - *

    May be extended by subclasses. - * - * @param contentType the content type to check - * @return true if the content type is a legal content type - */ - protected boolean isSupportedContentType(final String contentType) { - if (contentType != null) { - for (final String item : this.legalContentTypes) { - if (item.equals(contentType)) { - return true; - } - } - } - - return false; - } - - /** - * Returns the position in the partitoner's position category which is close to the given offset. - * This is, the position has either an offset which is the same as the given offset or an offset - * which is smaller than the given offset. This method profits from the knowledge that a - * partitioning is a ordered set of disjoint position. - * - *

    May be extended or replaced by subclasses. - * - * @param offset the offset for which to search the closest position - * @return the closest position in the partitioner's category - */ - protected TypedPosition findClosestPosition(int offset) { - - int index = -1; - try { - index = this.documentPositionMap.computeIndexInCategory(this.positionCategory, offset); - } catch (final BadLocationException e) { - Log.warn( - DefaultPartitioner.class, - "Bad location: " + offset + "(max:" + getContentLength() + ")."); - return null; - } catch (final BadPositionCategoryException e) { - Log.warn(DefaultPartitioner.class, "Bad position category: " + this.positionCategory); - return null; - } - if (index == -1) { - return null; - } - - List category = null; - try { - category = getPositions(); - } catch (final BadPositionCategoryException e) { - Log.warn(DefaultPartitioner.class, "Bad position category: " + this.positionCategory); - return null; - } - - if (category == null || category.size() == 0) { - return null; - } - - if (index < category.size()) { - if (offset == category.get(index).offset) { - return category.get(index); - } - } - - if (index > 0) { - index--; - } - - return category.get(index); - } - - /** - * Returns the partitioners positions. - * - * @return the partitioners positions - * @throws BadPositionCategoryException if getting the positions from the document fails - */ - protected final List getPositions() throws BadPositionCategoryException { - return this.documentPositionMap.getPositions(this.positionCategory); - } - - private int getContentLength() { - return getDocumentHandle().getDocument().getContentsCharCount(); - } - - @Override - public DocumentHandle getDocumentHandle() { - return documentHandle; - } - - @Override - public void setDocumentHandle(DocumentHandle handle) { - this.documentHandle = handle; - } - - @Override - public void release() {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPartitioner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPartitioner.java deleted file mode 100644 index f4334b9d7b8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPartitioner.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.List; -import org.eclipse.che.ide.api.editor.document.UseDocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedHandler; -import org.eclipse.che.ide.api.editor.text.TypedRegion; - -/** - * Interface for document partitioner.
    - * Partitioners parse a document and splits it in partitions, which are contiguous zones of text of - * a specific type (for example comment, literal string, code etc.). - */ -public interface DocumentPartitioner extends DocumentChangedHandler, UseDocumentHandle { - - /** The identifier of the default partition content type. */ - String DEFAULT_CONTENT_TYPE = "__dftl_partition_content_type"; - - void initialize(); - - void release(); - - /** - * Returns the set of all legal content types of this partitioner. I.e. any result delivered by - * this partitioner may not contain a content type which would not be included in this method's - * result. - * - * @return the set of legal content types - */ - List getLegalContentTypes(); - - /** - * Returns the content type of the partition containing the given offset in the connected - * document. There must be a document connected to this partitioner. - * - * @param offset the offset in the connected document - * @return the content type of the offset's partition - */ - String getContentType(int offset); - - /** - * Returns the partitioning of the given range of the connected document. There must be a document - * connected to this partitioner. - * - * @param offset the offset of the range of interest - * @param length the length of the range of interest - * @return the partitioning of the range - */ - List computePartitioning(int offset, int length); - - /** - * Returns the partition containing the given offset of the connected document. There must be a - * document connected to this partitioner. - * - * @param offset the offset for which to determine the partition - * @return the partition containing the offset - */ - TypedRegion getPartition(int offset); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMap.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMap.java deleted file mode 100644 index 1a0146fc4d3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMap.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.List; -import org.eclipse.che.ide.api.editor.text.BadLocationException; -import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; -import org.eclipse.che.ide.api.editor.text.TypedPosition; - -/** Model for document partitions. */ -public interface DocumentPositionMap { - - public static final class Categories { - /** The identifier of the default position category. */ - public static final String DEFAULT_CATEGORY = "__dflt_position_category"; - } - - /** - * Add a position category. - * - * @param category the category - */ - void addPositionCategory(String category); - - /** - * Tells if the given category contains a position for the given range. - * - * @param category the category - * @param offset the start of the range - * @param length the length of the range - * @return true iff the categroy contain the position - */ - boolean containsPosition(String category, int offset, int length); - - /** - * Tells if the given category is known. - * - * @param category the category - * @return true iff the category is known - */ - boolean containsPositionCategory(String category); - - /** - * Returns the positions in the given category. - * - * @param category the category - * @return the opsitions - * @throws BadPositionCategoryException if the category is invalid - */ - List getPositions(String category) throws BadPositionCategoryException; - - int computeIndexInCategory(String category, int offset) - throws BadLocationException, BadPositionCategoryException; - - /** - * Returns all known categories - * - * @return the categories - */ - List getPositionCategories(); - - void removePosition(String category, TypedPosition position) throws BadPositionCategoryException; - - /** - * Remove a position category. - * - * @param category the category - */ - void removePositionCategory(String category) throws BadPositionCategoryException; - - /** - * Add a position with the default category. - * - * @param position the position - * @throws BadLocationException when the position is invalid - */ - void addPosition(TypedPosition position) throws BadLocationException; - - /** - * Add a position in the category. - * - * @param position the position - * @param category the category - * @throws BadLocationException when the position is invalid - */ - void addPosition(String category, TypedPosition position) - throws BadLocationException, BadPositionCategoryException; - - List getPositions( - String category, int offset, int length, boolean canStartBefore, boolean canEndAfter) - throws BadPositionCategoryException; - - List getPositions( - int offset, int length, boolean canStartBefore, boolean canEndAfter) - throws BadPositionCategoryException; - - /** - * Sets the length of the mapped content. - * - * @param newLength the new value - */ - void setContentLength(int newLength); - - /** Clear known positions. */ - void resetPositions(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMapImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMapImpl.java deleted file mode 100644 index 07be2b1ebf2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/DocumentPositionMapImpl.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.editor.text.BadLocationException; -import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TypedPosition; -import org.eclipse.che.ide.runtime.Assert; -import org.eclipse.che.ide.util.loging.Log; - -/** Implementation for {@link DocumentPositionMap}. */ -public class DocumentPositionMapImpl implements DocumentPositionMap { - - /** All positions managed by the document ordered by their start positions. */ - private final Map> positions = new HashMap<>(); - - /** All positions managed by the document ordered by there end positions. */ - private final Map> endPositions = new HashMap<>(); - - private int contentLength = 0; - - @Override - public void addPositionCategory(final String category) { - if (category == null) { - return; - } - - if (!containsPositionCategory(category)) { - this.positions.put(category, new ArrayList()); - this.endPositions.put(category, new ArrayList()); - } - } - - @Override - public boolean containsPosition(String category, int offset, int length) { - if (category == null) { - return false; - } - - final List list = this.positions.get(category); - if (list == null) { - return false; - } - - final int size = list.size(); - if (size == 0) { - return false; - } - - int index = computeIndexInPositionList(list, offset, true); - if (index < size) { - Position p = list.get(index); - while (p != null && p.offset == offset) { - if (p.length == length) { - return true; - } - ++index; - p = (index < size) ? (Position) list.get(index) : null; - } - } - - return false; - } - - @Override - public boolean containsPositionCategory(final String category) { - if (category != null) { - return this.positions.containsKey(category); - } - return false; - } - - protected int computeIndexInPositionList( - final List positions, final int offset, final boolean orderedByOffset) { - if (positions.size() == 0) { - return 0; - } - - int left = 0; - int right = positions.size() - 1; - int mid = 0; - Position p = null; - - while (left < right) { - - mid = (left + right) / 2; - - p = positions.get(mid); - final int pOffset = getOffset(orderedByOffset, p); - if (offset < pOffset) { - if (left == mid) { - right = left; - } else { - right = mid - 1; - } - } else if (offset > pOffset) { - if (right == mid) { - left = right; - } else { - left = mid + 1; - } - } else if (offset == pOffset) { - left = right = mid; - } - } - - int pos = left; - p = positions.get(pos); - int pPosition = getOffset(orderedByOffset, p); - if (offset > pPosition) { - // append to the end - pos++; - } else { - // entry will become the first of all entries with the same offset - do { - --pos; - if (pos < 0) { - break; - } - p = positions.get(pos); - pPosition = getOffset(orderedByOffset, p); - } while (offset == pPosition); - ++pos; - } - - Assert.isTrue(0 <= pos && pos <= positions.size()); - - return pos; - } - - private int getOffset(boolean orderedByOffset, Position position) { - if (orderedByOffset || position.getLength() == 0) { - return position.getOffset(); - } - return position.getOffset() + position.getLength() - 1; - } - - @Override - public int computeIndexInCategory(final String category, final int offset) - throws BadLocationException, BadPositionCategoryException { - - if (0 > offset || offset > this.contentLength) { - throw new BadLocationException(); - } - - final List c = this.positions.get(category); - if (c == null) { - throw new BadPositionCategoryException(); - } - - return computeIndexInPositionList(c, offset, true); - } - - @Override - public List getPositions(String category) throws BadPositionCategoryException { - - if (category == null) { - throw new BadPositionCategoryException(); - } - - final List c = this.positions.get(category); - if (c == null) { - throw new BadPositionCategoryException(); - } - - return new ArrayList<>(c); - } - - @Override - public List getPositionCategories() { - return new ArrayList<>(this.positions.keySet()); - } - - @Override - public void removePosition(String category, TypedPosition position) - throws BadPositionCategoryException { - - if (position == null) { - return; - } - - if (category == null) { - throw new BadPositionCategoryException(); - } - - final List c = this.positions.get(category); - if (c == null) { - throw new BadPositionCategoryException(); - } - removeFromPositionsList(c, position, true); - - final List endPositions = this.endPositions.get(category); - if (endPositions == null) { - throw new BadPositionCategoryException(); - } - removeFromPositionsList(endPositions, position, false); - } - - @Override - public void removePositionCategory(String category) throws BadPositionCategoryException { - - if (category == null) { - return; - } - - if (!containsPositionCategory(category)) { - throw new BadPositionCategoryException(); - } - - this.positions.remove(category); - this.endPositions.remove(category); - } - - private void removeFromPositionsList( - List positions, TypedPosition position, boolean orderedByOffset) { - final int size = positions.size(); - - // Assume position is somewhere near it was before - final int index = - computeIndexInPositionList( - positions, - orderedByOffset ? position.offset : position.offset + position.length - 1, - orderedByOffset); - if (index < size && positions.get(index) == position) { - positions.remove(index); - return; - } - - int back = index - 1; - int forth = index + 1; - while (back >= 0 || forth < size) { - if (back >= 0) { - if (position == positions.get(back)) { - positions.remove(back); - return; - } - back--; - } - - if (forth < size) { - if (position == positions.get(forth)) { - positions.remove(forth); - return; - } - forth++; - } - } - } - - /* - * @see org.eclipse.jface.text.IDocument#addPosition(java.lang.String, org.eclipse.jface.text.Position) - */ - @Override - public void addPosition(String category, TypedPosition position) - throws BadLocationException, BadPositionCategoryException { - - if ((0 > position.offset) - || (0 > position.length) - || (position.offset + position.length > this.contentLength)) { - throw new BadLocationException(); - } - - if (category == null) { - throw new BadPositionCategoryException(); - } - - final List list = this.positions.get(category); - if (list == null) { - throw new BadPositionCategoryException(); - } - list.add(computeIndexInPositionList(list, position.offset, true), position); - - final List endPositions = this.endPositions.get(category); - if (endPositions == null) { - throw new BadPositionCategoryException(); - } - endPositions.add( - computeIndexInPositionList(endPositions, position.offset + position.length - 1, false), - position); - } - - @Override - public void addPosition(final TypedPosition position) throws BadLocationException { - try { - addPosition(Categories.DEFAULT_CATEGORY, position); - } catch (final BadPositionCategoryException e) { - Log.warn( - DocumentPositionMapImpl.class, - "Should not happen: DEFAULT_CATEGORY is not a valid category!"); - } - } - - @Override - public List getPositions( - int offset, int length, boolean canStartBefore, boolean canEndAfter) - throws BadPositionCategoryException { - return getPositions(Categories.DEFAULT_CATEGORY, offset, length, canStartBefore, canEndAfter); - } - - @Override - public List getPositions( - String category, int offset, int length, boolean canStartBefore, boolean canEndAfter) - throws BadPositionCategoryException { - if (canStartBefore && canEndAfter || (!canStartBefore && !canEndAfter)) { - List documentPositions; - if (canStartBefore && canEndAfter) { - if (offset < this.contentLength / 2) { - documentPositions = getStartingPositions(category, 0, offset + length); - } else { - documentPositions = getEndingPositions(category, offset, this.contentLength - offset + 1); - } - } else { - documentPositions = getStartingPositions(category, offset, length); - } - - final List list = new ArrayList(documentPositions.size()); - - final Position region = new Position(offset, length); - - for (final TypedPosition position : documentPositions) { - if (isWithinRegion(region, position, canStartBefore, canEndAfter)) { - list.add(position); - } - } - - return list; - } else if (canStartBefore) { - final List list = getEndingPositions(category, offset, length); - return list; - } else { - Assert.isLegal(canEndAfter && !canStartBefore); - - final List list = getStartingPositions(category, offset, length); - return list; - } - } - - private List getEndingPositions(String category, int offset, int length) - throws BadPositionCategoryException { - final List positions = endPositions.get(category); - if (positions == null) { - throw new BadPositionCategoryException(); - } - - final int indexStart = computeIndexInPositionList(positions, offset, false); - final int indexEnd = computeIndexInPositionList(positions, offset + length, false); - - return positions.subList(indexStart, indexEnd); - } - - private List getStartingPositions(String category, int offset, int length) - throws BadPositionCategoryException { - final List categoryPositions = positions.get(category); - if (categoryPositions == null) { - throw new BadPositionCategoryException(); - } - - final int indexStart = computeIndexInPositionList(categoryPositions, offset, true); - final int indexEnd = computeIndexInPositionList(categoryPositions, offset + length, true); - - return categoryPositions.subList(indexStart, indexEnd); - } - - private boolean isWithinRegion( - Position region, Position position, boolean canStartBefore, boolean canEndAfter) { - if (canStartBefore && canEndAfter) { - return region.overlapsWith(position.getOffset(), position.getLength()); - } else if (canStartBefore) { - return region.includes(position.getOffset() + position.getLength() - 1); - } else if (canEndAfter) { - return region.includes(position.getOffset()); - } else { - final int start = position.getOffset(); - return region.includes(start) && region.includes(start + position.getLength() - 1); - } - } - - @Override - public void setContentLength(final int newLength) { - this.contentLength = newLength; - } - - @Override - public void resetPositions() { - for (final List list : positions.values()) { - list.clear(); - } - for (final List list : endPositions.values()) { - list.clear(); - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionScanner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionScanner.java deleted file mode 100644 index e5b25477be6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionScanner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import java.util.List; - -/** A {@link TokenScanner} that detects partitions. */ -public interface PartitionScanner extends TokenScanner { - - /** - * Set the list of line delimiters. - * - * @param delimiters the delimiters - */ - void setLegalLineDelimiters(final List delimiters); - - /** - * Set the string to scan. - * - * @param content the new content to parse - */ - @Override - void setScannedString(String content); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionerFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionerFactory.java deleted file mode 100644 index c9637fa4f8c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/PartitionerFactory.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -/** Interface for a factory of {@link DocumentPartitioner}. */ -public interface PartitionerFactory { - /** - * Create an instance of {@link DocumentPartitioner}. - * - * @return the instance - */ - DocumentPartitioner create(DocumentPositionMap docPositionMap); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/StringCharacterScanner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/StringCharacterScanner.java deleted file mode 100644 index 5e4e9cc8219..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/StringCharacterScanner.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import com.google.gwt.regexp.shared.MatchResult; -import com.google.gwt.regexp.shared.RegExp; -import java.util.List; - -/** Implementation of {@link CharacterScanner} with a String as input. */ -public class StringCharacterScanner implements CharacterScanner { - - /** The scanned content. */ - private String content; - - /** The offset of the scanner within the content. */ - private int offset = 0; - - /** The delimiters of the document. */ - private List delimiters; - - @Override - public List getLegalLineDelimiters() { - return this.delimiters; - } - - @Override - public int getColumn() { - return getColumn(this.offset); - } - - private int getColumn(int offset) { - // Bad and slow implementation - if (offset < 0 || offset > this.content.length()) { - return -1; - } - if (this.delimiters == null || this.delimiters.isEmpty()) { - return offset; - } - - final StringBuilder sb = new StringBuilder("["); - for (final String delimiter : this.delimiters) { - sb.append("(?:").append(delimiter).append(")"); - } - sb.append("]"); - final RegExp regexp = RegExp.compile(sb.toString()); - - final String split = this.content; - int currentIndex = 0; - while (currentIndex < offset) { - final MatchResult matchResult = regexp.exec(split); - final int found = matchResult.getIndex(); - if (found < 0) { - throw new RuntimeException("Invalid index for regexp match"); - } - if (currentIndex + found > offset) { - // we're on the same line as offset - return offset - currentIndex; - } - currentIndex = currentIndex + found + 1; - } - return -1; - } - - @Override - public int read() { - if (this.offset == this.content.length()) { - return EOF; - } - final int result = this.content.charAt(this.offset); - this.offset++; - return result; - } - - @Override - public void unread() { - if (this.offset != 0) { - this.offset--; - } // else already at doc start - } - - public void setLegalLineDelimiters(final List delimiters) { - this.delimiters = delimiters; - } - - public void setScannedString(final String content) { - this.content = content; - this.offset = 0; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/TokenScanner.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/TokenScanner.java deleted file mode 100644 index 8aea9adbea7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/partition/TokenScanner.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.partition; - -import org.eclipse.che.ide.api.editor.text.rules.Token; - -/** - * A token scanner scans a range of a document and reports about the token it finds. A scanner has - * state. When asked, the scanner returns the offset and the length of the last found token. - * - * @see Token - */ -public interface TokenScanner { - /** - * Configures the scanner by providing access to the document range that should be scanned. - * - * @param document the document to scan - */ - void setScannedString(String document); - - /** - * Returns the next token in the document. - * - * @return the next token in the document - */ - Token nextToken(); - - /** - * Returns the offset of the last token read by this scanner. - * - * @return the offset of the last token read by this scanner - */ - int getTokenOffset(); - - /** - * Returns the length of the last token read by this scanner. - * - * @return the length of the last token read by this scanner - */ - int getTokenLength(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/position/PositionConverter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/position/PositionConverter.java deleted file mode 100644 index 8a29b40708a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/position/PositionConverter.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.position; - -import org.eclipse.che.ide.api.editor.text.TextPosition; - -/** Conversion utility for text/pixel coordinates. */ -public interface PositionConverter { - - /** - * Converts a text position (line, character) to pixel coordinates. - * - * @param textPosition the text position - * @return the pixel coordinates - */ - PixelCoordinates textToPixel(TextPosition textPosition); - - /** - * Converts an offset text position (index in the text) to pixel coordinates. - * - * @param textOffset the text offset - * @return the pixel coordinates - */ - PixelCoordinates offsetToPixel(int textOffset); - - /** - * Converts a {@link PixelCoordinates} object to a line/char text position. - * - * @param coordinates the pixel coordinates - * @return the text position - */ - TextPosition pixelToText(PixelCoordinates coordinates); - - /** - * Converts a {@link PixelCoordinates} object to an offset position in the text. - * - * @param coordinates the pixel coordinates - * @return the offset - */ - int pixelToOffset(PixelCoordinates coordinates); - - public static final class PixelCoordinates { - - /** The horizontal pixel coordinate. */ - private final int x; - - /** The vertical pixel coordinate. */ - private final int y; - - /** - * Constructor for {@link PixelCoordinates}. - * - * @param x the horizontal pixel coordinate - * @param y the vertical pixel coordinate - */ - public PixelCoordinates(final int x, final int y) { - this.x = x; - this.y = y; - } - - /** - * Returns the horizontal pixel coordinate. - * - * @return the horizontal coordinate - */ - public int getX() { - return x; - } - - /** - * Returns the vertical pixel coordinate. - * - * @return the vertical coordinate - */ - public int getY() { - return y; - } - - @Override - public String toString() { - return "PixelCoordinates [x=" + x + ", y=" + y + "]"; - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistAssistant.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistAssistant.java deleted file mode 100644 index 6d57a185de4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistAssistant.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.quickfix; - -import elemental.dom.Element; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistCallback; - -/** - * An QuickAssistAssistant provides support for quick fixes and quick assists. Its - * purpose is to propose, display, and insert quick assists and quick fixes available at the current - * source viewer's quick assist invocation context. - */ -public interface QuickAssistAssistant { - - /** - * Shows all possible quick fixes and quick assists at the viewer's cursor position. - * - * @param line the line on which the assist was triggered - * @param anchorElement element used for position - */ - void showPossibleQuickAssists(int line, Element anchorElement); - - /** - * Shows all possible quick fixes and quick assists at the viewer's cursor position. - * - * @param offset the offset on which the assist was triggered - * @param coordX horizontal offset used for position - * @param coordX vertical offset used for position - */ - void showPossibleQuickAssists(int offset, float coordX, float coordY); - - /** - * Compute the quick assist proposals. - * - * @param line the line on which the assist was triggered - * @param callback called when computation is done - */ - void computeQuickAssist(int line, CodeAssistCallback callback); - - /** - * Registers a given quick assist processor for a particular content type. If there is already a - * processor registered, the new processor is registered instead of the old one. - * - * @param processor the quick assist processor to register, or null to remove an - * existing one - */ - void setQuickAssistProcessor(QuickAssistProcessor processor); - - /** - * Returns the quick assist processor to be used for the given content type. - * - * @return the quick assist processor or null if none exists - */ - QuickAssistProcessor getQuickAssistProcessor(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistInvocationContext.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistInvocationContext.java deleted file mode 100644 index 30653315456..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistInvocationContext.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.quickfix; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * MachineContext information for quick fix and quick assist processors. - * - *

    This interface can be implemented by clients. - */ -public final class QuickAssistInvocationContext { - - private final int offset; - private final TextEditor textEditor; - - public QuickAssistInvocationContext( - @Nullable final Integer offset, @NotNull final TextEditor textEditor) { - if (textEditor == null) { - throw new IllegalArgumentException("editor handle cannot be null"); - } - this.offset = offset; - this.textEditor = textEditor; - } - - /** - * Returns the offset where quick assist was invoked. - * - * @return the invocation offset or -1 if unknown - */ - @Nullable - public Integer getOffset() { - return this.offset; - } - - /** - * Returns the editor handle for this context. - * - * @return the editor handle - */ - @NotNull - public TextEditor getTextEditor() { - return this.textEditor; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistProcessor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistProcessor.java deleted file mode 100644 index 71a49126745..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistProcessor.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.quickfix; - -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistCallback; - -/** Quick assist processor for quick fixes and quick assists. */ -public interface QuickAssistProcessor { - - void computeQuickAssistProposals( - QuickAssistInvocationContext invocationContext, CodeAssistCallback callback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistantFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistantFactory.java deleted file mode 100644 index 5fbcbaa7ce4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistantFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.quickfix; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** Factory of {@link QuickAssistAssistant}. */ -public interface QuickAssistantFactory { - - /** - * Create a QuickAssist assistant instance. - * - * @param textEditor the related editor - * @return a new quick assist assistant - */ - @NotNull - QuickAssistAssistant createQuickAssistant(TextEditor textEditor); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DefaultReconciler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DefaultReconciler.java deleted file mode 100644 index 6011dbf4283..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DefaultReconciler.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * Default implementation of {@link Reconciler}. - * - * @author Roman Nikitenko - */ -public class DefaultReconciler implements Reconciler { - - private final String partition; - private final DocumentPartitioner partitioner; - private final Map strategies; - - private DocumentHandle documentHandle; - private TextEditor editor; - - @AssistedInject - public DefaultReconciler( - @Assisted final String partition, @Assisted final DocumentPartitioner partitioner) { - this.partition = partition; - this.partitioner = partitioner; - strategies = new HashMap<>(); - } - - @Override - public void install(TextEditor editor) { - this.editor = editor; - reconcilerDocumentChanged(); - } - - @Override - public void uninstall() { - strategies.values().forEach(ReconcilingStrategy::closeReconciler); - } - - @Override - public ReconcilingStrategy getReconcilingStrategy(final String contentType) { - return strategies.get(contentType); - } - - @Override - public void addReconcilingStrategy(final String contentType, final ReconcilingStrategy strategy) { - strategies.put(contentType, strategy); - } - - @Override - public String getDocumentPartitioning() { - return partition; - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) {} - - @Override - public DocumentHandle getDocumentHandle() { - return this.documentHandle; - } - - @Override - public void setDocumentHandle(final DocumentHandle handle) { - this.documentHandle = handle; - } - - /** - * Returns the input document of the text view this reconciler is installed on. - * - * @return the reconciler document - */ - protected Document getDocument() { - return documentHandle.getDocument(); - } - - private void reconcilerDocumentChanged() { - strategies - .keySet() - .forEach( - key -> { - ReconcilingStrategy reconcilingStrategy = strategies.get(key); - reconcilingStrategy.setDocument(documentHandle.getDocument()); - }); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegion.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegion.java deleted file mode 100644 index f919ae30e92..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegion.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2005 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import org.eclipse.che.ide.api.editor.text.TypedRegion; - -/** A dirty region describes a document range which has been changed. */ -public class DirtyRegion implements TypedRegion { - - /** Identifies an insert operation. */ - public static final String INSERT = "__insert"; // $NON-NLS-1$ - - /** Identifies a remove operation. */ - public static final String REMOVE = "__remove"; // $NON-NLS-1$ - - /** The region's offset. */ - private int fOffset; - - /** The region's length. */ - private int fLength; - - /** Indicates the type of the applied change. */ - private String fType; - - /** The text which has been inserted. */ - private String fText; - - /** - * Creates a new dirty region. - * - * @param offset the offset within the document where the change occurred - * @param length the length of the text within the document that changed - * @param type the type of change that this region represents: {@link #INSERT} {@link #REMOVE} - * @param text the substitution text - */ - public DirtyRegion(int offset, int length, String type, String text) { - fOffset = offset; - fLength = length; - fType = normalizeTypeValue(type); - fText = text; - } - - /** - * Computes the normalized type value to ensure that the implementation can use object identity - * rather than equality. - * - * @param type the type value - * @return the normalized type value or null - * @since 3.1 - */ - private String normalizeTypeValue(String type) { - if (INSERT.equals(type)) return INSERT; - if (REMOVE.equals(type)) return REMOVE; - return null; - } - - /** Returns the offset of the region. */ - @Override - public int getOffset() { - return fOffset; - } - - /** Returns the length of the region. */ - @Override - public int getLength() { - return fLength; - } - - /** Returns the content type of the region. */ - @Override - public String getType() { - return fType; - } - - /** - * Returns the text that changed as part of the region change. - * - * @return the changed text - */ - public String getText() { - return fText; - } - - /** - * Modify the receiver so that it encompasses the region specified by the dirty region. - * - * @param dr the dirty region with which to merge - */ - void mergeWith(DirtyRegion dr) { - int start = Math.min(fOffset, dr.fOffset); - int end = Math.max(fOffset + fLength, dr.fOffset + dr.fLength); - fOffset = start; - fLength = end - start; - fText = (dr.fText == null ? fText : (fText == null) ? dr.fText : fText + dr.fText); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegionQueue.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegionQueue.java deleted file mode 100644 index ecb587f558e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/DirtyRegionQueue.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2008 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import java.util.ArrayList; -import java.util.List; - -/** - * Queue used to manage dirty regions. When a dirty region is inserted into the queue, the queue - * tries to fold it into the neighboring dirty region. - */ -public class DirtyRegionQueue { - - /** The list of dirty regions. */ - private final List fDirtyRegions = new ArrayList<>(); - - /** Creates a new empty dirty region. */ - public DirtyRegionQueue() { - super(); - } - - /** - * Adds a dirty region to the end of the dirty-region queue. - * - * @param dr the dirty region to add - */ - public void addDirtyRegion(DirtyRegion dr) { - // If the dirty region being added is directly after the last dirty - // region on the queue then merge the two dirty regions together. - final DirtyRegion lastDR = getLastDirtyRegion(); - boolean wasMerged = false; - if (lastDR != null) { - if (nullSafeStringsEquals(lastDR.getType(), dr.getType())) { - if (DirtyRegion.INSERT.equals(lastDR.getType())) { - if (lastDR.getOffset() + lastDR.getLength() == dr.getOffset()) { - lastDR.mergeWith(dr); - wasMerged = true; - } - } else if (DirtyRegion.REMOVE.equals(lastDR.getType())) { - if (dr.getOffset() + dr.getLength() == lastDR.getOffset()) { - lastDR.mergeWith(dr); - wasMerged = true; - } - } - } - } - - if (!wasMerged) { - // Don't merge- just add the new one onto the queue. - fDirtyRegions.add(dr); - } - } - - private static boolean nullSafeStringsEquals(final String s1, final String s2) { - if (s1 == s2) { - return true; - } - if (s1 == null) { - return false; - } - return s1.equals(s2); - } - - /** - * Returns the last dirty region that was added to the queue. - * - * @return the last DirtyRegion on the queue - */ - private DirtyRegion getLastDirtyRegion() { - final int size = fDirtyRegions.size(); - return (size == 0 ? null : (DirtyRegion) fDirtyRegions.get(size - 1)); - } - - /** - * Returns the number of regions in the queue. - * - * @return the dirty-region queue-size - */ - public int getSize() { - return fDirtyRegions.size(); - } - - /** Throws away all entries in the queue. */ - public void purgeQueue() { - fDirtyRegions.clear(); - } - - /** - * Removes and returns the first dirty region in the queue - * - * @return the next dirty region on the queue - */ - public DirtyRegion removeNextDirtyRegion() { - if (fDirtyRegions.size() == 0) { - return null; - } - final DirtyRegion dr = fDirtyRegions.get(0); - fDirtyRegions.remove(0); - return dr; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/Reconciler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/Reconciler.java deleted file mode 100644 index b6c09876973..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/Reconciler.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import org.eclipse.che.ide.api.editor.document.UseDocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedHandler; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * An Reconciler defines and maintains a model of the content of the text view document - * in the presence of changes applied to this document. Reconciler have a list of {@link - * ReconcilingStrategy} objects each of which is registered for a particular document content type. - * The reconciler uses the strategy objects to react on the changes applied to the text view - * document. - * - * @author Evgen Vidolob - */ -public interface Reconciler extends UseDocumentHandle, DocumentChangedHandler { - - /** - * Installs the reconciler on the given text view. After this method has been finished, the - * reconciler is operational, i.e., it works without requesting further client actions until - * uninstall is called. - */ - void install(TextEditor editor); - - /** Removes the reconciler from the text view it has previously been installed on. */ - void uninstall(); - - /** - * Returns the reconciling strategy registered with the reconciler for the specified content type. - * - * @param contentType the content type for which to determine the reconciling strategy - * @return the reconciling strategy registered for the given content type, or null if - * there is no such strategy - */ - ReconcilingStrategy getReconcilingStrategy(String contentType); - - /** - * Returns the partitioning this reconciler is using. - * - * @return the partitioning this reconciler is using - */ - String getDocumentPartitioning(); - - void addReconcilingStrategy(String contentType, ReconcilingStrategy strategy); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerFactory.java deleted file mode 100644 index b6572c629be..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; - -/** Factory for {@link Reconciler} instances. */ -public interface ReconcilerFactory { - - Reconciler create(String partitioning, DocumentPartitioner partitioner); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerWithAutoSave.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerWithAutoSave.java deleted file mode 100644 index e0538efb3c1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilerWithAutoSave.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; -import org.eclipse.che.ide.api.editor.text.Region; -import org.eclipse.che.ide.api.editor.text.RegionImpl; -import org.eclipse.che.ide.api.editor.text.TypedRegion; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Default implementation of {@link Reconciler}. Also this implementation provide autosave function. - * Autosave will performed before 'reconcile'. - */ -/* - Maybe this class not proper place for autosave function, but for this issue: https://jira.codenvycorp.com/browse/IDEX-2099 - we need to save file content before 'reconcile'. -*/ -public class ReconcilerWithAutoSave implements Reconciler { - - private static final int DELAY = 5000; - - private final Map strategies; - - private final String partition; - - private final DocumentPartitioner partitioner; - - private DirtyRegionQueue dirtyRegionQueue; - private DocumentHandle documentHandle; - private TextEditor editor; - private boolean autoSaveEnabled = true; - private final Timer autoSaveTimer = - new Timer() { - - @Override - public void run() { - save(); - } - }; - - @AssistedInject - public ReconcilerWithAutoSave( - @Assisted final String partition, @Assisted final DocumentPartitioner partitioner) { - this.partition = partition; - strategies = new HashMap<>(); - this.partitioner = partitioner; - } - - private void reconcilerDocumentChanged() { - for (String key : strategies.keySet()) { - ReconcilingStrategy reconcilingStrategy = strategies.get(key); - reconcilingStrategy.setDocument(documentHandle.getDocument()); - } - - autoSaveTimer.cancel(); - autoSaveTimer.schedule(DELAY); - } - - @Override - public void install(TextEditor editor) { - this.editor = editor; - this.dirtyRegionQueue = new DirtyRegionQueue(); - reconcilerDocumentChanged(); - } - - @Override - public void uninstall() { - autoSaveTimer.cancel(); - for (ReconcilingStrategy strategy : strategies.values()) { - strategy.closeReconciler(); - } - } - - private void save() { - if (autoSaveEnabled) { - if (editor.isDirty()) { - editor.doSave( - new AsyncCallback() { - @Override - public void onFailure(Throwable throwable) { - Log.error(ReconcilerWithAutoSave.class, throwable); - } - - @Override - public void onSuccess(EditorInput editorInput) { - processNextRegion(); - } - }); - return; - } - } - processNextRegion(); - } - - private void processNextRegion() { - final DirtyRegion region = dirtyRegionQueue.removeNextDirtyRegion(); - process(region); - } - - /** - * Processes a dirty region. If the dirty region is null the whole document is - * consider being dirty. The dirty region is partitioned by the document and each partition is - * handed over to a reconciling strategy registered for the partition's content type. - * - * @param dirtyRegion the dirty region to be processed - */ - protected void process(final DirtyRegion dirtyRegion) { - - Region region = dirtyRegion; - - if (region == null) { - region = new RegionImpl(0, getDocument().getContents().length()); - } - - final List regions = computePartitioning(region.getOffset(), region.getLength()); - - for (final TypedRegion r : regions) { - final ReconcilingStrategy strategy = getReconcilingStrategy(r.getType()); - if (strategy == null) { - continue; - } - - if (dirtyRegion != null) { - strategy.reconcile(dirtyRegion, r); - } else { - strategy.reconcile(r); - } - } - } - - /** - * Computes and returns the partitioning for the given region of the input document of the - * reconciler's connected text viewer. - * - * @param offset the region offset - * @param length the region length - * @return the computed partitioning - */ - private List computePartitioning(final int offset, final int length) { - return partitioner.computePartitioning(offset, length); - } - - /** - * Returns the input document of the text view this reconciler is installed on. - * - * @return the reconciler document - */ - protected Document getDocument() { - return documentHandle.getDocument(); - } - - /** - * Creates a dirty region for a document event and adds it to the queue. - * - * @param event the document event for which to create a dirty region - */ - private void createDirtyRegion(final DocumentChangedEvent event) { - if (event.getLength() == 0 && event.getText() != null) { - // Insert - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion( - event.getOffset(), event.getText().length(), DirtyRegion.INSERT, event.getText())); - - } else if (event.getText() == null || event.getText().length() == 0) { - // Remove - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion(event.getOffset(), event.getLength(), DirtyRegion.REMOVE, null)); - - } else { - // Replace (Remove + Insert) - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion(event.getOffset(), event.getLength(), DirtyRegion.REMOVE, null)); - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion( - event.getOffset(), event.getText().length(), DirtyRegion.INSERT, event.getText())); - } - } - - @Override - public ReconcilingStrategy getReconcilingStrategy(final String contentType) { - return strategies.get(contentType); - } - - @Override - public String getDocumentPartitioning() { - return partition; - } - - @Override - public void addReconcilingStrategy(final String contentType, final ReconcilingStrategy strategy) { - strategies.put(contentType, strategy); - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) { - if (documentHandle == null || !documentHandle.isSameAs(event.getDocument())) { - return; - } - createDirtyRegion(event); - autoSaveTimer.cancel(); - autoSaveTimer.schedule(DELAY); - } - - @Override - public DocumentHandle getDocumentHandle() { - return this.documentHandle; - } - - @Override - public void setDocumentHandle(final DocumentHandle handle) { - this.documentHandle = handle; - } - - public boolean isAutoSaveEnabled() { - return autoSaveEnabled; - } - - public void disableAutoSave() { - autoSaveEnabled = false; - autoSaveTimer.cancel(); - } - - public void enableAutoSave() { - autoSaveEnabled = true; - autoSaveTimer.schedule(DELAY); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilingStrategy.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilingStrategy.java deleted file mode 100644 index 0a34f10c84f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/reconciler/ReconcilingStrategy.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.reconciler; - -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.Region; - -/** - * A reconciling strategy is used by an reconciler to reconcile a model based on text of a - * particular content type. - * - * @author Evgen Vidolob - */ -public interface ReconcilingStrategy { - /** - * Tells this reconciling strategy on which document it will work. This method will be called - * before any other method and can be called multiple times. The regions passed to the other - * methods always refer to the most recent document passed into this method. - * - * @param document the document on which this strategy will work - */ - void setDocument(Document document); - - /** - * Activates incremental reconciling of the specified dirty region. As a dirty region might span - * multiple content types, the segment of the dirty region which should be investigated is also - * provided to this reconciling strategy. The given regions refer to the document passed into the - * most recent call of {@link #setDocument(Document)}. - * - * @param dirtyRegion the document region which has been changed - * @param subRegion the sub region in the dirty region which should be reconciled - */ - void reconcile(DirtyRegion dirtyRegion, Region subRegion); - - /** - * Activates non-incremental reconciling. The reconciling strategy is just told that there are - * changes and that it should reconcile the given partition of the document most recently passed - * into {@link #setDocument(Document)}. - * - * @param partition the document partition to be reconciled - */ - void reconcile(Region partition); - - /** - * This method should stop interact on changes in editor and clean up all outer reference (like - * handling events and so on) - */ - void closeReconciler(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/ParameterInfo.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/ParameterInfo.java deleted file mode 100644 index 376380e305f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/ParameterInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.signature; - -import com.google.common.base.Optional; -import javax.validation.constraints.NotNull; - -/** - * Represent a parameter of callable signature. Parameter can have label and optional documentation. - * - * @author Evgen Vidolob - */ -public interface ParameterInfo { - - /** - * The label of this parameter. Used for UI. - * - * @return the parameter label. - */ - @NotNull - String getLabel(); - - /** - * The documentation of this parameter. - * - * @return the human-readable documentation string. - */ - Optional getDocumentation(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelp.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelp.java deleted file mode 100644 index 8b60c378a09..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelp.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.signature; - -import com.google.common.base.Optional; -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * Result of calculation of signatures, represent the signature of something callable. - * - * @author Evgen Vidolob - */ -public interface SignatureHelp { - - /** - * One or more signature. - * - * @return - */ - @NotNull - List getSignatures(); - - /** - * The active signature - * - * @return - */ - Optional getActiveSignature(); - - /** - * The active parameter of the active signature. - * - * @return - */ - Optional getActiveParameter(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelpProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelpProvider.java deleted file mode 100644 index 70c90134278..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureHelpProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.signature; - -import com.google.common.base.Optional; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** - * Calculates signature information at cursor position. - * - * @author Evgen Vidolob - */ -public interface SignatureHelpProvider { - - /** - * Requests to provide signature information - * - * @param document the document where request called - * @param offset the offset where request called - * @return the promise. - */ - @NotNull - Promise> signatureHelp(Document document, int offset); - - /** Installs the SignatureHelpProvider on the given text view. */ - void install(TextEditor editor); - - /** Removes the SignatureHelpProvider from the text view it has previously been installed on. */ - void uninstall(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureInfo.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureInfo.java deleted file mode 100644 index 1efc8f527ef..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/signature/SignatureInfo.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.signature; - -import com.google.common.base.Optional; -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * Represents the signature of something callable. A signature can have label, like method name, a - * documentation and list of parameters - * - * @author Evgen Vidolob - */ -public interface SignatureInfo { - /** - * The label of this signature. - * - * @return - */ - @NotNull - String getLabel(); - - /** - * The documentation of this signature - * - * @return - */ - Optional getDocumentation(); - - /** - * The parameters of this signature. - * - * @return - */ - Optional> getParameters(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadLocationException.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadLocationException.java deleted file mode 100644 index 245f5f23102..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadLocationException.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * Indicates the attempt to access a non-existing position. The attempt has been performed on a text - * store such as a document or string. - * - *

    This class is not intended to be serialized. - */ -public class BadLocationException extends Exception { - - /** - * Serial version UID for this class. - * - *

    Note: This class is not intended to be serialized. - */ - private static final long serialVersionUID = 3257281452776370224L; - - /** Creates a new bad location exception. */ - public BadLocationException() { - super(); - } - - /** - * Creates a new bad location exception. - * - * @param message the exception message - */ - public BadLocationException(String message) { - super(message); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadPositionCategoryException.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadPositionCategoryException.java deleted file mode 100644 index 2b079bb947b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/BadPositionCategoryException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * Indicates the attempt to access a non-existing position category in a document. - * - *

    This class is not intended to be serialized. - * - * @see Document - */ -public class BadPositionCategoryException extends Exception { - - /** - * Serial version UID for this class. - * - *

    Note: This class is not intended to be serialized. - */ - private static final long serialVersionUID = 3761405300745713206L; - - /** Creates a new bad position category exception. */ - public BadPositionCategoryException() { - super(); - } - - /** - * Creates a new bad position category exception. - * - * @param message the exception's message - */ - public BadPositionCategoryException(String message) { - super(message); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/LinearRange.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/LinearRange.java deleted file mode 100644 index 3e263206125..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/LinearRange.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * Range of text described using linear position (ie by character index starting from the text - * beginning).
    - * The range is normalized so that length is always non negative. - */ -public final class LinearRange { - - /** The offset of the start of the range. */ - private final int startOffset; - /** The length of the range. */ - private final int length; - - private LinearRange(final int startIndex, final int length) { - this.startOffset = startIndex; - this.length = length; - } - - /** - * Returns the offset of the start of the range. - * - * @return the start offset - */ - public int getStartOffset() { - return startOffset; - } - - /** - * Returns the length the range.
    - * The length is guaranteed to be non-negative - * - * @return the length - */ - public int getLength() { - return length; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + length; - result = prime * result + startOffset; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - LinearRange other = (LinearRange) obj; - if (length != other.length) { - return false; - } - if (startOffset != other.startOffset) { - return false; - } - return true; - } - - @Override - public String toString() { - return "LinearRange [startOffset=" + startOffset + ", length=" + length + "]"; - } - - /** - * Begins range instantiation with the given range start. - * - * @param startOffset the range start - * @return a {@link PartialLinearRange} - */ - public static PartialLinearRange createWithStart(final int startOffset) { - return new PartialLinearRange(startOffset); - } - - /** Intermediate class for partially initialized {@link LinearRange} instances. */ - public static class PartialLinearRange { - - /** the start offset. */ - private final int startOffset; - - private PartialLinearRange(final int startOffset) { - this.startOffset = startOffset; - } - - /** - * Completes {@link LinearRange} instantiation with the given length. - * - * @param length the range length - * @return the range - */ - public LinearRange andLength(int length) { - if (length >= 0) { - return new LinearRange(this.startOffset, length); - } else { - throw new IllegalArgumentException( - "Incoherent range - start=" + this.startOffset + " length=" + length); - } - } - - /** - * Completes {@link LinearRange} instantiation with the given end. - * - * @param length the range end - * @return the range - */ - public LinearRange andEnd(int endOffset) { - if (endOffset > this.startOffset) { - return new LinearRange(startOffset, endOffset - startOffset); - } else { - return new LinearRange(endOffset, startOffset - endOffset); - } - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Position.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Position.java deleted file mode 100644 index 18dc5a3cde1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Position.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -import org.eclipse.che.ide.runtime.Assert; - -/** - * Positions describe text ranges of a document. Positions are adapted to changes applied to that - * document. The text range is specified by an offset and a length. Positions can be marked as - * deleted. Deleted positions are considered to no longer represent a valid text range in the - * managing document. - * - *

    Positions attached to documents are usually updated by position updaters. Because position - * updaters are freely definable and because of the frequency in which they are used, the fields of - * a position are made publicly accessible. Clients other than position updaters are not allowed to - * access these public fields. - * - *

    Positions cannot be used as keys in hash tables as they override isEquals and - * hashCode as they would be value objects. - * - * @see Document - */ -public class Position { - - /** The offset of the position */ - public int offset; - - /** The length of the position */ - public int length; - - /** Indicates whether the position has been deleted */ - public boolean isDeleted; - - /** - * Creates a new position with the given offset and length 0. - * - * @param offset the position offset, must be >= 0 - */ - public Position(int offset) { - this(offset, 0); - } - - /** - * Creates a new position with the given offset and length. - * - * @param offset the position offset, must be >= 0 - * @param length the position length, must be >= 0 - */ - public Position(int offset, int length) { - Assert.isTrue(offset >= 0); - Assert.isTrue(length >= 0); - this.offset = offset; - this.length = length; - } - - /** Creates a new, not initialized position. */ - protected Position() {} - - /* @see java.lang.Object#hashCode() */ - @Override - public int hashCode() { - int deleted = isDeleted ? 0 : 1; - return (offset << 24) | (length << 16) | deleted; - } - - /** Marks this position as deleted. */ - public void delete() { - isDeleted = true; - } - - /** Marks this position as not deleted. */ - public void undelete() { - isDeleted = false; - } - - /* @see java.lang.Object#isEquals(java.lang.Object) */ - @Override - public boolean equals(Object other) { - if (other instanceof Position) { - Position rp = (Position) other; - return (rp.offset == offset) && (rp.length == length); - } - return super.equals(other); - } - - /** - * Returns the length of this position. - * - * @return the length of this position - */ - public int getLength() { - return length; - } - - /** - * Returns the offset of this position. - * - * @return the offset of this position - */ - public int getOffset() { - return offset; - } - - /** - * Checks whether the given index is inside of this position's text range. - * - * @param index the index to check - * @return true if index is inside of this position - */ - public boolean includes(int index) { - - if (isDeleted) return false; - - return (this.offset <= index) && (index < this.offset + length); - } - - /** - * Checks whether the intersection of the given text range and the text range represented by this - * position is empty or not. - * - * @param rangeOffset the offset of the range to check - * @param rangeLength the length of the range to check - * @return true if intersection is not empty - */ - public boolean overlapsWith(int rangeOffset, int rangeLength) { - - if (isDeleted) return false; - - int end = rangeOffset + rangeLength; - int thisEnd = this.offset + this.length; - - if (rangeLength > 0) { - if (this.length > 0) return this.offset < end && rangeOffset < thisEnd; - return rangeOffset <= this.offset && this.offset < end; - } - - if (this.length > 0) return this.offset <= rangeOffset && rangeOffset <= thisEnd; - return this.offset == rangeOffset; - } - - /** - * Returns whether this position has been deleted or not. - * - * @return true if position has been deleted - */ - public boolean isDeleted() { - return isDeleted; - } - - /** - * Changes the length of this position to the given length. - * - * @param length the new length of this position - */ - public void setLength(int length) { - Assert.isTrue(length >= 0); - this.length = length; - } - - /** - * Changes the offset of this position to the given offset. - * - * @param offset the new offset of this position - */ - public void setOffset(int offset) { - Assert.isTrue(offset >= 0); - this.offset = offset; - } - - /* - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - String position = "offset: " + offset + ", length: " + length; // $NON-NLS-1$//$NON-NLS-2$ - return isDeleted ? position + " (deleted)" : position; // $NON-NLS-1$ - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Region.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Region.java deleted file mode 100644 index f9602b7a278..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/Region.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * A region describes a certain range in an indexed text store. Text stores are for example - * documents or strings. A region is defined by its offset into the text store and its length. - * - *

    A region is considered a value object. Its offset and length do not change over time. - * - *

    Clients may implement this interface or use the standard implementation {@link RegionImpl}. - */ -public interface Region { - - /** - * Returns the length of the region. - * - * @return the length of the region - */ - int getLength(); - - /** - * Returns the offset of the region. - * - * @return the offset of the region - */ - int getOffset(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/RegionImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/RegionImpl.java deleted file mode 100644 index 4f8ca74a55f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/RegionImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** The default implementation of the {@link Region} interface. */ -public class RegionImpl implements Region { - - /** The region offset */ - private int fOffset; - - /** The region length */ - private int fLength; - - /** - * Create a new region. - * - * @param offset the offset of the region - * @param length the length of the region - */ - public RegionImpl(int offset, int length) { - fOffset = offset; - fLength = length; - } - - /* @see org.eclipse.jface.text.IRegion#getLength() */ - @Override - public int getLength() { - return fLength; - } - - /* @see org.eclipse.jface.text.IRegion#getOffset() */ - @Override - public int getOffset() { - return fOffset; - } - - /* @see java.lang.Object#isEquals(java.lang.Object) */ - @Override - public boolean equals(Object o) { - if (o instanceof Region) { - Region r = (Region) o; - return r.getOffset() == fOffset && r.getLength() == fLength; - } - return false; - } - - /* @see java.lang.Object#hashCode() */ - @Override - public int hashCode() { - return (fOffset << 24) | (fLength << 16); - } - - /* @see java.lang.Object#toString() */ - @Override - public String toString() { - return "offset: " + fOffset + ", length: " + fLength; // $NON-NLS-1$ //$NON-NLS-2$; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextPosition.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextPosition.java deleted file mode 100644 index fc0dbe3cc87..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextPosition.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** A position in the text editor. */ -public class TextPosition { - /** The line in the text. */ - private final int line; - - /** The character position on the line. */ - private final int character; - - public TextPosition(int line, int character) { - this.line = line; - this.character = character; - } - - /** - * Return the line coordinate ofthe text position - * - * @return the line coordinate - */ - public int getLine() { - return line; - } - - /** - * Return the character coordinate ofthe text position - * - * @return the character coordinate - */ - public int getCharacter() { - return character; - } - - @Override - public String toString() { - return "(" + line + ", " + character + ")"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + character; - result = prime * result + line; - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!(obj instanceof TextPosition)) { - return false; - } - final TextPosition other = (TextPosition) obj; - if (character != other.character) { - return false; - } - if (line != other.line) { - return false; - } - return true; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextRange.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextRange.java deleted file mode 100644 index 47949689e66..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TextRange.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** Oriented range of text. */ -public class TextRange { - - /** The start position of the range. */ - private final TextPosition from; - - /** The end position of the range. */ - private final TextPosition to; - - /** - * TextRange constructor. - * - * @param from the start of the range - * @param to the end of the range - */ - public TextRange(final TextPosition from, final TextPosition to) { - this.from = from; - this.to = to; - } - - /** - * Return the start of the range (line-character position). - * - * @return the start of the range - */ - public TextPosition getFrom() { - return this.from; - } - - /** - * Return the end of the range (line-character position). - * - * @return the end of the range - */ - public TextPosition getTo() { - return this.to; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((from == null) ? 0 : from.hashCode()); - result = prime * result + ((to == null) ? 0 : to.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!(obj instanceof TextRange)) { - return false; - } - final TextRange other = (TextRange) obj; - if (from == null) { - if (other.from != null) { - return false; - } - } else if (!from.equals(other.from)) { - return false; - } - if (to == null) { - if (other.to != null) { - return false; - } - } else if (!to.equals(other.to)) { - return false; - } - return true; - } - - @Override - public String toString() { - return "TextRange [from=" + from + ", to=" + to + "]"; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedPosition.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedPosition.java deleted file mode 100644 index 35e370e4406..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedPosition.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2008 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * Convenience class for positions that have a type, similar to {@link TypedRegion}. - * - *

    As {@link Position},TypedPosition can not be used as key in hash tables as it - * overrides isEquals and hashCode as it would be a value object. - */ -public class TypedPosition extends Position { - - /** The type of the region described by this position */ - private String fType; - - /** - * Creates a position along the given specification. - * - * @param offset the offset of this position - * @param length the length of this position - * @param type the content type of this position - */ - public TypedPosition(int offset, int length, String type) { - super(offset, length); - fType = type; - } - - /** - * Creates a position based on the typed region. - * - * @param region the typed region - */ - public TypedPosition(TypedRegion region) { - super(region.getOffset(), region.getLength()); - fType = region.getType(); - } - - /** - * Returns the content type of the region. - * - * @return the content type of the region - */ - public String getType() { - return fType; - } - - /* - * @see java.lang.Object#isEquals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o instanceof TypedPosition) { - if (super.equals(o)) { - TypedPosition p = (TypedPosition) o; - return (fType == null && p.getType() == null) || fType.equals(p.getType()); - } - } - return false; - } - - /* - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - int type = fType == null ? 0 : fType.hashCode(); - return super.hashCode() | type; - } - - /* - * @see org.eclipse.jface.text.Region#toString() - */ - @Override - public String toString() { - return fType + " - " + super.toString(); // $NON-NLS-1$ - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegion.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegion.java deleted file mode 100644 index 0d721defda2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegion.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** - * Describes a region of an indexed text store such as a document or a string. The region consists - * of offset, length, and type. The region type is defined as a string. - * - *

    A typed region can, e.g., be used to described document partitions. - * - *

    Clients may implement this interface or use the standard implementation {@link - * org.eclipse.TypedRegionImpl.text.TypedRegion}. - */ -public interface TypedRegion extends Region { - - /** - * Returns the content type of the region. - * - * @return the content type of the region - */ - String getType(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegionImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegionImpl.java deleted file mode 100644 index 499b64e88bb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/TypedRegionImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text; - -/** Default implementation of {@link TypedRegion}. A TypedRegion is a value object. */ -public class TypedRegionImpl extends RegionImpl implements TypedRegion { - - /** The region's type */ - private String fType; - - /** - * Creates a typed region based on the given specification. - * - * @param offset the region's offset - * @param length the region's length - * @param type the region's type - */ - public TypedRegionImpl(int offset, int length, String type) { - super(offset, length); - fType = type; - } - - /* @see org.eclipse.jface.text.ITypedRegion#getProjectType() */ - @Override - public String getType() { - return fType; - } - - /* @see java.lang.Object#isEquals(java.lang.Object) */ - @Override - public boolean equals(Object o) { - if (o instanceof TypedRegionImpl) { - TypedRegionImpl r = (TypedRegionImpl) o; - return super.equals(r) - && ((fType == null && r.getType() == null) || fType.equals(r.getType())); - } - return false; - } - - /* @see java.lang.Object#hashCode() */ - @Override - public int hashCode() { - int type = fType == null ? 0 : fType.hashCode(); - return super.hashCode() | type; - } - - /* - * @see org.eclipse.jface.text.Region#toString() - * @since 3.5 - */ - @Override - public String toString() { - return fType + " - " + super.toString(); // $NON-NLS-1$ - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/annotation/Annotation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/annotation/Annotation.java deleted file mode 100644 index 73d6613497d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/annotation/Annotation.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.text.annotation; - -import com.google.gwt.resources.client.ImageResource; -import elemental.dom.Element; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Annotation managed by an{@link AnnotationModel}. - * - *

    Annotations are typed, can have an associated text and can be marked as persistent and - * deleted. Annotations which are not explicitly initialized with an annotation type are of type - * "org.eclipse.che.ide.api.editor.text.annotation.unknown". - */ -public class Annotation { - - /** - * Constant for unknown annotation types. - * - *

    Value: "org.eclipse.che.ide.api.editor.text.annotation.unknown" - */ - public static final String TYPE_UNKNOWN = - "org.eclipse.che.ide.api.editor.text.annotation.unknown"; // $NON-NLS-1$ - - /** The type of this annotation. */ - private String type; - - /** Indicates whether this annotation is persistent or not. */ - private boolean isPersistent = false; - - /** Indicates whether this annotation is marked as deleted or not. */ - private boolean markedAsDeleted = false; - - /** The text associated with this annotation. */ - private String text; - - /** Annotation drawing layer. */ - protected int layer; - - /** Image associated with this annotation */ - protected ImageResource image; - - /** Image associated with this annotation */ - protected SVGResource imageSVG; - - /** Element associated with this annotation */ - protected Element imageElement; - - /** Creates a new annotation that is not persistent and type less. */ - protected Annotation() { - this(null, false, null); - } - - /** - * Creates a new annotation with the given properties. - * - * @param type the unique name of this annotation type - * @param isPersistent true if this annotation is persistent, false - * otherwise - * @param text the text associated with this annotation - */ - public Annotation(String type, boolean isPersistent, String text) { - this.type = type; - this.isPersistent = isPersistent; - this.text = text; - } - - /** - * Creates a new annotation with the given persistence state. - * - * @param isPersistent true if persistent, false otherwise - */ - public Annotation(boolean isPersistent) { - this(null, isPersistent, null, 0, null, null); - } - - /** - * Creates a new annotation with the given properties. - * - * @param type the unique name of this annotation type - * @param isPersistent true if this annotation is persistent, false - * otherwise - * @param text the text associated with this annotation - * @param layer annotation draw layer - * @param image image associated with this annotation - */ - public Annotation( - String type, boolean isPersistent, String text, int layer, ImageResource image) { - this(type, isPersistent, text, layer, image, null); - } - - /** - * Creates a new annotation with the given properties. - * - * @param type the unique name of this annotation type - * @param isPersistent true if this annotation is persistent, false - * otherwise - * @param text the text associated with this annotation - * @param layer annotation draw layer - * @param imageSVG image associated with this annotation - */ - public Annotation( - String type, boolean isPersistent, String text, int layer, SVGResource imageSVG) { - this(type, isPersistent, text, layer, null, imageSVG); - } - - /** - * Creates a new annotation with the given properties. - * - * @param type the unique name of this annotation type - * @param isPersistent true if this annotation is persistent, false - * otherwise - * @param text the text associated with this annotation - * @param layer annotation draw layer - * @param image image associated with this annotation - * @param imageSVG image associated with this annotation - */ - public Annotation( - String type, - boolean isPersistent, - String text, - int layer, - ImageResource image, - SVGResource imageSVG) { - this.type = type; - this.isPersistent = isPersistent; - this.text = text; - this.layer = layer; - this.image = image; - this.imageSVG = imageSVG; - } - - /** - * Returns whether this annotation is persistent. - * - * @return true if this annotation is persistent, false otherwise - */ - public boolean isPersistent() { - return isPersistent; - } - - /** - * Sets the type of this annotation. - * - * @param type the annotation type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Returns the type of the annotation. - * - * @return the type of the annotation - */ - public String getType() { - return type == null ? TYPE_UNKNOWN : type; - } - - /** - * Marks this annotation deleted according to the value of the deleted parameter. - * - * @param deleted true if annotation should be marked as deleted - */ - public void markDeleted(boolean deleted) { - markedAsDeleted = deleted; - } - - /** - * Returns whether this annotation is marked as deleted. - * - * @return true if annotation is marked as deleted, false otherwise - */ - public boolean isMarkedDeleted() { - return markedAsDeleted; - } - - /** - * Sets the text associated with this annotation. - * - * @param text the text associated with this annotation - */ - public void setText(String text) { - this.text = text; - } - - /** - * Returns the text associated with this annotation. - * - * @return the text associated with this annotation or null - */ - public String getText() { - return text; - } - - /** - * Return element resource for this annotation. Note: if this method return null, - * this annotation not draw in left gutter - * - * @return - */ - public Element getImageElement() { - return imageElement; - } - - /** - * Return the annotations drawing layer. - * - * @return int starting from 0 - */ - public int getLayer() { - return layer; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder - .append("Annotation [type=") - .append(type) - .append(", text=") - .append(text) - .append(", layer=") - .append(layer) - .append("]"); - return builder.toString(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/Token.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/Token.java deleted file mode 100644 index 82d5fc8f93c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/Token.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2005 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.text.rules; - -/** A token to be returned by a rule. */ -public interface Token { - - /** - * Return whether this token is undefined. - * - * @return trueif this token is undefined - */ - boolean isUndefined(); - - /** - * Return whether this token represents a whitespace. - * - * @return trueif this token represents a whitespace - */ - boolean isWhitespace(); - - /** - * Return whether this token represents End Of File. - * - * @return trueif this token represents EOF - */ - boolean isEOF(); - - /** - * Return whether this token is neither undefined, nor whitespace, nor EOF. - * - * @return trueif this token is not undefined, not a whitespace, and not EOF - */ - boolean isOther(); - - /** - * Return a data attached to this token. The semantics of this data kept undefined by this - * interface. - * - * @return the data attached to this token. - */ - Object getData(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/TokenImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/TokenImpl.java deleted file mode 100644 index ee7f89c5d05..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/text/rules/TokenImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2007 IBM Corporation and others. 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: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.che.ide.api.editor.text.rules; - -import org.eclipse.che.ide.runtime.Assert; - -/** Standard implementation of IToken. */ -public class TokenImpl implements Token { - - /** Internal token type: Undefined */ - private static final int T_UNDEFINED = 0; - /** Internal token type: EOF */ - private static final int T_EOF = 1; - /** Internal token type: Whitespace */ - private static final int T_WHITESPACE = 2; - /** Internal token type: Others */ - private static final int T_OTHER = 3; - /** Standard token: Undefined. */ - public static final Token UNDEFINED = new TokenImpl(T_UNDEFINED); - /** Standard token: End Of File. */ - public static final Token EOF = new TokenImpl(T_EOF); - /** Standard token: Whitespace. */ - public static final Token WHITESPACE = new TokenImpl(T_WHITESPACE); - /** The type of this token */ - private int fType; - /** The data associated with this token */ - private Object fData; - - /** - * Creates a new token according to the given specification which does not have any data attached - * to it. - * - * @param type the type of the token - */ - private TokenImpl(int type) { - fType = type; - fData = null; - } - - /** - * Creates a new token which represents neither undefined, whitespace, nor EOF. The newly created - * token has the given data attached to it. - * - * @param data the data attached to the newly created token - */ - public TokenImpl(Object data) { - fType = T_OTHER; - fData = data; - } - - /* - * @see IToken#getData() - */ - @Override - public Object getData() { - return fData; - } - - /** - * Re-initializes the data of this token. The token may not represent undefined, whitespace, or - * EOF. - * - * @param data to be attached to the token - */ - public void setData(Object data) { - Assert.isTrue(isOther()); - fData = data; - } - - /* - * @see IToken#isOther() - */ - @Override - public boolean isOther() { - return (fType == T_OTHER); - } - - /* - * @see IToken#isEOF() - */ - @Override - public boolean isEOF() { - return (fType == T_EOF); - } - - /* - * @see IToken#isWhitespace() - */ - @Override - public boolean isWhitespace() { - return (fType == T_WHITESPACE); - } - - /* - * @see IToken#isUndefined() - */ - @Override - public boolean isUndefined() { - return (fType == T_UNDEFINED); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CanWrapLines.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CanWrapLines.java deleted file mode 100644 index 476e9261dcc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CanWrapLines.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** - * Determined whether the editor implementing this interface can wrap lines. - * - * @author Vitaliy Guliy - */ -public interface CanWrapLines { - - /** - * Determines whether line wrapping is active. - * - * @return true when line wrapping is active - */ - boolean isWrapLines(); - - /** Toggles line wrapping mode. */ - void toggleWrapLines(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/ContentInitializedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/ContentInitializedHandler.java deleted file mode 100644 index 166d624c266..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/ContentInitializedHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** - * Handle event that content has been already injected to the Editor Widget - * - * @author Vitalii Parfonov - */ -public interface ContentInitializedHandler { - - void onContentInitialized(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModel.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModel.java deleted file mode 100644 index 3c132f39b81..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModel.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import org.eclipse.che.ide.api.editor.text.Position; - -public interface CursorModel { - - /** - * Move cursor to offset. - * - * @param offset the offset - */ - void setCursorPosition(int offset); - - /** - * Get cursor position - * - * @return the position of cursor. - */ - Position getCursorPosition(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModelWithHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModelWithHandler.java deleted file mode 100644 index 497957e49cc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModelWithHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import org.eclipse.che.ide.util.ListenerRegistrar.Remover; - -/** - * Interface for a {@link CursorModel} that also have {@link CursorHandler}s. - * - * @author "Mickaël Leduque" - */ -public interface CursorModelWithHandler extends CursorModel { - - Remover addCursorHandler(CursorHandler handler); - - interface CursorHandler { - void onCursorChange(int line, int column, boolean isExplicitChange); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorResources.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorResources.java deleted file mode 100644 index 447668576b9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorResources.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; - -/** Resources interface for the editor. */ -public interface EditorResources extends ClientBundle { - - /** CssResource for the editor. */ - interface EditorCss extends CssResource { - - /** Style added to warnings. */ - String lineWarning(); - - /** Style added to errors. */ - String lineError(); - - /** Style added to the current breakpoint line. */ - String debugLine(); - } - - @Source({"Editor.css", "org/eclipse/che/ide/api/ui/style.css"}) - EditorCss editorCss(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidget.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidget.java deleted file mode 100644 index a0f2263f07c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidget.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import com.google.gwt.event.dom.client.HasBlurHandlers; -import com.google.gwt.event.dom.client.HasChangeHandlers; -import com.google.gwt.event.dom.client.HasFocusHandlers; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.RequiresResize; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.codeassist.AdditionalInfoCallback; -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal; -import org.eclipse.che.ide.api.editor.codeassist.CompletionsSource; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.events.HasCursorActivityHandlers; -import org.eclipse.che.ide.api.editor.events.HasGutterClickHandlers; -import org.eclipse.che.ide.api.editor.hotkeys.HotKeyItem; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.api.editor.position.PositionConverter; -import org.eclipse.che.ide.api.editor.text.Region; - -/** An interface for editor widget implementations. */ -public interface EditorWidget - extends IsWidget, - RequiresResize, - /* handler interfaces */ - HasBlurHandlers, - HasChangeHandlers, - HasCursorActivityHandlers, - HasFocusHandlers, - HasGutterClickHandlers, - /* extended capabilities */ - HasKeyBindings, - HasTextMarkers, - LineStyler.HasLineStyler, - UndoableEditor { - - /** - * Returns the contents of the editor. - * - * @return - */ - String getValue(); - - /** - * Sets the content of the editor.
    - * The operation must send a {@link DocumentChangedEvent} on the document private event - * bus. - * - * @param newValue the new contents - * @param initializationHandler must be called when content injected in the Editor Widget - */ - void setValue(String newValue, ContentInitializedHandler initializationHandler); - - /** - * Returns the current language mode for highlighting. - * - * @return the mode - */ - String getMode(); - - /** - * Change readonly state of the editor. - * - * @param isReadOnly true to set the editor in readonly mode, false to allow edit - */ - void setReadOnly(boolean isReadOnly); - - /** Sets whether the annotation ruler is visible. */ - void setAnnotationRulerVisible(boolean show); - - /** Sets whether the folding ruler is visible. */ - void setFoldingRulerVisible(boolean show); - - /** Sets whether the zoom ruler is visible. */ - void setZoomRulerVisible(boolean show); - - /** Sets whether the overview ruler is visible. */ - void setOverviewRulerVisible(boolean show); - - /** - * Returns the readonly state of the editor. - * - * @return the readonly state, true iff the editor is readonly - */ - boolean isReadOnly(); - - /** - * Returns the dirty state of the editor. - * - * @return true iff the editor is dirty (i.e. unsaved change were made) - */ - boolean isDirty(); - - /** Marks the editor as clean i.e change the dirty state to false. */ - void markClean(); - - /** Marks the editor as dirty i.e change the dirty state to true. */ - void markDirty(); - - /** - * Returns the tab size (equivalent number of spaces). - * - * @return the tab size - */ - int getTabSize(); - - /** - * Sets the tab size. - * - * @param tabSize the new value - */ - void setTabSize(int tabSize); - - /** - * The instance of {@link org.eclipse.che.ide.api.editor.document.Document}. - * - * @return the embedded document - */ - Document getDocument(); - - /** - * Returns the selected range in the editor. In case of multiple selection support, returns the - * primary selection. When no actual selection is done, a selection with a zero length is given - * - * @return the selected range - */ - Region getSelectedRange(); - - /** - * Returns the current keymap in the editor. - * - * @return the current keymap - */ - @NotNull - Keymap getKeymap(); - - /** Give the focus to the editor. */ - void setFocus(); - - /** - * Show a message to the user. - * - * @param message the message - */ - void showMessage(String message); - - /** - * Selects the given range in the editor. - * - * @param selection the new selection - * @param show whether the editor should be scrolled to show the range - */ - void setSelectedRange(Region selection, boolean show); - - /** - * Scroll the editor to show the given range. - * - * @param range the range to show - */ - void setDisplayRange(Region range); - - /** - * Returns a position converter relative to this editor (pixel coordinates <-> line char - * positions). - * - * @return a position converter - */ - PositionConverter getPositionConverter(); - - /** - * Display the completion proposals. - * - * @param proposals the proposals - */ - void showCompletionsProposals(List proposals); - - /** - * Display the completion proposals. - * - * @param completionsSource the completion source - */ - void showCompletionProposals(CompletionsSource completionsSource); - - /** Display the default completion proposals. */ - void showCompletionProposals(); - - void showCompletionProposals( - CompletionsSource completionsSource, AdditionalInfoCallback additionalInfoCallback); - - /** Refresh the editor widget. */ - void refresh(); - - boolean isCompletionProposalsShowing(); - - /** - * Return list hotKeys for editor - * - * @return list hotKeys - */ - List getHotKeys(); - - /** Callback that should be called when editor widget implementation is fully initialized. */ - interface WidgetInitializedCallback { - void initialized(EditorWidget editorWidget); - } - - /** Hide opened tooltip. */ - void hideTooltip(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidgetFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidgetFactory.java deleted file mode 100644 index f1e55e92f6b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorWidgetFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import java.util.List; -import org.eclipse.che.ide.api.editor.texteditor.EditorWidget.WidgetInitializedCallback; - -/** - * Interface for {@link EditorWidget} factories. - * - * @author "Mickaël Leduque" - * @author Artem Zatsarynnyi - */ -public interface EditorWidgetFactory { - - /** - * Create an editor instance. - * - * @param editorModes the editor modes - * @param widgetInitializedCallback the callback that will be called when the editor widget is - * fully initialize - * @return an editor instance - */ - T createEditorWidget( - List editorModes, WidgetInitializedCallback widgetInitializedCallback); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesTextOperations.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesTextOperations.java deleted file mode 100644 index e2947ebb088..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesTextOperations.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** - * Interface for text editor view that handles text operations. - * - * @author "Mickaël Leduque" - */ -public interface HandlesTextOperations { - - /** - * Returns whether the operation specified by the given operation code can be performed. - * - * @param operation the operation code - * @return true if the specified operation can be performed - */ - boolean canDoOperation(int operation); - - /** - * Performs the operation specified by the operation code on the target. doOperation - * must only be called if canDoOperation returns true. - * - * @param operation the operation code - */ - void doOperation(int operation); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesUndoRedo.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesUndoRedo.java deleted file mode 100644 index 949f30a143f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HandlesUndoRedo.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import javax.validation.constraints.NotNull; - -/** Interface for an editor that allow undo/redo operations. */ -public interface HandlesUndoRedo { - - /** - * Returns whether at least one text change can be repeated. A text change can be repeated only if - * it was executed and rolled back. - * - * @return true if at least on text change can be repeated - */ - boolean redoable(); - - /** - * Returns whether at least one text change can be rolled back. - * - * @return true if at least one text change can be rolled back - */ - boolean undoable(); - - /** Repeats the most recently rolled back text change. */ - void redo(); - - /** Rolls back the most recently executed text change. */ - void undo(); - - /** - * Signals the UndoRedo that all subsequent changes until endCompoundChange is called - * are to be undone in one piece. - */ - void beginCompoundChange(); - - /** - * Signals the UndoRedo that the sequence of changes which started with beginCompoundChange - * has been finished. All subsequent changes are considered to be individually undo-able. - */ - void endCompoundChange(); - - /** - * Adds a listener for undo/redo operations. Has no effect if an identical listener is already - * registered. - * - * @param listener undo/redo operations listener - */ - void addUndoRedoOperationsListener(@NotNull UndoRedoOperationsListener listener); - - interface UndoRedoOperationsListener { - void onOperationExecuted(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasKeyBindings.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasKeyBindings.java deleted file mode 100644 index 4c4ece2f7d5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasKeyBindings.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import org.eclipse.che.ide.api.editor.keymap.KeyBinding; - -/** Interface for components that handles key bindings. */ -public interface HasKeyBindings { - - /** - * Adds a key bindings. - * - * @param keyBinding the new binding - */ - void addKeyBinding(KeyBinding keyBinding); - - /** - * Adds a key bindings. - * - * @param keyBinding the new binding - * @param actionDescription action description - */ - void addKeyBinding(KeyBinding keyBinding, String actionDescription); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasNotificationPanel.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasNotificationPanel.java deleted file mode 100644 index 34087e1871b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasNotificationPanel.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import com.google.gwt.dom.client.Element; - -/** - * The interface needs for adding the notification panel into the editor. - * - * @author Evgen Vidolob - */ -public interface HasNotificationPanel { - NotificationRemover addNotification(Element element); - - interface NotificationRemover { - /** Removes notification panel. */ - void remove(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasReadOnlyProperty.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasReadOnlyProperty.java deleted file mode 100644 index 37b08bcb5b8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasReadOnlyProperty.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -public interface HasReadOnlyProperty { - - /** - * Sets the editable state. - * - * @param isReadOnly the read only state - */ - void setReadOnly(final boolean isReadOnly); - - /** - * Returns whether the shown text can be manipulated. - * - * @return the viewer's readOnly state - */ - boolean isReadOnly(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasTextMarkers.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasTextMarkers.java deleted file mode 100644 index 6ae485886ee..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/HasTextMarkers.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import org.eclipse.che.ide.api.editor.text.TextRange; - -/** Interface for component that handle marked ranges of text. */ -public interface HasTextMarkers { - - /** - * Add a marker on the text range. - * - * @param range the range - * @param className the CSS class - * @return an handle to clear the mark. - */ - MarkerRegistration addMarker(TextRange range, String className); - - /** Registration object to remove a text range marker. */ - interface MarkerRegistration { - /** Clear the mark. */ - void clearMark(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/LineStyler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/LineStyler.java deleted file mode 100644 index d5af9b591cb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/LineStyler.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** Interface for editors that allow line styling. */ -public interface LineStyler { - - /** - * Adds the styles to the line. - * - * @param lineNumber the line number - * @param styles the styles to add - */ - void addLineStyles(int lineNumber, String... styles); - - /** - * Removes the styles on the line. - * - * @param lineNumber the line number - * @param styles the styles to remove - */ - void removeLineStyles(int lineNumber, String... styles); - - /** - * Removes all styles on the line. - * - * @param lineNumber the line number - */ - void clearLineStyles(int lineNumber); - - /** Components that hold a line styler. */ - interface HasLineStyler { - /** - * Returns the LineStyler instance - * - * @return the line styler instance - */ - LineStyler getLineStyler(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditor.java deleted file mode 100644 index 09af420567a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditor.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.editorconfig.EditorUpdateAction; -import org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration; -import org.eclipse.che.ide.api.editor.keymap.KeyBinding; -import org.eclipse.che.ide.api.editor.position.PositionConverter; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.text.TextRange; - -/** Public view on the editor component. */ -public interface TextEditor extends EditorPartPresenter { - - /** - * Initializes this editor with the configuration and document provider. - * - * @param configuration the configuration of this editor. - */ - void initialize(@NotNull TextEditorConfiguration configuration); - - /** - * Returns the text editor configuration that was used for initialization. - * - * @return the text editor configuration - */ - TextEditorConfiguration getConfiguration(); - - /** @return the text editor view implementation */ - @Override - TextEditorPartView getView(); - - /** @return the text editor widget */ - EditorWidget getEditorWidget(); - - /** - * Add an editor-specific key binding. - * - * @param keyBinding the key binding - */ - void addKeybinding(KeyBinding keyBinding); - - /** - * Closes this text editor after optionally saving changes. - * - * @param save true if unsaved changed should be saved, and false if - * unsaved changed should be discarded - */ - @Override - void close(boolean save); - - /** - * Returns whether the text in this text editor can be changed by the user. - * - * @return true if it can be edited, and false if it is read-only - */ - boolean isEditable(); - - /** - * Abandons all modifications applied to this text editor's input element's textual presentation - * since the last save operation. - */ - void doRevertToSaved(); - - /** - * Returns the document backing the text content. - * - * @return the document - */ - Document getDocument(); - - /** - * Return the content type of the editor content.
    - * Returns null if the type is not known yet. - * - * @return the content type - */ - String getContentType(); - - /** - * Returns the selection range as a {@link TextRange} (i.e. two line, char objects: start en end). - * - * @return the selection range - */ - TextRange getSelectedTextRange(); - - /** - * Returns the selection range as a {@link LinearRange} (ie.e a start offset and a length). - * - * @return the selection range - */ - LinearRange getSelectedLinearRange(); - - /** - * Returns the cursor position as a {@link TextPosition} object (a line char position). - * - * @return the cursor position - */ - TextPosition getCursorPosition(); - - /** Sets the new cursor position. */ - void setCursorPosition(TextPosition textPosition); - - /** - * Returns the cursor model for the editor. - * - * @return the cursor model - */ - CursorModelWithHandler getCursorModel(); - - /** - * Returns a position converter relative to this editor (pixel coordinates <-> line char - * positions). - * - * @return a position converter - */ - PositionConverter getPositionConverter(); - - /** - * Returns the cursor position as an offset from the start. - * - * @return the cursor position - */ - int getCursorOffset(); - - /** - * Returns the top visible line. Used to determine editor vertical scroll position - * - * @return the top visible line - */ - int getTopVisibleLine(); - - /** - * Set (scroll) top visible line - * - * @param line the top line - */ - void setTopLine(int line); - - /** - * Displays a message to the user. - * - * @param message message - */ - void showMessage(String message); - - /** - * Returns focus state of the text editor - * - * @return true if the text editor is focused or false otherwise - */ - boolean isFocused(); - - /** Give the focus to the editor. */ - void setFocus(); - - /** Calls all editor update actions for this editor. */ - void refreshEditor(); - - /** - * Adds an editor update action for this editor. - * - * @param action the action to add - */ - void addEditorUpdateAction(EditorUpdateAction action); - - /** - * Get word position under offset. - * - * @param offset the offset for look for a word - * @return the word position - */ - @Nullable - Position getWordAtOffset(int offset); - - /** - * Update 'dirty' state of editor when state of editor content is changed - * - * @param dirty {@code true} when editor content is modified and {@code false} when editor content - * is saved - */ - void updateDirtyState(boolean dirty); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorOperations.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorOperations.java deleted file mode 100644 index 49a2286ce5e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorOperations.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** - * Defines the target for text operations. The editor informs the clients about the ability of the - * target to perform the specified operation at the current point in time. - * - * @author Evgen Vidolob - * @version $Id: - */ -public interface TextEditorOperations { - - /** Text operation code for undoing the last edit command. */ - int UNDO = 1; - - /** Text operation code for redoing the last undone edit command. */ - int REDO = 2; - - /** Text operation code for moving the selected text to the clipboard. */ - int CUT = 3; - - /** Text operation code for copying the selected text to the clipboard. */ - int COPY = 4; - - /** Text operation code for inserting the clipboard content at the current position. */ - int PASTE = 5; - - /** - * Text operation code for deleting the selected text or if selection is empty the character at - * the right of the current position. - */ - int DELETE = 6; - - /** Text operation code for selecting the complete text. */ - int SELECT_ALL = 7; - - /** Text operation code for shifting the selected text block to the right. */ - int SHIFT_RIGHT = 8; - - /** Text operation code for shifting the selected text block to the left. */ - int SHIFT_LEFT = 9; - - /** Text operation code for printing the complete text. */ - int PRINT = 10; - - /** Text operation code for prefixing the selected text block. */ - int PREFIX = 11; - - /** Text operation code for removing the prefix from the selected text block. */ - int STRIP_PREFIX = 12; - - /** - * Text operation code for requesting content assist to show completion proposals for the current - * insert position. - */ - int CODEASSIST_PROPOSALS = 13; - - /** - * Text operation code for formatting the selected text or complete document of this viewer if the - * selection is empty. - */ - int FORMAT = 14; - - /** - * Text operation code for requesting quick assist. This will normally show quick assist and quick - * fix proposals for the current position. - */ - int QUICK_ASSIST = 15; - - /** Text operation code for requesting signature help for current cursor position. */ - int SIGNATURE_HELP = 16; -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorPartView.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorPartView.java deleted file mode 100644 index a6b022726ab..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditorPartView.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.RequiresResize; -import com.google.gwt.user.client.ui.Widget; -import org.eclipse.che.ide.api.editor.EditorWithErrors; -import org.eclipse.che.ide.api.editor.codeassist.CompletionsSource; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.api.editor.text.TextPosition; - -/** - * View interface for the text editors components. - * - * @author "Mickaël Leduque" - */ -public interface TextEditorPartView extends RequiresResize, IsWidget, HasNotificationPanel { - - /** - * Invoke the code complete dialog. - * - * @param editorWidget the editor widget - * @param completionsSource the completion source - */ - void showCompletionProposals(EditorWidget editorWidget, CompletionsSource completionsSource); - - /** - * Invoke the code complete dialog with default completion. - * - * @param editorWidget the editor widget - */ - void showCompletionProposals(EditorWidget editorWidget); - - /** - * Sets the view delegate. - * - * @param delegate the delegate - */ - void setDelegate(Delegate delegate); - - /** - * Sets the editor widget. - * - * @param editorWidget the widget - */ - void setEditorWidget(EditorWidget editorWidget); - - /** - * Display a placeholder in place of the editor widget. - * - * @param placeHolder the widget to display - */ - void showPlaceHolder(Widget placeHolder); - - /** - * Sets whether the info panel is visible. - * - * @param visible {@code true} to show the info panel, {@code false} to hide it - */ - void setInfoPanelVisible(boolean visible); - - /** - * Sets the initial state of the info panel. - * - * @param mode the file mode - * @param keymap the current keymap - * @param lineCount the number of lines - * @param tabSize the tab size in this editor - */ - void initInfoPanel(String mode, Keymap keymap, int lineCount, int tabSize); - - /** - * Update the location displayed in the info panel. - * - * @param position the new position - */ - void updateInfoPanelPosition(TextPosition position); - - /** - * Update the values in the info panel for when the editor is not focused (i.e. show line count - * and not char part). - * - * @param lineCount the number of lines in the file - */ - void updateInfoPanelUnfocused(int lineCount); - - /** Delegate interface for this view. */ - interface Delegate extends EditorWithErrors, RequiresResize { - /** Reaction on loss of focus. */ - void editorLostFocus(); - - /** Reaction when the editor gains focus. */ - void editorGotFocus(); - - /** Reaction when the cursor position changes. */ - void editorCursorPositionChanged(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/UndoableEditor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/UndoableEditor.java deleted file mode 100644 index 3b44b83875f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/UndoableEditor.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.texteditor; - -/** @author Roman Nikitenko */ -public interface UndoableEditor { - - /** Returns the component that handles undo and redo. */ - HandlesUndoRedo getUndoRedo(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/DependencyDescription.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/DependencyDescription.java deleted file mode 100644 index f417ff3fc97..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/DependencyDescription.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -/** - * Describes Dependency information of Extension. - * - * @author Nikolay Zamosenchuk - */ -public class DependencyDescription { - private String id; - - private String version; - - /** - * Create {@link DependencyDescription} instance - * - * @param id - * @param version - */ - public DependencyDescription(String id, String version) { - this.id = id; - this.version = version; - } - - /** - * Get required extension id - * - * @return - */ - public String getId() { - return id; - } - - /** - * Get version of the used dependency - * - * @return - */ - public String getVersion() { - return version; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/Extension.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/Extension.java deleted file mode 100644 index 9905c3b2fb8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/Extension.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -/** - * Extension Definition annotation. Used to mark class as Extension and declare it's description - * - * @author Nikolay Zamosenchuk - */ -public @interface Extension { - - /** @return Extension version */ - String version() default "1.0"; - - /** @return Extension title */ - String title(); - - /** @return Extension brief description */ - String description() default ""; -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionDescription.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionDescription.java deleted file mode 100644 index 0098cdababa..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionDescription.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -import java.util.List; - -/** - * Provides Extension information: - * - *

      - *
    • id - unique String id; - *
    • version - version of the Extension; - *
    • title - brief description of the Extension; - *
    • dependencies - the list of required dependencies - *
    - * - * @author Nikolay Zamosenchuk - */ -public class ExtensionDescription { - private final String id; - private final String version; - private final List dependencies; - private final String title; - private final String description; - - /** - * Construct {@link ExtensionDescription} - * - * @param id - * @param version - * @param title - * @param dependencies - * @param description - */ - public ExtensionDescription( - String id, - String version, - String title, - String description, - List dependencies) { - this.id = id; - this.version = version; - this.title = title; - this.dependencies = dependencies; - this.description = description; - } - - /** - * Get Extension description - * - * @return - */ - public String getDescription() { - return description; - } - - /** - * Get Extension ID - * - * @return - */ - public String getId() { - return id; - } - - /** - * Get Extension Version - * - * @return - */ - public String getVersion() { - return version; - } - - /** - * Get Extension title - * - * @return the title - */ - public String getTitle() { - return title; - } - - /** - * Get the list of {@link DependencyDescription} - * - * @return - */ - public List getDependencies() { - return dependencies; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionGinModule.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionGinModule.java deleted file mode 100644 index 81be5ec9c5a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionGinModule.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -/** - * Marker annotation, used to inform SDK, that particular GinModule should be installed into the - * main Injector - * - * @author Nikolay Zamosenchuk - */ -public @interface ExtensionGinModule {} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionRegistry.java deleted file mode 100644 index 310d6c07873..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionRegistry.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -import java.util.Map; - -/** - * Provides information about Extensions, their description, version and the list of dependencies. - * Currently for information purposes only - * - * @author Nikolay Zamosenchuk - */ -public interface ExtensionRegistry { - - /** - * Returns the map of Extension ID to {@link ExtensionDescription}. - * - * @return - */ - Map getExtensionDescriptions(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionsInitializedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionsInitializedEvent.java deleted file mode 100644 index 90c100dd0c3..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/ExtensionsInitializedEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -import com.google.common.annotations.Beta; -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event describes state when all extensions that marked with annotation {@link Extension} have - * initialized. This event may be useful to perform some work when IDE actually has been initialized - * and displayed. - * - * @author Vlad Zhukovskyi - * @since 5.0.0 - */ -@Beta -public class ExtensionsInitializedEvent - extends GwtEvent { - - /** - * A listener is notified when extensions have been already initialized. - * - * @since 5.0.0 - */ - public interface ExtensionsInitializedHandler extends EventHandler { - - /** - * Notifies the listener that extensions have been already initialized. - * - * @param event instance of {@link ExtensionsInitializedEvent} - * @see ExtensionsInitializedEvent - * @since 5.0.0 - */ - void onExtensionsInitialized(ExtensionsInitializedEvent event); - } - - private static Type TYPE; - - public static Type getType() { - if (TYPE == null) { - TYPE = new Type<>(); - } - return TYPE; - } - - @Override - public Type getAssociatedType() { - return getType(); - } - - @Override - protected void dispatch(ExtensionsInitializedHandler handler) { - handler.onExtensionsInitialized(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/SDK.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/SDK.java deleted file mode 100644 index 16fb36e2595..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/extension/SDK.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.extension; - -/** - * Describes IDE 3 SDK Component - * - * @author Nikolay Zamosenchuk - */ -public @interface SDK { - /** @return SDK component id */ - String title(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedEvent.java deleted file mode 100644 index 1f990981c92..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedEvent.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory; - -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.factory.model.FactoryImpl; - -/** - * Event then indicate that factory accepted. Means that projects are imported, actions applied - * - * @author Vitalii Parfonov - */ -public class FactoryAcceptedEvent extends GwtEvent { - - private FactoryImpl factory; - - public FactoryAcceptedEvent(FactoryImpl factory) { - this.factory = factory; - } - - public static Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(FactoryAcceptedHandler handler) { - handler.onFactoryAccepted(this); - } - - public FactoryImpl getFactory() { - return factory; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedHandler.java deleted file mode 100644 index 1f8a5b4d9f9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryAcceptedHandler.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handler for FactoryAcceptedEvent. You can use this handler in case need to do some action on - * after accepting factory - * - * @author Vitalii Parfonov - */ -public interface FactoryAcceptedHandler extends EventHandler { - - /** - * Will be called the factory accepted on IDE side. Project already imported, actions performed. - * - * @param event - */ - void onFactoryAccepted(FactoryAcceptedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryServiceClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryServiceClient.java deleted file mode 100644 index 4a515189a3e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/FactoryServiceClient.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory; - -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.factory.shared.dto.FactoryDto; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.rest.AsyncRequestCallback; -import org.eclipse.che.ide.util.Pair; - -/** - * Client for Factory service. - * - * @author Vladyslav Zhukovskii - */ -public interface FactoryServiceClient { - - /** - * Get valid JSON factory object based on input factory ID - * - * @param factoryId factory ID to retrieve - * @param validate indicates whether or not factory should be validated by accept validator - * @return Factory through a Promise - */ - Promise getFactory(@NotNull String factoryId, boolean validate); - - /** - * Retrieves factory object prototype for given project with it's attributes. It's not the stored - * factory object. - * - * @param workspaceId workspace id - * @param path project path - * @param callback callback which returns snippet of the factory or exception if occurred - */ - void getFactoryJson( - @NotNull String workspaceId, - @NotNull String path, - @NotNull AsyncRequestCallback callback); - - /** - * Get factory as JSON. - * - * @param workspaceId workspace id - * @param path project path - * @return a promise that resolves to the {@link FactoryDto}, or rejects with an error - */ - Promise getFactoryJson(@NotNull String workspaceId, @Nullable String path); - - /** - * Save factory to storage. - * - * @param factory factory to save - * @return a promise that resolves to the {@link FactoryDto}, or rejects with an error - */ - Promise saveFactory(@NotNull FactoryDto factory); - - /** - * Find factory by given search parameters. - * - * @param skipCount the number of the items to skip - * @param maxItems the limit of the items in the response, default is 30ber of the items to skip - * @param params parameters to search factory by - * @return a promise that will provide a list of {@link FactoryDto}s, or rejects with an error - */ - Promise> findFactory( - Integer skipCount, Integer maxItems, List> params); - - /** - * Updates factory by id - * - * @param id factory identifier - * @param factory update body - * @return updated factory - */ - Promise updateFactory(String id, FactoryDto factory); - - /** - * Resolve factory object based on user parameters - * - * @param factoryParameters map containing factory data parameters provided through URL - * @param validate indicates whether or not factory should be validated by accept validator - * @return Factory through a Promise - */ - Promise resolveFactory( - @NotNull Map factoryParameters, boolean validate); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ActionImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ActionImpl.java deleted file mode 100644 index 41e44bff846..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ActionImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Action; - -/** Data object for {@link Action}. */ -public class ActionImpl implements Action { - - private String id; - private Map properties; - - public ActionImpl(String id, Map properties) { - this.id = id; - if (properties != null) { - this.properties = new HashMap<>(properties); - } - } - - public ActionImpl(Action action) { - this(action.getId(), action.getProperties()); - } - - @Override - public String getId() { - return id; - } - - @Override - public Map getProperties() { - if (properties == null) { - properties = new HashMap<>(); - } - return properties; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof ActionImpl)) { - return false; - } - final ActionImpl that = (ActionImpl) obj; - return Objects.equals(id, that.id) && getProperties().equals(that.getProperties()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(id); - hash = 31 * hash + getProperties().hashCode(); - return hash; - } - - @Override - public String toString() { - return "ActionImpl{" + "id='" + id + '\'' + ", properties=" + properties + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/AuthorImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/AuthorImpl.java deleted file mode 100644 index b2acef99175..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/AuthorImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Author; - -/** Data object for {@link Author}. */ -public class AuthorImpl implements Author { - - private Long created; - private String userId; - - public AuthorImpl(String userId, Long created) { - this.created = created; - this.userId = userId; - } - - public AuthorImpl(Author creator) { - this(creator.getUserId(), creator.getCreated()); - } - - @Override - public Long getCreated() { - return created; - } - - @Override - public String getUserId() { - return userId; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (!(obj instanceof AuthorImpl)) return false; - final AuthorImpl other = (AuthorImpl) obj; - return Objects.equals(userId, other.userId) && Objects.equals(created, other.created); - } - - @Override - public int hashCode() { - int result = 7; - result = 31 * result + Objects.hashCode(userId); - result = 31 * result + Objects.hashCode(created); - return result; - } - - @Override - public String toString() { - return "AuthorImpl{" + "created=" + created + ", userId='" + userId + '\'' + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonAttributesImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonAttributesImpl.java deleted file mode 100644 index 829ad17469b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonAttributesImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.ButtonAttributes; - -/** Data object for {@link ButtonAttributes}. */ -public class ButtonAttributesImpl implements ButtonAttributes { - - private String color; - private String logo; - private String style; - private Boolean counter; - - public ButtonAttributesImpl(String color, String logo, String style, Boolean counter) { - this.color = color; - this.logo = logo; - this.style = style; - this.counter = counter; - } - - public ButtonAttributesImpl(ButtonAttributes attributes) { - this( - attributes.getColor(), - attributes.getLogo(), - attributes.getStyle(), - attributes.getCounter()); - } - - @Override - public String getColor() { - return color; - } - - @Override - public String getLogo() { - return logo; - } - - @Override - public String getStyle() { - return style; - } - - @Override - public Boolean getCounter() { - return counter; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (!(obj instanceof ButtonAttributesImpl)) return false; - final ButtonAttributesImpl other = (ButtonAttributesImpl) obj; - return Objects.equals(color, other.color) - && Objects.equals(logo, other.logo) - && Objects.equals(style, other.style) - && Objects.equals(counter, other.counter); - } - - @Override - public int hashCode() { - int result = 7; - result = 31 * result + Objects.hashCode(color); - result = 31 * result + Objects.hashCode(logo); - result = 31 * result + Objects.hashCode(style); - result = 31 * result + Objects.hashCode(counter); - return result; - } - - @Override - public String toString() { - return "ButtonAttributesImpl{" - + "color='" - + color - + '\'' - + ", logo='" - + logo - + '\'' - + ", style='" - + style - + '\'' - + ", counter=" - + counter - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonImpl.java deleted file mode 100644 index 578d96d7869..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/ButtonImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Button; -import org.eclipse.che.api.core.model.factory.ButtonAttributes; - -/** Data object for {@link Button}. */ -public class ButtonImpl implements Button { - - private ButtonAttributesImpl attributes; - private Type type; - - public ButtonImpl(ButtonAttributes attributes, Type type) { - this.attributes = new ButtonAttributesImpl(attributes); - this.type = type; - } - - public ButtonImpl(Button button) { - this(button.getAttributes(), button.getType()); - } - - @Override - public ButtonAttributesImpl getAttributes() { - return attributes; - } - - @Override - public Type getType() { - return type; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof ButtonImpl)) { - return false; - } - final ButtonImpl that = (ButtonImpl) obj; - return Objects.equals(attributes, that.attributes) && Objects.equals(type, that.type); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(attributes); - hash = 31 * hash + Objects.hashCode(type); - return hash; - } - - @Override - public String toString() { - return "ButtonImpl{" + "attributes=" + attributes + ", type=" + type + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/FactoryImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/FactoryImpl.java deleted file mode 100644 index f5d2b67001c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/FactoryImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Author; -import org.eclipse.che.api.core.model.factory.Button; -import org.eclipse.che.api.core.model.factory.Factory; -import org.eclipse.che.api.core.model.factory.Ide; -import org.eclipse.che.api.core.model.factory.Policies; -import org.eclipse.che.api.core.model.workspace.WorkspaceConfig; -import org.eclipse.che.ide.api.workspace.model.WorkspaceConfigImpl; - -/** Data object for {@link Factory}. */ -public class FactoryImpl implements Factory { - - private String id; - private String name; - private String version; - private WorkspaceConfigImpl workspace; - private AuthorImpl creator; - private ButtonImpl button; - private IdeImpl ide; - private PoliciesImpl policies; - - public FactoryImpl( - String id, - String name, - String version, - WorkspaceConfig workspace, - Author creator, - Policies policies, - Ide ide, - Button button) { - this.id = id; - this.name = name; - this.version = version; - if (workspace != null) { - this.workspace = new WorkspaceConfigImpl(workspace); - } - if (creator != null) { - this.creator = new AuthorImpl(creator); - } - if (policies != null) { - this.policies = new PoliciesImpl(policies); - } - if (ide != null) { - this.ide = new IdeImpl(ide); - } - if (button != null) { - this.button = new ButtonImpl(button); - } - } - - public FactoryImpl(Factory factory) { - this( - factory.getId(), - factory.getName(), - factory.getV(), - factory.getWorkspace(), - factory.getCreator(), - factory.getPolicies(), - factory.getIde(), - factory.getButton()); - } - - @Override - public String getId() { - return id; - } - - @Override - public String getName() { - return name; - } - - @Override - public String getV() { - return version; - } - - @Override - public WorkspaceConfigImpl getWorkspace() { - return workspace; - } - - @Override - public AuthorImpl getCreator() { - return creator; - } - - @Override - public PoliciesImpl getPolicies() { - return policies; - } - - @Override - public ButtonImpl getButton() { - return button; - } - - @Override - public IdeImpl getIde() { - return ide; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (!(obj instanceof FactoryImpl)) return false; - final FactoryImpl other = (FactoryImpl) obj; - return Objects.equals(id, other.id) - && Objects.equals(name, other.name) - && Objects.equals(version, other.version) - && Objects.equals(workspace, other.workspace) - && Objects.equals(creator, other.creator) - && Objects.equals(policies, other.policies) - && Objects.equals(ide, other.ide) - && Objects.equals(button, other.button); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(id); - hash = 31 * hash + Objects.hashCode(name); - hash = 31 * hash + Objects.hashCode(version); - hash = 31 * hash + Objects.hashCode(workspace); - hash = 31 * hash + Objects.hashCode(creator); - hash = 31 * hash + Objects.hashCode(policies); - hash = 31 * hash + Objects.hashCode(ide); - hash = 31 * hash + Objects.hashCode(button); - return hash; - } - - @Override - public String toString() { - return "FactoryImpl{" - + "id='" - + id - + '\'' - + ", name='" - + name - + '\'' - + ", version='" - + version - + '\'' - + ", workspace=" - + workspace - + ", creator=" - + creator - + ", policies=" - + policies - + ", ide=" - + ide - + ", button=" - + button - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/IdeImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/IdeImpl.java deleted file mode 100644 index 8670b07761e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/IdeImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Ide; -import org.eclipse.che.api.core.model.factory.OnAppClosed; -import org.eclipse.che.api.core.model.factory.OnAppLoaded; -import org.eclipse.che.api.core.model.factory.OnProjectsLoaded; - -/** Data object for {@link Ide}. */ -public class IdeImpl implements Ide { - - private OnAppLoadedImpl onAppLoaded; - private OnProjectsLoadedImpl onProjectsLoaded; - private OnAppClosedImpl onAppClosed; - - public IdeImpl( - OnAppLoaded onAppLoaded, OnProjectsLoaded onProjectsLoaded, OnAppClosed onAppClosed) { - if (onAppLoaded != null) { - this.onAppLoaded = new OnAppLoadedImpl(onAppLoaded); - } - if (onProjectsLoaded != null) { - this.onProjectsLoaded = new OnProjectsLoadedImpl(onProjectsLoaded); - } - if (onAppClosed != null) { - this.onAppClosed = new OnAppClosedImpl(onAppClosed); - } - } - - public IdeImpl(Ide ide) { - this(ide.getOnAppLoaded(), ide.getOnProjectsLoaded(), ide.getOnAppClosed()); - } - - @Override - public OnAppLoadedImpl getOnAppLoaded() { - return onAppLoaded; - } - - @Override - public OnProjectsLoadedImpl getOnProjectsLoaded() { - return onProjectsLoaded; - } - - @Override - public OnAppClosedImpl getOnAppClosed() { - return onAppClosed; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof IdeImpl)) { - return false; - } - final IdeImpl that = (IdeImpl) obj; - return Objects.equals(onAppLoaded, that.onAppLoaded) - && Objects.equals(onProjectsLoaded, that.onProjectsLoaded) - && Objects.equals(onAppClosed, that.onAppClosed); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(onAppLoaded); - hash = 31 * hash + Objects.hashCode(onProjectsLoaded); - hash = 31 * hash + Objects.hashCode(onAppClosed); - return hash; - } - - @Override - public String toString() { - return "IdeImpl{" - + "onAppLoaded=" - + onAppLoaded - + ", onProjectsLoaded=" - + onProjectsLoaded - + ", onAppClosed=" - + onAppClosed - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppClosedImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppClosedImpl.java deleted file mode 100644 index 6f3715fef04..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppClosedImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.core.model.factory.Action; -import org.eclipse.che.api.core.model.factory.OnAppClosed; - -/** Data object for {@link OnAppClosed}. */ -public class OnAppClosedImpl implements OnAppClosed { - - private List actions; - - public OnAppClosedImpl(List actions) { - if (actions != null) { - this.actions = actions.stream().map(ActionImpl::new).collect(toList()); - } - } - - public OnAppClosedImpl(OnAppClosed onAppClosed) { - this(onAppClosed.getActions()); - } - - @Override - public List getActions() { - if (actions == null) { - actions = new ArrayList<>(); - } - return actions; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof OnAppClosedImpl)) { - return false; - } - final OnAppClosedImpl that = (OnAppClosedImpl) obj; - return getActions().equals(that.getActions()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + getActions().hashCode(); - return hash; - } - - @Override - public String toString() { - return "OnAppClosedImpl{" + "actions=" + actions + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppLoadedImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppLoadedImpl.java deleted file mode 100644 index 7d1ac8a5239..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnAppLoadedImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.core.model.factory.Action; -import org.eclipse.che.api.core.model.factory.OnAppLoaded; - -/** Data object for {@link OnAppLoaded}. */ -public class OnAppLoadedImpl implements OnAppLoaded { - - private List actions; - - public OnAppLoadedImpl(List actions) { - if (actions != null) { - this.actions = actions.stream().map(ActionImpl::new).collect(toList()); - } - } - - public OnAppLoadedImpl(OnAppLoaded onAppLoaded) { - this(onAppLoaded.getActions()); - } - - @Override - public List getActions() { - if (actions == null) { - actions = new ArrayList<>(); - } - return actions; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof OnAppLoadedImpl)) { - return false; - } - final OnAppLoadedImpl that = (OnAppLoadedImpl) obj; - return getActions().equals(that.getActions()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + getActions().hashCode(); - return hash; - } - - @Override - public String toString() { - return "OnAppLoadedImpl{" + "actions=" + actions + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnProjectsLoadedImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnProjectsLoadedImpl.java deleted file mode 100644 index 8da7d71663a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/OnProjectsLoadedImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.core.model.factory.Action; -import org.eclipse.che.api.core.model.factory.OnProjectsLoaded; - -/** Data object for {@link OnProjectsLoaded}. */ -public class OnProjectsLoadedImpl implements OnProjectsLoaded { - - private List actions; - - public OnProjectsLoadedImpl(List actions) { - if (actions != null) { - this.actions = actions.stream().map(ActionImpl::new).collect(toList()); - } - } - - public OnProjectsLoadedImpl(OnProjectsLoaded onProjectsLoaded) { - this(onProjectsLoaded.getActions()); - } - - @Override - public List getActions() { - if (actions == null) { - actions = new ArrayList<>(); - } - return actions; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof OnProjectsLoadedImpl)) { - return false; - } - final OnProjectsLoadedImpl that = (OnProjectsLoadedImpl) obj; - return getActions().equals(that.getActions()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + getActions().hashCode(); - return hash; - } - - @Override - public String toString() { - return "OnProjectsLoadedImpl{" + "actions=" + actions + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/PoliciesImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/PoliciesImpl.java deleted file mode 100644 index afd1e3679ba..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/factory/model/PoliciesImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.factory.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.factory.Policies; - -/** Data object for {@link Policies}. */ -public class PoliciesImpl implements Policies { - - private String referrer; - private String create; - private Long until; - private Long since; - - public PoliciesImpl(String referrer, String create, Long until, Long since) { - this.referrer = referrer; - this.create = create; - this.until = until; - this.since = since; - } - - public PoliciesImpl(Policies policies) { - this(policies.getReferer(), policies.getCreate(), policies.getUntil(), policies.getSince()); - } - - @Override - public String getReferer() { - return referrer; - } - - @Override - public String getCreate() { - return create; - } - - @Override - public Long getUntil() { - return until; - } - - @Override - public Long getSince() { - return since; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (!(obj instanceof PoliciesImpl)) return false; - final PoliciesImpl other = (PoliciesImpl) obj; - return Objects.equals(referrer, other.referrer) - && Objects.equals(create, other.create) - && Objects.equals(until, other.until) - && Objects.equals(since, other.since); - } - - @Override - public int hashCode() { - int result = 7; - result = 31 * result + Objects.hashCode(referrer); - result = 31 * result + Objects.hashCode(create); - result = 31 * result + Objects.hashCode(until); - result = 31 * result + Objects.hashCode(since); - return result; - } - - @Override - public String toString() { - return "PoliciesImpl{" - + "referrer='" - + referrer - + '\'' - + ", create='" - + create - + '\'' - + ", until=" - + until - + ", since=" - + since - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileType.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileType.java deleted file mode 100644 index 0b32834ae46..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileType.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.filetypes; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.Collections.EMPTY_SET; - -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; -import org.eclipse.che.commons.annotation.Nullable; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * FileType is meta information about file. It's contains - * - *
      - *
    • image - image resource associated with file - *
    • extension - extension associated with file - *
    • namePatterns - set of name patterns - *
    - * - * @author Evgen Vidolob - */ -public class FileType { - - private SVGResource image; - private String extension; - private Set namePatterns; - - public FileType(SVGResource image, String extension) { - this(image, extension, null); - } - - public FileType(SVGResource image, String extension, String namePattern) { - this.image = image; - this.extension = extension; - this.namePatterns = new HashSet<>(); - addNamePattern(namePattern); - } - - /** Returns the image resource associated with file */ - public SVGResource getImage() { - return image; - } - - /** Returns the extension associated with file */ - public String getExtension() { - return extension; - } - - /** - * Returns some element of the name patterns set or {@code null} if the set is empty. - * - * @deprecated FileType can contain a few name patterns, so use {@link #getNamePatterns()} instead - */ - @Nullable - public String getNamePattern() { - return namePatterns.isEmpty() ? null : namePatterns.iterator().next(); - } - - /** Returns the name patterns set describing the file type */ - public Set getNamePatterns() { - return namePatterns.isEmpty() ? EMPTY_SET : new HashSet<>(namePatterns); - } - - /** Sets image associated with the file type */ - public void setImage(SVGResource image) { - this.image = image; - } - - /** Sets extension associated with the file type */ - public void setExtension(String extension) { - this.extension = extension; - } - - /** - * Adds name pattern describing the file type - * - * @deprecated FileType can contain a few name patterns, so use {@link #addNamePattern(String)} - * instead - */ - public void setNamePattern(String namePattern) { - addNamePattern(namePattern); - } - - /** - * Adds name pattern describing the file type - * - * @param namePattern pattern for adding - * @return {@code true} if the pattern was added and {@code false} if given pattern is illegal - * ({@code null} or empty) either if it is already present - */ - public boolean addNamePattern(String namePattern) { - if (isNullOrEmpty(namePattern)) { - return false; - } - - return namePatterns.add(namePattern); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FileType fileType = (FileType) o; - - if (!Objects.equals(this.extension, fileType.extension)) { - return false; - } else { - return getNamePatterns().equals(fileType.getNamePatterns()); - } - } - - @Override - public int hashCode() { - return Objects.hash(extension, getNamePatterns()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileTypeRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileTypeRegistry.java deleted file mode 100644 index 0e14c29a7b0..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filetypes/FileTypeRegistry.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.filetypes; - -import java.util.List; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Registry allows to register new {@link FileType} and get the registered one. - * - * @author Artem Zatsarynnyi - */ -public interface FileTypeRegistry { - - /** Provider allows to get registered {@link FileType} and avoid File Type collision. */ - interface FileTypeProvider { - /** - * Allows to get {@link FileType} by extension and name pattern. - * - *

    Returns: - *

  • merged File Type if the File Type Registry contains type which match given {@code - * extension} and {@code namePattern} - *
  • newly created and registered File Type if the File Type Registry does not contain - * corresponding type to merge - * - * @param image associated with the File Type image, optional parameter: default image will be - * used when {@code image} is not provided - * @param extension associated with the File Type extension, mandatory parameter: {@link - * IllegalArgumentException} will be thrown when {@code extension} is not provided - * @param namePattern name pattern describing the File Type, optional parameter - * @throws IllegalArgumentException will be thrown when {@code extension} is not provided - * @return registered File Type - */ - FileType get( - @Nullable SVGResource image, @NotNull String extension, @Nullable String namePattern); - - /** - * Allows to get {@link FileType} by extension. - * - *

    Returns: - *

  • existing File Type if the File Type Registry contains type with such extension - *
  • newly created and registered File Type if the File Type Registry does not contain type - * with such extension - * - * @param image associated with the File Type image, optional parameter: default image will be - * used when {@code image} is not provided - * @param extension associated with the File Type extension, mandatory parameter: {@link - * IllegalArgumentException} will be thrown when {@code extension} is not provided - * @throws IllegalArgumentException will be thrown when {@code extension} is not provided - * @return registered File Type - */ - FileType getByExtension(@Nullable SVGResource image, @NotNull String extension); - - /** - * Allows to get the set of {@link FileType}s which match given {@code namePattern}. - * - *

    Returns: - *

  • set of existing File Types if the File Type Registry contains types which match given - * {@code namePattern} - *
  • newly created and registered by name pattern File Type if the File Type Registry does not - * contain types which match given {@code namePattern} - * - * @param image associated with the File Type image, optional parameter: default image will be - * used when {@code image} is not provided - * @param namePattern name pattern describing the File Type, mandatory parameter: {@link - * IllegalArgumentException} will be thrown when {@code namePattern} is not provided - * @throws IllegalArgumentException will be thrown when {@code namePattern} is not provided - * @return set of registered File Types - */ - Set getByNamePattern(@Nullable SVGResource image, @NotNull String namePattern); - } - - /** Returns the set of all registered file types. */ - Set getFileTypes(); - - /** - * Registers the specified File Type. - * - *

    Note: {@link IllegalStateException} will be thrown when given File Type can not be - * registered, so when the collision by file extension is detected. Use {@link FileTypeProvider} - * to register File Type and avoid collision. - * - * @param fileType file type to register - * @throws IllegalArgumentException when given {@code fileType} is {@code null} - * @throws IllegalStateException when given File Type can not be registered - */ - void registerFileType(FileType fileType); - - /** - * Returns the {@link List} of all registered file types. - * - * @return {@link List} of all registered file types - * @deprecated use {@link #getFileTypes()} instead - */ - List getRegisteredFileTypes(); - - /** - * Returns the file type of the specified file. - * - * @param file file for which type need to find - * @return file type or default file type if no file type found - */ - FileType getFileTypeByFile(VirtualFile file); - - /** - * Returns the file type for the specified file extension. - * - * @param extension extension for which file type need to find - * @return file type or default file type if no file type found - */ - FileType getFileTypeByExtension(String extension); - - /** - * Returns the file type which pattern matches the specified file name. - * - * @param name file name - * @return file type or default file type if no file type's name pattern matches the given file - * name - */ - FileType getFileTypeByFileName(String name); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/ClientServerEventService.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/ClientServerEventService.java deleted file mode 100644 index ae01b222499..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/ClientServerEventService.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.filewatcher; - -import org.eclipse.che.api.promises.client.Promise; - -/** - * Send file tracking operation calls on server side. There are several types of such calls: - * - *

      - *
    • START/STOP - tells to start/stop tracking specific file - *
    • SUSPEND/RESUME - tells to start/stop tracking all files registered for specific endpoint - *
    • MOVE - tells that file that is being tracked should be moved (renamed) - *
    - */ -public interface ClientServerEventService { - - /** - * Sends event on server side which tells to start tracking specific file - * - * @param path the path to the specific file - */ - Promise sendFileTrackingStartEvent(String path); - - /** - * Sends event on server side which tells to stop tracking specific file - * - * @param path the path to the specific file - */ - Promise sendFileTrackingStopEvent(String path); - - /** - * Sends event on server side which tells to suspend tracking all files registered for specific - * endpoint - */ - Promise sendFileTrackingSuspendEvent(); - - /** - * Sends event on server side which tells to resume tracking all files registered for specific - * endpoint - */ - Promise sendFileTrackingResumeEvent(); - - /** - * Sends event on server side which tells file that is being tracked should be moved (renamed) - * - * @param oldPath the old path to the specific file - * @param newPath the new path to the specific file - */ - Promise sendFileTrackingMoveEvent(String oldPath, String newPath); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/FileWatcherExcludesOperation.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/FileWatcherExcludesOperation.java deleted file mode 100644 index 8241f29b6f8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/filewatcher/FileWatcherExcludesOperation.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.filewatcher; - -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.api.WindowActionEvent; -import org.eclipse.che.ide.api.WindowActionHandler; -import org.eclipse.che.ide.api.workspace.WorkspaceReadyEvent; - -/** - * Tracks and allows to manage the file watcher exclude patterns for tracking creation, modification - * and deletion events for corresponding entries. - * - * @author Roman Nikitenko - */ -@Singleton -public class FileWatcherExcludesOperation implements WindowActionHandler { - private static final String EXCLUDES_SUBSCRIBE = "fileWatcher/excludes/subscribe"; - private static final String EXCLUDES_UNSUBSCRIBE = "fileWatcher/excludes/unsubscribe"; - private static final String EXCLUDES_CHANGED = "fileWatcher/excludes/changed"; - private static final String ADD_TO_EXCLUDES = "fileWatcher/excludes/addToExcludes"; - private static final String REMOVE_FROM_EXCLUDES = "fileWatcher/excludes/removeFromExcludes"; - private static final String EXCLUDES_CLEAN_UP = "fileWatcher/excludes/cleanup"; - - private PromiseProvider promises; - private RequestTransmitter requestTransmitter; - private Set excludes = new HashSet<>(); - - @Inject - public FileWatcherExcludesOperation( - EventBus eventBus, PromiseProvider promises, RequestTransmitter requestTransmitter) { - this.promises = promises; - this.requestTransmitter = requestTransmitter; - eventBus.addHandler(WindowActionEvent.TYPE, this); - eventBus.addHandler(WorkspaceReadyEvent.getType(), event -> subscribe()); - } - - @Inject - private void configureHandlers(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName(EXCLUDES_CHANGED) - .paramsAsListOfString() - .noResult() - .withConsumer( - newExcludes -> { - excludes.clear(); - excludes.addAll(newExcludes); - }); - - configurator - .newConfiguration() - .methodName(EXCLUDES_CLEAN_UP) - .noParams() - .noResult() - .withConsumer(s -> excludes.clear()); - } - - /** - * Checks if specified path is within excludes - * - * @param pathToTest path being examined - * @return true if path is within excludes, false otherwise - */ - public boolean isExcluded(String pathToTest) { - return excludes.contains(pathToTest); - } - - /** - * Registers a set of paths to skip tracking of creation, modification and deletion events for - * corresponding entries. - * - * @param pathsToExclude entries' paths to adding to excludes - */ - public Promise addToFileWatcherExcludes(Set pathsToExclude) { - JsonRpcPromise jsonRpcPromise = - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(ADD_TO_EXCLUDES) - .paramsAsListOfString(new ArrayList<>(pathsToExclude)) - .sendAndReceiveResultAsBoolean(); - return toPromise(jsonRpcPromise); - } - - /** - * Removes a set of paths from excludes to resume tracking of corresponding entries creation, - * modification and deletion events. - * - * @param paths entries' paths to remove from excludes - */ - public Promise removeFromFileWatcherExcludes(Set paths) { - JsonRpcPromise jsonRpcPromise = - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(REMOVE_FROM_EXCLUDES) - .paramsAsListOfString(new ArrayList<>(paths)) - .sendAndReceiveResultAsBoolean(); - return toPromise(jsonRpcPromise); - } - - private Promise toPromise(JsonRpcPromise jsonRpcPromise) { - return promises.create( - (AsyncCallback callback) -> { - jsonRpcPromise.onSuccess(callback::onSuccess); - - jsonRpcPromise.onFailure( - jsonRpcError -> callback.onFailure(new Throwable(jsonRpcError.getMessage()))); - }); - } - - @Override - public void onWindowClosing(WindowActionEvent event) {} - - @Override - public void onWindowClosed(WindowActionEvent event) { - unSubscribe(); - } - - private void subscribe() { - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(EXCLUDES_SUBSCRIBE) - .noParams() - .sendAndSkipResult(); - } - - private void unSubscribe() { - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(EXCLUDES_UNSUBSCRIBE) - .noParams() - .sendAndSkipResult(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/Icon.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/Icon.java deleted file mode 100644 index 648a24b7e3e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/Icon.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.icon; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.resources.client.ImageResource; -import com.google.gwt.user.client.ui.Image; -import org.eclipse.che.commons.annotation.Nullable; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Icon. - * - * @author Artem Zatsarynnyi - */ -public class Icon { - private final String id; - private final String sourcePath; - private final SVGResource svgResource; - private final ImageResource imageResource; - - /** - * Create a new icon based on the specified image path. - * - * @param id icon id - * @param sourcePath relative path to image within the GWT module's public folder, e.g. - * my-extension/icon.png - */ - public Icon(String id, String sourcePath) { - this.id = id; - this.sourcePath = sourcePath; - this.svgResource = null; - this.imageResource = null; - } - - /** - * Create a new icon based on the specified {@link SVGResource}. - * - * @param id icon id - * @param svgResource resource that contains SVG - */ - public Icon(String id, SVGResource svgResource) { - this.id = id; - this.sourcePath = null; - this.svgResource = svgResource; - this.imageResource = null; - } - - /** - * Create a new icon based on the specified {@link ImageResource}. - * - * @param id icon's id - * @param imageResource resource that contains image - */ - public Icon(String id, ImageResource imageResource) { - this.id = id; - this.sourcePath = null; - this.imageResource = imageResource; - this.svgResource = null; - } - - /** - * Creates new icon. - * - * @param id icon id - * @param sourcePath relative path to image within the GWT module's public folder, e.g. - * my-extension/icon.png - * @param svgResource resource that contains SVG - */ - public Icon(String id, String sourcePath, SVGResource svgResource) { - this.id = id; - this.sourcePath = sourcePath; - this.svgResource = svgResource; - this.imageResource = null; - } - - /** - * Icon id. - * - * @return icon id - */ - public String getId() { - return id; - } - - /** - * Returns {@link Image} widget. - * - * @return {@link Image} widget - */ - @Nullable - public Image getImage() { - if (sourcePath != null) { - return new Image(GWT.getModuleBaseForStaticFiles() + sourcePath); - } else if (imageResource != null) { - return new Image(imageResource); - } else { - return null; - } - } - - /** - * Returns {@link SVGImage} widget. - * - * @return {@link SVGImage} widget - */ - @Nullable - public SVGImage getSVGImage() { - if (svgResource == null) { - return null; - } - return new SVGImage(svgResource); - } - - /** - * Returns {@link SVGResource} widget. - * - * @return {@link SVGResource} widget - */ - @Nullable - public SVGResource getSVGResource() { - return svgResource; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/IconRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/IconRegistry.java deleted file mode 100644 index c4ccb343275..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/icon/IconRegistry.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.icon; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Client-side singleton component that provides possibility to define icons for UI in extensions. - * On IDE start it populated by application-scope 'default' icons and 'generic' icon (e.g. Codenvy - * logo). - * - * @author Vitaly Parfonov - * @author Artem Zatsarynnyi - */ -public interface IconRegistry { - - /** - * Register {@link Icon}. If icon with the same id previously registered, the old icon is replaced - * by the specified icon. - * - * @param icon icon to be registered - */ - void registerIcon(Icon icon); - - /** - * Returns {@link Icon} by its id. If no such icon is registered, it returns the same named - * 'default' icon. If it also not found, returns 'generic' icon. - * - * @param id icon id - * @return registered icon or the same named "default" icon or "generic" icon - */ - @NotNull - Icon getIcon(String id); - - /** - * Returns {@link Icon} by its id, or {@code null} if no icon with the specified id. - * - * @param id icon id - * @return registered icon, or {@code null} if found no icon with the specified id - */ - @Nullable - Icon getIconIfExist(String id); - - /** - * Returns 'generic' icon (e.g. Codenvy logo). May be useful when no icon found by its id. - * - * @return 'generic' icon - */ - Icon getGenericIcon(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/Constants.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/Constants.java deleted file mode 100644 index 593828d2965..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/Constants.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.jsonrpc; - -public final class Constants { - - public static final String WS_MASTER_JSON_RPC_ENDPOINT_ID = "workspace/master"; - public static final String WS_AGENT_JSON_RPC_ENDPOINT_ID = "workspace/agent"; - - private Constants() {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/SubscriptionManagerClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/SubscriptionManagerClient.java deleted file mode 100644 index a4af2220b22..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/SubscriptionManagerClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.jsonrpc; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Map; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.notification.dto.EventSubscription; -import org.eclipse.che.ide.dto.DtoFactory; - -@Singleton -public class SubscriptionManagerClient { - private final RequestTransmitter requestTransmitter; - private final DtoFactory dtoFactory; - - @Inject - SubscriptionManagerClient(RequestTransmitter requestTransmitter, DtoFactory dtoFactory) { - this.requestTransmitter = requestTransmitter; - this.dtoFactory = dtoFactory; - } - - public void subscribe(String endpointId, String method, Map scope) { - requestTransmitter - .newRequest() - .endpointId(endpointId) - .methodName("subscribe") - .paramsAsDto( - dtoFactory.createDto(EventSubscription.class).withMethod(method).withScope(scope)) - .sendAndSkipResult(); - } - - public void unSubscribe(String endpointId, String method, Map scope) { - requestTransmitter - .newRequest() - .endpointId(endpointId) - .methodName("unSubscribe") - .paramsAsDto( - dtoFactory.createDto(EventSubscription.class).withMethod(method).withScope(scope)) - .sendAndSkipResult(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/WorkspaceMasterJsonRpcInitializer.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/WorkspaceMasterJsonRpcInitializer.java deleted file mode 100644 index e48141b151a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/WorkspaceMasterJsonRpcInitializer.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.jsonrpc; - -import static com.google.gwt.user.client.Window.Location.getHost; -import static com.google.gwt.user.client.Window.Location.getProtocol; -import static java.util.Collections.emptySet; -import static java.util.Collections.singleton; -import static java.util.Collections.singletonMap; - -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import java.util.Set; -import javax.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.jsonrpc.JsonRpcInitializer; -import org.eclipse.che.ide.util.loging.Log; -import org.eclipse.che.security.oauth.SecurityTokenProvider; - -/** Initializes json rpc connection to workspace master */ -@Singleton -public class WorkspaceMasterJsonRpcInitializer { - private final JsonRpcInitializer initializer; - private final AppContext appContext; - private final RequestTransmitter requestTransmitter; - private final SecurityTokenProvider securityTokenProvider; - - @Inject - public WorkspaceMasterJsonRpcInitializer( - JsonRpcInitializer initializer, - AppContext appContext, - RequestTransmitter requestTransmitter, - SecurityTokenProvider securityTokenProvider) { - this.initializer = initializer; - this.appContext = appContext; - this.requestTransmitter = requestTransmitter; - this.securityTokenProvider = securityTokenProvider; - internalInitialize(); - } - - private static native String getWebsocketContext() /*-{ - if ($wnd.IDE && $wnd.IDE.config) { - return $wnd.IDE.config.websocketContext; - } else { - return null; - } - }-*/; - - public void initialize() { - Log.debug( - WorkspaceMasterJsonRpcInitializer.class, - "Initializing JSON RPC websocket connection to workspace master"); - try { - internalInitialize(); - } catch (Exception e) { - Log.debug(WorkspaceMasterJsonRpcInitializer.class, "Failed, will try one more time."); - new Timer() { - @Override - public void run() { - internalInitialize(); - } - }.schedule(1_000); - } - } - - private void internalInitialize() { - securityTokenProvider - .getSecurityToken() - .then( - token -> { - String protocol = "https:".equals(getProtocol()) ? "wss://" : "ws://"; - String host = getHost(); - String context = getWebsocketContext(); - String url = protocol + host + context; - char separator = url.contains("?") ? '&' : '?'; - String queryParams = - separator - + "token=" - + token - + appContext.getApplicationId().map(id -> "&clientId=" + id).orElse(""); - Set initActions = - appContext.getApplicationId().isPresent() - ? emptySet() - : singleton(WorkspaceMasterJsonRpcInitializer.this::processWsId); - - initializer.initialize( - "ws-master", singletonMap("url", url + queryParams), initActions); - }); - } - - private void processWsId() { - requestTransmitter - .newRequest() - .endpointId("ws-master") - .methodName("websocketIdService/getId") - .noParams() - .sendAndReceiveResultAsString() - .onSuccess(appContext::setApplicationWebsocketId); - } - - public void terminate() { - initializer.terminate("ws-master"); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBindingAgent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBindingAgent.java deleted file mode 100644 index a29fac77497..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBindingAgent.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.keybinding; - -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.extension.SDK; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** - * Public interface of the key binding management. The key binding defines the key sequence that - * should be used to invoke the command. A key binding may reference a scheme which is used to group - * key bindings into different named schemes that the user may activate. - * - * @author Evgen Vidolob - * @author Arnaud Kervern - * @version $Id: - */ -@SDK(title = "ide.api.ui.keyBinding") -public interface KeyBindingAgent { - - /** - * Global scheme, bindings added in this scheme always - * - * @return - */ - Scheme getGlobal(); - - /** - * Get build in Eclipse key binding scheme. - * - * @deprecated Eclipse should not be accessed like that, use {@link - * KeyBindingAgent#getScheme(String)} or {@link KeyBindingAgent#getActive()} - * @return the Eclipse scheme. - */ - @Deprecated - Scheme getEclipse(); - - /** - * Currently active scheme. - * - * @return the scheme - */ - Scheme getActive(); - - /** Change active scheme using his identifier */ - void setActive(@NotNull String scheme); - - /** - * Register a new scheme - * - * @param scheme to register - */ - void addScheme(Scheme scheme); - - /** - * Get a registered Scheme, and return null if nothing is corresponding. - * - * @param id of the registered scheme - * @return the expected scheme, or null. - */ - Scheme getScheme(String id); - - /** List registered schemes */ - List getSchemes(); - - /** - * @return keyboard shortcut for the action with the specified actionId or an null if - * the action doesn't have any keyboard shortcut. - */ - @Nullable - CharCodeWithModifiers getKeyBinding(@NotNull String actionId); - - /** Disable key binding agent. It's may be used when some modal window are shown. */ - void disable(); - - /** Enable key binding agent back. */ - void enable(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBuilder.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBuilder.java deleted file mode 100644 index c71042ef2dc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/KeyBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.keybinding; - -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; -import org.eclipse.che.ide.util.input.ModifierKeys; - -/** - * A builder for {@link CharCodeWithModifiers}. It's simplify creating CharCodeWithModifiers object. - * - * @author Evgen Vidolob - * @version $Id: - */ -public class KeyBuilder { - private int modifiers; - - private int charCode; - - public KeyBuilder() {} - - /** - * Add ACTION modifier. Action is abstraction for the primary modifier used for chording shortcuts - * in IDE. To stay consistent with native OS shortcuts, this will be set if CTRL is pressed on - * Linux or Windows, or if CMD is pressed on Mac. - * - * @return the KeyBuilder with action modifier added - */ - public KeyBuilder action() { - modifiers |= ModifierKeys.ACTION; - return this; - } - - /** - * Add ALT modifier - * - * @return the KeyBuilder with ALT modifier added - */ - public KeyBuilder alt() { - modifiers |= ModifierKeys.ALT; - return this; - } - - /** - * Add CTRL modifier. This will only be set on Mac. (On Windows and Linux, the {@link - * KeyBuilder#action()} will be set instead.) - * - * @return the KeyBuilder with CTRL modifier added - */ - public KeyBuilder control() { - modifiers |= ModifierKeys.CTRL; - return this; - } - - /** - * Add SHIFT modifier. - * - * @return the KeyBuilder with SHIFT modifier added - */ - public KeyBuilder shift() { - modifiers |= ModifierKeys.SHIFT; - return this; - } - - /** - * Key binding has no modifier keys. - * - * @return the KeyBuilder with NONE modifier added - */ - public KeyBuilder none() { - modifiers = ModifierKeys.NONE; - return this; - } - - /** - * Set char code - * - * @param charCode the code of the character. If the character is upper-case it means that - * KeyBuilder will be with the SHIFT modifier. - * @return the KeyBuilder with char code added - */ - public KeyBuilder charCode(int charCode) { - this.charCode = charCode; - return this; - } - - /** - * Build CharCodeWithModifiers object. - * - * @return new CharCodeWithModifiers object. - */ - public CharCodeWithModifiers build() { - return new CharCodeWithModifiers(modifiers, charCode); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java deleted file mode 100644 index 2526d1a528b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.keybinding; - -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** - * Scheme is set of the key bindings. - * - * @author Evgen Vidolob - * @author Artem Zatsarynnyi - * @author Arnaud Kervern - */ -public interface Scheme { - - /** - * Get id of the scheme. - * - * @return the scheme id - */ - String getSchemeId(); - - /** - * Get scheme description. - * - * @return the scheme description - */ - String getDescription(); - - /** - * Add key binding for action. - * - * @param key the hot key which bind - * @param actionId the action id which keys bind - */ - void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId); - - /** - * Add multiple key bindings at once - * - * @param keys Map of action's id with corresponding hot key - */ - void addKeys(@NotNull Map keys); - - /** - * Remove key binding for action. - * - * @param key the hot key to remove - * @param actionId the action's id for which key need to remove - */ - void removeKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId); - - /** - * @return all actions that have the specified key. If there are no such actions then the method - * returns an empty array - */ - @NotNull - List getActionIds(int digest); - - /** - * @return keyboard shortcut for the action with the specified actionId or an null if - * the action doesn't have any keyboard shortcut - */ - @Nullable - CharCodeWithModifiers getKeyBinding(@NotNull String actionId); - - /** @return a boolean to check if the action is handled by this scheme */ - boolean contains(@NotNull String actionId); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/SchemeImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/SchemeImpl.java deleted file mode 100644 index c2e689028d2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/SchemeImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.keybinding; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** - * @author Evgen Vidolob - * @author Artem Zatsarynnyi - * @author Arnaud Kervern - */ -public class SchemeImpl implements Scheme { - - private String id; - - private String description; - - private Map> handlers; - - private Map actionId2CharCode; - - public SchemeImpl(String id, String description) { - this.id = id; - this.description = description; - handlers = new HashMap<>(); - actionId2CharCode = new HashMap<>(); - } - - /** {@inheritDoc} */ - @Override - public String getSchemeId() { - return id; - } - - /** {@inheritDoc} */ - @Override - public String getDescription() { - return description; - } - - /** {@inheritDoc} */ - @Override - public void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId) { - final int digest = key.getKeyDigest(); - if (!handlers.containsKey(digest)) { - handlers.put(digest, new ArrayList()); - } - handlers.get(digest).add(actionId); - actionId2CharCode.put(actionId, key); - } - - @Override - public void addKeys(Map keys) { - for (Map.Entry entry : keys.entrySet()) { - addKey(entry.getValue(), entry.getKey()); - } - } - - /** {@inheritDoc} */ - @Override - public void removeKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId) { - final int digest = key.getKeyDigest(); - - List array = handlers.get(digest); - if (array != null) { - array.remove(actionId); - if (array.isEmpty()) { - handlers.remove(digest); - } - } - - actionId2CharCode.remove(actionId); - } - - /** {@inheritDoc} */ - @NotNull - @Override - public List getActionIds(int digest) { - if (handlers.containsKey(digest)) { - return handlers.get(digest); - } - return new ArrayList<>(); - } - - /** {@inheritDoc} */ - @Nullable - @Override - public CharCodeWithModifiers getKeyBinding(@NotNull String actionId) { - return actionId2CharCode.get(actionId); - } - - @Override - public boolean contains(String actionId) { - return actionId2CharCode.containsKey(actionId); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/BaseMacro.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/BaseMacro.java deleted file mode 100644 index 2ff0369dd57..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/BaseMacro.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.macro; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.common.base.Objects; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; - -/** - * Base implementation of {@link Macro}. - * - * @author Vlad Zhukovskyi - * @see Macro - * @since 4.7.0 - */ -public class BaseMacro implements Macro { - - private final String key; - private final String value; - private final String description; - - public BaseMacro(String key, String value, String description) { - this.key = checkNotNull(key, "Key should not be null"); - this.value = checkNotNull(value, "Value should not be null"); - this.description = checkNotNull(description, "Description should not be null"); - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return key; - } - - @Override - public String getDescription() { - return description; - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - return Promises.resolve(value); - } - - /** {@inheritDoc} */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - BaseMacro that = (BaseMacro) o; - return Objects.equal(key, that.key) - && Objects.equal(value, that.value) - && Objects.equal(description, that.description); - } - - /** {@inheritDoc} */ - @Override - public int hashCode() { - return Objects.hashCode(key, value, description); - } - - /** {@inheritDoc} */ - @Override - public String toString() { - return "BaseMacro{" - + "key='" - + key - + '\'' - + ", value='" - + value - + '\'' - + ", description='" - + description - + '\'' - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/Macro.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/Macro.java deleted file mode 100644 index 545479da5a5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/Macro.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.macro; - -import java.util.Set; -import org.eclipse.che.api.promises.client.Promise; - -/** - * Macro which can be used for the simple text substitutions. Mainly used in command lines before - * sending command to the machine for execution. - * - *

    Implementations of this interface have to be registered using a multibinder in order to be - * picked-up on application's start-up. Also macro can be registered in 'runtime' with {@link - * MacroRegistry#register(Set)}. - * - * @author Artem Zatsarynnyi - * @see BaseMacro - * @see MacroProcessor#expandMacros(String) - * @see MacroRegistry - */ -public interface Macro { - - /** Returns macro name. The recommended syntax is ${macro.name}. */ - String getName(); - - /** Returns macro description. */ - String getDescription(); - - /** - * Expand macro into the real value. - * - * @return a promise that resolves to the real value associated with macro - */ - Promise expand(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroProcessor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroProcessor.java deleted file mode 100644 index 116c83da75c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroProcessor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.macro; - -import org.eclipse.che.api.promises.client.Promise; - -/** - * Expands all {@link Macro}s in the given string. - * - * @author Artem Zatsarynnyi - * @see Macro - */ -public interface MacroProcessor { - - /** - * Expands all known macros in the given string. If macro is unknown it will be skipped. - * - * @param text string which may contain macros - * @return a promise that resolves to the given {@code text} with expanded macros - */ - Promise expandMacros(String text); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroRegistry.java deleted file mode 100644 index 5db5bc38c3b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/macro/MacroRegistry.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.macro; - -import java.util.List; -import java.util.Set; - -/** - * Registry for {@link Macro}s. - * - * @author Artem Zatsarynnyi - * @see Macro - */ -public interface MacroRegistry { - - /** Register set of macros. */ - void register(Set macros); - - /** Unregister the given macro. */ - void unregister(Macro macro); - - /** Returns the names of all registered {@link Macro}s. */ - Set getNames(); - - /** Returns {@link Macro} by it's name. */ - Macro getMacro(String name); - - /** Returns all registered {@link Macro}s. */ - List getMacros(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/Presenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/Presenter.java deleted file mode 100644 index d8e860ab6a7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/Presenter.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.mvp; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; - -/** - * Common interface for Presenters that are responsible for driving the UI - * - *

    - * - * @author Nikolay Zamosenchuk Jul 24, 2012 - */ -public interface Presenter { - /** - * Allows presenter to expose it's view to the container. - * - * @param container - */ - void go(final AcceptsOneWidget container); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/View.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/View.java deleted file mode 100644 index 4bef0f79d4b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/mvp/View.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.mvp; - -import com.google.gwt.user.client.ui.IsWidget; - -/** - * Common interface for Views - * - * @author Andrey Plotnikov - */ -public interface View extends IsWidget { - /** Sets the delegate to receive events from this view. */ - void setDelegate(T delegate); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/Notification.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/Notification.java deleted file mode 100644 index a1096baf616..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/Notification.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -import static org.eclipse.che.ide.api.notification.ReadState.READ; -import static org.eclipse.che.ide.api.notification.ReadState.UNREAD; - -import com.google.common.base.Strings; -import com.google.gwt.dom.client.Document; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; -import org.eclipse.che.ide.DelayedTask; - -/** - * Presents an entity that reflects the state of a notification. - * - *

    In order to show a notification you need to create an instance of this class and give it to - * {@link NotificationManager}. The manager knows how to show and handle it. In case you want to - * change the notification you will change your own instance and these changes will be take place in - * view. - * - *

    The notification makes it possible to delegate some actions in response to opening and closing - * of a notification. Also the notification has an popup state. The notification with this state - * will be closed only when user clicks 'Close' button. Other notifications (non-popup) will be - * closed after 5 a second time-out. - * - *

    Title is a mandatory parameter for the notification. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -public class Notification { - - protected NotificationListener listener; - protected String id; - protected long time; - protected String title; - protected String content; - protected ReadState state; - protected ProjectConfigDto project; - - private List observers; - - protected DelayedTask setUnreadStateTask = - new DelayedTask() { - @Override - public void onExecute() { - time = System.currentTimeMillis(); - setState(UNREAD); - } - }; - - /** - * Creates notification object with specified title. - * - * @param title notification title (required) - */ - public Notification(String title) { - this(title, null, null, null); - } - - /** - * Creates notification object. - * - * @param title notification title (required) - * @param content notification content (optional) - * @param project project which name will be displayed in the notification (optional) - * @param listener event listener that handle mouse events (optional) - */ - public Notification( - String title, String content, ProjectConfigDto project, NotificationListener listener) { - id = Document.get().createUniqueId(); - observers = new ArrayList<>(); - - this.project = project; - this.title = title; - this.content = content; - this.listener = listener; - - setUnreadState(); - } - - /** - * Get notification event listener. - * - * @return notification event listener - */ - public NotificationListener getListener() { - return listener; - } - - /** - * Set notification event listener. - * - * @param listener notification event listener (required) - */ - public void setListener(NotificationListener listener) { - if (listener != null) { - this.listener = listener; - setUnreadState(); - } - } - - protected void setUnreadState() { - // lets collect all calls instead of continuously calling update observers - setUnreadStateTask.delay(200); - } - - /** - * Get notification title. - * - * @return notification title - */ - public String getTitle() { - return title; - } - - /** - * Set notification title. - * - * @param title notification title (required) - * @throws IllegalArgumentException if title is null or empty - */ - public void setTitle(String title) { - if (Strings.isNullOrEmpty(title)) { - throw new IllegalArgumentException("Title shouldn't be a null"); - } - - this.title = title; - setUnreadState(); - } - - /** - * Get notification content. - * - * @return notification content - */ - public String getContent() { - return content; - } - - /** - * Set notification's content - * - * @param content notification content (required) - */ - public void setContent(String content) { - this.content = content; - setUnreadState(); - } - - /** - * Returns whether this notification is read. - * - * @return true if the notification is read, and false if it's not - */ - public boolean isRead() { - return state == READ; - } - - /** - * Set notification's state - * - * @param state notification state - * @throws IllegalArgumentException if status is null - */ - public void setState(ReadState state) { - if (state == null) { - throw new IllegalArgumentException("State shouldn't be a null"); - } - this.state = state; - notifyObservers(); - } - - /** - * Get timestamp when this notification was created or updated. - * - * @return timestamp when this notification was created or updated - */ - public long getTime() { - return time; - } - - /** - * Get project to which notification belongs. - * - * @return project - */ - public ProjectConfigDto getProject() { - return project; - } - - /** {@inheritDoc} */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Notification)) return false; - - Notification that = (Notification) o; - - return id.equals(that.id); - } - - /** {@inheritDoc} */ - @Override - public int hashCode() { - return id.hashCode(); - } - - /** - * Add a notification's observer. - * - * @param observer observer that need to add - */ - public void addObserver(NotificationObserver observer) { - if (!observers.contains(observer)) { - observers.add(observer); - } - } - - /** - * Remove a notification's observer. - * - * @param observer observer that need to remove - */ - public void removeObserver(NotificationObserver observer) { - observers.remove(observer); - } - - /** Notify observes. */ - public void notifyObservers() { - for (NotificationObserver observer : observers) { - observer.onValueChanged(); - } - } - - /** - * Return internal ID for the notification - * - * @return notification ID - */ - public String getId() { - return id; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationListener.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationListener.java deleted file mode 100644 index f68b5b5b96f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -/** - * Handle events for the specific notification. - * - * @author Vlad Zhukovskiy - */ -public interface NotificationListener { - /** Perform operation when user clicks on the notification. */ - void onClick(Notification notification); - - /** Perform operation when user double clicks on the notification. */ - void onDoubleClick(Notification notification); - - /** Perform operation when user closes the notification. */ - void onClose(Notification notification); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationManager.java deleted file mode 100644 index 9b4710cab0d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationManager.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode; - -import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; -import org.eclipse.che.ide.api.notification.StatusNotification.Status; -import org.eclipse.che.ide.api.parts.PartPresenter; - -/** - * The manager for notifications. Used to show notifications and change their states. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskii - */ -public interface NotificationManager extends PartPresenter { - - /** - * Show notification. - * - * @param notification notification - * @param return type of the notification - * @return notification object - */ - T notify(T notification); - - /** - * Show notification. - * - * @param title title - * @return notification object - */ - Notification notify(String title); - - /** - * Show notification. - * - * @param title title - * @param content content - * @return notification object - */ - Notification notify(String title, String content); - - /** - * Show notification. - * - * @param title title - * @param listener notification event listener - * @return notification object - */ - Notification notify(String title, NotificationListener listener); - - /** - * Show notification. - * - * @param title title - * @param status notification status - * @param displayMode mode of displaying of the notification - * @return notification object - */ - StatusNotification notify(String title, Status status, DisplayMode displayMode); - - /** - * Show notification. - * - * @param title title - * @param content content - * @param listener notification event listener - * @return notification object - */ - Notification notify(String title, String content, NotificationListener listener); - - /** - * Show status notification. - * - * @param title title - * @param content content - * @param status notification status - * @param displayMode mode of displaying of the notification - * @return notification object - */ - StatusNotification notify(String title, String content, Status status, DisplayMode displayMode); - - /** - * Show status notification. - * - * @param title title - * @param content content - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param listener notification event listener - * @return notification object - */ - StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - NotificationListener listener); - - /** - * Show status notification. - * - * @param title title - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param listener notification event listener - * @return notification object - */ - StatusNotification notify( - String title, Status status, DisplayMode displayMode, NotificationListener listener); - - /** - * Show notification. - * - * @param title title - * @param content content - * @param project provide project information to which notification belongs - * @return notification object - */ - Notification notify(String title, String content, ProjectConfigDto project); - - /** - * Show notification. - * - * @param title title - * @param project provide project information to which notification belongs - * @return notification object - */ - Notification notify(String title, ProjectConfigDto project); - - /** - * Show notification. - * - * @param title title - * @param content content - * @param listener notification event listener - * @param project provide project information to which notification belongs - * @return notification object - */ - Notification notify( - String title, String content, NotificationListener listener, ProjectConfigDto project); - - /** - * Show notification. - * - * @param title title - * @param listener notification event listener - * @param project provide project information to which notification belongs - * @return notification object - */ - Notification notify(String title, NotificationListener listener, ProjectConfigDto project); - - /** - * Show status notification. - * - * @param title title - * @param content content - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param project provide project information to which notification belongs - * @return notification object - */ - StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - ProjectConfigDto project); - - /** - * Show status notification. - * - * @param title title - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param project provide project information to which notification belongs - * @return notification object - */ - StatusNotification notify( - String title, Status status, DisplayMode displayMode, ProjectConfigDto project); - - /** - * Show status notification. - * - * @param title title - * @param content content - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param listener notification event listener - * @param project provide project information to which notification belongs - * @return notification object - */ - StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - NotificationListener listener, - ProjectConfigDto project); - - /** - * Show status notification. - * - * @param title title - * @param status notification status - * @param displayMode mode of displaying of the notification - * @param listener notification event listener - * @param project provide project information to which notification belongs - * @return notification object - */ - StatusNotification notify( - String title, - Status status, - DisplayMode displayMode, - NotificationListener listener, - ProjectConfigDto project); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationObserver.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationObserver.java deleted file mode 100644 index 1f4c029aada..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/NotificationObserver.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -/** - * Notification observer. - * - * @author Vlad Zhukovskyi - */ -public interface NotificationObserver { - /** Performs some actions in response to a user's changing something */ - void onValueChanged(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/ReadState.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/ReadState.java deleted file mode 100644 index fc679d8890c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/ReadState.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -/** - * State of notification. The notification has 2 states: a notification is read and a notification - * is unread. - * - * @author Vlad Zhukovskiy - */ -public enum ReadState { - READ, - UNREAD -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotification.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotification.java deleted file mode 100644 index 03445bf4455..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotification.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; - -/** - * Status notification. May have one of three status: PROGRESS, SUCCESS and FAIL. - * - * @author Vlad Zhukovskiy - */ -public class StatusNotification extends Notification { - - public enum Status { - PROGRESS, - SUCCESS, - WARNING, - FAIL - } - - public enum DisplayMode { - /** Notification will be float as balloon during the notification is in progress status */ - FLOAT_MODE, - - /** Notification will be emerge as balloon only when status is changed */ - EMERGE_MODE, - - /** Notification won't be emerge at all */ - NOT_EMERGE_MODE - } - - private Status status; - private DisplayMode displayMode; - private StatusNotificationListener statusListener; - - /** - * Creates status notification object with specified title, status and display mode. - * - * @param title notification title (required) - * @param status notification status (required) - * @param displayMode mode of displaying of the notification - */ - public StatusNotification(String title, Status status, DisplayMode displayMode) { - super(title); - this.status = status; - this.displayMode = displayMode; - } - - /** - * Creates status notification object with specified title, status and display mode. - * - * @param title notification title (required) - * @param status notification status (required) - * @param displayMode mode of displaying of the notification - * @param listener event listener that handle mouse events (optional) - */ - public StatusNotification( - String title, Status status, DisplayMode displayMode, NotificationListener listener) { - super(title); - this.status = status; - this.displayMode = displayMode; - this.listener = listener; - } - - /** - * Creates status notification. - * - * @param title notification title (required) - * @param content notification content (optional) - * @param status notification status (required) - * @param displayMode mode of displaying of the notification - * @param project project which name will be displayed in the notification (optional) - * @param listener event listener that handle mouse events (optional) - */ - public StatusNotification( - String title, - String content, - Status status, - DisplayMode displayMode, - ProjectConfigDto project, - NotificationListener listener) { - super(title, content, project, listener); - this.status = status; - this.displayMode = displayMode; - } - - /** - * Return the notification status. - * - * @return notification status - * @see org.eclipse.che.ide.api.notification.StatusNotification.Status - */ - public Status getStatus() { - return status; - } - - /** - * Set new status notification. - * - * @param status new notification status - * @throws IllegalArgumentException if status is null - * @see org.eclipse.che.ide.api.notification.StatusNotification.Status - */ - public void setStatus(Status status) { - if (status == null) { - throw new IllegalArgumentException("Status shouldn't be a null"); - } - boolean isStatusChanged = this.status != status; - this.status = status; - - if (isStatusChanged && statusListener != null) { - statusListener.onNotificationStatusChanged(this); - } - setUnreadState(); - } - - /** - * Sets display mode - * - * @param displayMode mode of displaying of the notification - */ - public void setDisplayMode(DisplayMode displayMode) { - this.displayMode = displayMode; - setUnreadState(); - } - - /** Returns the display mode of notification */ - public DisplayMode getDisplayMode() { - return displayMode; - } - - /** Sets listener for being notified about changes of notification status. */ - public void setStatusListener(StatusNotificationListener statusListener) { - this.statusListener = statusListener; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotificationListener.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotificationListener.java deleted file mode 100644 index 3527eb272ca..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/notification/StatusNotificationListener.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.notification; - -/** - * Listener interface for being notified about changes of notification status. - * - * @author Roman Nikitenko - */ -public interface StatusNotificationListener { - /** Performs some actions in response to a notification status has been changed */ - void onNotificationStatusChanged(StatusNotification notification); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2Authenticator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2Authenticator.java deleted file mode 100644 index 29f57baee9b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2Authenticator.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.oauth; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.security.oauth.OAuthStatus; - -/** @author Roman Nikitenko */ -public interface OAuth2Authenticator { - - void authenticate(String authenticationUrl, AsyncCallback callback); - - Promise authenticate(String authenticationUrl); - - String getProviderName(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorRegistry.java deleted file mode 100644 index a6eaa02afb4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorRegistry.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.oauth; - -/** - * Authenticators registry. - * - * @author Vitalii Parfonov - */ -public interface OAuth2AuthenticatorRegistry { - - void registerAuthenticator(String providerName, OAuth2Authenticator oAuth2Authenticator); - - OAuth2Authenticator getAuthenticator(String providerName); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorUrlProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorUrlProvider.java deleted file mode 100644 index b6ae11fd15f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/oauth/OAuth2AuthenticatorUrlProvider.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.oauth; - -import com.google.common.base.Joiner; -import com.google.gwt.user.client.Window; -import java.util.List; - -/** - * Constructs URL's to OAUth authentication depending on current host and rest context. - * - * @author Vitalii Parfonov - */ -public class OAuth2AuthenticatorUrlProvider { - - private static final String oAuthServicePath = "/oauth/authenticate"; - - public static String get(String restContext, String authenticatePath) { - return restContext + authenticatePath + "&redirect_after_login=" + redirect(); - } - - public static String get( - String restContext, String providerName, String userId, List scopes) { - final String scope = Joiner.on(',').join(scopes); - - return restContext - + oAuthServicePath - + "?oauth_provider=" - + providerName - + "&scope=" - + scope - + "&userId=" - + userId - + "&redirect_after_login=" - + redirect(); - } - - private static String redirect() { - return Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/ws/"; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/outputconsole/OutputConsole.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/outputconsole/OutputConsole.java deleted file mode 100644 index 15086059c32..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/outputconsole/OutputConsole.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.outputconsole; - -import org.eclipse.che.ide.api.mvp.Presenter; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Describes requirements for the console for displaying output. - * - * @author Roman Nikitenko - */ -public interface OutputConsole extends Presenter { - - /** Return title for the console. */ - String getTitle(); - - /** - * Returns the title SVG image resource of this console. - * - * @return the title SVG image resource - */ - SVGResource getTitleIcon(); - - /** Checks whether the console is finished outputting or not. */ - boolean isFinished(); - - /** Stop process. */ - void stop(); - - /** Called when console is closed. */ - void close(); - - /** Action Delegate interface. */ - interface ActionDelegate { - - /** Is called when new is printed */ - void onConsoleOutput(OutputConsole console); - - /** Is called when user asked to download output */ - void onDownloadOutput(OutputConsole console); - } - - /** Sets action delegate. */ - void addActionDelegate(ActionDelegate actionDelegate); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/AbstractPartPresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/AbstractPartPresenter.java deleted file mode 100644 index 2bd892667e5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/AbstractPartPresenter.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.util.ListenerManager; -import org.eclipse.che.ide.util.ListenerManager.Dispatcher; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Abstract base implementation of all PartPresenter - * - * @author Evgen Vidolob - * @author Stéphane Daviet - * @author Valeriy Svydenko - */ -public abstract class AbstractPartPresenter implements PartPresenter { - - private final ListenerManager manager; - private final List rules; - - private Selection selection; - - protected PartStack partStack; - - public AbstractPartPresenter() { - manager = ListenerManager.create(); - rules = new ArrayList<>(); - selection = new Selection.NoSelectionProvided(); - } - - /** {@inheritDoc} */ - @Override - public void storeState() { - // default implementation is empty. Add some logic for particular part to store it's state - } - - /** {@inheritDoc} */ - @Override - public void restoreState() { - // default implementation is empty. Add some logic for particular part to restore it's state - } - - /** - * Set PartStack where this part added. - * - * @param partStack - */ - public void setPartStack(@NotNull PartStack partStack) { - this.partStack = partStack; - } - - @Override - public PartStack getPartStack() { - return partStack; - } - - /** {@inheritDoc} */ - @Override - public void addRule(@NotNull String perspectiveId) { - rules.add(perspectiveId); - } - - /** {@inheritDoc} */ - @Override - public List getRules() { - return rules; - } - - /** {@inheritDoc} */ - @Override - public void onClose(@NotNull AsyncCallback callback) { - callback.onSuccess(null); - } - - /** {@inheritDoc} */ - @Override - public void onOpen() {} - - /** {@inheritDoc} */ - @Override - public void addPropertyListener(@NotNull PropertyListener listener) { - manager.add(listener); - } - - /** {@inheritDoc} */ - @Override - public void removePropertyListener(@NotNull PropertyListener listener) { - manager.remove(listener); - } - - /** - * Fires a property changed event. - * - * @param propId the id of the property that changed - */ - protected void firePropertyChange(final int propId) { - manager.dispatch( - new Dispatcher() { - @Override - public void dispatch(PropertyListener listener) { - listener.propertyChanged(AbstractPartPresenter.this, propId); - } - }); - } - - /** {@inheritDoc} */ - @NotNull - @Override - public Selection getSelection() { - return this.selection; - } - - /** - * Sets the Selection of the Part. It later can be accessible using {@link - * AbstractPartPresenter#getSelection()} - * - * @param selection instance of Selection - */ - public void setSelection(@NotNull Selection selection) { - this.selection = selection; - firePropertyChange(SELECTION_PROPERTY); - } - - /** {@inheritDoc} */ - @Override - public int getSize() { - return 285; - } - - /** {@inheritDoc} */ - @Override - public int getUnreadNotificationsCount() { - return 0; - } - - @Nullable - @Override - public SVGResource getTitleImage() { - return null; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedEvent.java deleted file mode 100644 index eb98dec8e05..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedEvent.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event that notifies of changing active PartPresenter - * - * @author Nikolay Zamosenchuk - */ -public class ActivePartChangedEvent extends GwtEvent { - public static Type TYPE = new Type<>(); - - private final PartPresenter activePart; - - public ActivePartChangedEvent(PartPresenter activePart) { - this.activePart = activePart; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** @return instance of Active Part */ - public PartPresenter getActivePart() { - return activePart; - } - - @Override - protected void dispatch(ActivePartChangedHandler handler) { - handler.onActivePartChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedHandler.java deleted file mode 100644 index aea08007ca1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/ActivePartChangedHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handles Active Part Changed Event - * - * @author Nikolay Zamosenchuk - */ -public interface ActivePartChangedHandler extends EventHandler { - /** - * Active part have changed - * - * @param event - */ - void onActivePartChanged(ActivePartChangedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStack.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStack.java deleted file mode 100644 index 78b0d2bfc97..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStack.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Multi Part Stack is layout element, containing {@link EditorPartStack}s and provides methods to - * control them. - * - * @author Roman Nikitenko - */ -public interface EditorMultiPartStack extends PartStack { - - /** - * Get active {@link EditorPartStack} - * - * @return active editor part stack or null if this one is absent - */ - @Nullable - EditorPartStack getActivePartStack(); - - /** - * Get {@link EditorPartStack} for given {@code part} - * - * @param part editor part to find corresponding editor part stack - * @return editor part stack which contains given {@code part} or null if this one is not found in - * any {@link EditorPartStack} - */ - @Nullable - EditorPartStack getPartStackByPart(PartPresenter part); - - /** - * Get {@link EditorPartStack} by given {@code tabId} - * - * @param tabId ID of editor tab to find part stack which contains corresponding editor part - * @return editor part stack which contains part with given {@code tabId} or null if this one is - * not found in any {@link EditorPartStack} - */ - @Nullable - EditorPartStack getPartStackByTabId(@NotNull String tabId); - - /** - * Get editor part which associated with given {@code tabId} - * - * @param tabId ID of tab to find corresponding editor part - * @return editor part or null if this one is not found in any {@link EditorPartStack} - */ - @Nullable - EditorPartPresenter getPartByTabId(@NotNull String tabId); - - /** - * Get {@link EditorTab} for given {@code editorPart} - * - * @param editorPart editor part to find corresponding editor tab - * @return tab for given {@code editorPart} or null if this one is not found in any {@link - * EditorPartStack} - */ - @Nullable - EditorTab getTabByPart(EditorPartPresenter editorPart); - - /** - * Get next opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate next opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getNextFor(EditorPartPresenter editorPart); - - /** - * Get previous opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate previous opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart); - - /** - * Create first(root) part stack - * - * @return the first part stack - */ - EditorPartStack createRootPartStack(); - - /** - * Remove given part stack. Note: All opened parts will be closed, use {@link - * EditorPartStack#getParts()} to avoid removing not empty part stack - * - * @param partStackToRemove part stack to remove - */ - void removePartStack(EditorPartStack partStackToRemove); - - /** - * Split part stack - * - * @param relativePartStack the relative part stack - * @param constraints the constraints of split(should contains direction of splitting:vertical or - * horizontal) - * @param size the size of splits part stack (use -1 if not set) - * @return the new splits part stack - */ - EditorPartStack split(EditorPartStack relativePartStack, Constraints constraints, double size); - - /** @return the editor multi part stack state */ - EditorMultiPartStackState getState(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStackState.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStackState.java deleted file mode 100644 index 5e394c57c49..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorMultiPartStackState.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import org.eclipse.che.ide.api.constraints.Direction; - -/** @author Evgen Vidolob */ -public class EditorMultiPartStackState { - - private EditorPartStack editorPartStack; - - private Direction direction; - private double size; - private EditorMultiPartStackState splitFirst; - private EditorMultiPartStackState splitSecond; - - public EditorMultiPartStackState(EditorPartStack editorPartStack) { - this.editorPartStack = editorPartStack; - } - - public EditorMultiPartStackState( - Direction direction, - double size, - EditorMultiPartStackState splitFirst, - EditorMultiPartStackState splitSecond) { - this.direction = direction; - this.size = size; - this.splitFirst = splitFirst; - this.splitSecond = splitSecond; - } - - public EditorPartStack getEditorPartStack() { - return editorPartStack; - } - - public Direction getDirection() { - return direction; - } - - public double getSize() { - return size; - } - - public EditorMultiPartStackState getSplitFirst() { - return splitFirst; - } - - public EditorMultiPartStackState getSplitSecond() { - return splitSecond; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorPartStack.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorPartStack.java deleted file mode 100644 index 432f70c5000..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorPartStack.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.resource.Path; - -/** - * Part Stack is tabbed layout element, containing Parts. EditorPartStack is shared across the - * Perspectives and allows to display EditorParts - * - * @author Nikolay Zamosenchuk - * @author Roman Nikitenko - */ -public interface EditorPartStack extends PartStack { - - /** - * Get opened editor by related file path - * - * @param path path of the file opened in editor - * @return opened editor or null if it does not exist - */ - @Nullable - PartPresenter getPartByPath(Path path); - - /** - * Get {@link EditorTab} for given {@code editorPart} - * - * @param editorPart editor part to find corresponding editor tab - * @return tab for given {@code editorPart} or null if this one is not found in {@link - * EditorPartStack} - */ - @Nullable - EditorTab getTabByPart(EditorPartPresenter editorPart); - - /** - * Get {@link EditorTab} for given path - * - * @param path path to file to find corresponding editor tab - * @return tab for given {@code editorPart} or null if this one is not found in {@link - * EditorPartStack} - */ - @Nullable - EditorTab getTabByPath(Path path); - - /** - * Get editor part which associated with given {@code tabId} - * - * @param tabId ID of tab to find corresponding editor part - * @return editor part or null if this one is not found in {@link EditorPartStack} - */ - @Nullable - EditorPartPresenter getPartByTabId(@NotNull String tabId); - - /** - * Get next opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate next opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getNextFor(EditorPartPresenter editorPart); - - /** - * Get previous opened editor based on given {@code editorPart} - * - * @param editorPart the starting point to evaluate previous opened editor - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart); - - /** - * Get last closed editor for {@link EditorPartStack} - * - * @return opened editor or null if it does not exist - */ - @Nullable - EditorPartPresenter getLastClosed(); - - /** - * Get all parts, opened in this stack. - * - * @return the parts list. - */ - @Override - List getParts(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorTab.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorTab.java deleted file mode 100644 index 06e4968b36b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/EditorTab.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** @author Dmitry Shnurenko */ -public interface EditorTab extends View, TabItem { - - void setReadOnlyMark(boolean isVisible); - - void setErrorMark(boolean isVisible); - - void setWarningMark(boolean isVisible); - - String getId(); - - /** - * Return virtual file associated with editor tab. - * - * @return {@link VirtualFile} file - */ - VirtualFile getFile(); - - /** - * Sets associated file with editor tab. - * - * @param file associated file - */ - void setFile(VirtualFile file); - - /** - * Set color to the label of editor's tab. - * - * @param color CSS color to set. Supported CSS color values: - *

      - *
    • Hexadecimal colors e.g. #ff0000 - *
    • RGB colors e.g. rgb(255, 0, 0) - *
    • RGBA colors e.g. rgba(255, 0, 0, 0.3) - *
    • HSL colors e.g. hsl(120, 60%, 70%) - *
    • HSLA colors e.g. hsla(120, 100%, 25%, 0.3) - *
    • Predefined/Cross-browser color names e.g. green - *
        - */ - void setTitleColor(String color); - - /** - * Get editor part which associated with given tab - * - * @return editor part which associated with given tab - */ - EditorPartPresenter getRelativeEditorPart(); - - /** - * Set unsaved data mark to editor tab item. - * - * @param hasUnsavedData true if tab should display 'unsaved data' mark, otherwise false - */ - void setUnsavedDataMark(boolean hasUnsavedData); - - /** - * Set pin mark to editor tab item. - * - * @param pinned true if tab should be pinned, otherwise false - */ - void setPinMark(boolean pinned); - - /** - * Indicates whether editor tab is either pinned or not. - * - * @return true if editor tab is pinned - */ - boolean isPinned(); - - interface ActionDelegate { - - void onTabClicked(@NotNull TabItem tab); - - void onTabClose(@NotNull TabItem tab); - - void onTabDoubleClicked(@NotNull TabItem tab); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Focusable.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Focusable.java deleted file mode 100644 index 794f6aff896..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Focusable.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -/** - * A view that implements this interface can receive keyboard focus. - * - * @author Vitaliy Guliy - */ -public interface Focusable { - - /** Explicitly focus/unfocus this view. Only one view can be focused at a time. */ - void setFocus(boolean focused); - - /** - * Check is this view focused. - * - * @return true if view has focus, otherwise return false - */ - boolean isFocused(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartPresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartPresenter.java deleted file mode 100644 index acb9d5ce8b8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartPresenter.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.IsWidget; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.selection.Selection; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Part is a main UI block of the IDE. - * - * @author Nikolay Zamosenchuk - * @author Stéphane Daviet - */ -public interface PartPresenter extends Presenter { - - /** - * The property id for getTitle, getTitleImage and getTitleToolTip - * . - */ - int TITLE_PROPERTY = 0x001; - - /** The property id for getSelection. */ - int SELECTION_PROPERTY = 0x002; - - /** Store part state before changing perspective. */ - void storeState(); - - /** Restore part state after changing perspective. */ - void restoreState(); - - /** @return Title of the Part */ - @NotNull - String getTitle(); - - void addRule(@NotNull String perspectiveId); - - List getRules(); - - IsWidget getView(); - - /** - * Returns corresponding part stack. - * - * @return - */ - PartStack getPartStack(); - - /** - * Returns the title SVG image resource of this part. If this value changes the part must fire a - * property listener event with PROP_TITLE. - * - *

        The title image is usually used to populate the title bar of this part's visual container. - * - * @return the title SVG image resource - */ - @Nullable - SVGResource getTitleImage(); - - /** - * Returns count of unread notifications. Is used to display a badge on part button. - * - * @return count of unread notifications - */ - int getUnreadNotificationsCount(); - - /** - * Returns the title tool tip text of this part. An empty string result indicates no tool tip. If - * this value changes the part must fire a property listener event with PROP_TITLE. - * - *

        The tool tip text is used to populate the title bar of this part's visual container. - * - * @return the part title tool tip (not null) - */ - @Nullable - String getTitleToolTip(); - - /** - * Return size of part. If current part is vertical panel then size is height. If current part is - * horizontal panel then size is width. - * - * @return size of part - */ - int getSize(); - - /** - * This method is called when Part is opened. Note: this method is NOT called when part gets - * focused. It is called when new tab in PartStack created. - */ - void onOpen(); - - /** - * This method is called when part is going to be closed. Part itself can deny blocking, by - * calling onFailure() on callback, i.e. when document is being edited and accidentally close - * button pressed. - * - * @param callback - */ - void onClose(@NotNull AsyncCallback callback); - - /** - * Adds a listener for changes to properties of this part. Has no effect if an identical listener - * is already registered. - * - * @param listener a property listener - */ - void addPropertyListener(@NotNull PropertyListener listener); - - /** @return The {@link org.eclipse.che.ide.api.selection.Selection} of this Part. */ - @NotNull - Selection getSelection(); - - /** - * Removes the given property listener from this part. Has no effect if an identical listener is - * not registered. - * - * @param listener a property listener - */ - void removePropertyListener(@NotNull PropertyListener listener); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStack.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStack.java deleted file mode 100644 index d75fddafbb1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStack.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Part Stack is tabbed layout element, containing Parts. - * - * @author Nikolay Zamosenchuk - * @author Vitaliy Guliy - */ -public interface PartStack extends Presenter { - - /** State of the part stack. */ - enum State { - - /** - * The default state when the part stack is visible. Part stack can be maximized, collapsed or - * hidden. - */ - NORMAL, - - /** - * Hidden part stack can not be maximized or collapsed. It only can be displayed using show() - * methd. - */ - HIDDEN, - - /** Part stack is maximized. In this state it can be restored or become hidden. */ - MAXIMIZED, - - /** - * Part stack is minimized while another one is maximized. The state will be changed to NORMAL - * after restoring the perspective. - */ - MINIMIZED - } - - /** - * Change the focused state of the PartStack to desired value - * - * @param focused - */ - void setFocus(boolean focused); - - /** - * Add part to the PartStack. To immediately show part, you must call setActivePart() - * . - * - * @param part - */ - void addPart(PartPresenter part); - - /** - * Add part to the PartStack with position constraint. - * - * @param part - * @param constraint - */ - void addPart(PartPresenter part, Constraints constraint); - - /** - * Ask if PartStack contains given Part. - * - * @param part - * @return - */ - boolean containsPart(PartPresenter part); - - /** - * Get active Part. Active is the part that is currently displayed on the screen - * - * @return - */ - PartPresenter getActivePart(); - - /** - * Activate given part (force show it on the screen). If part wasn't previously added to the - * PartStack or has been removed, that method has no effect. - * - * @param part - */ - void setActivePart(@NotNull PartPresenter part); - - /** - * Returns the state of the perspective. - * - * @return perspective state - */ - State getPartStackState(); - - /** Shows the part stack. */ - void show(); - - /** - * Hides the Part Stack. Use {@link #hide(boolean)} when hiding of the Part Stack is caused by - * user action - */ - void hide(); - - /** - * Hides the Part Stack. - * - * @param isUserInteraction pass {@code true} when hiding of the Part Stack is caused by user - * action (user clicked 'Hide' button, for example) or {@code false} otherwise - */ - default void hide(boolean isUserInteraction) { - hide(); - } - - /** Maximizes the part stack. */ - void maximize(); - - /** - * Minimizes the part stack. The part state can be restored to NORMAL state when restoring the - * perspective. - */ - void minimize(); - - /** Restores the part stack and the perspective to the default state. */ - void restore(); - - /** - * Remove given part from PartStack. - * - * @param part - */ - void removePart(PartPresenter part); - - void openPreviousActivePart(); - - /** Update part stack reference */ - void updateStack(); - - /** - * Get all parts, opened in this stack. - * - * @return the parts list - */ - List getParts(); - - /** - * Sets action delegate. - * - * @param delegate action delegate - */ - void setDelegate(ActionDelegate delegate); - - interface ActionDelegate { - - /** - * Requests the delegate to maximize the part stack. - * - * @param partStack part stack - */ - void onMaximize(PartStack partStack); - - /** - * Requests the delegate to restore part stack state. - * - * @param partStack part stack - */ - void onRestore(PartStack partStack); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackStateChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackStateChangedEvent.java deleted file mode 100644 index 92e12df14f2..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackStateChangedEvent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Is fired when a part stack state is changed. - * - * @author Vitaliy Guliy - */ -public class PartStackStateChangedEvent extends GwtEvent { - - /** Implement to handle changing the part stack state. */ - public interface Handler extends EventHandler { - - void onPartStackStateChanged(PartStackStateChangedEvent event); - } - - public static final GwtEvent.Type TYPE = new GwtEvent.Type(); - - private PartStack partStack; - private boolean isUserInteraction; - - public PartStackStateChangedEvent(PartStack partStack) { - this(partStack, false); - } - - /** - * Creates event to notify Part Stack state is changed. - * - * @param isUserInteraction pass {@code true} when hiding of the Part Stack is caused by user - * action (user clicked 'Hide' button, for example) or {@code false} otherwise - */ - public PartStackStateChangedEvent(PartStack partStack, boolean isUserInteraction) { - this.partStack = partStack; - this.isUserInteraction = isUserInteraction; - } - - public PartStack getPartStack() { - return partStack; - } - - /** - * Returns {@code true} when hiding of the Part Stack is caused by user action (user clicked - * 'Hide' button, for example) or {@code false} otherwise - */ - public boolean isUserInteraction() { - return isUserInteraction; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onPartStackStateChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackType.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackType.java deleted file mode 100644 index 4741e0be037..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackType.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -/** Defines Part's position on the Screen */ -public enum PartStackType { - /** - * Contains navigation parts. Designed to navigate by project, types, classes and any other - * entities. Usually placed on the LEFT side of the IDE. - */ - NAVIGATION, - /** - * Contains informative parts. Designed to display the state of the application, project or - * processes. Usually placed on the BOTTOM side of the IDE. - */ - INFORMATION, - /** - * Contains editing parts. Designed to provide an ability to edit any resources or settings. - * Usually placed in the CENTRAL part of the IDE. - */ - EDITING, - /** - * Contains tooling parts. Designed to provide handy features and utilities, access to other - * services or any other features that are out of other PartType scopes. Usually placed on the - * RIGHT side of the IDE. - */ - TOOLING -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackUIResources.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackUIResources.java deleted file mode 100644 index fffd8f2b9ee..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackUIResources.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.resources.client.DataResource; -import com.google.gwt.resources.client.DataResource.MimeType; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Nikolay Zamosenchuk */ -public interface PartStackUIResources extends ClientBundle { - - interface PartStackCss extends CssResource { - - @ClassName("ide-PartStack-Tab-Line-Warning") - String lineWarning(); - - @ClassName("ide-PartStack-Tab-Line-Error") - String lineError(); - - String listItemPanel(); - } - - @Source({"partstack.css", "org/eclipse/che/ide/api/ui/style.css"}) - PartStackCss partStackCss(); - - @Source("collapse-expand-icon.svg") - SVGResource collapseExpandIcon(); - - @Source("arrow-bottom.svg") - SVGResource arrowBottom(); - - @Source("erase.svg") - SVGResource erase(); - - @Source("close-icon.svg") - SVGResource closeIcon(); - - @Source("maximize-part.svg") - SVGResource maximizePart(); - - @MimeType("image/svg+xml") - @Source("tabLineError.svg") - DataResource tabLineError(); - - @MimeType("image/svg+xml") - @Source("tabLineWarning.svg") - DataResource tabLineWarning(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackView.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackView.java deleted file mode 100644 index 5b74bf72a5a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PartStackView.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.DoubleClickHandler; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.Widget; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.mvp.View; - -/** PartStack View interface */ -public interface PartStackView extends View { - - /** Tab which can be clicked and closed */ - interface TabItem extends ClickHandler, DoubleClickHandler { - - @NotNull - IsWidget getView(); - - @NotNull - String getTitle(); - - /** - * Returns part tab icon - * - * @return part tab icon - */ - Widget getIcon(); - - /** - * Updates part tab button. - * - * @param part part - */ - void update(@NotNull PartPresenter part); - - /** Selects part button. */ - void select(); - - /** Removes selection for the button. */ - void unSelect(); - } - - /** Add Tab */ - void addTab(@NotNull TabItem tabItem, @NotNull PartPresenter presenter); - - /** Remove Tab */ - void removeTab(@NotNull PartPresenter presenter); - - void selectTab(@NotNull PartPresenter partPresenter); - - /** Set new Tabs positions */ - void setTabPositions(List partPositions); - - /** Set PartStack focused */ - void setFocus(boolean focused); - - void setMaximized(boolean maximized); - - /** Update Tab */ - void updateTabItem(@NotNull PartPresenter partPresenter); - - /** Handles Focus Request Event. It is generated, when user clicks a stack anywhere */ - interface ActionDelegate { - - /** PartStack is being clicked and requests Focus */ - void onRequestFocus(); - - /** Toggle maximize Part Stack */ - void onToggleMaximize(); - - /** Hide Part Stack */ - void onHide(); - - /** Display Part Stack menu */ - void onPartStackMenu(int mouseX, int mouseY); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Perspective.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Perspective.java deleted file mode 100644 index a9259717e1a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/Perspective.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.statepersistance.StateComponent; - -/** - * This interface is a general type for all perspectives. You must implement the interface when you - * add new perspective. Provides methods to define type and view representation of perspective. - * - * @author Dmitry Shnurenko - */ -public interface Perspective extends StateComponent { - - /** Some unique id will used to set/switch current perspective in workbench layout logic */ - String getPerspectiveId(); - - /** Human readable name of perspective will be used in UI element for switching perspective */ - String getPerspectiveName(); - - /** Maximizes central part stack */ - void maximizeCentralPartStack(); - - /** Maximize left part stack */ - void maximizeLeftPartStack(); - - /** Maximize right part stack */ - void maximizeRightPartStack(); - - /** Maximizes bottom part stack */ - void maximizeBottomPartStack(); - - /** Restores perspective to the state before maximizing */ - void restore(); - - /** Store perspective state before changing. */ - void storeState(); - - /** Restores perspective state after changing. */ - void restoreState(); - - /** - * Sets passed part as active. Sets focus to part and open it. - * - * @param part part which will be active - * @param type type of part stack - */ - void setActivePart(@NotNull PartPresenter part, @NotNull PartStackType type); - - /** - * Removes part. - * - * @param part part which will be removed - */ - void removePart(@NotNull PartPresenter part); - - /** - * Reveals given Part and requests focus for it. - * - * @param part part which wil be focused - */ - void setActivePart(@NotNull PartPresenter part); - - /** - * Hides current part. - * - * @param part part which need hide - */ - void hidePart(@NotNull PartPresenter part); - - /** - * Opens new Part or shows already opened - * - * @param part part which need open - * @param type type of part - */ - void addPart(@NotNull PartPresenter part, @NotNull PartStackType type); - - /** - * Opens part with special constraint. - * - * @param part part which will be opened - * @param type part stack type to find it among active part stacks - * @param constraint constraints with which need open part - */ - void addPart( - @NotNull PartPresenter part, @NotNull PartStackType type, @Nullable Constraints constraint); - - /** - * Retrieves the instance of the {@link PartStack} for given {@link PartStackType} - * - * @param type type for which need get part stack - * @return an instance of {@link PartStack} - */ - @Nullable - PartStack getPartStack(@NotNull PartStackType type); - - /** - * Allows perspective to expose it's view to the container. - * - * @param container container in which need expose view - */ - void go(@NotNull AcceptsOneWidget container); - - /** - * Get current active part - * - * @return the active part - */ - @Nullable - PartPresenter getActivePart(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveManager.java deleted file mode 100644 index 6e7b9077641..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveManager.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * The class stores current perspective type. Contains listeners which do some actions when type is - * changed. By default PROJECT perspective type is set. - * - * @author Dmitry Shnurenko - */ -@Singleton -public class PerspectiveManager { - - private final List listeners; - private final Map perspectives; - - private String currentPerspectiveId; - - @Inject - public PerspectiveManager( - Map perspectives, - @Named("defaultPerspectiveId") String defaultPerspectiveId) { - this.perspectives = perspectives; - listeners = new ArrayList<>(); - - currentPerspectiveId = defaultPerspectiveId; - } - - /** - * Returns current active perspective. The method can return null, if current perspective isn't - * found. - */ - @Nullable - public Perspective getActivePerspective() { - return perspectives.get(currentPerspectiveId); - } - - /** - * Changes perspective type and notifies listeners. - * - * @param perspectiveId type which need set - */ - public void setPerspectiveId(@NotNull String perspectiveId) { - Perspective currentPerspective = perspectives.get(currentPerspectiveId); - - currentPerspective.storeState(); - - currentPerspectiveId = perspectiveId; - - for (PerspectiveTypeListener container : listeners) { - container.onPerspectiveChanged(); - } - } - - /** Returns current perspective type. */ - @NotNull - public String getPerspectiveId() { - return currentPerspectiveId; - } - - /** - * Adds listeners which will react on changing of perspective type. - * - * @param listener listener which need add - */ - public void addListener(@NotNull PerspectiveTypeListener listener) { - listeners.add(listener); - } - - /** @return current map of all perspectives */ - public Map getPerspectives() { - return new HashMap<>(perspectives); - } - - /** - * The interface which must be implemented by all elements who need react on perspective changing. - */ - public interface PerspectiveTypeListener { - /** Performs some action when perspective was changed. */ - void onPerspectiveChanged(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveView.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveView.java deleted file mode 100644 index d770e92b599..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PerspectiveView.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import org.eclipse.che.ide.api.mvp.View; - -/** - * Perspective View contains abstract containers for PartStack - * - * @author Nikolay Zamosenchuk - */ -public interface PerspectiveView extends View { - /** - * Returns central panel. - * - * @return - */ - AcceptsOneWidget getEditorPanel(); - - /** - * Returns left panel. - * - * @return - */ - AcceptsOneWidget getNavigationPanel(); - - /** - * Returns bottom panel. - * - * @return - */ - AcceptsOneWidget getInformationPanel(); - - /** - * Returns right panel. - * - * @return - */ - AcceptsOneWidget getToolPanel(); - - /** Handle View events */ - interface ActionDelegate { - - void onResize(int width, int height); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PropertyListener.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PropertyListener.java deleted file mode 100644 index e25ed4ab42a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/PropertyListener.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -/** - * Interface for listening for property changes on an {@link PartPresenter} - * - * @author Evgen Vidolob - */ -public interface PropertyListener { - - /** - * Indicates that a property has changed. - * - * @param source the object whose property has changed - * @param propId the id of the property which has changed; property ids are generally defined as - * constants on the source class - */ - void propertyChanged(PartPresenter source, int propId); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/WorkspaceAgent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/WorkspaceAgent.java deleted file mode 100644 index 67f5ed52ea7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/WorkspaceAgent.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.extension.SDK; - -/** - * Handles IDE Perspective, allows to open/close/switch Parts, manages opened Parts. - * - * @author Nikolay Zamosenchuk - */ -@SDK(title = "ide.api.ui.workspace") -public interface WorkspaceAgent { - - void setActivePart(@NotNull PartPresenter part, PartStackType type); - - /** - * Opens given Part - * - * @param part - * @param type - */ - void openPart(PartPresenter part, PartStackType type); - - /** - * Opens Part with constraint - * - * @param part - * @param type - * @param constraint - */ - void openPart(PartPresenter part, PartStackType type, Constraints constraint); - - /** - * Hides given Part - * - * @param part - */ - void hidePart(PartPresenter part); - - /** - * Remove given Part - * - * @param part - */ - void removePart(PartPresenter part); - - /** - * Retrieves the instance of the {@link PartStack} for given {@link PartStackType} - * - * @param type one of the enumerated type {@link PartStackType} - * @return the part stack found, else null - */ - PartStack getPartStack(PartStackType type); - - /** - * Get current active part - * - * @return the active part - */ - @Nullable - PartPresenter getActivePart(); - - /** - * Activate given part - * - * @param part - */ - void setActivePart(PartPresenter part); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseActionDelegate.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseActionDelegate.java deleted file mode 100644 index 4f8d2bf7830..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseActionDelegate.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts.base; - -/** - * Base interface for action delegates, provide method for minimizing part. - * - * @author Evgen Vidolob - */ -public interface BaseActionDelegate { - - /** Toggles maximized state of the part. */ - void onToggleMaximize(); - - /** - * Activate Part when clicking the mouse. Is used when the Part contains frames and mouse events - * are blocked. - */ - void onActivate(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BasePresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BasePresenter.java deleted file mode 100644 index bef2ec6cbb5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BasePresenter.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts.base; - -import org.eclipse.che.ide.api.parts.AbstractPartPresenter; -import org.eclipse.che.ide.api.parts.PartStack; - -/** - * Base presenter for parts that support minimizing by part toolbar button. - * - * @author Evgen Vidolob - */ -public abstract class BasePresenter extends AbstractPartPresenter implements BaseActionDelegate { - - @Override - public void onToggleMaximize() { - if (partStack != null) { - if (partStack.getPartStackState() == PartStack.State.MAXIMIZED) { - partStack.restore(); - } else { - partStack.maximize(); - } - } - } - - /** {@inheritDoc} */ - @Override - public void onActivate() { - partStack.setActivePart(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseView.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseView.java deleted file mode 100644 index 01c3b4c3681..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/BaseView.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts.base; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.BlurEvent; -import com.google.gwt.event.dom.client.BlurHandler; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.FocusWidget; -import com.google.gwt.user.client.ui.Widget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.Focusable; -import org.eclipse.che.ide.util.UIUtil; - -/** - * Base view for part. By default the view has toolbar containing part description and minimize - * button. Toolbar is represented as dock panel and can be simply expanded. - * - * @author Codenvy crowd - */ -public abstract class BaseView extends Composite - implements View, Focusable { - - /** Root widget */ - private DockLayoutPanel container; - - protected T delegate; - - protected FocusWidget lastFocused; - - /** Indicates whether this view is focused */ - private boolean focused = false; - - private BlurHandler blurHandler = - new BlurHandler() { - @Override - public void onBlur(BlurEvent event) { - if (event.getSource() instanceof FocusWidget) { - lastFocused = (FocusWidget) event.getSource(); - } - } - }; - - public BaseView() { - container = new DockLayoutPanel(Style.Unit.PX); - container.getElement().setAttribute("role", "part"); - container.setSize("100%", "100%"); - container.getElement().getStyle().setOutlineStyle(Style.OutlineStyle.NONE); - initWidget(container); - } - - /** {@inheritDoc} */ - @Override - public final void setDelegate(T delegate) { - this.delegate = delegate; - } - - /** - * Sets content widget. - * - * @param widget content widget - */ - public final void setContentWidget(Widget widget) { - container.add(widget); - for (FocusWidget focusWidget : UIUtil.getFocusableChildren(widget)) { - focusWidget.addBlurHandler(blurHandler); - } - - focusView(); - } - - /** - * Sets new value of part title. - * - * @param title part title - */ - @Override - public void setTitle(@NotNull String title) {} - - /** {@inheritDoc} */ - @Override - public final void setFocus(boolean focused) { - this.focused = focused; - if (focused) { - Scheduler.get().scheduleDeferred(this::focusView); - } else { - Scheduler.get().scheduleDeferred(this::blurView); - } - } - - /** {@inheritDoc} */ - @Override - public final boolean isFocused() { - return focused; - } - - /** - * Override this method to set focus to necessary element inside the view. Method is called when - * focusing the part view. - */ - protected void focusView() { - getElement().focus(); - } - - /** Handles loosing the focus. */ - protected void blurView() { - getElement().blur(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/MaximizePartEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/MaximizePartEvent.java deleted file mode 100644 index 76f8d77a9af..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/MaximizePartEvent.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts.base; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.parts.PartPresenter; - -/** - * Fire this event to maximize part. - * - * @author Vitaliy Guliy - */ -public class MaximizePartEvent extends GwtEvent { - - /** Implement this handler to handle maximizing the part. */ - public interface Handler extends EventHandler { - - void onMaximizePart(MaximizePartEvent event); - } - - public static final GwtEvent.Type TYPE = new GwtEvent.Type<>(); - - private PartPresenter part; - - public MaximizePartEvent(PartPresenter part) { - this.part = part; - } - - /** - * Returns part to be maximized. - * - * @return part - */ - public PartPresenter getPart() { - return part; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onMaximizePart(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.java deleted file mode 100644 index cc117e6db5f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.parts.base; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.event.dom.client.DoubleClickHandler; -import com.google.gwt.event.dom.client.HasClickHandlers; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import org.vectomatic.dom.svg.ui.SVGImage; - -/** - * Button which can be added to the tool bar. - * - * @author Codenvy crowd - */ -public class ToolButton extends Composite implements HasClickHandlers { - - /** UIBinder class for this TabButton. */ - interface TabButtonUiBinder extends UiBinder {} - - /** UIBinder for this TabButton. */ - private static TabButtonUiBinder uiBinder = GWT.create(TabButtonUiBinder.class); - - @UiField FlowPanel iconPanel; - - /** - * Creates new button based on SVG image. - * - * @param image SVG image - */ - public ToolButton(SVGImage image) { - initWidget(uiBinder.createAndBindUi(this)); - iconPanel.add(image); - - blockDoubleClicking(); - } - - /** - * Creates new button containing new Image created from HTML. - * - * @param htmlImageResource HTML content for new image - */ - public ToolButton(String htmlImageResource) { - initWidget(uiBinder.createAndBindUi(this)); - - FlowPanel image = new FlowPanel(); - image.getElement().setInnerHTML(htmlImageResource); - iconPanel.add(image); - - blockDoubleClicking(); - } - - @Override - public HandlerRegistration addClickHandler(ClickHandler clickHandler) { - return iconPanel.addDomHandler(clickHandler, ClickEvent.getType()); - } - - /** Blocks double clicking on the button and on the parent element. */ - private void blockDoubleClicking() { - addDomHandler( - new DoubleClickHandler() { - @Override - public void onDoubleClick(DoubleClickEvent event) { - event.stopPropagation(); - event.preventDefault(); - } - }, - DoubleClickEvent.getType()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.ui.xml b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.ui.xml deleted file mode 100644 index ca7f09dd5c1..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/parts/base/ToolButton.ui.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - @eval toolButtonColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonColor(); - @eval toolButtonHoverColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonHoverColor(); - @eval toolButtonActiveBorder org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveBorder(); - @eval toolButtonActiveColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveColor(); - @eval toolButtonHoverBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonHoverBackgroundColor(); - @eval toolButtonActiveBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveBackgroundColor(); - @eval toolButtonHoverBoxShadow org.eclipse.che.ide.api.theme.Style.theme.toolButtonHoverBoxShadow(); - @eval toolButtonActiveBoxShadow org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveBoxShadow(); - - .button { - width: 18px; - height: 18px; - overflow: hidden; - cursor: pointer; - } - - .button * { - transition: all 0.1s ease-in-out; - } - - .button > svg, - .button > div { - display: block; - position: absolute; - width: 13px; - height: 13px; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: auto; - padding: 1px; - box-sizing: content-box; - border: 1px solid transparent; - border-radius: 3px; - fill: toolButtonColor; - font-size: 13px; - line-height: 13px; - text-align: center; - color: toolButtonColor; - white-space: nowrap; - pointer-events: none; - } - - .button > svg, - .button > svg * { - fill: toolButtonColor; - } - - .button:hover > svg, - .button:hover > svg *, - .button:hover > div { - fill: toolButtonHoverColor !important; - color: toolButtonHoverColor !important; - } - - .button:active > svg, - .button:active > svg *, - .button:active > div { - fill: toolButtonActiveColor !important; - color: toolButtonActiveColor !important; - } - - .button:active > svg > *, - .button:active > div > * { - opacity: 0.8; - } - - - - - - diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/AbstractPreferencePagePresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/AbstractPreferencePagePresenter.java deleted file mode 100644 index ef51971bed9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/AbstractPreferencePagePresenter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.preferences; - -/** - * Abstract base implementation for all preference page implementations. It's simpler to get started - * using Preferences. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -public abstract class AbstractPreferencePagePresenter implements PreferencePagePresenter { - - public static String DEFAULT_CATEGORY = "IDE"; - - protected DirtyStateListener delegate; - - private String title; - - private String category; - - /** - * Create preference page. - * - * @param title - * @param category - */ - public AbstractPreferencePagePresenter(String title, String category) { - this.title = title; - this.category = category; - } - - /** - * Create preference page with a default category for grouping elements. - * - * @param title - */ - public AbstractPreferencePagePresenter(String title) { - this(title, DEFAULT_CATEGORY); - } - - @Override - public void setUpdateDelegate(DirtyStateListener delegate) { - this.delegate = delegate; - } - - @Override - public String getTitle() { - return title; - } - - @Override - public String getCategory() { - return category; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencePagePresenter.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencePagePresenter.java deleted file mode 100644 index 0503edb592b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencePagePresenter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.preferences; - -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Interface of preference page. Describes main methods for all preference pages. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -public interface PreferencePagePresenter extends Presenter { - /** Needs for delegate updateControls function into PagePresenter. */ - interface DirtyStateListener { - /** Updates preference view components without content panel. */ - void onDirtyChanged(); - } - - /** - * Sets new delegate - * - * @param delegate - */ - void setUpdateDelegate(DirtyStateListener delegate); - - /** - * Return preference category. This category will used for grouping elements. - * - * @return - */ - String getCategory(); - - /** - * Return preference page's title. This title will be shown into list of preferences. - * - * @return - */ - String getTitle(); - - /** - * Returns whether this page is changed or not. This information is typically used by the - * preferences presenter to decide when the information is changed. - * - * @return true if this page is changed, and false otherwise - */ - boolean isDirty(); - - /** Stores changes to Preferences Manager. */ - void storeChanges(); - - /** Reverts changes on values stored in Preferences Manager. */ - void revertChanges(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencesManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencesManager.java deleted file mode 100644 index b8d2f92d14a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/preferences/PreferencesManager.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.preferences; - -import java.util.Map; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * Manager for preferences. - * - * @author Andrey Plotnikov - */ -public interface PreferencesManager { - - /** - * Returns preference's value for the given preference's name. - * - * @param preference the preference's name whose associated value will be returned - * @return preference's value - */ - @Nullable - String getValue(String preference); - - /** - * Associates the preference's value with the preference's name. If preferences previously - * contained this preference, the old value is replaced by new one. - * - * @param preference preference's name with which the preference's value will be associated - * @param value preference's value will be associated with preference's name - */ - void setValue(String preference, String value); - - /** - * Persists preferences by passing it to the server side and create notification in case error - * - * @return the promise which either updates preference pages state or rejects which an error - */ - Promise flushPreferences(); - - /** - * Load preferences from server and create notification in case error - * - * @return the promise which either uses preferences or rejects in case an error - */ - Promise> loadPreferences(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/MutableProjectConfig.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/MutableProjectConfig.java deleted file mode 100644 index ee3f8a66c55..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/MutableProjectConfig.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project; - -import static com.google.common.collect.Lists.newArrayList; -import static com.google.common.collect.Maps.newHashMap; - -import com.google.common.annotations.Beta; -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.core.model.project.ProjectProblem; -import org.eclipse.che.api.core.model.workspace.config.ProjectConfig; -import org.eclipse.che.api.core.model.workspace.config.SourceStorage; -import org.eclipse.che.api.project.shared.NewProjectConfig; -import org.eclipse.che.api.workspace.shared.dto.CommandDto; - -/** @author Vlad Zhukovskiy */ -@Beta -public class MutableProjectConfig implements ProjectConfig { - - private String name; - private String path; - private String description; - private String type; - private List mixins; - private Map> attributes; - private MutableSourceStorage sourceStorage; - private Map options; - private List projects; - private List commands; - private List problems; - - public MutableProjectConfig(ProjectConfig source) { - name = source.getName(); - path = source.getPath(); - description = source.getDescription(); - type = source.getType(); - mixins = newArrayList(source.getMixins()); - attributes = newHashMap(source.getAttributes()); - sourceStorage = new MutableSourceStorage(source.getSource()); - problems = source.getProblems(); - } - - public MutableProjectConfig() {} - - @Override - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - @Override - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @Override - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public List getMixins() { - if (mixins == null) { - mixins = newArrayList(); - } - - return mixins; - } - - public void setMixins(List mixins) { - this.mixins = mixins; - } - - @Override - public Map> getAttributes() { - if (attributes == null) { - attributes = newHashMap(); - } - - return attributes; - } - - public void setAttributes(Map> attributes) { - this.attributes = attributes; - } - - @Override - public MutableSourceStorage getSource() { - if (sourceStorage == null) { - sourceStorage = new MutableSourceStorage(); - } - - return sourceStorage; - } - - @Override - public List getProblems() { - return problems; - } - - public void setSource(SourceStorage sourceStorage) { - this.sourceStorage = new MutableSourceStorage(sourceStorage); - } - - public Map getOptions() { - if (options == null) { - options = newHashMap(); - } - return options; - } - - public void setOptions(Map options) { - this.options = options; - } - - public List getCommands() { - if (commands == null) { - commands = newArrayList(); - } - return commands; - } - - public void setCommands(List commands) { - this.commands = commands; - } - - /** - * Returns the list of configurations to creating projects - * - * @return the list of {@link NewProjectConfig} to creating projects - */ - public List getProjects() { - if (projects == null) { - return newArrayList(); - } - return projects; - } - - /** - * Sets the list of configurations to creating projects - * - * @param projects the list of {@link NewProjectConfig} to creating projects - */ - public void setProjects(List projects) { - this.projects = projects; - } - - public class MutableSourceStorage implements SourceStorage { - private String type; - private String location; - private Map parameters; - - public MutableSourceStorage(SourceStorage source) { - type = source.getType(); - location = source.getLocation(); - parameters = source.getParameters(); - } - - public MutableSourceStorage() {} - - @Override - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - @Override - public Map getParameters() { - if (parameters == null) { - parameters = newHashMap(); - } - - return parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/NewProjectConfigImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/NewProjectConfigImpl.java deleted file mode 100644 index beef603232a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/NewProjectConfigImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project; - -import static java.util.Collections.emptyMap; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.core.model.project.ProjectProblem; -import org.eclipse.che.api.core.model.workspace.config.SourceStorage; -import org.eclipse.che.api.project.shared.NewProjectConfig; -import org.eclipse.che.api.project.templates.shared.dto.ProjectTemplateDescriptor; -import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; - -/** - * Implementation of {@link NewProjectConfig} for creating project - * - * @author Roman Nikitenko - */ -public class NewProjectConfigImpl implements NewProjectConfig { - private String name; - private String path; - private String description; - private String type; - private SourceStorage sourceStorage; - private List mixins; - private Map> attributes; - private Map options; - - /** Constructor for creating project import configuration */ - public NewProjectConfigImpl( - String name, String path, String description, String type, SourceStorage sourceStorage) { - this(name, path, description, type, sourceStorage, null, null, null); - } - - /** Constructor for creating project generator configuration */ - public NewProjectConfigImpl( - String name, - String path, - String description, - String type, - Map> attributes, - Map options) { - this(name, path, description, type, null, null, attributes, options); - } - - /** Constructor for creating configuration from project template descriptor */ - public NewProjectConfigImpl(ProjectTemplateDescriptor descriptor) { - this( - descriptor.getName(), - descriptor.getPath(), - descriptor.getDescription(), - descriptor.getProjectType(), - descriptor.getSource(), - descriptor.getMixins(), - descriptor.getAttributes(), - descriptor.getOptions()); - } - - /** Constructor for creating configuration from DTO object */ - public NewProjectConfigImpl(ProjectConfigDto dto) { - this( - dto.getName(), - dto.getPath(), - dto.getDescription(), - dto.getType(), - dto.getSource(), - dto.getMixins(), - dto.getAttributes(), - emptyMap()); - } - - public NewProjectConfigImpl( - String name, - String path, - String description, - String type, - SourceStorage sourceStorage, - List mixins, - Map> attributes, - Map options) { - this.name = name; - this.path = path; - this.description = description; - this.type = type; - this.sourceStorage = sourceStorage; - this.mixins = mixins; - this.attributes = attributes != null ? attributes : new HashMap>(); - this.options = options != null ? options : new HashMap(); - } - - @Override - public String getName() { - return name; - } - - @Override - public void setName(String name) { - this.name = name; - } - - @Override - public String getPath() { - return path; - } - - @Override - public void setPath(String path) { - this.path = path; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public void setDescription(String description) { - this.description = description; - } - - @Override - public String getType() { - return type; - } - - @Override - public void setType(String type) { - this.type = type; - } - - @Override - public List getMixins() { - return mixins != null ? mixins : new ArrayList(); - } - - @Override - public void setMixins(List mixins) { - this.mixins = mixins; - } - - @Override - public Map> getAttributes() { - return attributes != null ? attributes : new HashMap>(); - } - - @Override - public void setAttributes(Map> attributes) { - this.attributes = attributes; - } - - @Override - public Map getOptions() { - return options != null ? options : new HashMap(); - } - - @Override - public void setOptions(Map options) { - this.options = options; - } - - @Override - public SourceStorage getSource() { - return sourceStorage; - } - - @Override - public List getProblems() { - return Collections.emptyList(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/QueryExpression.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/QueryExpression.java deleted file mode 100644 index b9d74064571..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/QueryExpression.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project; - -/** @author Artem Zatsarynnyi */ -public class QueryExpression { - private String name; - private String path; - private String text; - private int maxItems; - private int skipCount; - - /** - * Get path to start search. - * - * @return path to start search - */ - public String getPath() { - return path; - } - - /** - * Set path to start search. - * - * @param path path to start search - * @return this {@code QueryExpression} - */ - public QueryExpression setPath(String path) { - this.path = path; - return this; - } - - /** - * Get name of file to search. - * - * @return file name to search - */ - public String getName() { - return name; - } - - /** - * Set name of file to search. - * - *

        Supported wildcards are: - * - *

          - *
        • *, which matches any character sequence (including the empty one); - *
        • ?, which matches any single character. - *
        - * - * @param name file name to search - * @return this {@code QueryExpression} - */ - public QueryExpression setName(String name) { - this.name = name; - return this; - } - - /** - * Get text to search. - * - * @return text to search - */ - public String getText() { - return text; - } - - /** - * Set text to search. - * - * @param text text to search - * @return this {@code QueryExpression} - */ - public QueryExpression setText(String text) { - this.text = text; - return this; - } - - /** - * Get maximum number of items in response. - * - * @return maximum number of items in response - */ - public int getMaxItems() { - return maxItems; - } - - /** - * Set maximum number of items in response. - * - * @param maxItems maximum number of items in response - * @return this {@code QueryExpression} - */ - public QueryExpression setMaxItems(int maxItems) { - this.maxItems = maxItems; - return this; - } - - /** - * Get amount of items to skip. - * - * @return amount of items to skip - */ - public int getSkipCount() { - return skipCount; - } - - /** - * Set amount of items to skip. - * - * @param skipCount amount of items to skip - * @return this {@code QueryExpression} - */ - public QueryExpression setSkipCount(int skipCount) { - this.skipCount = skipCount; - return this; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTemplateRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTemplateRegistry.java deleted file mode 100644 index ee920543dff..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTemplateRegistry.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type; - -import java.util.List; -import org.eclipse.che.api.project.templates.shared.dto.ProjectTemplateDescriptor; - -/** Registry of project templates. */ -public interface ProjectTemplateRegistry { - - /** Get project templates for the specified {@code projectTypeId} or empty list if none. */ - List getTemplates(String projectTypeId); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypeRegistry.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypeRegistry.java deleted file mode 100644 index 13ff506376e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypeRegistry.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type; - -import java.util.List; -import org.eclipse.che.api.project.shared.dto.ProjectTypeDto; -import org.eclipse.che.commons.annotation.Nullable; - -/** Registry of project types. */ -public interface ProjectTypeRegistry { - - List getProjectTypes(); - - @Nullable - ProjectTypeDto getProjectType(String id); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypesLoadedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypesLoadedEvent.java deleted file mode 100644 index 205ddace9bd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/ProjectTypesLoadedEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when {@link ProjectTypeRegistry} is initialized. */ -public class ProjectTypesLoadedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onProjectTypesInitialized(this); - } - - public interface Handler extends EventHandler { - void onProjectTypesInitialized(ProjectTypesLoadedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/PreSelectedProjectTypeManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/PreSelectedProjectTypeManager.java deleted file mode 100644 index 69b28645d9d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/PreSelectedProjectTypeManager.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type.wizard; - -/** - * Provides, to extensions, a way to set the default project type to be pre selected. Project - * wizards will use {@link PreSelectedProjectTypeManager#getPreSelectedProjectTypeId()} to get the - * type to be preselected - */ -public interface PreSelectedProjectTypeManager { - - /** - * To be used by project wizards to get the project type to preselect when no type is selected. - * - * @return The project id or an empty string if none. - */ - String getPreSelectedProjectTypeId(); - - /** Set projectType to preselect. lowest priority value will get selected. */ - void setProjectTypeIdToPreselect(String projectTypeId, int priority); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardMode.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardMode.java deleted file mode 100644 index e49f8dab434..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardMode.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type.wizard; - -import javax.validation.constraints.NotNull; - -/** - * Defines modes used to open a project wizard. - * - * @author Artem Zatsarynnyi - */ -public enum ProjectWizardMode { - - /** Project wizard opened for creating new project. */ - CREATE("create"), - /** - * Project wizard opened for updating existing project or creating configuration for the existed - * folder. - */ - UPDATE("update"), - /** Project wizard opened for creating new project from template. */ - IMPORT("import"); - - private final String value; - - ProjectWizardMode(String value) { - this.value = value; - } - - public static ProjectWizardMode parse(@NotNull String mode) { - for (ProjectWizardMode wizardMode : values()) { - if (mode.equals(wizardMode.toString())) { - return wizardMode; - } - } - - throw new IllegalArgumentException("Unknown value: " + mode); - } - - @Override - public String toString() { - return value; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardRegistrar.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardRegistrar.java deleted file mode 100644 index 38d44521c6a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/type/wizard/ProjectWizardRegistrar.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.type.wizard; - -import com.google.inject.Provider; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.wizard.WizardPage; - -/** - * Defines the requirements for an object that provides an information for registering project type - * into project wizard. - * - *

        Implementations of this interface need to be registered using a multibinder in order to be - * picked-up by project wizard. - * - * @author Artem Zatsarynnyi - */ -public interface ProjectWizardRegistrar { - - /** Key allows to get project wizard mode from wizard's context. */ - String WIZARD_MODE_KEY = "ProjectWizard:Mode"; - - /** - * Key allows to get project's name from wizard's context when project wizard opened for updating - * project. - */ - String PROJECT_NAME_KEY = "ProjectWizard:CurrentProjectName"; - - /** Returns ID of the project type that should be registered in project wizard. */ - String getProjectTypeId(); - - /** Returns project type category for the project wizard. */ - @NotNull - String getCategory(); - - /** Returns pages that should be used in project wizard. */ - List>> getWizardPages(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/wizard/ImportWizardRegistrar.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/wizard/ImportWizardRegistrar.java deleted file mode 100644 index c6687469488..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/wizard/ImportWizardRegistrar.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.project.wizard; - -import com.google.inject.Provider; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.wizard.WizardPage; - -/** - * Defines the requirements for an object that provides an information for registering project - * importer into project import wizard. - * - *

        Implementations of this interface need to be registered using a multibinder in order to be - * picked up by project wizard. - * - * @author Artem Zatsarynnyi - */ -public interface ImportWizardRegistrar { - - /** Returns ID of the project importer that should be registered in project import wizard. */ - @NotNull - String getImporterId(); - - /** Returns pages that should be used in project import wizard. */ - @NotNull - List>> getWizardPages(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/reference/FqnProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/reference/FqnProvider.java deleted file mode 100644 index b513800fa69..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/reference/FqnProvider.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.reference; - -/** - * The class provides methods which allows to extract fully qualified name for nodes. Fully - * qualified name (Fqn) is an unambiguous name that specifies which object, function, or variable a - * call refers to without regard to the context of the call. In a hierarchical structure, a name is - * fully qualified when it "is complete in the sense that it includes (a) all names in the - * hierarchic sequence above the given element and (b) the name of the given element itself." Thus - * fully qualified names explicitly refer to namespaces that would otherwise be implicit because of - * the scope of the call. - * - * @author Dmitry Shnurenko - */ -public interface FqnProvider { - - /** - * The methods extracts fqn from nodes which contains it. If node doesn't contain fqn, method - * returns empty string. - * - * @param object node for which fqn will be extract - * @return string representation of fqn or empty string if node doesn't contain fqn. - */ - String getFqn(Object object); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Container.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Container.java deleted file mode 100644 index b312c7b8a36..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Container.java +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import org.eclipse.che.api.core.model.project.type.ProjectType; -import org.eclipse.che.api.project.shared.dto.SourceEstimation; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.project.QueryExpression; -import org.eclipse.che.ide.api.resources.Project.ProjectRequest; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.NameUtils; - -/** - * Interface for resource which may contain other resources (termed its members). - * - *

        If {@code location} of current container is equals to {@link Path#ROOT} then it means that - * current container represent the workspace root. To obtain the workspace root {@link AppContext} - * should be injected into third- party component and method {@link AppContext#getWorkspaceRoot()} - * should be called. Only {@link Project}s are allowed to be created in workspace root. - * - *

        Note. This interface is not intended to be implemented by clients. - * - * @author Vlad Zhukovskyi - * @see Project - * @see Folder - * @see AppContext - * @see AppContext#getWorkspaceRoot() - * @since 4.4.0 - */ -@Beta -public interface Container extends Resource { - - /** - * Returns the {@code Promise} with handle to the file resource identified by the given path in - * this container. - * - *

        The supplied path should represent relative path to file in this container. - * - * @param relativePath the path of the member file - * @return the {@code Promise} with the handle of the member file - * @throws IllegalStateException if during resource search failed has been occurred. Reasons - * include: - *

          - *
        • Resource with path '/project_path' doesn't exist - *
        • Resource with path '/project_path' isn't a project - *
        • Not a file - *
        - * - * @see #getContainer(Path) - * @since 4.4.0 - */ - Promise> getFile(Path relativePath); - - /** - * Returns the {@code Promise} with handle to the file resource identified by the given path in - * this container. - * - *

        The supplied path should represent relative path to file in this container. - * - * @param relativePath the path of the member file - * @return the {@code Promise} with the handle of the member file - * @throws IllegalStateException if during resource search failed has been occurred. Reasons - * include: - *

          - *
        • Resource with path '/project_path' doesn't exist - *
        • Resource with path '/project_path' isn't a project - *
        • Not a file - *
        - * - * @see #getContainer(Path) - * @since 4.4.0 - */ - Promise> getFile(String relativePath); - - /** - * Returns the {@code Promise} with handle to the container identified by the given path in this - * container. - * - *

        The supplied path should represent relative path to folder. - * - * @param relativePath the path of the member container - * @return the {@code Promise} with the handle of the member container - * @throws IllegalStateException if during resource search failed has been occurred. Reasons - * include: - *

          - *
        • Resource with path '/project_path' doesn't exist - *
        • Resource with path '/project_path' isn't a project - *
        • Not a container - *
        - * - * @see #getFile(Path) - * @since 4.4.0 - */ - Promise> getContainer(Path relativePath); - - /** - * Returns the {@code Promise} with handle to the container identified by the given path in this - * container. - * - *

        The supplied path should represent relative path to folder. - * - * @param relativePath the path of the member container - * @return the {@code Promise} with the handle of the member container - * @throws IllegalStateException if during resource search failed has been occurred. Reasons - * include: - *

          - *
        • Resource with path '/project_path' doesn't exist - *
        • Resource with path '/project_path' isn't a project - *
        • Not a container - *
        - * - * @see #getFile(Path) - * @since 4.4.0 - */ - Promise> getContainer(String relativePath); - - /** - * Returns the {@code Promise} with handle to the resource identified by the given path in this - * container. - * - *

        The supplied path should represent relative path to resource. - * - * @param relativePath the path of the member resource - * @return the {@code Promise} with the handle of the member resource - * @throws IllegalStateException if during resource search failed has been occurred. Reasons - * include: - *

          - *
        • Resource with path '/project_path' doesn't exist - *
        • Resource with path '/project_path' isn't a project - *
        - * - * @see #getFile(Path) - */ - Promise> getResource(Path relativePath); - - /** - * Returns the {@code Promise} with array of existing member resources (projects, folders and - * files) in this resource, in particular order. Order is organized by alphabetic resource name - * ignoring case. - * - *

        Supplied parameter {@code force} instructs that stored children should be updated. - * - *

        Note, that if the result array is empty, then method thinks that children may not be loaded - * from the server and send a request ot the server to load the children. - * - *

        Method guarantees that resources will be sorted by their {@link #getLocation()} in ascending - * order. - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Cached and loaded resource provided by {@link - * ResourceDelta#getResource()}. - * - *

        Or - * - *

        Delta kind: {@link ResourceDelta#UPDATED}. When resource was cached previously. Updated - * resource provided by {@link ResourceDelta#getResource()}. - * - * @return the {@code Promise} with array of members of this resource - * @see #getChildren() - * @since 4.4.0 - */ - Promise getChildren(); - - /** - * Returns the {@code Promise} with array of existing member resources (projects, folders and - * files) in this resource, in particular order. Order is organized by alphabetic resource name - * ignoring case. - * - *

        Supplied parameter {@code force} instructs that stored children should be updated. - * - *

        Note, that if supplied argument {@code force} is set to {@code false} and result array is - * empty, then method thinks that children may not be loaded from the server and send a request ot - * the server to load the children. - * - *

        Method guarantees that resources will be sorted by their {@link #getLocation()} in ascending - * order. - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Cached and loaded resource provided by {@link - * ResourceDelta#getResource()}. - * - *

        Or - * - *

        Delta kind: {@link ResourceDelta#UPDATED}. When resource was cached previously. Updated - * resource provided by {@link ResourceDelta#getResource()}. - * - *

        May fire {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#REMOVED}. Removed resource provided by {@link - * ResourceDelta#getResource()}. In case if {@code force} is set in {@code true}. - * - * @return the {@code Promise} with array of members of this resource - * @see #getChildren() - * @since 4.4.0 - */ - Promise getChildren(boolean force); - - /** - * Creates the new {@link Project} in current container. - * - *

        Fires following events: {@link ResourceChangedEvent} when project has successfully created. - * - *

        Calling this method doesn't create a project immediately. To complete the request method - * {@link ProjectRequest#send()} should be called. {@link ProjectRequest} has ability to - * reconfigure project during update/create operations. - * - *

        Calling {@link ProjectRequest#send()} produces new {@link Project} resource. - * - *

        The supplied argument {@code name} should be a valid and pass validation within {@link - * NameUtils#checkProjectName(String)}. The supplied argument {@code type} should be a valid and - * registered project type. - * - *

        - * - *

        Example of usage for creating a new project: - * - *

        -   *     ProjectConfig config = ... ;
        -   *     Container workspace = ... ;
        -   *
        -   *     Promise newProjectPromise = workspace.newProject()
        -   *                                                   .withBody(config)
        -   *                                                   .send();
        -   *
        -   *     newProjectPromise.then(new Operation() {
        -   *         public void apply(Project newProject) throws OperationException {
        -   *              //do something with new project
        -   *         }
        -   *     });
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Created resource (instance of {@link Project}) provided by {@link - * ResourceDelta#getResource()} - * - * @return the create project request - * @throws IllegalArgumentException if arguments is not a valid. Reasons include: - *

          - *
        • Invalid project name - *
        • Invalid project type - *
        - * - * @throws IllegalStateException if creation was failed. Reasons include: - *
          - *
        • Resource already exists - *
        - * - * @see NameUtils#checkProjectName(String) - * @see ProjectRequest - * @see ProjectRequest#send() - * @since 4.4.0 - */ - ProjectRequest newProject(); - - /** - * Creates the new {@link Project} in current container with specified source storage (in other - * words, imports a remote project). - * - *

        Fires following events: {@link ResourceChangedEvent} when project has successfully created. - * - *

        Calling this method doesn't import a project immediately. To complete the request method - * {@link ProjectRequest#send()} should be called. - * - *

        Calling {@link ProjectRequest#send()} produces new {@link Project} resource. - * - *

        The supplied argument {@code name} should be a valid and pass validation within {@link - * NameUtils#checkProjectName(String)}. - * - *

        - * - *

        Example of usage for creating a new project: - * - *

        -   *     ProjectConfig config = ... ;
        -   *     Container workspace = ... ;
        -   *
        -   *     Promise newProjectPromise = workspace.importProject()
        -   *                                                   .withBody(config)
        -   *                                                   .send();
        -   *
        -   *     newProjectPromise.then(new Operation() {
        -   *         public void apply(Project newProject) throws OperationException {
        -   *              //do something with new project
        -   *         }
        -   *     });
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Created resource (instance of {@link Project}) provided by {@link - * ResourceDelta#getResource()} - * - * @return the create project request - * @throws IllegalArgumentException if arguments is not a valid. Reasons include: - *

          - *
        • Invalid project name - *
        - * - * @throws IllegalStateException if creation was failed. Reasons include: - *
          - *
        • Resource already exists - *
        - * - * @see NameUtils#checkProjectName(String) - * @see ProjectRequest - * @see ProjectRequest#send() - * @since 4.4.0 - */ - ProjectRequest importProject(); - - /** - * Creates the new {@link Folder} in current container. - * - *

        Fires following events: {@link ResourceChangedEvent} when folder has successfully created. - * - *

        Method produces new {@link Folder}. - * - *

        The supplied argument {@code name} should be a valid and pass validation within {@link - * NameUtils#checkFolderName(String)}. - * - *

        Note. That folders can not be created in workspace root (obtained by {@link - * AppContext#getWorkspaceRoot()}). Creating folder in this container will be failed. - * - *

        Example of usage: - * - *

        -   *     Container workspace = ... ;
        -   *
        -   *     workspace.newFolder("name").then(new Operation() {
        -   *         public void apply(Folder newFolder) throws OperationException {
        -   *              //do something with new folder
        -   *         }
        -   *     });
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Created resource (instance of {@link Folder}) provided by {@link - * ResourceDelta#getResource()} - * - * @param name the name of the folder - * @return the {@link Promise} with created {@link Folder} - * @throws IllegalArgumentException if arguments is not a valid. Reasons include: - *

          - *
        • Invalid folder name - *
        • Failed to create folder in workspace root - *
        - * - * @throws IllegalStateException if creation was failed. Reasons include: - *
          - *
        • Resource already exists - *
        - * - * @see NameUtils#checkFolderName(String) - * @since 4.4.0 - */ - Promise newFolder(String name); - - /** - * Creates the new {@link File} in current container. - * - *

        Fires following events: {@link ResourceChangedEvent} when file has successfully created. - * - *

        Method produces new {@link File}. - * - *

        The supplied argument {@code name} should be a valid and pass validation within {@link - * NameUtils#checkFileName(String)} (String)}. - * - *

        Note. That files can not be created in workspace root (obtained by {@link - * AppContext#getWorkspaceRoot()}). Creating folder in this container will be failed. - * - *

        The file content may be a {@code null} or empty. - * - *

        Example of usage: - * - *

        -   *     Container workspace = ... ;
        -   *
        -   *     workspace.newFile("name", "content").then(new Operation() {
        -   *         public void apply(File newFile) throws OperationException {
        -   *              //do something with new file
        -   *         }
        -   *     });
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Created resource (instance of {@link File}) provided by {@link - * ResourceDelta#getResource()} - * - * @param name the name of the file - * @param content the file content - * @return the {@link Promise} with created {@link File} - * @throws IllegalArgumentException if arguments is not a valid. Reasons include: - *

          - *
        • Invalid file name - *
        • Failed to create file in workspace root - *
        - * - * @throws IllegalStateException if creation was failed. Reasons include: - *
          - *
        • Resource already exists - *
        - * - * @see NameUtils#checkFileName(String) - * @since 4.4.0 - */ - Promise newFile(String name, String content); - - /** - * Synchronizes the cached container and its children with the local file system. - * - *

        For refreshing entire workspace root this method should be called on the container, which - * obtained from {@link AppContext#getWorkspaceRoot()}. - * - *

        Fires following events: {@link ResourceChangedEvent} when the synchronized resource has - * changed. - * - *

        Method doesn't guarantees the sorted order of the returned resources. - * - * @return the array of resource which where affected by synchronize operation - * @since 4.4.0 - */ - Promise synchronize(); - - /** - * Synchronizes the given {@code deltas} with already cached resources. Method is useful for - * third-party components which performs changes with resources outside of client side resource - * management. - * - *

        Method should be called on the workspace root {@link AppContext#getWorkspaceRoot()}. - * - * @param deltas the deltas which should be resolved - * @return the {@link Promise} with resolved deltas - * @throws IllegalStateException in case if method has been called outside of workspace root. - * Reasons include: - *

          - *
        • External deltas should be applied on the workspace root - *
        - * - * @see ExternalResourceDelta - * @see ResourceDelta - * @since 4.4.0 - */ - Promise synchronize(ResourceDelta... deltas); - - /** - * Searches the all possible files which matches given file or content mask. - * - *

        Supplied file mask may supports wildcard: - * - *

          - *
        • {@code *} - which matches any character sequence (including the empty one) - *
        • {@code ?} - which matches any single character - *
        - * - *

        Method doesn't guarantees the sorted order of the returned resources. - * - * @param fileMask the file name mask - * @param contentMask the content entity mask - * @return the {@link Promise} with array of found results - * @since 4.4.0 - */ - Promise search(String fileMask, String contentMask); - - /** - * Searches the all possible files which configured into {@link QueryExpression}. - * - *

        Method doesn't guarantees the sorted order of the returned resources. - * - * @param queryExpression the search query expression includes search parameters - * @return the {@link Promise} with array of found results - */ - Promise search(QueryExpression queryExpression); - - /** - * Creates the search expression which matches given file or content mask. - * - *

        Supplied file mask may supports wildcard: - * - *

          - *
        • {@code *} - which matches any character sequence (including the empty one) - *
        • {@code ?} - which matches any single character - *
        - * - * @param fileMask the file name mask - * @param query the content entity mask - * @return the instance of {@link QueryExpression} - */ - QueryExpression createSearchQueryExpression(String fileMask, String query); - - /** - * Returns the plain list of file tree with given {@code depth}. - * - *

        Input {@code depth} should be within the range from -1 to {@link Integer#MAX_VALUE}. - * - *

        In case if {@code depth} equals to 0, then empty resource is returned. In case if {@code - * depth} equals to -1, then whole file tree is loaded and returned. - * - *

        Method doesn't guarantee that resources will be sorted by their {@link #getLocation()} in - * any order. - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Cached and loaded resource provided by {@link - * ResourceDelta#getResource()}. - * - *

        Or - * - *

        Delta kind: {@link ResourceDelta#UPDATED}. When resource was cached previously. Updated - * resource provided by {@link ResourceDelta#getResource()}. - * - * @param depth the depth - * @return plain array of loaded resources - * @throws IllegalArgumentException in case if invalid depth passed as argument. i.e. depth equals - * -2, -3 and so on. Reasons include: - *

          - *
        • Invalid depth - *
        - * - * @since 4.4.0 - */ - Promise getTree(int depth); - - /** - * Estimates if the current container supposed to be a project within certain {@code projectType}. - * - * @param projectType the project type to estimate for - * @return the {@link SourceEstimation} with estimated attributes - * @throws IllegalArgumentException in case if project type is {@code null} or empty. Reasons - * include: - *
          - *
        • Null project type - *
        • Empty project type - *
        - * - * @see SourceEstimation - * @see ProjectType#getId() - * @since 4.4.0 - */ - Promise estimate(String projectType); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ExternalResourceDelta.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ExternalResourceDelta.java deleted file mode 100644 index 2e86e60549f..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ExternalResourceDelta.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.resource.Path; - -/** - * Delta which describes changes which has made outside system resource management. For example some - * refactoring mechanisms may includes from many preparing steps and after applying refactoring - * resource management should know what exactly happened with resources in the third-party - * components. - * - *

        When third-party component performs any changes in the resources, resource management should - * be informed about external changes by creating instances of current delta and calling {@link - * Container#synchronize(ResourceDelta...)}. - * - *

        Given resource paths should be absolute. - * - *

        Example of usage: - * - *

        - *     ResourceDelta deltaUpdate = new ExternalResourceDelta(Path.valueOf("/some/path_1"), ResourceDelta.UPDATED);
        - *     ResourceDelta deltaRemove = new ExternalResourceDelta(Path.valueOf("/some/path_2"), ResourceDelta.REMOVED);
        - *     ResourceDelta deltaAdd = new ExternalResourceDelta(Path.valueOf("/some/path_3"), ResourceDelta.ADDED);
        - *     ResourceDelta deltaMove = new ExternalResourceDelta(Path.valueOf("/some/path_3"), Path.valueOf("/some/path_2"),
        - *                                                         ResourceDelta.ADDED | ResourceDelta.MOVED_FROM | ResourceDelta.MOVED_FROM);
        - *
        - *     Workspace workspace = ... ;
        - *     workspace.synchronize(deltaUpdate, deltaRemove, deltaAdd, deltaMove).then(new Operation() {
        - *         public void apply(ResourceDelta[] appliedDeltas) throws OperationException {
        - *              //do something after deltas have been resolved
        - *         }
        - *     });
        - * 
        - * - * @author Vlad Zhukovskiy - * @see ResourceDelta - * @see Container#synchronize(ResourceDelta...) - * @since 4.4.0 - */ -@Beta -public class ExternalResourceDelta implements ResourceDelta { - - private Path newPath; - private Path oldPath; - - protected static int KIND_MASK = 0xF; - protected int status; - - public ExternalResourceDelta(Path path, int status) { - this(path, null, status); - } - - public ExternalResourceDelta(Path newPath, Path oldPath, int status) { - this.newPath = checkNotNull(newPath); - this.oldPath = oldPath; - this.status = status; - } - - /** {@inheritDoc} */ - @Override - public int getKind() { - return status & KIND_MASK; - } - - /** {@inheritDoc} */ - @Override - public int getFlags() { - return status & ~KIND_MASK; - } - - /** {@inheritDoc} */ - @Override - public Path getFromPath() { - return oldPath; - } - - /** {@inheritDoc} */ - @Override - public Path getToPath() { - return newPath; - } - - /** {@inheritDoc} */ - @Override - public Resource getResource() { - return null; - } - - /** {@inheritDoc} */ - @Override - public String toString() { - return "ExternalResourceDelta{" - + "newPath=" - + newPath - + ", oldPath=" - + oldPath - + ", status=" - + status - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/File.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/File.java deleted file mode 100644 index 196d6a5884a..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/File.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.debug.HasLocation; -import org.eclipse.che.ide.api.vcs.HasVcsStatus; -import org.eclipse.che.ide.resource.Path; - -/** - * Files are leaf resources which contain data. The contents of a file resource is stored as a file - * in the local file system. - * - *

        File extends also {@link VirtualFile}, so this resource can be easily opened in editor. - * - *

        File instance can be obtained by calling {@link Container#getFile(Path)} or by {@link - * Container#getChildren(boolean)}. - * - *

        Note. This interface is not intended to be implemented by clients. - * - * @author Vlad Zhukovskyi - * @see VirtualFile - * @see Container#getFile(Path) - * @since 4.4.0 - */ -@Beta -public interface File - extends Resource, VirtualFile, ModificationTracker, HasVcsStatus, HasLocation { - - /** @see VirtualFile#getDisplayName() */ - @Override - String getDisplayName(); - - /** @see VirtualFile#isReadOnly() */ - @Override - boolean isReadOnly(); - - /** @see VirtualFile#getContentUrl() */ - @Override - String getContentUrl(); - - /** @see VirtualFile#getContent() */ - @Override - Promise getContent(); - - /** @see VirtualFile#updateContent(String) */ - @Override - Promise updateContent(String content); - - /** - * Returns the file extension portion of this resource's name or {@code null} if it does not have - * one. - * - * @return a string file extension or {@code null} - * @see #getName() - * @since 4.4.0 - */ - String getExtension(); - - /** - * Returns the name without the extension. If file name contains '.' the substring till the last - * '.' is returned. Otherwise the same value as {@link #getName()} method returns is returned. - * - * @return the name without extension - * @see #getExtension() - * @see #getName() - * @since 4.4.0 - */ - String getNameWithoutExtension(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Folder.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Folder.java deleted file mode 100644 index 276e16a18ec..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Folder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.resources.Project.ProjectRequest; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.NameUtils; - -/** - * Folders may be leaf or non-leaf resources and may contain files and/or other folders. A folder - * resource is stored as a directory in the local file system. - * - *

        Folder instance can be obtained by calling {@link Container#getContainer(Path)} or by {@link - * Container#getChildren(boolean)}. - * - *

        Note. This interface is not intended to be implemented by clients. - * - * @author Vlad Zhukovskyi - * @since 4.4.0 - */ -@Beta -public interface Folder extends Container { - - /** - * Transforms current folder into {@link Project}. - * - *

        Calling current method doesn't create configuration immediately. To complete configuration - * creating method {@link ProjectRequest#send()} should be called. This is immutable operation - * which produce new {@link Project}. - * - *

        Example of usage: - * - *

        -   *     Folder folder = ... ;
        -   *     ProjectConfig configuration = ... ;
        -   *
        -   *     Promise projectPromise = folder.toProject().withBody(configuration).send();
        -   *
        -   *     projectPromise.then(new Operation() {
        -   *         public void apply(Project newProject) throws OperationException {
        -   *              //do something with new project
        -   *         }
        -   *     });
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#UPDATED}. Updated resource (instance of {@link Project}) provided by - * {@link ResourceDelta#getResource()} - * - * @return the create project request - * @throws IllegalArgumentException if arguments is not a valid. Reasons include: - *

          - *
        • Invalid project name - *
        • Invalid project type - *
        - * - * @throws IllegalStateException if creation was failed. Reasons include: - *
          - *
        • Resource already exists - *
        - * - * @see NameUtils#checkProjectName(String) - * @see ProjectRequest - * @see ProjectRequest#send() - * @since @since 4.4.0 - */ - ProjectRequest toProject(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ModificationTracker.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ModificationTracker.java deleted file mode 100644 index d5afec497f9..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ModificationTracker.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -/** - * Represents mechanism for getting and setting value of the content stamp. This value is changed - * when file is modified. - * - * @author Valeriy Svydenko - */ -public interface ModificationTracker { - - /** - * Sets modification tracker value. - * - * @param stamp encoded content - */ - void setModificationStamp(String stamp); - - /** - * Gets modification tracker value. Modification tracker is a value is changed by any modification - * of the content of the file. - * - * @return modification tracker value - */ - String getModificationStamp(); - - /** - * Update modification tracker value by content. Modification tracker is a value is changed by any - * modification of the content of the file. - * - * @param content actual file content - */ - void updateModificationStamp(String content); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Project.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Project.java deleted file mode 100644 index 0e5569e01bb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Project.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import com.google.common.base.MoreObjects; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.core.model.workspace.config.ProjectConfig; -import org.eclipse.che.api.project.shared.dto.SourceEstimation; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.marker.Marker; - -/** - * An object that represents client side project. - * - *

        Features of projects include: - * - *

          - *
        • A project collects together a set of files and folders. - *
        • A project's location controls where the project's resources are stored in the local file - * system. - *
        - * - * Project also extends {@link ProjectConfig} which contains the meta-data required to define a - * project. - * - *

        To get list of currently of all loaded projects in the IDE, use {@link - * AppContext#getProjects()} - * - *

        Note. This interface is not intended to be implemented by clients. - * - * @author Vlad Zhukovskyi - * @see AppContext#getProjects() - * @since 4.4.0 - */ -@Beta -public interface Project extends Container, ProjectConfig { - - /** - * Changes this project resource to match the given configuration provided by the request. Request - * contains all necessary data for manipulating with the project. - * - *

        Example of usage: - * - *

        -   *     ProjectConfig config = ... ;
        -   *     Project project = ... ;
        -   *
        -   *     Project.ProjectRequest updateRequest = project.update()
        -   *                                                   .withBody(config);
        -   *
        -   *     Promise updatedProject = updateRequest.send();
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#UPDATED}. Updated resource provided by {@link ResourceDelta#getResource()} - * - *

        Note. Calling this method doesn't update the project immediately. To complete request method - * {@link ProjectRequest#send()} should be called. - * - * @return the request to update the project - * @see ProjectRequest - * @see ProjectRequest#send() - * @since 4.4.0 - */ - ProjectRequest update(); - - /** - * Check whether current project has problems. Problem project calculates in a runtime, so it is - * not affects stored configuration on the server. To find out the reasons why project has - * problems, following code snippet may be helpful: - * - *

        Example of usage: - * - *

        -   *     Project project = ... ;
        -   *     if (project.isProblem()) {
        -   *         Marker problemMarker = getMarker(ProblemProjectMarker.PROBLEM_PROJECT).get();
        -   *
        -   *         String message = String.valueOf(problemMarker.getAttribute(Marker.MESSAGE));
        -   *     }
        -   * 
        - * - * @return {@code true} if current project has problems, otherwise {@code false} - * @see ProblemProjectMarker - * @since 4.4.0 - */ - boolean isProblem(); - - /** - * Returns the {@code true} if project physically exists on the file system. - * - *

        Project may not be exists on file system, but workspace may has configured in the current - * workspace. - * - * @return {@code true} if project physically exists on the file system, otherwise {@code false} - * @since 4.4.0 - */ - boolean exists(); - - /** - * Resolve possible project types for current {@link Project}. - * - *

        These source estimations may be useful for automatically project type detection. - * - *

        Source estimation provides possible project type and attributes that this project type can - * provide. Based on this information, current project may be configured in correct way. - * - * @return the {@link Promise} with source estimations - * @since 4.4.0 - */ - Promise> resolve(); - - /** - * Checks whether given project {@code type} is applicable to current project. - * - * @param type the project type to check - * @return true if given project type is applicable to current project - * @since 4.4.0 - */ - boolean isTypeOf(String type); - - /** - * Returns the attribute value for given {@code key}. If such attribute doesn't exist, {@code - * null} is returned. If there is more than one value exists for given {@code key}, than first - * value is returned. - * - * @param key the attribute name - * @return first value for the given {@code key} or null if such attribute doesn't exist - * @since 4.4.0 - */ - String getAttribute(String key); - - /** - * Returns the list of attributes for given {@code key}. If such attribute doesn't exist, {@code - * null} is returned. - * - * @param key the attribute name - * @return the list with values for the given {@code key} or null if such attribute doesn't exist - * @since 4.4.0 - */ - List getAttributes(String key); - - /** - * Marker that describe problematic project. - * - * @see #isProblem() - * @since 4.4.0 - */ - @Beta - class ProblemProjectMarker implements Marker { - - private Map problems; - - /** - * Marker type, which should be used when marker requests. - * - * @see Resource#getMarker(String) - */ - public static final String PROBLEM_PROJECT = "problemProjectMarker"; - - public ProblemProjectMarker(Map problems) { - this.problems = MoreObjects.firstNonNull(problems, Collections.emptyMap()); - } - - /** {@inheritDoc} */ - @Override - public String getType() { - return PROBLEM_PROJECT; - } - - public Map getProblems() { - return problems; - } - } - - /** - * Base interface for project update operation. - * - * @see Project#update() - * @since 4.4.0 - */ - @Beta - interface ProjectRequest extends Resource.Request { - @Override - Request withBody(ProjectConfig object); - - @Override - ProjectConfig getBody(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/RenamingSupport.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/RenamingSupport.java deleted file mode 100644 index c30b9981464..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/RenamingSupport.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -/** - * Indicates resource which allow renaming. - * - * @author Valeriy Svydenko - */ -public interface RenamingSupport { - /** Returns {@code} true if renaming is allowed otherwise {@code} false */ - boolean isRenameAllowed(Resource resource); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Resource.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Resource.java deleted file mode 100644 index ab01df86a60..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/Resource.java +++ /dev/null @@ -1,684 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import static com.google.common.base.Preconditions.checkState; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Project.ProjectRequest; -import org.eclipse.che.ide.api.resources.marker.Marker; -import org.eclipse.che.ide.api.resources.marker.MarkerChangedEvent; -import org.eclipse.che.ide.resource.Path; - -/** - * The client side analog of file system files and directories. There are exactly three types of - * resources: files, folders and projects. - * - *

        Workspace root is representing by {@link Container}. In which only {@link Project} is allowed - * to be created. - * - *

        File resources are similar to files in that they hold data directly. Folder resources are - * analogous to directories in that they hold other resources but cannot directly hold data. Project - * resources group files and folders into reusable clusters. - * - *

        Features of resources: - * - *

          - *
        • {@code Resource} objects are handles to state maintained by a workspace. That is, resources - * objects do not actually contain data themselves but rather represent resource state and - * give it behaviour. - *
        • Resources are identified by type and their {@code path}, which is similar to a file system - * path. The name of the resource is the last segment of its path. A resource's parent is - * located by removing the last segment (the resource's name) from the resource's full path. - *
        - * - *

        To obtain already initialized resource in workspace you just need to inject {@link AppContext} - * into your component and call {@link AppContext#getProjects()} or {@link - * AppContext#getWorkspaceRoot()}. - * - *

        Note. This interface is not intended to be implemented by clients. - * - * @author Vlad Zhukovskyi - * @see Container - * @see File - * @see Folder - * @see Project - * @see AppContext#getProjects() - * @see AppContext#getWorkspaceRoot() - * @since 4.4.0 - */ -@Beta -public interface Resource extends Comparable { - /** - * Type constant that describes {@code File} resource. - * - * @see Resource#getResourceType() - * @see Resource#isFile() - * @see File - * @since 4.4.0 - */ - int FILE = 0x1; - - /** - * Type constant that describes {@code Folder} resource. - * - * @see Resource#getResourceType() - * @see Resource#isFolder() - * @see Folder - * @since 4.4.0 - */ - int FOLDER = 0x2; - - /** - * Type constant that describes {@code Project} resource. - * - * @see Resource#getResourceType() - * @see Resource#isProject() - * @see Project - * @since 4.4.0 - */ - int PROJECT = 0x4; - - /** - * Returns {@code true} if current represents a file. - * - * @return true if current resource is file based resource. - * @see Resource#getResourceType() - * @see Resource#FILE - * @since 4.4.0 - */ - default boolean isFile() { - return getResourceType() == FILE; - } - - /** - * Casts current resource to the {@link File} if the last one's represents a file. - * - *

        Example of usage: - * - *

        -   *    public void doSome() {
        -   *        Resource resource = ...;
        -   *        if (resource.isFile()) {
        -   *            File file = resource.asFile();
        -   *        }
        -   *    }
        -   * 
        - * - * @return instance of {@link File} - * @throws IllegalStateException in case if current resource is not a file - * @see Resource#getResourceType() - * @see Resource#FILE - * @since 5.1.0 - */ - default File asFile() { - checkState(isFile(), "Current resource is not a file"); - - return (File) this; - } - - /** - * Returns {@code true} if current represents a folder. - * - * @return true if current resource is folder based resource. - * @see Resource#getResourceType() - * @see Resource#FOLDER - * @since 4.4.0 - */ - default boolean isFolder() { - return getResourceType() == FOLDER; - } - - /** - * Casts current resource to the {@link Folder} if the last one's represents a folder. - * - *

        Example of usage: - * - *

        -   *    public void doSome() {
        -   *        Resource resource = ...;
        -   *        if (resource.isFolder()) {
        -   *            Folder folder = resource.asFolder();
        -   *        }
        -   *    }
        -   * 
        - * - * @return instance of {@link Folder} - * @throws IllegalStateException in case if current resource is not a folder - * @see Resource#getResourceType() - * @see Resource#FOLDER - * @since 5.1.0 - */ - default Folder asFolder() { - checkState(isFolder(), "Current resource is not a folder"); - - return (Folder) this; - } - - /** - * Returns {@code true} if current represents a project. - * - * @return true if current resource is project based resource. - * @see Resource#getResourceType() - * @see Resource#PROJECT - * @since 4.4.0 - */ - default boolean isProject() { - return getResourceType() == PROJECT; - } - - /** - * Casts current resource to the {@link Project} if the last one's represents a project. - * - *

        Example of usage: - * - *

        -   *    public void doSome() {
        -   *        Resource resource = ...;
        -   *        if (resource.isProject()) {
        -   *            Project project = resource.asProject();
        -   *        }
        -   *    }
        -   * 
        - * - * @return instance of {@link Project} - * @throws IllegalStateException in case if current resource is not a project - * @see Resource#getResourceType() - * @see Resource#PROJECT - * @since 5.1.0 - */ - default Project asProject() { - checkState(isProject(), "Current resource is not a project"); - - return (Project) this; - } - - /** - * Copies resource to given {@code destination} path. Copy operation performs asynchronously and - * result of current operation will be provided in {@code Promise} result. Destination path should - * have write access. - * - *

        Copy operation produces new {@link Resource} which is already cached. - * - *

        Fires following events: {@link ResourceChangedEvent} when resource has successfully copied. - * This event provides information about copied resource and source resource. - * - *

        Example of usage: - * - *

        -   *     Resource resource = ... ;
        -   *     Path copyTo = ... ;
        -   *
        -   *     resource.copy(copyTo).then(new Operation() {
        -   *          public void apply(Resource copiedResource) throws OperationException {
        -   *              //do something with copiedResource
        -   *          }
        -   *     })
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Copied resource provided by {@link ResourceDelta#getResource()}. - * Contains flags {@link ResourceDelta#COPIED_FROM}. Source resource is accessible by calling - * {@link ResourceDelta#getFromPath()}. - * - * @param destination the destination path - * @return {@link Promise} with copied {@link Resource} - * @throws IllegalStateException if this resource could not be copied. Reasons include: - *

          - *
        • Resource already exists - *
        • Resource with path '/path' isn't a project - *
        - * - * @throws IllegalArgumentException if current resource can not be copied. Reasons include: - *
          - *
        • Workspace root is not allowed to be copied - *
        - * - * @see ResourceChangedEvent - * @see Resource - * @since 4.4.0 - */ - Promise copy(Path destination); - - /** - * Copies resource to given {@code destination} path. Copy operation performs asynchronously and - * result of current operation will be provided in {@code Promise} result. Destination path should - * have write access. - * - *

        Copy operation produces new {@link Resource} which is already cached. - * - *

        Fires following events: {@link ResourceChangedEvent} when resource has successfully copied. - * This event provides information about copied resource and source resource. - * - *

        Passing {@code force} argument as true method will ignore existed resource on the server and - * overwrite them. - * - *

        Example of usage: - * - *

        -   *     Resource resource = ... ;
        -   *     Path copyTo = ... ;
        -   *
        -   *     resource.copy(copyTo, true).then(new Operation() {
        -   *          public void apply(Resource copiedResource) throws OperationException {
        -   *              //do something with copiedResource
        -   *          }
        -   *     })
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#ADDED}. Copied resource provided by {@link ResourceDelta#getResource()}. - * Contains flags {@link ResourceDelta#COPIED_FROM}. Source resource is accessible by calling - * {@link ResourceDelta#getFromPath()}. - * - * @param destination the destination path - * @param force overwrite existed resource on the server - * @return {@link Promise} with copied {@link Resource} - * @throws IllegalStateException if this resource could not be copied. Reasons include: - *

          - *
        • Resource already exists - *
        • Resource with path '/path' isn't a project - *
        - * - * @throws IllegalArgumentException if current resource can not be copied. Reasons include: - *
          - *
        • Workspace root is not allowed to be copied - *
        - * - * @see ResourceChangedEvent - * @see Resource - * @since 4.4.0 - */ - Promise copy(Path destination, boolean force); - - /** - * Moves resource to given new {@code destination}. Move operation performs asynchronously and - * result of current operation will be displayed in {@code Promise} result. - * - *

        Move operation produces new {@link Resource} which is already cached. - * - *

        Fires following events: {@link ResourceChangedEvent} when resource has successfully moved. - * This event provides information about moved resource. - * - *

        Before moving mechanism remembers deepest depth which was read and tries to restore it after - * move. - * - *

        Example of usage: - * - *

        -   *     Resource resource = ... ;
        -   *     Path moveTo = ... ;
        -   *
        -   *     resource.move(moveTo).then(new Operation() {
        -   *          public void apply(Resource movedResource) throws OperationException {
        -   *              //do something with movedResource
        -   *          }
        -   *     })
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#REMOVED}. Removed resource is provided by {@link - * ResourceDelta#getResource()}. - * - *

        Also fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta - * kind: {@link ResourceDelta#ADDED}. Moved resource provided by {@link - * ResourceDelta#getResource()}. Contains flags {@link ResourceDelta#MOVED_FROM} and {@link - * ResourceDelta#MOVED_TO}. Source resource is accessible by calling {@link - * ResourceDelta#getFromPath()}. Moved resource (or new resource) is accessible by calling {@link - * ResourceDelta#getToPath()}. - * - * @param destination the destination path - * @return {@code Promise} with move moved {@link Resource} - * @throws IllegalStateException if this resource could not be moved. Reasons include: - *

          - *
        • Resource already exists - *
        • Resource with path '/path' isn't a project - *
        - * - * @throws IllegalArgumentException if current resource can not be moved. Reasons include: - *
          - *
        • Workspace root is not allowed to be moved - *
        - * - * @see ResourceChangedEvent - * @see Resource - * @since 4.4.0 - */ - Promise move(Path destination); - - /** - * Moves resource to given new {@code destination}. Move operation performs asynchronously and - * result of current operation will be displayed in {@code Promise} result. - * - *

        Move operation produces new {@link Resource} which is already cached. - * - *

        Fires following events: {@link ResourceChangedEvent} when resource has successfully moved. - * This event provides information about moved resource. - * - *

        Before moving mechanism remembers deepest depth which was read and tries to restore it after - * move. - * - *

        Passing {@code force} argument as true method will ignore existed resource on the server and - * overwrite them. - * - *

        Example of usage: - * - *

        -   *     Resource resource = ... ;
        -   *     Path moveTo = ... ;
        -   *
        -   *     resource.move(moveTo, true).then(new Operation() {
        -   *          public void apply(Resource movedResource) throws OperationException {
        -   *              //do something with movedResource
        -   *          }
        -   *     })
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#REMOVED}. Removed resource is provided by {@link - * ResourceDelta#getResource()}. - * - *

        Also fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta - * kind: {@link ResourceDelta#ADDED}. Moved resource provided by {@link - * ResourceDelta#getResource()}. Contains flags {@link ResourceDelta#MOVED_FROM} and {@link - * ResourceDelta#MOVED_TO}. Source resource is accessible by calling {@link - * ResourceDelta#getFromPath()}. Moved resource (or new resource) is accessible by calling {@link - * ResourceDelta#getToPath()}. - * - * @param destination the destination path - * @return {@code Promise} with move moved {@link Resource} - * @throws IllegalStateException if this resource could not be moved. Reasons include: - *

          - *
        • Resource already exists - *
        • Resource with path '/path' isn't a project - *
        - * - * @throws IllegalArgumentException if current resource can not be moved. Reasons include: - *
          - *
        • Workspace root is not allowed to be moved - *
        - * - * @see ResourceChangedEvent - * @see Resource - * @since 4.4.0 - */ - Promise move(Path destination, boolean force); - - /** - * Deletes current resource. Delete operation performs asynchronously and result of current - * operation will be displayed in {@code Promise} result as {@code void}. - * - *

        Fires following events: {@link ResourceChangedEvent} when resource has successfully removed. - * - *

        Example of usage: - * - *

        -   *     Resource resource = ... ;
        -   *
        -   *     resource.delete().then(new Operation() {
        -   *         public void apply(Void ignored) throws OperationException {
        -   *             //do something
        -   *         }
        -   *     })
        -   * 
        - * - *

        Fires {@link ResourceChangedEvent} with the following {@link ResourceDelta}: Delta kind: - * {@link ResourceDelta#REMOVED}. Removed resource provided by {@link ResourceDelta#getResource()} - * - * @return {@code Promise} with {@code void} - * @throws IllegalArgumentException if current resource can not be removed. Reasons include: - *

          - *
        • Workspace root is not allowed to be removed - *
        - * - * @see ResourceChangedEvent - * @since 4.4.0 - */ - Promise delete(); - - /** - * Returns the full, absolute path of this resource relative to the project's root. e.g. {@code - * "/project_name/path/to/resource"}. - * - * @return the absolute path of this resource - * @see Path - * @since 4.4.0 - */ - Path getLocation(); - - /** - * Returns the name of the resource. The name of a resource is synonymous with the last segment of - * its full (or project-relative) path. - * - * @return the name of the resource - * @since 4.4.0 - */ - String getName(); - - /** - * Returns the resource which is the parent of this resource or {@code null} if such parent - * doesn't exist. (This means that this resource is 'root' project) - * - * @return the resource's parent {@link Container} - * @see Container - * @since 5.1.0 - */ - Container getParent(); - - /** - * Returns the {@code Project} which contains this resource. Returns itself for projects. A - * resource's project is the one named by the first segment of its full path. - * - *

        By design, each node should be bound to specified {@link Project}. - * - * @return the {@link Optional} with related project - * @see Project - * @since 4.4.0 - * @deprecated use {@link #getProject()} - */ - @Deprecated - Optional getRelatedProject(); - - /** - * Returns the {@link Project} which is bound to this resource or {@code null}. - * - *

        Returns itself for projects. - * - * @return the bound instance of {@link Project} or null - * @since 5.1.0 - */ - @Nullable - Project getProject(); - - /** - * Returns the type of this resource. Th returned value will be on of {@code FILE}, {@code - * FOLDER}, {@code PROJECT}. - * - *

        - * - *

          - *
        • All resources of type {@code FILE} implement {@code File}. - *
        • All resources of type {@code FOLDER} implement {@code Folder}. - *
        • All resources of type {@code PROJECT} implement {@code Project}. - *
        - * - * @return the type of this resource - * @see #FILE - * @see #FOLDER - * @see #PROJECT - * @since 4.4.0 - */ - int getResourceType(); - - /** - * Returns the URL of this resource. The URL allows to download locally current resource. - * - *

        For container based resource the URL link will allow download container as zip archive. - * - * @return the URL of the resource - * @throws IllegalArgumentException if URL is requested on workspace root. Reasons include: - *

          - *
        • Workspace root doesn't have export URL - *
        - * - * @since 4.4.0 - */ - String getURL(); - - /** - * Returns the marker handle with given {@code type} for the resource. The resource is not checked - * to see if it has such a marker. The returned marker need not exist. - * - * @param type the known marker type - * @return the {@link Optional} with specified registered marker - * @throws IllegalArgumentException in case if given marker type is invalid (null or empty). - * Reasons include: - *
          - *
        • Invalid marker type occurred - *
        - * - * @see Marker#getType() - * @see #getMarkers() - * @since 4.4.0 - */ - Optional getMarker(String type); - - /** - * Returns all markers of the specified type on this resource. If there is no marker bound to the - * resource, then empty array will be returned. - * - * @return the array of markers - * @see #getMarker(String) - * @since 4.4.0 - */ - Marker[] getMarkers(); - - /** - * Bound given {@code marker} to current resource. if such marker is already bound to the resource - * it will be overwritten. - * - *

        Fires following events: {@link MarkerChangedEvent} with status {@link Marker#UPDATED} when - * existed marker has been replaced with new one. {@link MarkerChangedEvent} with status {@link - * Marker#CREATED} when marker has been added to the current resource. - * - * @param marker the resource marker - * @throws IllegalArgumentException in case if given marker is invalid. Reasons include: - *

          - *
        • Null marker occurred - *
        - * - * @see MarkerChangedEvent - * @since 4.4.0 - */ - void addMarker(Marker marker); - - /** - * Delete specified marker with given {@code type}. - * - *

        Fires following event: {@link MarkerChangedEvent} with status {@link Marker#REMOVED} when - * given marker has been removed from current resource. - * - * @param type the marker type - * @return true if specified marker removed - * @throws IllegalArgumentException in case if given marker type is invalid (null or empty). - * Reasons include: - *

          - *
        • Invalid marker type occurred - *
        - * - * @see Marker#getType() - * @see MarkerChangedEvent - * @since 4.4.0 - */ - boolean deleteMarker(String type); - - /** - * Delete all markers which is bound to current resource. - * - * @return true if all markers has been removed - * @since 4.4.0 - */ - boolean deleteAllMarkers(); - - /** - * Returns the nearest parent resource which has given marker {@code type}. - * - * @param type the marker type - * @return the {@link Optional} with specified registered marker - * @throws IllegalArgumentException in case if given marker type is invalid (null or empty). - * Reasons include: - *
          - *
        • Invalid marker type occurred - *
        - * - * @since 4.4.0 - */ - Optional getParentWithMarker(String type); - - /** {@inheritDoc} */ - @Override - boolean equals(Object other); - - /** {@inheritDoc} */ - @Override - int hashCode(); - - /** - * Base interface for resource modification request. - * - * @param the resource type, should extends {@link Resource} - * @param the body which is used to construct the request - * @see ProjectRequest - * @since 4.4.0 - */ - @Beta - interface Request { - - /** - * The body which is used to transform input data into request which is responsible for resource - * modification. - * - * @param object the request body - * @return instance of current {@link Request} - * @see #getBody() - * @since 4.4.0 - */ - Request withBody(O object); - - /** - * Returns the body which is used to transform input data into request. - * - * @return the request body - * @see #withBody(Object) - * @since 4.4.0 - */ - O getBody(); - - /** - * Sends the request to server and returns the {@link Promise} with new instance of {@link R} - * which belongs to provided request configuration. - * - *

        Uses to modify state of concrete resource. - * - * @return the {@link Promise} with new instance {@link R} - * @see Container#newProject() - * @see Container#importProject() - * @see Project#update() - * @since 4.4.0 - */ - Promise send(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceChangedEvent.java deleted file mode 100644 index 1d9d9ac24a6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceChangedEvent.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.common.annotations.Beta; -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Resource change events describe changes to resources. - * - *

        Each event has resource delta. Delta means some information, which was performed to a - * resource. To obtain information about specific type of event, then method {@link - * ResourceDelta#getKind()} should be called. - * - *

        Third party components should implement {@link ResourceChangedHandler} to handle resource - * event and subscribe this implementation in general event bus. - * - *

        Example of usage: - * - *

        - *     eventBus.addHandler(ResourceChangedEvent.getType(), new ResourceChangedHandler{
        - *         void onResourceChanged(ResourceChangedEvent event) {
        - *             ResourceDelta delta = event.getDelta();
        - *             Resource resource = delta.getResource();
        - *
        - *             if (delta.getKind() == ResourceDelta.ADDED) {
        - *                 //handle resource creation
        - *             }
        - *
        - *             if (delta.getKind() == ResourceDelta.REMOVED) {
        - *                 //handle resource removal
        - *             }
        - *
        - *             if (delta.getKind() == ResourceDelta.UPDATED) {
        - *                 //handle resource update
        - *             }
        - *         }
        - *     });
        - * 
        - * - * @author Vlad Zhukovskiy - * @see ResourceDelta - * @since 4.4.0 - */ -@Beta -public final class ResourceChangedEvent - extends GwtEvent { - - /** - * A resource change listener is notified of changes to resources in the workspace. These changes - * arise from direct manipulation of resources, or indirectly through re-synchronization with the - * local file system. - * - *

        Third party components may implement this interface to handle resource changes event. - * - * @since 4.4.0 - */ - public interface ResourceChangedHandler extends EventHandler { - - /** - * Notifies the listener that some resource changes are happening. The supplied event dives - * details. This event object (and the resource delta within it) is valid only for the duration - * of the invocation of this method. - * - * @param event instance of {@link ResourceChangedEvent} - * @see ResourceChangedEvent - * @since 4.4.0 - */ - void onResourceChanged(ResourceChangedEvent event); - } - - private static Type TYPE; - - public static Type getType() { - if (TYPE == null) { - TYPE = new Type<>(); - } - return TYPE; - } - - private ResourceDelta delta; - - public ResourceChangedEvent(ResourceDelta delta) { - this.delta = checkNotNull(delta, "Resource delta should not be a null"); - } - - /** - * Returns the resource delta. - * - * @return the resource delta - * @see ResourceDelta - * @since 4.4.0 - */ - public ResourceDelta getDelta() { - return delta; - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** {@inheritDoc} */ - @Override - protected void dispatch(ResourceChangedHandler handler) { - handler.onResourceChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceDelta.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceDelta.java deleted file mode 100644 index 93552ee0300..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceDelta.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.resource.Path; - -/** - * A resource delta represents changes in the state of concrete resource. - * - * @author Vlad Zhukovskiy - * @since @since 4.4.0 - * @see ExternalResourceDelta - */ -@Beta -public interface ResourceDelta { - - /* -- Delta kind -- */ - - /** - * Delta kind constant (bit mask) indicating that the resource has been added to its its parent. - * - * @see ResourceDelta#getKind() - * @since 4.4.0 - */ - int ADDED = 0x1; - - /** - * Delta kind constant (bit mask) indicating that the resource has been removed from its parent. - * - * @see ResourceDelta#getKind() - * @since 4.4.0 - */ - int REMOVED = 0x2; - - /** - * Delta kind constant (bit mask) indicating that the resource has been updated. - * - * @see ResourceDelta#getKind() - * @since 4.4.0 - */ - int UPDATED = 0x4; - - /** - * Delta kind constant (bit mask) indicating that resource (usually container-based) has been - * synchronized. - * - * @see ResourceDelta#getKind() - * @since 4.4.0 - */ - int SYNCHRONIZED = 0x8; - - /* -- Constants which describe resource changes -- */ - - /** - * Change constant (bit mask) indicating that the content of the resource has changed. - * - * @see ResourceDelta#getFlags() - * @since 4.4.0 - */ - int CONTENT = 0x100; - - /** - * Change constant (bit mask) indicating that the resource was moved from another location. The - * location can be retrieved using {@link ResourceDelta#getFromPath()} - * - * @see ResourceDelta#getFlags() - * @since 4.4.0 - */ - int MOVED_FROM = 0x200; - - /** - * Change constant (bit mask) indicating that the resource was moved to another location. The - * location can be retrieved using {@link ResourceDelta#getToPath()} - * - * @see ResourceDelta#getFlags() - * @since 4.4.0 - */ - int MOVED_TO = 0x400; - - /** - * Change constant (bit mask) indicating that the resource was copied from another location. The - * location can be retrieved using {@link ResourceDelta#getFromPath()} - * - * @see ResourceDelta#getFlags() - * @since 4.4.0 - */ - int COPIED_FROM = 0x800; - - /** - * Change constant (bit mask) indicating that the resource was generated after user actions, not - * automatically. - * - * @see ResourceDelta#getFlags() - * @since 4.4.0 - */ - int DERIVED = 0x1000; - - /** - * Returns the kind of this resource delta. Normally, one of {@code ADDED}, {@code REMOVED}, - * {@code UPDATED}, {@code LOADED}, {@code UNLOADED}. - * - * @return the kind of this resource delta. - * @see #ADDED - * @see #REMOVED - * @see #UPDATED - * @since 4.4.0 - */ - int getKind(); - - /** - * Returns flags which describe in more detail how a resource has been affected. - * - *

        The following codes (bit masks) are used when kind is {@code UPDATED}, and also when the - * resource is involved in a move: - * - *

          - *
        • {@code CONTENT} - The bytes contained by the resource have been altered, or - * IResource.touch has been called on the resource. - *
        • {@code MOVED_FROM} - The resource has moved. {@link #getFromPath()} will return the path - * of where it was moved from. - *
        • {@code MOVED_TO} - The resource has moved. {@link #getToPath()} ()} will return the path - * of where it was moved to. - *
        • {@code COPIED_FROM} - Change constant (bit mask) indicating that the resource was copied - * from another location. The location can be retrieved using {@link #getFromPath()}. - *
        - * - *

        A simple move operation would result in the following delta information. If a resource is - * moved from A to B (with no other changes to A or B), then A will have kind {@code REMOVED}, - * with flag {@code MOVED_TO}, and {@link #getToPath()} on A will return the path for B. B will - * have kind {@code ADDED}, with flag {@code MOVED_FROM}, and {@link #getFromPath()} on B will - * return the path for A. - * - * @return the flags - * @see #CONTENT - * @see #MOVED_FROM - * @see #MOVED_TO - * @see #COPIED_FROM - * @see #DERIVED - * @see #getKind() - * @see #getFromPath() - * @see #getToPath() - * @since 4.4.0 - */ - int getFlags(); - - /** - * Returns the path from which resource was moved. This value is valid if the {@code MOVED_FROM} - * or {@code COPIED_FROM} change flag is set, otherwise, {@code null} is returned. - * - * @return instance of {@link Path} or {@code null} - * @see #getToPath() - * @see #getFlags() - * @since 4.4.0 - */ - Path getFromPath(); - - /** - * Returns the path to which resource was moved. This value is valid if the {@code MOVED_TO} - * change flag is set, otherwise, {@code null} is returned. - * - * @return instance of {@link Path} or {@code null} - * @see #getFromPath() - * @see #getFlags() - * @since 4.4.0 - */ - Path getToPath(); - - /** - * Returns a handle for the affected resource. - * - * @return the affected resource - * @since 4.4.0 - */ - Resource getResource(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceInterceptor.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceInterceptor.java deleted file mode 100644 index e9beb4487b6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceInterceptor.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; - -/** - * Intercept resource which loads from the server and registers in internal client resource storage. - * - *

        This interface is designed to modifying the specific resource before it would be cached. For - * example any extension may create own implementation and set up specific markers for the given - * resource or any other operations specific to the resource. - * - * @author Vlad Zhukovskiy - * @since 4.4.0 - */ -@Beta -public interface ResourceInterceptor { - - /** - * Intercepts given {@code resource} and returns it. Implementation is allowed to modify given - * {@code resource}. - * - * @param resource the resource to intercept - * @return the modified resource - * @since 4.4.0 - */ - void intercept(Resource resource); - - /** - * Default implementation of {@link ResourceInterceptor} which is do nothing except returning - * given {@code resource}. - * - * @see ResourceInterceptor - * @since 4.4.0 - */ - class NoOpInterceptor implements ResourceInterceptor { - - /** {@inheritDoc} */ - @Override - public void intercept(Resource resource) { - // stub - } - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceNameComparator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceNameComparator.java deleted file mode 100644 index 97d69ce0af7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourceNameComparator.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import java.util.Comparator; - -/** - * Compares two {@link Resource} by their name ignoring case. - * - * @author Vlad Zhukovskiy - * @see Resource#getName() - * @since 4.4.0 - */ -@Beta -public class ResourceNameComparator implements Comparator { - - private static final ResourceNameComparator INSTANCE = new ResourceNameComparator(); - - private ResourceNameComparator() {} - - public static Comparator getInstance() { - return INSTANCE; - } - - /** {@inheritDoc} */ - @Override - public int compare(Resource o1, Resource o2) { - return o1.getName().compareToIgnoreCase(o2.getName()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourcePathComparator.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourcePathComparator.java deleted file mode 100644 index b2c6c48b369..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/ResourcePathComparator.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import java.util.Comparator; - -/** - * Compares two {@link Resource} by their name ignoring case. - * - * @author Vlad Zhukovskiy - * @see Resource#getName() - * @since 4.4.0 - */ -@Beta -public class ResourcePathComparator implements Comparator { - - private static final ResourcePathComparator INSTANCE = new ResourcePathComparator(); - - private ResourcePathComparator() {} - - public static Comparator getInstance() { - return INSTANCE; - } - - /** {@inheritDoc} */ - @Override - public int compare(Resource o1, Resource o2) { - return o1.getLocation().toString().compareTo(o2.getLocation().toString()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchItemReference.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchItemReference.java deleted file mode 100644 index 45019a77991..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchItemReference.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.project.shared.Constants; -import org.eclipse.che.api.project.shared.SearchOccurrence; -import org.eclipse.che.api.project.shared.dto.SearchOccurrenceDto; -import org.eclipse.che.api.project.shared.dto.SearchResultDto; - -/** @author Vitalii Parfonov */ -public class SearchItemReference { - - private String name; - private String path; - private String project; - private String contentUrl; - private List occurrences; - - public SearchItemReference(SearchResultDto searchResultDto) { - name = searchResultDto.getItemReference().getName(); - path = searchResultDto.getItemReference().getPath(); - project = searchResultDto.getItemReference().getProject(); - if (searchResultDto.getItemReference().getLink(Constants.LINK_REL_GET_CONTENT) != null) { - contentUrl = - searchResultDto.getItemReference().getLink(Constants.LINK_REL_GET_CONTENT).getHref(); - } - final List dtos = searchResultDto.getSearchOccurrences(); - occurrences = new ArrayList<>(dtos.size()); - for (SearchOccurrence dto : dtos) { - occurrences.add(new SearchOccurrenceImpl(dto)); - } - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getProject() { - return project; - } - - public void setProject(String project) { - this.project = project; - } - - public List getOccurrences() { - return occurrences; - } - - public void setOccurrences(List occurrences) { - this.occurrences = occurrences; - } - - public String getContentUrl() { - return contentUrl; - } - - public void setContentUrl(String contentUrl) { - this.contentUrl = contentUrl; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchOccurrenceImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchOccurrenceImpl.java deleted file mode 100644 index f378dff3935..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchOccurrenceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import org.eclipse.che.api.project.shared.SearchOccurrence; - -/** @author Vitalii Parfonov */ -public class SearchOccurrenceImpl implements SearchOccurrence { - - private float score; - private int endOffset; - private int startOffset; - private String phrase; - private String lineContent; - private int lineNumber; - - public SearchOccurrenceImpl(SearchOccurrence searchOccurrence) { - score = searchOccurrence.getScore(); - endOffset = searchOccurrence.getEndOffset(); - startOffset = searchOccurrence.getStartOffset(); - phrase = searchOccurrence.getPhrase(); - lineContent = searchOccurrence.getLineContent(); - lineNumber = searchOccurrence.getLineNumber(); - } - - @Override - public float getScore() { - return score; - } - - @Override - public void setScore(float score) { - this.score = score; - } - - @Override - public String getPhrase() { - return phrase; - } - - @Override - public void setPhrase(String phrase) { - this.phrase = phrase; - } - - @Override - public int getEndOffset() { - return endOffset; - } - - @Override - public void setEndOffset(int endOffset) { - this.endOffset = endOffset; - } - - @Override - public int getStartOffset() { - return startOffset; - } - - @Override - public void setStartOffset(int startOffset) { - this.startOffset = startOffset; - } - - @Override - public void setLineNumber(int lineNumber) { - this.lineNumber = lineNumber; - } - - @Override - public int getLineNumber() { - return lineNumber; - } - - @Override - public void setLineContent(String lineContent) { - this.lineContent = lineContent; - } - - @Override - public String getLineContent() { - return lineContent; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchResult.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchResult.java deleted file mode 100644 index 94ac54b3482..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SearchResult.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import java.util.List; - -/** Class contains an information about result of the text search operation. */ -public class SearchResult { - private List itemReferences; - private long totalHits; - - public SearchResult(List itemReferences, long totalHits) { - this.itemReferences = itemReferences; - this.totalHits = totalHits; - } - - /** returns list of found items {@link SearchItemReference} */ - public List getItemReferences() { - return itemReferences; - } - - /** returns total file count where requested text was found */ - public long getTotalHits() { - return totalHits; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SyntheticFile.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SyntheticFile.java deleted file mode 100644 index 5db821d4f09..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/SyntheticFile.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import com.google.common.annotations.Beta; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.resource.Path; - -/** - * Implementation for {@link VirtualFile} which describe resource which doesn't exist on file system - * and is auto generated. For example it may be effective version of such resource. - * - *

        This file doesn't have link to the content url. - * - * @author Vlad Zhukovskiy - * @see VirtualFile - */ -@Beta -public class SyntheticFile implements VirtualFile { - - private String name; - private String content; - private String displayName; - - public SyntheticFile(String name, String content) { - this(name, name, content); - } - - public SyntheticFile(String name, String displayName, String content) { - this.name = name; - this.displayName = displayName; - this.content = content; - } - - @Override - public Path getLocation() { - return Path.valueOf(name); - } - - @Override - public String getName() { - return name; - } - - @Override - public String getDisplayName() { - return displayName; - } - - @Override - public boolean isReadOnly() { - return true; - } - - @Override - public String getContentUrl() { - throw new UnsupportedOperationException(); - } - - @Override - public Promise getContent() { - return Promises.resolve(content); - } - - @Override - public Promise updateContent(String content) { - this.content = content; - - return Promises.resolve(null); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SyntheticFile)) return false; - SyntheticFile that = (SyntheticFile) o; - return Objects.equal(name, that.name) && Objects.equal(content, that.content); - } - - @Override - public int hashCode() { - return Objects.hashCode(name, content); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this).add("name", name).toString(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/VirtualFile.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/VirtualFile.java deleted file mode 100644 index 2b9d97871ff..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/VirtualFile.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources; - -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.resource.Path; - -/** - * Represents a file on the client side. Note, that virtual file instances are created by request, - * so in this case there can be several instances of virtual file that corresponds to the same file. - * - *

        Virtual file may has link to related {@code ProjectConfig}. - * - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -public interface VirtualFile { - - /** - * Returns path for the virtual file. Path may in various representation based on implementation. - * Usually it something like physical file or folder path, e.g. `/path/to/som/file`. Path should - * always be non-null or non-empty. - * - * @return non-null unique path. - * @since 4.4.0 - */ - Path getLocation(); - - /** - * Returns name for the virtual file. Name should always be non-null but it may be empty. - * - * @return non-null name. - */ - String getName(); - - /** - * Returns display name for the virtual file. Display name usually uses to display file name in - * editor tab or other places. Value should not be a {@code null}. - * - * @return non-null display name. - */ - String getDisplayName(); - - /** - * Returns {@code true} in case if virtual file doesn't have ability to be updated. - * - * @return {@code true} if file is read only, otherwise false. - */ - boolean isReadOnly(); - - /** - * Returns url string where file content may be fetched. Some file type can't represent their - * content as string. So virtual file provide url where it content. For example if this virtual - * file represent image, image viewer may use this URL as src for {@link - * com.google.gwt.user.client.ui.Image}. - * - * @return url or null if content url doesn't exist. - */ - String getContentUrl(); - - /** - * Get content of the file. Promise object should not be a null value. If implementation doesn't - * have ability to load string content of the current file, then preferable to throw {@code - * UnsupportedOperationException} in promise. - * - * @return {@code Promise} with string representation of file content. - */ - Promise getContent(); - - /** - * Update content of the file. Some implementations may not support updating their content, so in - * this case preferable to throw {@code UnsupportedOperationException} in promise. - * - * @param content new content of the file - * @return {@code Promise} with success operation if content has been updated. - */ - Promise updateContent(String content); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/Marker.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/Marker.java deleted file mode 100644 index f213b3c7038..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/Marker.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.marker; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.resources.Project.ProblemProjectMarker; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Markers are a general mechanism for associating notes and meta-data with resources. - * - *

        Each marker has a type string, specifying its unique id. The resources plugin defines only one - * standard marker (at this moment): {@link ProblemProjectMarker#PROBLEM_PROJECT}. - * - *

        Marker, by nature is only runtime attribute and doesn't store on the server side. - * - * @author Vlad Zhukovskiy - * @see Resource#getMarker(String) - * @see Resource#getMarkers() - * @see Resource#addMarker(Marker) - * @see Resource#deleteMarker(String) - * @since 4.4.0 - */ -@Beta -public interface Marker { - - /** - * Kind constant (bit mask) indicating that the marker has been created to given resource. - * - * @since 4.4.0 - */ - int CREATED = 0x1; - - /** - * Kind constant (bit mask) indicating that the marker has been removed from given resource. - * - * @since 4.4.0 - */ - int REMOVED = 0x2; - - /** - * Kind constant (bit mask) indicating that the marker has been updated to given resource. - * - * @since 4.4.0 - */ - int UPDATED = 0x4; - - /** - * Returns the type of this marker. The returned marker type will not be {@code null}. - * - * @return the type of this marker - * @since 4.4.0 - */ - String getType(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/MarkerChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/MarkerChangedEvent.java deleted file mode 100644 index 3e5cab319eb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/MarkerChangedEvent.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.marker; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.common.annotations.Beta; -import com.google.common.base.MoreObjects; -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Marker created event. This event fires when marker has been created. Created, means that marker - * has bound to the resource. - * - * @author Vlad Zhukovskiy - * @see Marker - * @since 4.4.0 - */ -@Beta -public class MarkerChangedEvent extends GwtEvent { - - /** - * A marker create listener is notified of marker creation to the specified resource. - * - *

        Third party components may implement this interface to handle marker creation event. - */ - public interface MarkerChangedHandler extends EventHandler { - - /** - * Notifies the listener that some marker has been created. - * - * @param event instance of {@link MarkerChangedEvent} - * @see MarkerChangedEvent - * @since 4.4.0 - */ - void onMarkerChanged(MarkerChangedEvent event); - } - - private static Type TYPE; - - public static Type getType() { - if (TYPE == null) { - TYPE = new Type<>(); - } - return TYPE; - } - - private final Resource resource; - private final Marker marker; - private final int status; - - public MarkerChangedEvent(Resource resource, Marker marker, int status) { - this.status = status; - this.resource = checkNotNull(resource, "Resource should not be a null"); - this.marker = checkNotNull(marker, "Marker should not be a null"); - } - - /** - * Returns the resource which is the host of specified marker. - * - * @return the resource - * @since 4.4.0 - */ - public final Resource getResource() { - return resource; - } - - /** - * Returns the marker which is bounded to resource provided by {@link #getResource()}. - * - * @return the marker - * @see Marker - * @since 4.4.0 - */ - public Marker getMarker() { - return marker; - } - - /** - * Returns the status of event. - * - * @return the status - * @see Marker#CREATED - * @see Marker#REMOVED - * @see Marker#UPDATED - * @since 4.4.0 - */ - public int getStatus() { - return status; - } - - /** {@inheritDoc} */ - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("resource", resource) - .add("marker", marker) - .add("status", status) - .toString(); - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** {@inheritDoc} */ - @Override - protected void dispatch(MarkerChangedHandler handler) { - handler.onMarkerChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/PresentableTextMarker.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/PresentableTextMarker.java deleted file mode 100644 index a48b0647d8d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/marker/PresentableTextMarker.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.marker; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Marker that provides the human presentable text for specific resource. - * - * @author Vlad Zhukovskiy - * @see Resource#getMarker(String) - * @since 4.4.0 - */ -@Beta -public class PresentableTextMarker implements Marker { - - public static final String ID = "displayNameMarker"; - - private String presentableText; - - public PresentableTextMarker(String presentableText) { - this.presentableText = presentableText; - } - - /** {@inheritDoc} */ - @Override - public String getType() { - return ID; - } - - /** - * Returns the human presentable text. - * - * @return the presentable text - * @since 4.4.0 - */ - public String getPresentableText() { - return presentableText; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/ClipboardManager.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/ClipboardManager.java deleted file mode 100644 index 8b810f41fdb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/ClipboardManager.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.modification; - -import com.google.common.annotations.Beta; - -/** - * Manages providers that maintain a clipboard. Provides are responsible for cut/copy/paste - * operations. - * - * @author Vlad Zhukovskiy - * @see CutProvider - * @see CopyProvider - * @see PasteProvider - * @since 4.4.0 - */ -@Beta -public interface ClipboardManager { - /** - * Returns the cut operation provider. - * - * @return the cut provider - * @see CutProvider - * @since 4.4.0 - */ - CutProvider getCutProvider(); - - /** - * Returns the copy operation provider. - * - * @return the copy provider - * @see CopyProvider - * @since 4.4.0 - */ - CopyProvider getCopyProvider(); - - /** - * Returns the paste operation provider. - * - * @return the paste provider - * @see PasteProvider - * @since 4.4.0 - */ - PasteProvider getPasteProvider(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CopyProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CopyProvider.java deleted file mode 100644 index a184f642777..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CopyProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.modification; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.app.AppContext; - -/** - * Provides ability to copy resources which is in given context. - * - *

        Provider checks whether elements in application context can be copied and if so, then copying - * the last ones. - * - *

        Note, that this interface is not intended to be implemented by third-party components. - * - *

        Examples of usage: - * - *

        - *     CopyPasteSupport copySupport = ... ;
        - *     AppContext appContext = ... ;
        - *
        - *     if (copySupport.getCopyProvider().isCopyEnable(appContext)) {
        - *         copySupport.getCopyProvider().performCopy(appContext);
        - *     }
        - * 
        - * - * @author Vlad Zhukovskiy - * @see ClipboardManager - * @see ClipboardManager#getCopyProvider() - * @since 4.4.0 - */ -@Beta -public interface CopyProvider { - /** - * Checks whether resources which is in context, can be copied. - * - * @param appContext the application context - * @return {@code true} if active resources can be copied, otherwise {@code false} - * @since 4.4.0 - */ - boolean isCopyEnable(AppContext appContext); - - /** - * Performs copying resources from the given application context. - * - * @param appContext the application context - * @since 4.4.0 - */ - void performCopy(AppContext appContext); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutProvider.java deleted file mode 100644 index c88b49c58f4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.modification; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.app.AppContext; - -/** - * Provides ability to cut resources which is in given context. - * - *

        Provider checks whether elements in application context can be cut and if so, then cutting the - * last ones. - * - *

        Note, that this interface is not intended to be implemented by third-party components. - * - *

        Examples of usage: - * - *

        - *     CopyPasteSupport copySupport = ... ;
        - *     AppContext appContext = ... ;
        - *
        - *     if (copySupport.getCutProvider().isCutEnable(appContext)) {
        - *         copySupport.getCutProvider().performCut(appContext);
        - *     }
        - * 
        - * - * @author Vlad Zhukovskiy - * @see ClipboardManager - * @see ClipboardManager#getCutProvider() - * @since 4.4.0 - */ -@Beta -public interface CutProvider { - /** - * Checks whether resources which is in context, can be cut. - * - * @param appContext the application context - * @return {@code true} if active resources can be cut, otherwise {@code false} - * @since 4.4.0 - */ - boolean isCutEnable(AppContext appContext); - - /** - * Performs cutting resources from the given application context. - * - * @param appContext the application context - * @since 4.4.0 - */ - void performCut(AppContext appContext); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutResourceMarker.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutResourceMarker.java deleted file mode 100644 index b49a0001340..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/CutResourceMarker.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.modification; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.resources.marker.Marker; - -/** - * Marker that indicates resource which is cut by {@link CutProvider}. - * - * @author Vlad Zhukovskiy - * @since 4.4.0 - */ -@Beta -public class CutResourceMarker implements Marker { - - public static final String ID = "cutResourceMarker"; - - @Override - public String getType() { - return ID; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/PasteProvider.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/PasteProvider.java deleted file mode 100644 index 9d389206ffd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/resources/modification/PasteProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.resources.modification; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.app.AppContext; - -/** - * Provides ability to paste resources which is in clipboard now. - * - *

        Provider checks whether elements in application context can be paste and if so, then paste the - * last ones. - * - *

        Note, that this interface is not intended to be implemented by third-party components. - * - *

        Examples of usage: - * - *

        - *     CopyPasteSupport copySupport = ... ;
        - *     AppContext appContext = ... ;
        - *
        - *     if (copySupport.getPasteProvider().isPastePossible(appContext)) {
        - *         copySupport.getPasteProvider().performPaste(appContext);
        - *     }
        - * 
        - * - * @author Vlad Zhukovskiy - * @see ClipboardManager - * @see ClipboardManager#getPasteProvider() () - * @since 4.4.0 - */ -@Beta -public interface PasteProvider { - /** - * Checks whether resources which is in clipboard context, can be paste. - * - * @param appContext the application context - * @return {@code true} if active resources can be paste, otherwise {@code false} - * @since 4.4.0 - */ - boolean isPastePossible(AppContext appContext); - - /** - * Performs pasting resources from the given clipboard context. - * - * @param appContext the application context - * @since 4.4.0 - */ - void performPaste(AppContext appContext); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/Selection.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/Selection.java deleted file mode 100644 index 937583687ee..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/Selection.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.selection; - -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * This class contains a single selected object or the bulk of selected objects. Selection can - * contain any type of Objects and any number of them.
        - * Single selection can be created using {@link Selection#Selection(Object)} constructor that accept - * one Object.
        - * Multiselection can be created with the help of {@link Selection#Selection(List)}. - * - * @author Nikolay Zamosenchuk - */ -public class Selection { - /** The selection. */ - private final List elements; - - /** The head of the selection. */ - private final T head; - - /** Creates an empty selection */ - public Selection() { - this.elements = java.util.Collections.emptyList(); - this.head = null; - } - - /** - * Creates SingleSelection, with only one item in it. - * - * @param item actual Selected object - */ - public Selection(final T item) { - if (item == null) { - this.elements = java.util.Collections.emptyList(); - this.head = null; - } else { - this.elements = java.util.Collections.singletonList(item); - this.head = item; - } - } - - public Selection(final List list) { - if (list == null || list.isEmpty()) { - this.elements = java.util.Collections.emptyList(); - this.head = null; - } else { - this.elements = list; - this.head = this.elements.get(0); - } - } - - public Selection(final List list, @NotNull final T head) { - this.elements = list; - this.head = head; - } - - public T getHeadElement() { - return this.head; - } - - /** - * Returns the first element of the selection. - * - * @return the first element of the selection - * @deprecated use {@link #getHeadElement()} - */ - @Deprecated - public T getFirstElement() { - return getHeadElement(); - } - - /** - * Tells if the selection is empty. - * - * @return true if Selection is empty - */ - public boolean isEmpty() { - return this.elements.isEmpty(); - } - - /** @return true if Selection contains only one element. */ - public boolean isSingleSelection() { - return this.elements.size() == 1; - } - - public boolean isMultiSelection() { - return this.elements.size() > 1; - } - - /** - * Returns all the selected elements. - * - * @return all the selected elements. - * @deprecated use {@link #getAllElements()} - */ - @Deprecated - public List getAll() { - final List copy = new ArrayList<>(); - for (final T item : this.elements) { - copy.add(item); - } - return copy; - } - - /** - * Returns all the selected elements. - * - * @return all the selected elements. - */ - public List getAllElements() { - return new ArrayList<>(this.elements); - } - - public static class NoSelectionProvided extends Selection {} -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionAgent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionAgent.java deleted file mode 100644 index 11ebb5e6154..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionAgent.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.selection; - -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.api.extension.SDK; - -/** - * Selection API allows to provide a way of data-based communication, when Parts provide a static - * access to the data selected in active Part. In order to listen to dynamic Selection changes, - * please subscribe to {@link SelectionChangedEvent} on {@link EventBus}. - * - * @author Nikolay Zamosenchuk - */ -@SDK(title = "ide.api.ui.selection") -public interface SelectionAgent { - - /** - * Provides a way of getting current app-wide Selection. - * - * @return - */ - Selection getSelection(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedEvent.java deleted file mode 100644 index 9ae94a74702..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedEvent.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.selection; - -import com.google.gwt.event.shared.GwtEvent; - -/** - * Event that notifies of changed Selection - * - * @author Nikolay Zamosenchuk - */ -public class SelectionChangedEvent extends GwtEvent { - public static Type TYPE = new Type<>(); - - private final Selection selection; - - /** @param selection new selection */ - public SelectionChangedEvent(Selection selection) { - this.selection = selection; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** @return current selection */ - public Selection getSelection() { - return selection; - } - - @Override - protected void dispatch(SelectionChangedHandler handler) { - handler.onSelectionChanged(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedHandler.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedHandler.java deleted file mode 100644 index 001c700225d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/SelectionChangedHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.selection; - -import com.google.gwt.event.shared.EventHandler; - -/** - * Handles the Selection Changed Event - * - * @author Nikolay Zamosenchuk - */ -public interface SelectionChangedHandler extends EventHandler { - /** - * Selection Changed - * - * @param event - */ - void onSelectionChanged(SelectionChangedEvent event); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ssh/SshServiceClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ssh/SshServiceClient.java deleted file mode 100644 index 23a0303a009..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/ssh/SshServiceClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.ssh; - -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.ssh.shared.dto.SshPairDto; - -/** - * The client service for working with ssh keys. - * - * @author Sergii Leschenko - */ -public interface SshServiceClient { - /** Gets ssh pairs of given service */ - Promise> getPairs(String service); - - /** - * Gets ssh pair of given service and specific name - * - * @param service the service name - * @param name the identifier of one the pair - */ - Promise getPair(String service, String name); - - /** Generates new ssh key pair with given service and name */ - Promise generatePair(String service, String name); - - /** Deletes ssh pair with given service and name */ - Promise deletePair(String service, String name); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/AppStateServiceClient.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/AppStateServiceClient.java deleted file mode 100644 index b8f690c51ae..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/AppStateServiceClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.statepersistance; - -import elemental.json.JsonFactory; -import org.eclipse.che.api.promises.client.Promise; - -/** - * Service allows to load or persist IDE state for current user. - * - * @author Roman Nikitenko - */ -public interface AppStateServiceClient { - - /** - * Load saved IDE state for current workspace in JSON format. Use {@link - * JsonFactory#parse(String)} to get corresponding object. Note: it is expected that saved IDE - * state object is valid, so any validations are not performed. - */ - Promise loadState(); - - /** - * Save IDE state for current workspace. - * - * @param state IDE state in JSON format. - */ - Promise saveState(String state); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/StateComponent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/StateComponent.java deleted file mode 100644 index d155f9ac5d0..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/statepersistance/StateComponent.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.statepersistance; - -import elemental.json.JsonObject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; - -/** - * Defines requirements for a component which would like to persist some state of workspace across - * sessions. - * - *

        Implementations of this interface need to be registered using a multibinder in order to be - * picked-up on IDE start-up: - * - *

        - * GinMultibinder stateComponents = GinMultibinder.newSetBinder(binder(), StateComponent.class); - * stateComponents.addBinding().to(Foo.class); - * - * - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -public interface StateComponent { - - /** - * The minimum priority that state component can have. - * - * @see #getPriority() - * @since 5.16.0 - */ - int MIN_PRIORITY = 1; - - /** - * The default priority that is assigned to a state component. - * - * @see #getPriority() - * @since 5.16.0 - */ - int DEFAULT_PRIORITY = 5; - - /** - * The maximum priority that state component can have. - * - * @see #getPriority() - * @since 5.16.0 - */ - int MAX_PRIORITY = 10; - - /** - * Identifier of the component which may have persistent state. Usually uses to identify from the - * raw json. - * - * @return component id, any string value, non-null and non-empty. If null occurred, then - * component is not take a part in serialization - * @since 5.16.0 - */ - String getId(); - - /** - * Called when component should store his state. - * - * @return the JSON object that represent state of the component. - */ - @NotNull - JsonObject getState(); - - /** - * Called when component should restore his state. - * - * @param state the component state object - */ - Promise loadState(@NotNull JsonObject state); - - /** - * Priority of the execution. Each component may be prioritized to execute one self. Values should - * be from 1 (the last one to execute) to 10 (should be executed as first). Default value is 5. - * - * @return priority for the interceptor in which it should be run - * @see #MIN_PRIORITY - * @see #DEFAULT_PRIORITY - * @see #MAX_PRIORITY - * @since 5.16.0 - */ - default int getPriority() { - return DEFAULT_PRIORITY; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Style.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Style.java deleted file mode 100644 index 1910eeb244c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Style.java +++ /dev/null @@ -1,668 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.theme; - -/** - * This class contains constants for style. Fields initialized from user preferences. Static methods - * used for bridging with CssResources - * - * @author Evgen Vidolob - */ -public class Style { - - public static Theme theme; - - public static String getEditorTabIconColor() { - return theme.getEditorTabIconColor(); - } - - public static String getLogoFill() { - return theme.getLogoFill(); - } - - public static String getMainFontColor() { - return theme.getMainFontColor(); - } - - public static String getLoaderProgressStatusColor() { - return theme.loaderProgressStatusColor(); - } - - public static String getRadioButtonBackgroundColor() { - return theme.getRadioButtonBackgroundColor(); - } - - public static String getCommandsToolbarBackgroundColor() { - return theme.getCommandsToolbarBackgroundColor(); - } - - public static String getCommandsToolbarProcessesLabelBackground() { - return theme.getCommandsToolbarProcessesLabelBackground(); - } - - public static String getCommandsToolbarProcessesLabelBorder() { - return theme.getCommandsToolbarProcessesLabelBorder(); - } - - public static String getCommandsToolbarMachineNameColor() { - return theme.getCommandsToolbarMachineNameColor(); - } - - public static String getCommandsToolbarCommandNameColor() { - return theme.getCommandsToolbarCommandNameColor(); - } - - public static String getCommandEditorProjectsTableHeaderColor() { - return theme.getCommandEditorProjectsTableHeaderColor(); - } - - public static String getCommandEditorProjectsTableRowColor() { - return theme.getCommandEditorProjectsTableRowColor(); - } - - public static String getCommandEditorProjectSwitcherBorder() { - return theme.getCommandEditorProjectSwitcherBorder(); - } - - public static String getDialogContentBackground() { - return theme.getDialogContentBackground(); - } - - public static String getDropdownListBackground() { - return theme.getDropdownListBackground(); - } - - public static String getHoveredDropdownListBackground() { - return theme.getHoveredDropdownListBackground(); - } - - public static String getActiveDropdownListBackground() { - return theme.getActiveDropdownListBackground(); - } - - public static String getDropdownListBorder() { - return theme.getDropdownListBorder(); - } - - public static String getDropdownListButtonColor() { - return theme.getDropdownListButtonColor(); - } - - public static String getMenuButtonBackground() { - return theme.getMenuButtonBackground(); - } - - public static String getHoveredMenuButtonBackground() { - return theme.getHoveredMenuButtonBackground(); - } - - public static String getActiveMenuButtonBackground() { - return theme.getActiveMenuButtonBackground(); - } - - public static String getActiveMenuButtonBorder() { - return theme.getMenuButtonBorder(); - } - - public static String getButtonBackground() { - return theme.getButtonBackground(); - } - - public static String getButtonBorderColor() { - return theme.getButtonBorderColor(); - } - - public static String getButtonFontColor() { - return theme.getButtonFontColor(); - } - - public static String getButtonHoverBackground() { - return theme.getButtonHoverBackground(); - } - - public static String getButtonHoverBorderColor() { - return theme.getButtonHoverBorderColor(); - } - - public static String getButtonHoverFontColor() { - return theme.getButtonHoverFontColor(); - } - - public static String getButtonClickedBackground() { - return theme.getButtonClickedBackground(); - } - - public static String getButtonClickedBorderColor() { - return theme.getButtonClickedBorderColor(); - } - - public static String getButtonClickedFontColor() { - return theme.getButtonClickedFontColor(); - } - - public static String getButtonDisabledBackground() { - return theme.getButtonDisabledBackground(); - } - - public static String getButtonDisabledBorderColor() { - return theme.getButtonDisabledBorderColor(); - } - - public static String getButtonDisabledFontColor() { - return theme.getButtonDisabledFontColor(); - } - - public static String getPrimaryButtonBackground() { - return theme.getPrimaryButtonBackground(); - } - - public static String getPrimaryButtonBorderColor() { - return theme.getPrimaryButtonBorderColor(); - } - - public static String getPrimaryButtonFontColor() { - return theme.getPrimaryButtonFontColor(); - } - - public static String getPrimaryButtonHoverBackground() { - return theme.getPrimaryButtonHoverBackground(); - } - - public static String getPrimaryButtonHoverBorderColor() { - return theme.getPrimaryButtonHoverBorderColor(); - } - - public static String getPrimaryButtonHoverFontColor() { - return theme.getPrimaryButtonHoverFontColor(); - } - - public static String getPrimaryButtonClickedBackground() { - return theme.getPrimaryButtonClickedBackground(); - } - - public static String getPrimaryButtonClickedBorderColor() { - return theme.getPrimaryButtonClickedBorderColor(); - } - - public static String getPrimaryButtonClickedFontColor() { - return theme.getPrimaryButtonClickedFontColor(); - } - - public static String getPrimaryButtonDisabledBackground() { - return theme.getPrimaryButtonDisabledBackground(); - } - - public static String getPrimaryButtonDisabledBorderColor() { - return theme.getPrimaryButtonDisabledBorderColor(); - } - - public static String getPrimaryButtonDisabledFontColor() { - return theme.getPrimaryButtonDisabledFontColor(); - } - - public static String getNotableButtonTopColor() { - return theme.getNotableButtonTopColor(); - } - - public static String getNotableButtonColor() { - return theme.getNotableButtonColor(); - } - - public static String getSocialButtonColor() { - return theme.getSocialButtonColor(); - } - - public static String getEditorBackgroundColor() { - return theme.getEditorBackgroundColor(); - } - - public static String getEditorCurrentLineColor() { - return theme.getEditorCurrentLineColor(); - } - - public static String getEditorDefaultFontColor() { - return theme.getEditorDefaultFontColor(); - } - - public static String getEditorSelectionColor() { - return theme.getEditorSelectionColor(); - } - - public static String getEditorInactiveSelectionColor() { - return theme.getEditorInactiveSelectionColor(); - } - - public static String getEditorCursorColor() { - return theme.getEditorCursorColor(); - } - - public static String getEditorGutterColor() { - return theme.getEditorGutterColor(); - } - - // syntax - public static String getEditorKeyWord() { - return theme.getEditorKeyWord(); - } - - public static String getEditorAtom() { - return theme.getEditorAtom(); - } - - public static String getEditorNumber() { - return theme.getEditorNumber(); - } - - public static String getEditorDef() { - return theme.getEditorDef(); - } - - public static String getEditorVariable() { - return theme.getEditorVariable(); - } - - public static String getEditorVariable2() { - return theme.getEditorVariable2(); - } - - public static String getEditorProperty() { - return theme.getEditorProperty(); - } - - public static String getEditorOperator() { - return theme.getEditorOperator(); - } - - public static String getEditorComment() { - return theme.getEditorComment(); - } - - public static String getEditorString() { - return theme.getEditorString(); - } - - public static String getEditorString2() { - return theme.getEditorString2(); - } - - public static String getEditorMeta() { - return theme.getEditorMeta(); - } - - public static String getEditorError() { - return theme.getEditorError(); - } - - public static String getEditorBuiltin() { - return theme.getEditorBuiltin(); - } - - public static String getEditorTag() { - return theme.getEditorTag(); - } - - public static String getEditorAttribute() { - return theme.getEditorAttribute(); - } - - public static String getWindowContentBackground() { - return theme.getWindowContentBackground(); - } - - public static String getWindowContentFontColor() { - return theme.getWindowContentFontColor(); - } - - public static String getWindowShadowColor() { - return theme.getWindowShadowColor(); - } - - public static String getWindowHeaderBackground() { - return theme.getWindowHeaderBackground(); - } - - public static String getWindowHeaderBorderColor() { - return theme.getWindowHeaderBorderColor(); - } - - public static String getWindowFooterBackground() { - return theme.getWindowFooterBackground(); - } - - public static String getWindowFooterBorderColor() { - return theme.getWindowFooterBorderColor(); - } - - public static String getWindowSeparatorColor() { - return theme.getWindowSeparatorColor(); - } - - public static String getWindowTitleFontColor() { - return theme.getWindowTitleFontColor(); - } - - public static String getWizardStepsColor() { - return theme.getWizardStepsColor(); - } - - public static String getWizardStepsBorderColor() { - return theme.getWizardStepsBorderColor(); - } - - public static String getWelcomeFontColor() { - return theme.getWelcomeFontColor(); - } - - public static String getCaptionFontColor() { - return theme.getCaptionFontColor(); - } - - public static String getFactoryLinkColor() { - return theme.getFactoryLinkColor(); - } - - public static String getStatusPanelColor() { - return theme.getStatusPanelColor(); - } - - public static String getCellOddRow() { - return theme.getCellOddRowColor(); - } - - public static String getCellEvenRow() { - return theme.getCellOddEvenColor(); - } - - public static String getCellKeyboardSelectedRow() { - return theme.getCellKeyboardSelectedRowColor(); - } - - public static String getCellHoveredRow() { - return theme.getCellHoveredRow(); - } - - public static String getMainMenuBkgColor() { - return theme.getMainMenuBkgColor(); - } - - public static String getMainMenuSelectedBkgColor() { - return theme.getMainMenuSelectedBkgColor(); - } - - public static String getMainMenuSelectedBorderColor() { - return theme.getMainMenuSelectedBorderColor(); - } - - public static String getMainMenuFontColor() { - return theme.getMainMenuFontColor(); - } - - public static String getMainMenuFontHoverColor() { - return theme.getMainMenuFontHoverColor(); - } - - public static String getMainMenuFontSelectedColor() { - return theme.getMainMenuFontSelectedColor(); - } - - public static String getToolbarBackgroundImage() { - return theme.getToolbarBackgroundImage(); - } - - public static String getToolbarActionGroupShadowColor() { - return theme.getToolbarActionGroupShadowColor(); - } - - public static String getToolbarActionGroupBackgroundColor() { - return theme.getToolbarActionGroupBackgroundColor(); - } - - public static String getToolbarActionGroupBorderColor() { - return theme.getToolbarActionGroupBorderColor(); - } - - public static String getToolbarBackgroundColor() { - return theme.getToolbarBackgroundColor(); - } - - public static String getToolbarIconColor() { - return theme.getToolbarIconColor(); - } - - public static String getToolbarHoverIconColor() { - return theme.getToolbarHoverIconColor(); - } - - public static String getToolbarSelectedIconFilter() { - return theme.getToolbarSelectedIconFilter(); - } - - public static String getTooltipBackgroundColor() { - return theme.getTooltipBackgroundColor(); - } - - public static String getPerspectiveSwitcherBackgroundColor() { - return theme.getPerspectiveSwitcherBackgroundColor(); - } - - public static String getSelectCommandActionIconColor() { - return theme.getSelectCommandActionIconColor(); - } - - public static String getSelectCommandActionIconBackgroundColor() { - return theme.getSelectCommandActionIconBackgroundColor(); - } - - public static String getSelectCommandActionColor() { - return theme.getSelectCommandActionColor(); - } - - public static String getSelectCommandActionHoverColor() { - return theme.getSelectCommandActionHoverColor(); - } - - public static String getSuccessEventColor() { - return theme.getSuccessEventColor(); - } - - public static String getErrorEventColor() { - return theme.getErrorEventColor(); - } - - public static String getLinkColor() { - return theme.getLinkColor(); - } - - public static String getDelimeterColor() { - return theme.getDelimeterColor(); - } - - public static String getOutputLinkColor() { - return theme.getOutputLinkColor(); - } - - public static String getEditorInfoBackgroundColor() { - return theme.getEditorInfoBackgroundColor(); - } - - public static String getEditorInfoTextColor() { - return theme.editorInfoTextColor(); - } - - public static String getEditorInfoBorderColor() { - return theme.getEditorInfoBorderColor(); - } - - public static String getEditorInfoBorderShadowColor() { - return theme.getEditorInfoBorderShadowColor(); - } - - public static String getEditorLineNumberColor() { - return theme.getEditorLineNumberColor(); - } - - public static String getEditorSeparatorColor() { - return theme.getEditorSeparatorColor(); - } - - public static String getBlueIconColor() { - return theme.getBlueIconColor(); - } - - public static String getSplitterSmallBorderColor() { - return theme.getSplitterSmallBorderColor(); - } - - public static String getSplitterLargeBorderColor() { - return theme.getSplitterLargeBorderColor(); - } - - public static String getBadgeBackgroundColor() { - return theme.getBadgeBackgroundColor(); - } - - public static String getBadgeFontColor() { - return theme.getBadgeFontColor(); - } - - public static String getPopupBkgColor() { - return theme.getPopupBkgColor(); - } - - public static String getPopupBorderColor() { - return theme.getPopupBorderColor(); - } - - public static String getPopupShadowColor() { - return theme.getPopupShadowColor(); - } - - public static String getPopupHoverColor() { - return theme.getPopupHoverColor(); - } - - public static String getPopupHotKeyColor() { - return theme.getPopupHotKeyColor(); - } - - public static String getTextFieldTitleColor() { - return theme.getTextFieldTitleColor(); - } - - public static String getTextFieldColor() { - return theme.getTextFieldColor(); - } - - public static String getTextFieldBackgroundColor() { - return theme.getTextFieldBackgroundColor(); - } - - public static String getTextFieldFocusedColor() { - return theme.getTextFieldFocusedColor(); - } - - public static String getTextFieldFocusedBackgroundColor() { - return theme.getTextFieldFocusedBackgroundColor(); - } - - public static String getTextFieldDisabledColor() { - return theme.getTextFieldDisabledColor(); - } - - public static String getTextFieldDisabledBackgroundColor() { - return theme.getTextFieldDisabledBackgroundColor(); - } - - public static String getTextFieldBorderColor() { - return theme.getTextFieldBorderColor(); - } - - public static String getMenuBackgroundColor() { - return theme.getMenuBackgroundColor(); - } - - public static String getMenuBackgroundImage() { - return theme.getMenuBackgroundImage(); - } - - public static String getPanelBackgroundColor() { - return theme.getPanelBackgroundColor(); - } - - public static String getPrimaryHighlightsColor() { - return theme.getPrimaryHighlightColor(); - } - - public static String getSeparatorColor() { - return theme.getSeparatorColor(); - } - - public static String getErrorColor() { - return theme.getErrorColor(); - } - - public static String getSuccessColor() { - return theme.getSuccessColor(); - } - - public static String getListBoxHoverBackgroundColor() { - return theme.getListBoxHoverBackgroundColor(); - } - - public static String getListBoxColor() { - return theme.getListBoxColor(); - } - - public static String getListBoxDisabledColor() { - return theme.getListBoxDisabledColor(); - } - - public static String getListBoxDisabledBackgroundColor() { - return theme.getListBoxDisabledBackgroundColor(); - } - - public static String getListBoxDropdownBackgroundColor() { - return theme.getListBoxDropdownBackgroundColor(); - } - - public static String getVcsConsoleStagedFilesColor() { - return theme.vcsConsoleStagedFilesColor(); - } - - public static String getVcsConsoleUnstagedFilesColor() { - return theme.vcsConsoleUnstagedFilesColor(); - } - - public static String getVcsConsoleErrorColor() { - return theme.vcsConsoleErrorColor(); - } - - public static String getVcsConsoleModifiedFilesColor() { - return theme.vcsConsoleModifiedFilesColor(); - } - - public static String getVcsConsoleChangesLineNumbersColor() { - return theme.vcsConsoleChangesLineNumbersColor(); - } - - public static String getVcsStatusAddedColor() { - return theme.vcsStatusAddedColor(); - } - - public static String getVcsStatusModifiedColor() { - return theme.vcsStatusModifiedColor(); - } - - public static String getVcsStatusUntrackedColor() { - return theme.vcsStatusUntrackedColor(); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Theme.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Theme.java deleted file mode 100644 index 5402af96edc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/Theme.java +++ /dev/null @@ -1,1725 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.theme; - -/** - * Theme is a collection of colors, fonts and supporting data that may be used by plugins to help - * provide uniform look and feel to their components. Note:
        - * In this interface color means CSS color i.e : #eeeeee, rgb(1,1,1), rgba(1,1,1,1), red etc. - * - * @author Evgen Vidolob - */ -public interface Theme { - - /** @return the theme id */ - String getId(); - - /** @return the description of the theme */ - String getDescription(); - - /** - * Global background color. - * - * @return the color - */ - String backgroundColor(); - - /** return the logo color */ - String getLogoFill(); - - /** - * This color used in toolbar for highlight hovered items - * - * @return the color - */ - String hoverBackgroundColor(); - - /** - * Background color for an item selected with the keyboard - * - * @return the color - */ - String keyboardSelectionBackgroundColor(); - - /** - * Background color for selected items in CellWidgets, menu, toolbar - * - * @return the color - */ - String selectionBackground(); - - /** - * Background color for selected text in input fields. - * - * @return the color - */ - String inputSelectionBackground(); - - /** - * Background color for inactive selection. - * - * @return the color - */ - String inactiveSelectionBackground(); - - /** - * Background color for inactive(not selected part button) - * - * @return the color - */ - String inactiveTabBackground(); - - /** - * Border color for inactive(not selected part button) - * - * @return the color - */ - String inactiveTabBorderColor(); - - /** - * Background color for active (selected) part button - * - * @return the color - */ - String activeTabBackground(); - - /** - * Border color for active (selected) part button - * - * @return the color - */ - String activeTabBorderColor(); - - /** - * Text color for active (selected) part button - * - * @return the color - */ - String activeTabTextColor(); - - /** - * Text shadow for active tab. - * - * @return text shadow - */ - String activeTabTextShadow(); - - /** - * Text color for part button. - * - * @return the color - */ - String tabTextColor(); - - /** - * Text color for hovered part button. - * - * @return the color - */ - String hoveredTabTextColor(); - - /** - * Icon color for editor tab. - * - * @return color - */ - String getEditorTabIconColor(); - - /** - * Background color for active (selected) editor tab. - * - * @return color - */ - String activeEditorTabBackgroundColor(); - - /** - * Background color for readonly editor tab. - * - * @return color - */ - String editorReadonlyTabBackgroundColor(); - - /** - * Background color for readonly active (selected) editor tab. - * - * @return color - */ - String activeEditorReadonlyTabBackgroundColor(); - - /** - * Background color for focused editor tab. - * - * @return color - */ - String focusedEditorTabBackgroundColor(); - - /** - * Bottom border (underline) color for focused editor tab. - * - * @return color - */ - String focusedEditorTabBorderBottomColor(); - - /** - * Background color of part stack panel(where placed part button) - * - * @return the color - */ - String tabsPanelBackground(); - - /** - * Border color of the tab(part button) - * - * @return the color - */ - String tabBorderColor(); - - /** - * Color to underline active tab - * - * @return - */ - String tabUnderlineColor(); - - /** - * Background color of the tab(part button) - * - * @return - */ - String partBackground(); - - /** - * Background color of the part toolbar panel - * - * @return the color - */ - String partToolbar(); - - /** - * Background color for selected (active) part toolbar - * - * @return the color - */ - String partToolbarActive(); - - /** - * Shadow color(css box-shadow property) of the part toolbar - * - * @return the color - */ - String partToolbarShadow(); - - /** - * First top line's color of the part toolbar separator. - * - * @return the color - */ - String partToolbarSeparatorTopColor(); - - /** - * Second bottom line's color of the part toolbar separator. - * - * @return the color - */ - String partToolbarSeparatorBottomColor(); - - /** - * Color of the main font - * - * @return the color - */ - String getMainFontColor(); - - /** - * Background color of the {@link com.google.gwt.user.client.ui.RadioButton} - * - * @return the color - */ - String getRadioButtonBackgroundColor(); - - /** - * Background color of the disabled menu item - * - * @return the color - */ - String getDisabledMenuColor(); - - /** Background color of the Commands toolbar. */ - String getCommandsToolbarBackgroundColor(); - - /** Background of the Processes list's label on the Commands toolbar. */ - String getCommandsToolbarProcessesLabelBackground(); - - /** Border of the Processes list's label on the Commands toolbar. */ - String getCommandsToolbarProcessesLabelBorder(); - - /** Color of the machine name label on the Commands toolbar. */ - String getCommandsToolbarMachineNameColor(); - - /** Color of the command name label on the Commands toolbar. */ - String getCommandsToolbarCommandNameColor(); - - /** Color of the projects table's header in the command editor. */ - String getCommandEditorProjectsTableHeaderColor(); - - /** Color of the projects table's row in the command editor. */ - String getCommandEditorProjectsTableRowColor(); - - /** Border of the project switcher in the command editor. */ - String getCommandEditorProjectSwitcherBorder(); - - /** - * Background color of the {@link com.google.gwt.user.client.ui.DialogBox} - * - * @return the color - */ - String getDialogContentBackground(); - - /** Background of the DropdownList widget. */ - String getDropdownListBackground(); - - /** Color of the ExecLabel for DropdownList widget. */ - String getDropdownListExecLabelColor(); - - /** Background of the ExecLabel for DropdownList widget. */ - String getDropdownListExecLabelBackground(); - - /** Background of the hovered DropdownList widget. */ - String getHoveredDropdownListBackground(); - - /** Background of the active DropdownList widget. */ - String getActiveDropdownListBackground(); - - /** Border of the DropdownList widget. */ - String getDropdownListBorder(); - - /** Color of the button for opening DropdownList. */ - String getDropdownListButtonColor(); - - /** Background of the MenuButton widget. */ - String getMenuButtonBackground(); - - /** Background of the hovered MenuButton widget. */ - String getHoveredMenuButtonBackground(); - - /** Background of the active MenuButton widget. */ - String getActiveMenuButtonBackground(); - - /** Border of the MenuButton widget. */ - String getMenuButtonBorder(); - - /** Background color of Toolbar controller menu button. */ - String toolbarControllerBackground(); - - /** Left border color of Toolbar controller menu button. */ - String toolbarControllerLeftColor(); - - /** Top border color of Toolbar controller menu button. */ - String toolbarControllerTopColor(); - - /** - * Background color of default button. - * - * @return the color - */ - String getButtonBackground(); - - /** - * Border color of default button. - * - * @return the color - */ - String getButtonBorderColor(); - - /** - * Font color of default button. - * - * @return the color - */ - String getButtonFontColor(); - - /** - * Background color of default button hover state. - * - * @return the color - */ - String getButtonHoverBackground(); - - /** - * Border color of default button hover state. - * - * @return the color - */ - String getButtonHoverBorderColor(); - - /** - * Font color of default button hover state. - * - * @return the color - */ - String getButtonHoverFontColor(); - - /** - * Background color of default button clicked state. - * - * @return the color - */ - String getButtonClickedBackground(); - - /** - * Border color of default button clicked state. - * - * @return the color - */ - String getButtonClickedBorderColor(); - - /** - * Font color of default button clicked state. - * - * @return the color - */ - String getButtonClickedFontColor(); - - /** - * Background color of default button disabled state. - * - * @return the color - */ - String getButtonDisabledBackground(); - - /** - * Border color of default button disabled state. - * - * @return the color - */ - String getButtonDisabledBorderColor(); - - /** - * Font color of default button disabled state. - * - * @return the color - */ - String getButtonDisabledFontColor(); - - /** - * Background color of primary button normal state. - * - * @return the color - */ - String getPrimaryButtonBackground(); - - /** - * Border color of primary button normal state. - * - * @return the color - */ - String getPrimaryButtonBorderColor(); - - /** - * Font color of primary button normal state. - * - * @return the color - */ - String getPrimaryButtonFontColor(); - - /** - * Background color of primary button hover state. - * - * @return the color - */ - String getPrimaryButtonHoverBackground(); - - /** - * Border color of primary button hover state. - * - * @return the color - */ - String getPrimaryButtonHoverBorderColor(); - - /** - * Font color of primary button hover state. - * - * @return the color - */ - String getPrimaryButtonHoverFontColor(); - - /** - * Background color of primary button clicked state. - * - * @return the color - */ - String getPrimaryButtonClickedBackground(); - - /** - * Border color of primary button clicked state. - * - * @return the color - */ - String getPrimaryButtonClickedBorderColor(); - - /** - * Font color of primary button clicked state. - * - * @return the color - */ - String getPrimaryButtonClickedFontColor(); - - /** - * Background color of primary button disabled state. - * - * @return the color - */ - String getPrimaryButtonDisabledBackground(); - - /** - * Border color of primary button disabled state. - * - * @return the color - */ - String getPrimaryButtonDisabledBorderColor(); - - /** - * Font color of primary button disabled state. - * - * @return the color - */ - String getPrimaryButtonDisabledFontColor(); - - /** - * Color of the social button for sharing factory. - * - * @return the color - */ - String getSocialButtonColor(); - - /** - * Background for editor panel ( place where the editor will be placed ) - * - * @return color for editor panel - */ - String editorPanelBackgroundColor(); - - /** - * Background color for editor tabs panel. - * - * @return the color - */ - String editorTabsBackgroundColor(); - - /** @return border color for editor panel */ - String editorPanelBorderColor(); - - /** - * Background color of the editor - * - * @return the color - */ - String getEditorBackgroundColor(); - - /** - * Color for highlighted line in editor(where cursor placed) - * - * @return the color - */ - String getEditorCurrentLineColor(); - - /** - * Main font color in the editor - * - * @return the color - */ - String getEditorDefaultFontColor(); - - /** - * Editor selection background color. - * - * @return the color - */ - String getEditorSelectionColor(); - - /** - * Editor linked group color. - * - * @return the color - */ - String getEditorLinkedGroupColor(); - - /** - * Editor linked group background color. - * - * @return the color - */ - String getEditorLinkedGroupBackground(); - - /** - * Editor inactive selection color(if focus not in browser) - * - * @return the color - */ - String getEditorInactiveSelectionColor(); - - /** - * Color of the editor cursor - * - * @return the color - */ - String getEditorCursorColor(); - - /** - * Background color of the gutter (left or right vertical panels in editor) - * - * @return the color - */ - String getEditorGutterColor(); - - /** - * Color of key word token, produced by Codemirror parser - * - * @return the color - */ - String getEditorKeyWord(); - - /** - * Color of atom token, produced by Codemirror parser - * - * @return the color - */ - String getEditorAtom(); - - /** - * Color of number token, produced by Codemirror parser - * - * @return the color - */ - String getEditorNumber(); - - /** - * Color of def token, produced by Codemirror parser - * - * @return the color - */ - String getEditorDef(); - - /** - * Color of variable token, produced by Codemirror parser - * - * @return the color - */ - String getEditorVariable(); - - /** - * Color of variable2 token, produced by Codemirror parser - * - * @return the color - */ - String getEditorVariable2(); - - /** - * Color of property token, produced by Codemirror parser - * - * @return the color - */ - String getEditorProperty(); - - /** - * Color of operator token, produced by Codemirror parser - * - * @return the color - */ - String getEditorOperator(); - - /** - * Color of comment token, produced by Codemirror parser - * - * @return the color - */ - String getEditorComment(); - - /** - * Color of string token, produced by Codemirror parser - * - * @return the color - */ - String getEditorString(); - - /** - * Color of meta token, produced by Codemirror parser - * - * @return the color - */ - String getEditorMeta(); - - /** - * Color of error token, produced by Codemirror parser - * - * @return the color - */ - String getEditorError(); - - /** - * Color of builtin token, produced by Codemirror parser - * - * @return the color - */ - String getEditorBuiltin(); - - /** - * Color of tag token, produced by Codemirror parser - * - * @return the color - */ - String getEditorTag(); - - /** - * Color of attribute token, produced by Codemirror parser - * - * @return the color - */ - String getEditorAttribute(); - - /** - * Color of string2 token, produced by Codemirror parser - * - * @return the color - */ - String getEditorString2(); - - /** - * Background color of completion popup. - * - * @return the color - */ - String completionPopupBackgroundColor(); - - /** - * Border color of completion popup. - * - * @return the color - */ - String completionPopupBorderColor(); - - /** - * Background color for completion popup header. - * - * @return color - */ - String completionPopupHeaderBackgroundColor(); - - /** - * Text color for completion popup header. - * - * @return color - */ - String completionPopupHeaderTextColor(); - - /** - * Background color of selected or highlighted item for completion popup. - * - * @return color - */ - String completionPopupSelectedItemBackgroundColor(); - - /** - * Item text color for completion popup. - * - * @return color - */ - String completionPopupItemTextColor(); - - /** - * Item subtitle text color for completion popup. - * - * @return color - */ - String completionPopupItemSubtitleTextColor(); - - /** - * Item highlight text color for completion popup. - * - * @return color - */ - String completionPopupItemHighlightTextColor(); - - /** - * Background color of the window widget. - * - * @return the color - */ - String getWindowContentBackground(); - - /** - * Font color of the window widget. - * - * @return the color - */ - String getWindowContentFontColor(); - - /** - * Shadow color of the window widget. - * - * @return the color - */ - String getWindowShadowColor(); - - /** - * Background color of the window header - * - * @return the color - */ - String getWindowHeaderBackground(); - - /** - * Font color of the window header. - * - * @return the color - */ - String getWindowHeaderBorderColor(); - - /** - * Background color of the window footer. - * - * @return the color - */ - String getWindowFooterBackground(); - - /** - * Font color of the window footer. - * - * @return the color - */ - String getWindowFooterBorderColor(); - - /** - * Color of the line separating elements in Window (for footer). - * - * @return the color - */ - String getWindowSeparatorColor(); - - /** - * Font color of window's title. - * - * @return the color - */ - String getWindowTitleFontColor(); - - /** - * New Project wizard steps background color(used in new project wizard, left vertical panel) - * - * @return the color - */ - String getWizardStepsColor(); - - /** - * Border color of the steps panel in new project wizard - * - * @return the color - */ - String getWizardStepsBorderColor(); - - /** - * Color of the Factory link. - * - * @return the color - */ - String getFactoryLinkColor(); - - /** - * Font color for welcome page text - * - * @return the color - */ - String getWelcomeFontColor(); - - /** - * Font color for group captions on view (Example, Share Factory view). - * - * @return the color - */ - String getCaptionFontColor(); - - /** - * Font color for console text - * - * @return the color - */ - String consolePanelColor(); - - /** - * Font color for status panel - * - * @return the color - */ - String getStatusPanelColor(); - - /** - * Background color for odd rows in Cell Widgets - * - * @return the color - */ - String getCellOddRowColor(); - - /** - * Background color for odd rows in Cell Widgets - * - * @return the color - */ - String getCellOddEvenColor(); - - /** - * Background color for keyboard selected rows in Cell Widgets - * - * @return the color - */ - String getCellKeyboardSelectedRowColor(); - - /** - * Background color for hovered rows in Cell Widgets - * - * @return - */ - String getCellHoveredRow(); - - /** - * Background color of menu items - * - * @return the color - */ - String getMainMenuBkgColor(); - - /** - * Delimiter background color of main menu - * - * @return the color - */ - String mainMenuDelimiterBackground(); - - /** - * Background color of selected menu items - * - * @return the color - */ - String getMainMenuSelectedBkgColor(); - - /** - * Border color of selected menu items - * - * @return the color - */ - String getMainMenuSelectedBorderColor(); - - /** - * Font color for menu item text - * - * @return the color - */ - String getMainMenuFontColor(); - - /** - * Font color for menu item hover text - * - * @return the color - */ - String getMainMenuFontHoverColor(); - - /** - * Font color for menu item selected text - * - * @return the color - */ - String getMainMenuFontSelectedColor(); - - String getNotableButtonTopColor(); - - String getNotableButtonColor(); - - /** @return the color of border shadow */ - String tabBorderShadow(); - - /** @return the color of tree file text */ - String treeTextFileColor(); - - /** @return the color of tree folder text */ - String treeTextFolderColor(); - - /** @return the color of tree text-shadow */ - String treeTextShadow(); - - /** @return the color of tree icon file */ - String treeIconFileColor(); - - /** - * The color of the action group shadow. - * - * @return {@link String} color - */ - String getToolbarActionGroupShadowColor(); - - /** - * The color of the action group background. - * - * @return {@link String} color - */ - String getToolbarActionGroupBackgroundColor(); - - /** - * The color of the action group border. - * - * @return {@link String} color - */ - String getToolbarActionGroupBorderColor(); - - /** - * The background image of the toolbar. - * - * @return {@link String} background image - */ - String getToolbarBackgroundImage(); - - /** - * The color of the toolbar background. - * - * @return {@link String} color - */ - String getToolbarBackgroundColor(); - - /** - * The color of the toolbar icons. - * - * @return {@link String} color - */ - String getToolbarIconColor(); - - /** - * The color of the toolbar icons if hover. - * - * @return {@link String} hover color - */ - String getToolbarHoverIconColor(); - - /** - * The filter of the toolbar icons if select. - * - * @return {@link String} select filter - */ - String getToolbarSelectedIconFilter(); - - /** - * The color of the tooltip background. - * - * @return {@link String} color - */ - String getTooltipBackgroundColor(); - - /** - * The background color of the perspective switcher if checked. - * - * @return {@link String} color - */ - String getPerspectiveSwitcherBackgroundColor(); - - /** - * The icon color for the selectCommandAction. - * - * @return {@link String} color - */ - String getSelectCommandActionIconColor(); - - /** - * The background color for selectCommandAction icon. - * - * @return {@link String} color - */ - String getSelectCommandActionIconBackgroundColor(); - - /** - * The command action color. - * - * @return {@link String} color - */ - String getSelectCommandActionColor(); - - /** - * The command action hover color. - * - * @return {@link String} color - */ - String getSelectCommandActionHoverColor(); - - /** @return the progress icon color */ - String progressColor(); - - /** @return the color of the success event */ - String getSuccessEventColor(); - - /** @return the color of the error event */ - String getErrorEventColor(); - - /** @return the color of the links */ - String getLinkColor(); - - /** @return the color of the event items delimeter */ - String getDelimeterColor(); - - /** - * Background color for processes panel. - * - * @return color - */ - String processTreeBackgroundColor(); - - /** - * Background color for toolbar in consoles panel. - * - * @return color - */ - String consolesToolbarBackground(); - - /** - * Border color for consoles toolbar border. - * - * @return color - */ - String colsolesToolbarBorderColor(); - - /** - * Button color on consoles toolbar. - * - * @return color - */ - String consolesToolbarButtonColor(); - - /** - * Hovered button color on consoles toolbar. - * - * @return color - */ - String consolesToolbarHoveredButtonColor(); - - /** - * Disabled button on the consoles toolbar. - * - * @return color - */ - String consolesToolbarDisabledButtonColor(); - - /** - * Toggled button on the consoles toolbar. - * - * @return color - */ - String consolesToolbarToggledButtonColor(); - - /** - * Toggled button border on the consoles toolbar. - * - * @return color - */ - String consolesToolbarToggledButtonBorderColor(); - - /** - * Text color for DEV label in processes tree. - * - * @return color - */ - String processTreeDevLabel(); - - /** Text color for machine name in processes tree. */ - String processesTreeMachineNameColor(); - - /** - * Background color for console output area. - * - * @return color - */ - String outputBackgroundColor(); - - /** @return the color of the output font. */ - String getOutputFontColor(); - - /** @return the color of output link. */ - String getOutputLinkColor(); - - /** @return the background color for editor info panel. */ - String getEditorInfoBackgroundColor(); - - /** @return text color for editor info panel */ - String editorInfoTextColor(); - - /** @return the color of border for editor info panel. */ - String getEditorInfoBorderColor(); - - /** @return the color of border shadow for editor info panel. */ - String getEditorInfoBorderShadowColor(); - - /** @return the color of the line numbers in the editor gutter. */ - String getEditorLineNumberColor(); - - /** @return background color of the line numbers gutter */ - String editorGutterLineNumberBackgroundColor(); - - /** @return the color of the separator line between the gutter and the editor. */ - String getEditorSeparatorColor(); - - /** - * Splitter small border color - * - * @return - */ - String getSplitterSmallBorderColor(); - - /** - * Splitter large border color - * - * @return - */ - String getSplitterLargeBorderColor(); - - /** - * Color of badge background. - * - * @return badge background color - */ - String getBadgeBackgroundColor(); - - /** - * Color of badge font. - * - * @return badge font color - */ - String getBadgeFontColor(); - - /** Process badge border color. */ - String processBadgeBorderColor(); - - /** @return the blue color for icon. */ - String getBlueIconColor(); - - /** @return the red color for icon. */ - String getRedIconColor(); - - /** @return the color of the popup background. */ - String getPopupBkgColor(); - - /** @return the color of the popup border. */ - String getPopupBorderColor(); - - /** @return the color of the popup shadow. */ - String getPopupShadowColor(); - - /** @return the color of the popup hover. */ - String getPopupHoverColor(); - - /** @return the font color of the popup hot key. */ - String getPopupHotKeyColor(); - - /** @return the text field title color. */ - String getTextFieldTitleColor(); - - /** @return the text field color. */ - String getTextFieldColor(); - - /** @return the text field background color. */ - String getTextFieldBackgroundColor(); - - /** @return the text field focused color. */ - String getTextFieldFocusedColor(); - - /** @return the text field focused background color. */ - String getTextFieldFocusedBackgroundColor(); - - /** @return the text field disabled color. */ - String getTextFieldDisabledColor(); - - /** @return the text field disabled background color. */ - String getTextFieldDisabledBackgroundColor(); - - /** @return the text field border color. */ - String getTextFieldBorderColor(); - - /** @return the menu background color. */ - String getMenuBackgroundColor(); - - /** @return the menu background image. */ - String getMenuBackgroundImage(); - - /** @return the panel background color. */ - String getPanelBackgroundColor(); - - /** @return the primary highlights color. */ - String getPrimaryHighlightColor(); - - /** - * Default icon color - * - * @return color - */ - String iconColor(); - - /** - * Active icon color - * - * @return color - */ - String activeIconColor(); - - /** @return the separator color. */ - String getSeparatorColor(); - - /** @return the error state color. */ - String getErrorColor(); - - /** @return the success state color. */ - String getSuccessColor(); - - /** @return the list box background color if hover. */ - String getListBoxHoverBackgroundColor(); - - /** @return the list box color. */ - String getListBoxColor(); - - /** @return the list box disabled color. */ - String getListBoxDisabledColor(); - - /** @return the list box disabled background color. */ - String getListBoxDisabledBackgroundColor(); - - /** @return the list box dropdown background color. */ - String getListBoxDropdownBackgroundColor(); - - /** @return the list box dropdown shadow color. */ - String listBoxDropdownShadowColor(); - - /** @return the categories list header text color. */ - String categoriesListHeaderTextColor(); - - /** @return the categories list header icon color. */ - String categoriesListHeaderIconColor(); - - /** @return the categories list header background color. */ - String categoriesListHeaderBackgroundColor(); - - /** @return the categories list item color. */ - String categoriesListItemTextColor(); - - /** @return the categories list item background color. */ - String categoriesListItemBackgroundColor(); - - /** @return the scrollbar border color */ - String scrollbarBorderColor(); - - /** @return scrollbar background color */ - String scrollbarBackgroundColor(); - - /** @return scrollbar hover background color */ - String scrollbarHoverBackgroundColor(); - - /** @return matching search block background color */ - String matchingSearchBlockBackgroundColor(); - - /** @return matching search block border color */ - String matchingSearchBlockBorderColor(); - - /** @return current search block background color */ - String currentSearchBlockBackgroundColor(); - - /** @return current search block border color */ - String currentSearchBlockBorderColor(); - - /** - * ****************************************************************************************** - * - *

        Dropdown menu with a list of opened files - * - *

        ****************************************************************************************** - */ - String openedFilesDropdownButtonBackground(); - - String openedFilesDropdownButtonBorderColor(); - - String openedFilesDropdownButtonShadowColor(); - - String openedFilesDropdownButtonIconColor(); - - String openedFilesDropdownButtonHoverIconColor(); - - String openedFilesDropdownButtonActiveBackground(); - - String openedFilesDropdownButtonActiveBorderColor(); - - String openedFilesDropdownListBackgroundColor(); - - String openedFilesDropdownListShadowColor(); - - String openedFilesDropdownListTextColor(); - - String openedFilesDropdownListCloseButtonColor(); - - String openedFilesDropdownListHoverBackgroundColor(); - - /** - * ****************************************************************************************** - * - *

        RadioButton - * - *

        ****************************************************************************************** - */ - String radioButtonIconColor(); - - String radioButtonBorderColor(); - - String radioButtonBackgroundColor(); - - String radioButtonFontColor(); - - String radioButtonDisabledFontColor(); - - String radioButtonDisabledIconColor(); - - String radioButtonDisabledBackgroundColor(); - - /** - * ****************************************************************************************** - * - *

        Checkbox - * - *

        ****************************************************************************************** - */ - String checkBoxIconColor(); - - String checkBoxIndeterminateIconColor(); - - String checkBoxFontColor(); - - String checkBoxBorderColor(); - - String checkBoxBackgroundColor(); - - String checkBoxDisabledIconColor(); - - String checkBoxDisabledFontColor(); - - String checkBoxDisabledBackgroundColor(); - - /** - * ****************************************************************************************** - * - *

        Tree - * - *

        ****************************************************************************************** - */ - String treeExpandArrowColor(); - - String treeExpandArrowShadow(); - - /** - * ****************************************************************************************** - * - *

        Project Explorer - * - *

        ****************************************************************************************** - */ - String projectExplorerJointContainerFill(); - - String projectExplorerJointContainerShadow(); - - String projectExplorerPresentableTextShadow(); - - String projectExplorerInfoTextShadow(); - - String projectExplorerSelectedRowBackground(); - - String projectExplorerSelectedRowBorder(); - - String projectExplorerHoverRowBackground(); - - String projectExplorerHoverRowBorder(); - - String projectExplorerVcsHead(); - - /** - * ****************************************************************************************** - * - *

        Loader - * - *

        ****************************************************************************************** - */ - /** @return color of the loader expander. */ - String loaderExpanderColor(); - - /** - * The background color for loader icon. - * - * @return {@link String} color - */ - String loaderIconBackgroundColor(); - - /** - * The progress status color for loader. - * - * @return {@link String} color - */ - String loaderProgressStatusColor(); - - /** - * The placeholder color for input fields. - * - * @return {@link String} color - */ - String placeholderColor(); - - /** - * ****************************************************************************************** - * - *

        Category - * - *

        ****************************************************************************************** - */ - String categoryHeaderButtonHoverColor(); - - String categoryHeaderButtonColor(); - - String categoryElementButtonHoverColor(); - - String categoryElementButtonColor(); - - String categorySelectElementBackgroundColor(); - - String categorySelectElementColor(); - - /** - * ****************************************************************************************** - * - *

        Notification - * - *

        ****************************************************************************************** - */ - String notificationPopupSuccessBackground(); - - String notificationPopupFailBackground(); - - String notificationPopupProgressBackground(); - - String notificationPopupWarningBackground(); - - String notificationPopupPanelShadow(); - - String notificationPopupIconSuccessFill(); - - String notificationPopupIconFailFill(); - - String notificationPopupIconProgressFill(); - - String notificationPopupIconWarningFill(); - - String notificationPopupIconSvgFill(); - - String notificationPopupTextColor(); - - String closeNotificationButtonColor(); - - String closeNotificationHoveredButtonColor(); - - String projectExplorerReadonlyItemBackground(); - - String projectExplorerTestItemBackground(); - - String editorTabPinBackgroundColor(); - - String editorTabPinDropShadow(); - - String loaderBackgroundColor(); - - String loaderBorderColor(); - - String loaderBoxShadow(); - - String loaderSVGFill(); - - String loaderLabelColor(); - - String outputBoxShadow(); - - /** - * ****************************************************************************************** - * - *

        Tool button (part header button) - * - *

        ****************************************************************************************** - */ - String toolButtonColor(); - - String toolButtonHoverColor(); - - String toolButtonActiveBorder(); - - String toolButtonHoverBackgroundColor(); - - String toolButtonActiveBackgroundColor(); - - String toolButtonActiveColor(); - - String toolButtonHoverBoxShadow(); - - String toolButtonActiveBoxShadow(); - - /** - * ****************************************************************************************** - * - *

        VCS output console - * - *

        ****************************************************************************************** - */ - String vcsConsoleStagedFilesColor(); - - String vcsConsoleUnstagedFilesColor(); - - String vcsConsoleErrorColor(); - - String vcsConsoleModifiedFilesColor(); - - String vcsConsoleChangesLineNumbersColor(); - - String vcsStatusAddedColor(); - - String vcsStatusModifiedColor(); - - String vcsStatusUntrackedColor(); - - String vcsChangeMarkerInsertionColor(); - - String vcsChangeMarkerModificationColor(); - - String vcsChangeMarkerDeletionColor(); - - String editorPreferenceCategoryBackgroundColor(); - - String gitPanelRepositoryChangesLabelColor(); - - String gitPanelRepositoryChangesLabelBackgroundColor(); - - /** - * ****************************************************************************************** - * - *

        Resource monitors - * - *

        ****************************************************************************************** - */ - String resourceMonitorBarBackground(); - - /** - * ****************************************************************************************** - * - *

        Popup Loader - * - *

        ****************************************************************************************** - */ - String popupLoaderBackgroundColor(); - - String popupLoaderBorderColor(); - - String popupLoaderShadow(); - - String popupLoaderTitleColor(); - - String popupLoaderTextColor(); - - /** Cell table */ - String cellTableBackground(); - - String cellTableHrefColor(); - - String cellTableHeaderColor(); - - String cellTableHeaderBackground(); - - String cellTableOddRowBackground(); - - String cellTableEvenRowBackground(); - - String cellTableCellColor(); - - String cellTableHoveredBackground(); - - String cellTableSelectedBackground(); - - /** - * ****************************************************************************************** - * - *

        Find results bottom panel - * - *

        ****************************************************************************************** - */ - String findResultsBackground(); - - String findResultsTextColor(); - - /** - * ****************************************************************************************** - * - *

        Editor placeholder - * - *

        ****************************************************************************************** - */ - String editorPlaceholderTabsPanelBackground(); - - String editorPlaceholderTabsPanelBottomBorderColor(); - - String editorPlaceholderTabBackground(); - - String editorPlaceholderTabIconColor(); - - String editorPlaceholderTabLabelColor(); - - String editorPlaceholderTabsPanelPlusColor(); - - String editorPlaceholderContentBackground(); - - String editorPlaceholderLineNumbersColor(); - - String editorPlaceholderRowsColor(); - - /** - * ****************************************************************************************** - * - *

        Project explorer placeholder - * - *

        ****************************************************************************************** - */ - String projectExplorerPlaceholderBackground(); - - String projectExplorerPlaceholderIconColor(); - - String projectExplorerPlaceholderRowColor(); - - /** - * ****************************************************************************************** - * - *

        Part switcher icons - * - *

        ****************************************************************************************** - */ - String tabIconColor(); - - String activeTabIconColor(); - - String hoveredTabIconColor(); - - /** - * ****************************************************************************************** - * - *

        Toolbar panel - * - *

        ****************************************************************************************** - */ - String noToolbarPanelColor(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/ThemeAgent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/ThemeAgent.java deleted file mode 100644 index 95cb26951e6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/theme/ThemeAgent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.theme; - -import java.util.List; -import javax.validation.constraints.NotNull; - -/** - * Manages UI Themes - * - * @author Evgen Vidolob - */ -public interface ThemeAgent { - - String PREFERENCE_KEY = "ide.theme"; - - /** - * @param themeId the id of the theme - * @return theme with theme id or default theme if theme not found - */ - @NotNull - Theme getTheme(@NotNull String themeId); - - /** @return default theme */ - Theme getDefault(); - - /** @return all known themes */ - List getThemes(); - - /** @return current theme */ - String getCurrentThemeId(); - - /** - * Sets current theme by theme id. If there is no such theme by given id, then default theme is - * activated. - */ - void setTheme(String themeId); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsChangeMarkerRender.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsChangeMarkerRender.java deleted file mode 100644 index 8cee83eb403..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsChangeMarkerRender.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.vcs; - -/** Indicates that the editor can handle VCS change markers. */ -public interface HasVcsChangeMarkerRender { - - /** Returns an instance of {@link VcsChangeMarkerRender}. */ - VcsChangeMarkerRender getVcsChangeMarkersRender(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsStatus.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsStatus.java deleted file mode 100644 index ab6a363f6c5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/HasVcsStatus.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.vcs; - -/** - * Indicates that specified resource has VCS status attribute. - * - * @author Igor Vinokur - */ -public interface HasVcsStatus { - - /** Returns VCS status attribute of the resource. */ - VcsStatus getVcsStatus(); - - /** - * Set VCS status attribute to the resource. - * - * @param vcsStatus VCS status to set - */ - void setVcsStatus(VcsStatus vcsStatus); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRender.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRender.java deleted file mode 100644 index a30b470a202..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRender.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.vcs; - -import org.eclipse.che.api.git.shared.EditedRegionType; - -/** Component that handles VCS change markers. */ -public interface VcsChangeMarkerRender { - - /** - * Add change marker to the gutter on the given lines. - * - * @param lineStart the first line number of the marker - * @param lineEnd the last line number of the marker - * @param type type of the marker e.g. insertion, modification, deletion - */ - void addChangeMarker(int lineStart, int lineEnd, EditedRegionType type); - - /** Clear all VCS change markers in the gutter. */ - void clearAllChangeMarkers(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRenderFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRenderFactory.java deleted file mode 100644 index 4103e616c4b..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsChangeMarkerRenderFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.vcs; - -import org.eclipse.che.ide.api.editor.gutter.Gutter; - -/** - * Factory for {@link VcsChangeMarkerRender} instances. - * - * @author Igor Vinokur - */ -public interface VcsChangeMarkerRenderFactory { - /** - * Creates an instance of {@link VcsChangeMarkerRender}. - * - * @param hasGutter the gutter manager - */ - VcsChangeMarkerRender create(Gutter hasGutter); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsStatus.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsStatus.java deleted file mode 100644 index 389ae866034..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/vcs/VcsStatus.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.vcs; - -import static java.util.Arrays.stream; - -import org.eclipse.che.ide.api.theme.Style; - -public enum VcsStatus { - UNTRACKED("untracked"), - ADDED("added"), - MODIFIED("modified"), - NOT_MODIFIED("not_modified"); - - private String value; - - VcsStatus(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - public String getColor() { - switch (this) { - case UNTRACKED: - return Style.getVcsStatusUntrackedColor(); - case MODIFIED: - return Style.getVcsStatusModifiedColor(); - case ADDED: - return Style.getVcsStatusAddedColor(); - case NOT_MODIFIED: - return null; - default: - return null; - } - } - - public static VcsStatus from(String value) { - return stream(VcsStatus.values()) - .filter(vcsStatus -> vcsStatus.getValue().equals(value.toLowerCase())) - .findAny() - .orElse(null); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizard.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizard.java deleted file mode 100644 index 529e7b8c3dd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizard.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import com.google.inject.Inject; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.collections.ListHelper; - -/** - * Abstract base implementation of a {@link Wizard}. - * - * @author Andrey Plotnikov - * @author Artem Zatsarynnyi - */ -public abstract class AbstractWizard implements Wizard { - protected final T dataObject; - protected final Map context; - protected List> wizardPages; - private UpdateDelegate delegate; - private int currentPageIndex; - - /** - * Creates new wizard with the specified {@code dataObject} which will be passed into every added - * page. - * - *

        So multiple pages have the same {@code dataObject}, and any change to the {@code dataObject} - * made by one page is available to the other pages. - * - * @param dataObject data-object for wizard - */ - @Inject - public AbstractWizard(T dataObject) { - this.dataObject = dataObject; - context = new HashMap<>(); - wizardPages = new ArrayList<>(); - } - - public Map getContext() { - return context; - } - - /** Returns wizard's data-object. */ - public T getDataObject() { - return dataObject; - } - - /** - * Add page to wizard. - * - * @param page page to add - */ - public void addPage(@NotNull WizardPage page) { - page.setUpdateDelegate(delegate); - page.setContext(context); - page.init(dataObject); - wizardPages.add(page); - } - - /** - * Add page to wizard at the specified position. - * - * @param page page to be stored at the specified position - * @param index position where the page should be inserted - * @param replace {@code true} if the existed page should be replaced by the given one, {@code - * false} if a page should be inserted at the specified position - */ - public void addPage(@NotNull WizardPage page, int index, boolean replace) { - if (index >= wizardPages.size()) { - addPage(page); - return; - } - - if (replace) { - setPage(page, index); - } else { - List> before = ListHelper.slice(wizardPages, 0, index); - WizardPage currentPage = wizardPages.get(index); - List> after = ListHelper.slice(wizardPages, index + 1, wizardPages.size()); - - wizardPages.clear(); - wizardPages.addAll(before); - addPage(page); - wizardPages.add(currentPage); - wizardPages.addAll(after); - } - } - - private void setPage(@NotNull WizardPage page, int index) { - page.setUpdateDelegate(delegate); - page.setContext(context); - page.init(dataObject); - wizardPages.set(index, page); - } - - @Override - public void setUpdateDelegate(@NotNull UpdateDelegate delegate) { - this.delegate = delegate; - for (WizardPage page : wizardPages) { - page.setUpdateDelegate(delegate); - } - } - - @Nullable - @Override - public WizardPage navigateToFirst() { - resetNavigationState(); - return navigateToNext(); - } - - /** Reset wizard's navigation state. */ - private void resetNavigationState() { - currentPageIndex = -1; - } - - @Nullable - @Override - public WizardPage navigateToNext() { - return getNextPage(); - } - - /** Returns next page that may be shown. */ - @Nullable - private WizardPage getNextPage() { - while (++currentPageIndex < wizardPages.size()) { - WizardPage page = wizardPages.get(currentPageIndex); - if (!page.canSkip()) { - return page; - } - } - return null; - } - - @Nullable - @Override - public WizardPage navigateToPrevious() { - while (--currentPageIndex >= 0) { - final WizardPage page = wizardPages.get(currentPageIndex); - if (!page.canSkip()) { - return page; - } - } - return null; - } - - @Override - public boolean hasNext() { - for (int i = currentPageIndex + 1; i < wizardPages.size(); i++) { - WizardPage page = wizardPages.get(i); - if (!page.canSkip()) { - return true; - } - } - return false; - } - - @Override - public boolean hasPrevious() { - for (int i = currentPageIndex - 1; i >= 0; i--) { - WizardPage page = wizardPages.get(i); - if (!page.canSkip()) { - return true; - } - } - return false; - } - - @Override - public boolean canComplete() { - for (WizardPage page : wizardPages) { - if (!page.isCompleted()) { - return false; - } - } - return true; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizardPage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizardPage.java deleted file mode 100644 index d051b6f3788..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/AbstractWizardPage.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import java.util.Map; -import javax.validation.constraints.NotNull; - -/** - * Abstract base implementation of a {@link WizardPage}. - * - *

        It is completed and can not be skipped by default. - * - * @author Andrey Plotnikov - * @author Artem Zatsarynnyi - */ -public abstract class AbstractWizardPage implements WizardPage { - protected T dataObject; - protected Map context; - protected Wizard.UpdateDelegate updateDelegate; - - /** Create wizard page. */ - protected AbstractWizardPage() {} - - /** - * {@inheritDoc} - * - *

        Sub-classes should invoke {@code super.init} at the beginning of this method. - * - *

        Multiple pages have the same {@code dataObject}, and any change to the {@code dataObject} - * made by one page is available to the other pages. - */ - @Override - public void init(T dataObject) { - this.dataObject = dataObject; - } - - /** {@inheritDoc} */ - @Override - public void setContext(@NotNull Map context) { - this.context = context; - } - - /** {@inheritDoc} */ - @Override - public void setUpdateDelegate(@NotNull Wizard.UpdateDelegate delegate) { - this.updateDelegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public boolean isCompleted() { - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean canSkip() { - return false; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/Wizard.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/Wizard.java deleted file mode 100644 index 083b639c5ca..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/Wizard.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * The main responsibility of a {@link Wizard} subclass is doing the real work when the wizard - * completes. - * - * @param the type of the data-object that stores collected data - * @author Andrey Plotnikov - * @author Artem Zatsarynnyi - */ -public interface Wizard { - /** - * Performs some actions required for flipping to first page and returning to the first page of a - * wizard. - * - * @return first page - */ - @Nullable - WizardPage navigateToFirst(); - - /** - * Provides a way to move to the next wizard page. - * - * @return the next page or {@code null} if wizard has no next page - */ - @Nullable - WizardPage navigateToNext(); - - /** - * Provides a way to move to the previous wizard page. - * - * @return the previous page or {@code null} if wizard has no previous page - */ - @Nullable - WizardPage navigateToPrevious(); - - /** - * Returns whether the wizard has the next page. - * - * @return {@code true} if the wizard has next page, otherwise - {@code false} - */ - boolean hasNext(); - - /** - * Returns whether the wizard has previous page. - * - * @return {@code true} if the wizard has previous page, otherwise - {@code false} - */ - boolean hasPrevious(); - - /** - * Checks whether the wizard may be completed. - * - * @return {@code true} if the wizard could be completed, otherwise - {@code false} - */ - boolean canComplete(); - - /** Complete the wizard. */ - void complete(@NotNull CompleteCallback callback); - - /** Sets update control delegate. */ - void setUpdateDelegate(@NotNull UpdateDelegate delegate); - - /** Usually it is required to enable/disable navigation buttons in wizard view. */ - interface UpdateDelegate { - /** Called when wizard view should be updated. */ - void updateControls(); - } - - interface CompleteCallback { - /** Called when wizard completed successfully. */ - void onCompleted(); - - /** Called when failure occurred while completing wizard. */ - void onFailure(Throwable e); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/WizardPage.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/WizardPage.java deleted file mode 100644 index 7e04185f989..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/wizard/WizardPage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * The main responsibility of a {@link WizardPage} subclass is collecting data. - * - * @param the type of the data-object that stores collected data - * @author Andrey Plotnikov - * @author Artem Zatsarynnyi - */ -public interface WizardPage extends Presenter { - /** Initializes page by the passed {@code dataObject}. */ - void init(T dataObject); - - void setContext(@NotNull Map context); - - /** Sets update control delegate. */ - void setUpdateDelegate(@NotNull Wizard.UpdateDelegate delegate); - - /** - * Returns whether this page is completed or not. This information is typically used by the wizard - * to decide when it is okay to finish. - * - * @return {@code true} if this page is completed, otherwise - {@code false} - */ - boolean isCompleted(); - - /** - * Determines whether the page should be skipped (shouldn't be shown) by wizard. - * - * @return {@code true} if this page should be skipped, otherwise - {@code false} - */ - boolean canSkip(); -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WorkspaceReadyEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WorkspaceReadyEvent.java deleted file mode 100644 index 94238b911d4..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WorkspaceReadyEvent.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace; - -import com.google.common.annotations.Beta; -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.api.core.model.workspace.WorkspaceConfig; -import org.eclipse.che.ide.api.resources.Project; - -/** - * Workspace projects loaded events describe situation when new workspace configuration has been - * received and workspace context have to be initialized with remote projects. - * - *

        This event is intended to be fired when workspace has started and configured and projects has - * been successfully loaded. - * - *

        By design this event is intended to initialize third party components with initial projects - * configuration. - * - * @author Vlad Zhukovskiy - * @since 4.4.0 - */ -@Beta -public class WorkspaceReadyEvent extends GwtEvent { - - /** - * A workspace change listener is notified of projects loading. - * - *

        Third party components may implement this interface to handle workspace projects loading - * event. - */ - public interface WorkspaceReadyHandler extends EventHandler { - /** - * Notifies the listener that some workspace configuration changes are happening. The supplied - * event dives details. - * - * @param event instance of {@link WorkspaceReadyEvent} - * @see WorkspaceReadyEvent - * @since 4.4.0 - */ - void onWorkspaceReady(WorkspaceReadyEvent event); - } - - private static Type TYPE; - - public static Type getType() { - if (TYPE == null) { - TYPE = new Type<>(); - } - return TYPE; - } - - private final Project[] projects; - - public WorkspaceReadyEvent(Project[] projects) { - this.projects = projects; - } - - /** - * Returns the new workspace configuration. - * - * @return the new workspace configuration - * @see WorkspaceConfig - * @since 4.4.0 - */ - public Project[] getProjects() { - return projects; - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return TYPE; - } - - /** {@inheritDoc} */ - @Override - protected void dispatch(WorkspaceReadyHandler handler) { - handler.onWorkspaceReady(this); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtil.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtil.java deleted file mode 100644 index cf589c6facb..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtil.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_WS_AGENT_HTTP_REFERENCE; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_WS_AGENT_WEBSOCKET_REFERENCE; - -import com.google.common.annotations.VisibleForTesting; -import java.util.Optional; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.workspace.shared.Constants; -import org.eclipse.che.ide.QueryParameters; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; - -/** Helps to quickly get info related to the "wsagent" server. */ -@Singleton -public class WsAgentServerUtil { - - /** - * URL's query parameter for passing the prefix of the "wsagent" server reference. Allows to tell - * IDE to use a different "wsagent" server. - */ - public static final String WSAGENT_SERVER_REF_PREFIX_PARAM = "wsagent-ref-prefix"; - - private final AppContext appContext; - private final QueryParameters queryParameters; - - @Inject - public WsAgentServerUtil(AppContext appContext, QueryParameters queryParameters) { - this.appContext = appContext; - this.queryParameters = queryParameters; - } - - /** - * Returns {@code Optional} with a machine which contains the "wsagent" server. - * - * @return {@code Optional} with the machine which contains the "wsagent" server if the current - * workspace has a runtime and there is such machine, otherwise an empty {@code Optional} - */ - public Optional getWsAgentServerMachine() { - return getWorkspaceRuntime() - .flatMap( - runtime -> - runtime - .getMachines() - .values() - .stream() - .filter(this::containsWsAgentHttpServer) - .findAny()); - } - - /** - * Returns {@code Optional} with the {@link Constants#SERVER_WS_AGENT_HTTP_REFERENCE wsagent/http} - * server. - * - * @return {@code Optional} with the {@link Constants#SERVER_WS_AGENT_HTTP_REFERENCE wsagent/http} - * server if the current workspace has a runtime and there is a machine with such server, - * otherwise an empty {@code Optional} - */ - public Optional getWsAgentHttpServer() { - return getServerByRef(getWsAgentHttpServerReference()); - } - - /** - * Returns {@code Optional} with the {@link Constants#SERVER_WS_AGENT_WEBSOCKET_REFERENCE - * wsagent/ws} server. - * - * @return {@code Optional} with the {@link Constants#SERVER_WS_AGENT_WEBSOCKET_REFERENCE - * wsagent/ws} server if the current workspace has a runtime and there is a machine with such - * server, otherwise an empty {@code Optional} - */ - public Optional getWsAgentWebSocketServer() { - return getServerByRef(getWsAgentWebSocketServerReference()); - } - - @VisibleForTesting - Optional getServerByRef(String ref) { - Optional runtimeOpt = getWorkspaceRuntime(); - - if (runtimeOpt.isPresent()) { - for (MachineImpl machine : runtimeOpt.get().getMachines().values()) { - ServerImpl server = machine.getServers().get(ref); - - if (server != null) { - return Optional.of(server); - } - } - } - - return Optional.empty(); - } - - /** - * Checks whether the provided {@link MachineImpl} contains the {@link - * Constants#SERVER_WS_AGENT_HTTP_REFERENCE wsagent/http} server. - * - * @param machine {@link MachineImpl} to check - * @return {@code true} if the given machine contains the {@link - * Constants#SERVER_WS_AGENT_HTTP_REFERENCE wsagent/http} server server, otherwise {@code - * false} - */ - public boolean containsWsAgentHttpServer(MachineImpl machine) { - return machine.getServers().keySet().contains(getWsAgentHttpServerReference()); - } - - /** - * Returns a reference of the {@link Constants#SERVER_WS_AGENT_HTTP_REFERENCE wsagent/http} - * server. - * - *

        Note, the returned server reference may be prepended with the prefix passed - * through the URL's query parameter. - * - * @see #WSAGENT_SERVER_REF_PREFIX_PARAM - */ - public String getWsAgentHttpServerReference() { - String refPrefix = queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - - return isNullOrEmpty(refPrefix) - ? SERVER_WS_AGENT_HTTP_REFERENCE - : refPrefix + SERVER_WS_AGENT_HTTP_REFERENCE; - } - - /** - * Returns a reference of the {@link Constants#SERVER_WS_AGENT_WEBSOCKET_REFERENCE wsagent/ws} - * server. - * - *

        Note, the returned server reference may be prepended with the prefix passed - * through the URL's query parameter. - * - * @see #WSAGENT_SERVER_REF_PREFIX_PARAM - */ - public String getWsAgentWebSocketServerReference() { - String refPrefix = queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - - return isNullOrEmpty(refPrefix) - ? SERVER_WS_AGENT_WEBSOCKET_REFERENCE - : refPrefix + SERVER_WS_AGENT_WEBSOCKET_REFERENCE; - } - - @VisibleForTesting - Optional getWorkspaceRuntime() { - WorkspaceImpl workspace = appContext.getWorkspace(); - - return Optional.ofNullable(workspace.getRuntime()); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerRunningEvent.java deleted file mode 100644 index 4176023374d..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerRunningEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when exec-agent server in some machine goes into a running state. Allows to avoid checking - * server's name unlike {@link ServerRunningEvent}. - * - * @see ServerRunningEvent - */ -public class ExecAgentServerRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public ExecAgentServerRunningEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onExecAgentServerRunning(this); - } - - public interface Handler extends EventHandler { - void onExecAgentServerRunning(ExecAgentServerRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerStoppedEvent.java deleted file mode 100644 index 578118f6bd7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ExecAgentServerStoppedEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when exec-agent server in some machine goes into a stopped state. Allows to avoid checking - * server's name unlike {@link ServerStoppedEvent}. - * - * @see ServerStoppedEvent - */ -public class ExecAgentServerStoppedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public ExecAgentServerStoppedEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onExecAgentServerStopped(this); - } - - public interface Handler extends EventHandler { - void onExecAgentServerStopped(ExecAgentServerStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerFailedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerFailedEvent.java deleted file mode 100644 index c2899e507dc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerFailedEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when installer in some machine goes into a failed state. */ -public class InstallerFailedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String installer; - private final String error; - private final String machineName; - - public InstallerFailedEvent(String installer, String error, String machineName) { - this.installer = installer; - this.error = error; - this.machineName = machineName; - } - - /** Returns the installer identifier. */ - public String getInstaller() { - return installer; - } - - /** Returns the error message. */ - public String getError() { - return error; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onInstallerFailed(this); - } - - public interface Handler extends EventHandler { - void onInstallerFailed(InstallerFailedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerRunningEvent.java deleted file mode 100644 index 32325481870..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerRunningEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when installer in some machine goes into a running state. */ -public class InstallerRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String installer; - private final String machineName; - private final boolean serverRunning; - - public InstallerRunningEvent(String installer, String machineName, boolean serverRunning) { - this.installer = installer; - this.machineName = machineName; - this.serverRunning = serverRunning; - } - - /** Returns the installer identifier. */ - public String getInstaller() { - return installer; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - /** Returns true if corresponding server is defined and running. */ - public boolean isServerRunning() { - return serverRunning; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onInstallerRunning(this); - } - - public interface Handler extends EventHandler { - void onInstallerRunning(InstallerRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerStartingEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerStartingEvent.java deleted file mode 100644 index 126d81f3d8e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/InstallerStartingEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when installer in some machine goes into a starting state. */ -public class InstallerStartingEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String installer; - private final String machineName; - - public InstallerStartingEvent(String installer, String machineName) { - this.installer = installer; - this.machineName = machineName; - } - - /** Returns the installer identifier. */ - public String getInstaller() { - return installer; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onInstallerStarting(this); - } - - public interface Handler extends EventHandler { - void onInstallerStarting(InstallerStartingEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineFailedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineFailedEvent.java deleted file mode 100644 index 3216e8d38f6..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineFailedEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Fired when some machine goes into a failed state. */ -public class MachineFailedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final MachineImpl machine; - private final String error; - - public MachineFailedEvent(MachineImpl machine, String error) { - this.machine = machine; - this.error = error; - } - - /** Returns the failed machine. */ - public MachineImpl getMachine() { - return machine; - } - - /** Returns the error message describes the reason of fail. */ - public String getError() { - return error; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onMachineFailed(this); - } - - public interface Handler extends EventHandler { - void onMachineFailed(MachineFailedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineRunningEvent.java deleted file mode 100644 index 1056fed8736..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineRunningEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Fired when some machine goes into a running state. */ -public class MachineRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final MachineImpl machine; - - public MachineRunningEvent(MachineImpl machine) { - this.machine = machine; - } - - /** Returns the running machine. */ - public MachineImpl getMachine() { - return machine; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onMachineRunning(this); - } - - public interface Handler extends EventHandler { - void onMachineRunning(MachineRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStartingEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStartingEvent.java deleted file mode 100644 index e2e2e382a84..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStartingEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Fired when some machine goes into a starting state. */ -public class MachineStartingEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final MachineImpl machine; - - public MachineStartingEvent(MachineImpl machine) { - this.machine = machine; - } - - /** Returns the starting machine. */ - public MachineImpl getMachine() { - return machine; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onMachineStarting(this); - } - - public interface Handler extends EventHandler { - void onMachineStarting(MachineStartingEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStoppedEvent.java deleted file mode 100644 index 6f56be12300..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/MachineStoppedEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Fired when some machine goes into a stopped state. */ -public class MachineStoppedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final MachineImpl machine; - - public MachineStoppedEvent(MachineImpl machine) { - this.machine = machine; - } - - /** Returns the stopped machine. */ - public MachineImpl getMachine() { - return machine; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onMachineStopped(this); - } - - public interface Handler extends EventHandler { - void onMachineStopped(MachineStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerRunningEvent.java deleted file mode 100644 index bed33c3cf62..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerRunningEvent.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when some server in some machine goes into a running state. - * - * @see WsAgentServerRunningEvent - * @see TerminalAgentServerRunningEvent - * @see ExecAgentServerRunningEvent - */ -public class ServerRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String serverName; - private final String machineName; - - public ServerRunningEvent(String serverName, String machineName) { - this.serverName = serverName; - this.machineName = machineName; - } - - /** Returns the running server's name. */ - public String getServerName() { - return serverName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onServerRunning(this); - } - - public interface Handler extends EventHandler { - void onServerRunning(ServerRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerStoppedEvent.java deleted file mode 100644 index 394df2fc7ff..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/ServerStoppedEvent.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when some server in some machine goes into a stopped state. - * - * @see WsAgentServerStoppedEvent - * @see TerminalAgentServerStoppedEvent - * @see ExecAgentServerStoppedEvent - */ -public class ServerStoppedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String serverName; - private final String machineName; - - public ServerStoppedEvent(String serverName, String machineName) { - this.serverName = serverName; - this.machineName = machineName; - } - - /** Returns the running server's name. */ - public String getServerName() { - return serverName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onServerStopped(this); - } - - public interface Handler extends EventHandler { - void onServerStopped(ServerStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerRunningEvent.java deleted file mode 100644 index 9b6e5f22856..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerRunningEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when terminal-agent server in some machine goes into a running state. Allows to avoid - * checking server's name unlike {@link ServerRunningEvent}. - * - * @see ServerRunningEvent - */ -public class TerminalAgentServerRunningEvent - extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public TerminalAgentServerRunningEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onTerminalAgentServerRunning(this); - } - - public interface Handler extends EventHandler { - void onTerminalAgentServerRunning(TerminalAgentServerRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerStoppedEvent.java deleted file mode 100644 index 007a70a7ecc..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/TerminalAgentServerStoppedEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when terminal-agent server in some machine goes into a stopped state. Allows to avoid - * checking server's name unlike {@link ServerStoppedEvent}. - * - * @see ServerStoppedEvent - */ -public class TerminalAgentServerStoppedEvent - extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public TerminalAgentServerStoppedEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onTerminalAgentServerStopped(this); - } - - public interface Handler extends EventHandler { - void onTerminalAgentServerStopped(TerminalAgentServerStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceRunningEvent.java deleted file mode 100644 index aec74711c68..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceRunningEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when the current workspace goes into a running state. */ -public class WorkspaceRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(WorkspaceRunningEvent.Handler handler) { - handler.onWorkspaceRunning(this); - } - - public interface Handler extends EventHandler { - void onWorkspaceRunning(WorkspaceRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStartingEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStartingEvent.java deleted file mode 100644 index f46a3d5d027..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStartingEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when the current workspace goes into a starting state. */ -public class WorkspaceStartingEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onWorkspaceStarting(this); - } - - public interface Handler extends EventHandler { - void onWorkspaceStarting(WorkspaceStartingEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppedEvent.java deleted file mode 100644 index db69e001a0e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppedEvent.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when the current workspace goes into a stopped state. */ -public class WorkspaceStoppedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final boolean error; - private final String errorMessage; - - public WorkspaceStoppedEvent(boolean error, String errorMessage) { - this.error = error; - this.errorMessage = errorMessage; - } - - public boolean isError() { - return error; - } - - /** - * Returns an error message if workspace was stopped due to error. - * - * @return error message if workspace was stopped due to error or an empty string if workspace was - * stopped normally - */ - public String getErrorMessage() { - return errorMessage; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(WorkspaceStoppedEvent.Handler handler) { - handler.onWorkspaceStopped(this); - } - - public interface Handler extends EventHandler { - void onWorkspaceStopped(WorkspaceStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppingEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppingEvent.java deleted file mode 100644 index 7ef46c0bb3c..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WorkspaceStoppingEvent.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Fired when the current workspace goes into a stopping state. */ -public class WorkspaceStoppingEvent extends GwtEvent { - - private String reason; - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(WorkspaceStoppingEvent.Handler handler) { - handler.onWorkspaceStopping(this); - } - - public String getReason() { - return reason; - } - - public void setReason(String reason) { - this.reason = reason; - } - - public interface Handler extends EventHandler { - void onWorkspaceStopping(WorkspaceStoppingEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerRunningEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerRunningEvent.java deleted file mode 100644 index 9c5b178d015..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerRunningEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when ws-agent server in some machine goes into a running state. Allows to avoid checking - * server's name unlike {@link ServerRunningEvent}. - * - * @see ServerRunningEvent - */ -public class WsAgentServerRunningEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public WsAgentServerRunningEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onWsAgentServerRunning(this); - } - - public interface Handler extends EventHandler { - void onWsAgentServerRunning(WsAgentServerRunningEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerStoppedEvent.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerStoppedEvent.java deleted file mode 100644 index 5cb8ae7fa04..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/event/WsAgentServerStoppedEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when ws-agent server in some machine goes into a stopped state. Allows to avoid checking - * server's name unlike {@link ServerStoppedEvent}. - * - * @see ServerStoppedEvent - */ -public class WsAgentServerStoppedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final String machineName; - - public WsAgentServerStoppedEvent(String machineName) { - this.machineName = machineName; - } - - /** Returns the related machine's name. */ - public String getMachineName() { - return machineName; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onWsAgentServerStopped(this); - } - - public interface Handler extends EventHandler { - void onWsAgentServerStopped(WsAgentServerStoppedEvent event); - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/EnvironmentImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/EnvironmentImpl.java deleted file mode 100644 index d2d76ee5770..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/EnvironmentImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import org.eclipse.che.api.core.model.workspace.config.Environment; -import org.eclipse.che.api.core.model.workspace.config.MachineConfig; -import org.eclipse.che.api.core.model.workspace.config.Recipe; - -/** Data object for {@link Environment}. */ -public class EnvironmentImpl implements Environment { - - private RecipeImpl recipe; - private Map machines; - - public EnvironmentImpl(Recipe recipe, Map machines) { - if (recipe != null) { - this.recipe = new RecipeImpl(recipe); - } - if (machines != null) { - this.machines = - machines - .entrySet() - .stream() - .collect( - Collectors.toMap( - Map.Entry::getKey, entry -> new MachineConfigImpl(entry.getValue()))); - } - } - - public EnvironmentImpl(Environment environment) { - this(environment.getRecipe(), environment.getMachines()); - } - - public RecipeImpl getRecipe() { - return recipe; - } - - @Override - public Map getMachines() { - if (machines == null) { - machines = new HashMap<>(); - } - return machines; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof EnvironmentImpl)) { - return false; - } - final EnvironmentImpl that = (EnvironmentImpl) obj; - return Objects.equals(recipe, that.recipe) && getMachines().equals(that.getMachines()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(recipe); - hash = 31 * hash + getMachines().hashCode(); - return hash; - } - - @Override - public String toString() { - return "EnvironmentImpl{" + "recipe=" + recipe + ", machines=" + machines + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineConfigImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineConfigImpl.java deleted file mode 100644 index 62edfc962e5..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineConfigImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import org.eclipse.che.api.core.model.workspace.config.MachineConfig; -import org.eclipse.che.api.core.model.workspace.config.ServerConfig; -import org.eclipse.che.api.core.model.workspace.config.Volume; -import org.eclipse.che.commons.annotation.Nullable; - -public class MachineConfigImpl implements MachineConfig { - - private List installers; - private Map env; - private Map attributes; - private Map servers; - private Map volumes; - - public MachineConfigImpl( - List installers, - Map servers, - Map env, - Map attributes, - Map volumes) { - if (installers != null) { - this.installers = new ArrayList<>(installers); - } - if (servers != null) { - this.servers = - servers - .entrySet() - .stream() - .collect( - Collectors.toMap( - Map.Entry::getKey, entry -> new ServerConfigImpl(entry.getValue()))); - } - if (env != null) { - this.env = new HashMap<>(env); - } - if (attributes != null) { - this.attributes = new HashMap<>(attributes); - } - if (volumes != null) { - this.volumes = - volumes - .entrySet() - .stream() - .collect( - Collectors.toMap(Map.Entry::getKey, entry -> new VolumeImpl(entry.getValue()))); - } - } - - public MachineConfigImpl(MachineConfig machine) { - this( - machine.getInstallers(), - machine.getServers(), - machine.getEnv(), - machine.getAttributes(), - machine.getVolumes()); - } - - @Override - public List getInstallers() { - if (installers == null) { - installers = new ArrayList<>(); - } - return installers; - } - - @Override - public Map getServers() { - if (servers == null) { - servers = new HashMap<>(); - } - return servers; - } - - @Override - public Map getEnv() { - if (env == null) { - env = new HashMap<>(); - } - return env; - } - - @Override - public Map getAttributes() { - if (attributes == null) { - attributes = new HashMap<>(); - } - return attributes; - } - - @Override - public Map getVolumes() { - if (volumes == null) { - volumes = new HashMap<>(); - } - return volumes; - } - - /** - * @param name - * @return volume by name or null if no such volume defined - */ - @Nullable - public VolumeImpl getVolume(String name) { - return volumes.get(name); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof MachineConfigImpl)) { - return false; - } - final MachineConfigImpl that = (MachineConfigImpl) obj; - return getInstallers().equals(that.getInstallers()) - && getEnv().equals(that.getEnv()) - && getAttributes().equals(that.getAttributes()) - && getServers().equals(that.getServers()) - && getVolumes().equals(that.getVolumes()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + getInstallers().hashCode(); - hash = 31 * hash + getEnv().hashCode(); - hash = 31 * hash + getAttributes().hashCode(); - hash = 31 * hash + getServers().hashCode(); - hash = 31 * hash + getVolumes().hashCode(); - return hash; - } - - @Override - public String toString() { - return "MachineConfigImpl{" - + "installers=" - + installers - + ", env=" - + env - + ", attributes=" - + attributes - + ", servers=" - + servers - + ", volumes=" - + volumes - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineImpl.java deleted file mode 100644 index 697a423a12e..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/MachineImpl.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.api.core.model.workspace.runtime.MachineStatus; -import org.eclipse.che.api.core.model.workspace.runtime.Server; - -/** Data object for {@link Machine}. */ -public class MachineImpl implements Machine { - - private String name; - private Map attributes; - private Map servers; - private MachineStatus status; - - public MachineImpl( - String name, - Map attributes, - Map servers, - MachineStatus status) { - this.name = name; - this.attributes = new HashMap<>(attributes); - this.status = status; - if (servers != null) { - this.servers = - servers - .entrySet() - .stream() - .collect( - HashMap::new, - (map, entry) -> - map.put(entry.getKey(), new ServerImpl(entry.getKey(), entry.getValue())), - HashMap::putAll); - } - } - - public MachineImpl(String name, Machine machine) { - this(name, machine.getAttributes(), machine.getServers(), machine.getStatus()); - } - - public String getName() { - return name; - } - - @Override - public Map getAttributes() { - if (attributes == null) { - attributes = new HashMap<>(); - } - return attributes; - } - - @Override - public Map getServers() { - if (servers == null) { - servers = new HashMap<>(); - } - return servers; - } - - @Override - public MachineStatus getStatus() { - return status; - } - - public Optional getServerByName(String name) { - return Optional.ofNullable(getServers().get(name)); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof MachineImpl)) { - return false; - } - MachineImpl machine = (MachineImpl) o; - return Objects.equals(getName(), machine.getName()) - && Objects.equals(getAttributes(), machine.getAttributes()) - && Objects.equals(getServers(), machine.getServers()) - && getStatus() == machine.getStatus(); - } - - @Override - public int hashCode() { - return Objects.hash(getName(), getAttributes(), getServers(), getStatus()); - } - - @Override - public String toString() { - return "MachineImpl{" - + "name='" - + name - + '\'' - + ", attributes=" - + attributes - + ", servers=" - + servers - + ", status=" - + status - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ProjectConfigImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ProjectConfigImpl.java deleted file mode 100644 index bf5dd6f71fd..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ProjectConfigImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import static java.util.stream.Collectors.toMap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.project.ProjectProblem; -import org.eclipse.che.api.core.model.workspace.config.ProjectConfig; -import org.eclipse.che.api.core.model.workspace.config.SourceStorage; - -/** Data object for {@link ProjectConfig}. */ -public class ProjectConfigImpl implements ProjectConfig { - - private String path; - private String name; - private String type; - private String description; - private SourceStorageImpl source; - private List mixins; - private Map> attributes; - private List problems; - - public ProjectConfigImpl(ProjectConfig projectConfig) { - name = projectConfig.getName(); - path = projectConfig.getPath(); - description = projectConfig.getDescription(); - type = projectConfig.getType(); - mixins = new ArrayList<>(projectConfig.getMixins()); - problems = new ArrayList<>(projectConfig.getProblems()); - attributes = - projectConfig - .getAttributes() - .entrySet() - .stream() - .collect(toMap(Map.Entry::getKey, e -> new ArrayList<>(e.getValue()))); - - SourceStorage sourceStorage = projectConfig.getSource(); - if (sourceStorage != null) { - source = - new SourceStorageImpl( - sourceStorage.getType(), sourceStorage.getLocation(), sourceStorage.getParameters()); - } - } - - @Override - public String getName() { - return name; - } - - @Override - public String getPath() { - return path; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public String getType() { - return type; - } - - @Override - public List getMixins() { - if (mixins == null) { - mixins = new ArrayList<>(); - } - return mixins; - } - - @Override - public Map> getAttributes() { - if (attributes == null) { - attributes = new HashMap<>(); - } - return attributes; - } - - @Override - public SourceStorageImpl getSource() { - return source; - } - - @Override - public List getProblems() { - if (problems == null) { - problems = new ArrayList<>(); - } - return problems; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof ProjectConfigImpl)) { - return false; - } - final ProjectConfigImpl that = (ProjectConfigImpl) obj; - return Objects.equals(path, that.path) - && Objects.equals(name, that.name) - && Objects.equals(type, that.type) - && Objects.equals(description, that.description) - && Objects.equals(source, that.source) - && getMixins().equals(that.getMixins()) - && getAttributes().equals(that.getAttributes()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(path); - hash = 31 * hash + Objects.hashCode(name); - hash = 31 * hash + Objects.hashCode(type); - hash = 31 * hash + Objects.hashCode(description); - hash = 31 * hash + Objects.hashCode(source); - hash = 31 * hash + getMixins().hashCode(); - hash = 31 * hash + getAttributes().hashCode(); - return hash; - } - - @Override - public String toString() { - return "ProjectConfigImpl{" - + "path='" - + path - + '\'' - + ", name='" - + name - + '\'' - + ", type='" - + type - + '\'' - + ", description='" - + description - + '\'' - + ", source=" - + source - + ", mixins=" - + mixins - + ", attributes=" - + attributes - + ", problems=" - + problems - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RecipeImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RecipeImpl.java deleted file mode 100644 index 83cc7d44391..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RecipeImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.config.Recipe; - -public class RecipeImpl implements Recipe { - - private String type; - private String contentType; - private String content; - private String location; - - public RecipeImpl(String type, String contentType, String content, String location) { - this.type = type; - this.contentType = contentType; - this.content = content; - this.location = location; - } - - public RecipeImpl(Recipe recipe) { - this.type = recipe.getType(); - this.contentType = recipe.getContentType(); - this.content = recipe.getContent(); - this.location = recipe.getLocation(); - } - - @Override - public String getType() { - return type; - } - - @Override - public String getContentType() { - return contentType; - } - - @Override - public String getContent() { - return content; - } - - @Override - public String getLocation() { - return location; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RecipeImpl)) return false; - RecipeImpl that = (RecipeImpl) o; - return Objects.equals(type, that.type) - && Objects.equals(contentType, that.contentType) - && Objects.equals(content, that.content) - && Objects.equals(location, that.location); - } - - @Override - public int hashCode() { - return Objects.hash(type, contentType, content, location); - } - - @Override - public String toString() { - return "RecipeImpl{" - + "type='" - + type - + '\'' - + ", contentType='" - + contentType - + '\'' - + ", content='" - + content - + '\'' - + ", location='" - + location - + '\'' - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RuntimeImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RuntimeImpl.java deleted file mode 100644 index e699e8b6016..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/RuntimeImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import static java.util.stream.Collectors.toCollection; -import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toMap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.eclipse.che.api.core.model.workspace.Runtime; -import org.eclipse.che.api.core.model.workspace.Warning; -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.ide.api.command.CommandImpl; - -/** Data object for {@link Runtime}. */ -public class RuntimeImpl implements Runtime { - - private final String activeEnv; - private final String owner; - private final String machineToken; - private Map machines; - private List commands; - private List warnings; - - public RuntimeImpl( - String activeEnv, - Map machines, - String owner, - String machineToken, - List commands, - List warnings) { - this.activeEnv = activeEnv; - if (machines != null) { - this.machines = - machines - .entrySet() - .stream() - .collect( - toMap( - Map.Entry::getKey, - entry -> new MachineImpl(entry.getKey(), entry.getValue()))); - } - this.owner = owner; - this.machineToken = machineToken; - if (commands != null) { - this.commands = commands.stream().map(CommandImpl::new).collect(toCollection(ArrayList::new)); - } - if (warnings != null) { - this.warnings = warnings.stream().map(WarningImpl::new).collect(toList()); - } - } - - @Override - public String getActiveEnv() { - return activeEnv; - } - - @Override - public Map getMachines() { - if (machines == null) { - machines = new HashMap<>(); - } - return machines; - } - - public Optional getMachineByName(String name) { - return Optional.ofNullable(getMachines().get(name)); - } - - @Override - public String getOwner() { - return owner; - } - - public String getMachineToken() { - return machineToken; - } - - @Override - public List getWarnings() { - if (warnings == null) { - warnings = new ArrayList<>(); - } - return warnings; - } - - @Override - public List getCommands() { - if (commands == null) { - commands = new ArrayList<>(); - } - return commands; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RuntimeImpl)) return false; - RuntimeImpl that = (RuntimeImpl) o; - return Objects.equals(activeEnv, that.activeEnv) - && Objects.equals(machines, that.machines) - && Objects.equals(owner, that.owner) - && Objects.equals(commands, that.commands) - && Objects.equals(warnings, that.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(activeEnv, machines, owner, commands, warnings); - } - - @Override - public String toString() { - return "RuntimeImpl{" - + "activeEnv='" - + activeEnv - + '\'' - + ", machines='" - + machines - + '\'' - + ", owner=" - + owner - + ", commands=" - + commands - + ", warnings=" - + warnings - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerConfigImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerConfigImpl.java deleted file mode 100644 index 41497ddc784..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerConfigImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.config.ServerConfig; - -public class ServerConfigImpl implements ServerConfig { - - private String port; - private String protocol; - private String path; - private Map attributes; - - public ServerConfigImpl( - String port, String protocol, String path, Map attributes) { - this.port = port; - this.protocol = protocol; - this.path = path; - if (attributes != null) { - this.attributes = new HashMap<>(attributes); - } else { - this.attributes = new HashMap<>(); - } - } - - public ServerConfigImpl(ServerConfig serverConf) { - this( - serverConf.getPort(), - serverConf.getProtocol(), - serverConf.getPath(), - serverConf.getAttributes()); - } - - @Override - public String getPort() { - return port; - } - - @Override - public String getProtocol() { - return protocol; - } - - @Override - public String getPath() { - return path; - } - - @Override - public Map getAttributes() { - return attributes; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof ServerConfigImpl)) { - return false; - } - final ServerConfigImpl that = (ServerConfigImpl) obj; - return Objects.equals(port, that.port) - && Objects.equals(protocol, that.protocol) - && Objects.equals(attributes, that.attributes) - && getPath().equals(that.getPath()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(port); - hash = 31 * hash + Objects.hashCode(protocol); - hash = 31 * hash + Objects.hashCode(path); - hash = 31 * hash + Objects.hashCode(attributes); - return hash; - } - - @Override - public String toString() { - return "ServerConfigImpl{" - + "port='" - + port - + '\'' - + ", protocol='" - + protocol - + '\'' - + ", path='" - + path - + '\'' - + ", attributes=" - + attributes - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerImpl.java deleted file mode 100644 index 2f259773579..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/ServerImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import static com.google.common.base.Strings.nullToEmpty; - -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.api.core.model.workspace.runtime.Server; -import org.eclipse.che.api.core.model.workspace.runtime.ServerStatus; - -public class ServerImpl implements Server { - - private String name; - private String url; - private ServerStatus status; - private Map attributes; - - public ServerImpl(String name, Server server) { - this.name = name; - this.url = nullToEmpty(server.getUrl()); // some servers doesn't have URL - this.status = server.getStatus(); - if (server.getAttributes() != null) { - this.attributes = new HashMap<>(server.getAttributes()); - } else { - this.attributes = new HashMap<>(); - } - } - - public String getName() { - return name; - } - - @Override - public String getUrl() { - return url; - } - - @Override - public ServerStatus getStatus() { - return this.status; - } - - @Override - public Map getAttributes() { - return attributes; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/SourceStorageImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/SourceStorageImpl.java deleted file mode 100644 index 116c9eb70c8..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/SourceStorageImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.config.SourceStorage; - -/** Data object for {@link SourceStorage}. */ -public class SourceStorageImpl implements SourceStorage { - - private String type; - private String location; - private Map parameters; - - public SourceStorageImpl(String type, String location, Map parameters) { - this.type = type; - this.location = location; - if (parameters != null) { - this.parameters = new HashMap<>(parameters); - } - } - - @Override - public String getType() { - return type; - } - - @Override - public String getLocation() { - return location; - } - - @Override - public Map getParameters() { - if (parameters == null) { - parameters = new HashMap<>(); - } - return parameters; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof SourceStorageImpl)) { - return false; - } - final SourceStorageImpl that = (SourceStorageImpl) obj; - return Objects.equals(type, that.type) - && Objects.equals(location, that.location) - && getParameters().equals(that.getParameters()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(type); - hash = 31 * hash + Objects.hashCode(location); - hash = 31 * hash + getParameters().hashCode(); - return hash; - } - - @Override - public String toString() { - return "SourceStorageImpl{" - + "type='" - + type - + '\'' - + ", location='" - + location - + '\'' - + ", parameters=" - + parameters - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/VolumeImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/VolumeImpl.java deleted file mode 100644 index 8b8c0877153..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/VolumeImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.config.Volume; - -/** @author Alexander Garagatyi */ -public class VolumeImpl implements Volume { - private final String path; - - public VolumeImpl(String path) { - this.path = path; - } - - public VolumeImpl(Volume value) { - path = value.getPath(); - } - - @Override - public String getPath() { - return path; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof VolumeImpl)) { - return false; - } - final VolumeImpl that = (VolumeImpl) obj; - return Objects.equals(path, that.path); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(path); - return hash; - } - - @Override - public String toString() { - return "VolumeImpl{" + "path='" + path + '\'' + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WarningImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WarningImpl.java deleted file mode 100644 index f5512cf0701..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WarningImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.Warning; - -/** Data object for {@link Warning}. */ -public class WarningImpl implements Warning { - - private final int code; - private final String message; - - public WarningImpl(int code, String message) { - this.code = code; - this.message = message; - } - - public WarningImpl(Warning warning) { - this(warning.getCode(), warning.getMessage()); - } - - @Override - public int getCode() { - return code; - } - - @Override - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof WarningImpl)) { - return false; - } - final WarningImpl that = (WarningImpl) obj; - return code == that.code && Objects.equals(message, that.message); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + code; - hash = 31 * hash + Objects.hashCode(message); - return hash; - } - - @Override - public String toString() { - return "Warning{" + "code=" + code + ", message='" + message + '\'' + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceConfigImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceConfigImpl.java deleted file mode 100644 index dfba3df1ea7..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceConfigImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toMap; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.WorkspaceConfig; -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.api.core.model.workspace.config.Environment; -import org.eclipse.che.api.core.model.workspace.config.ProjectConfig; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandImpl; - -/** Data object for {@link WorkspaceConfig}. */ -public class WorkspaceConfigImpl implements WorkspaceConfig { - - private String name; - private String description; - private String defaultEnv; - private List commands; - private List projects; - private Map environments; - private Map attributes; - - public WorkspaceConfigImpl( - String name, - String description, - String defaultEnv, - List commands, - List projects, - Map environments, - Map attributes) { - this.name = name; - this.defaultEnv = defaultEnv; - this.description = description; - if (environments != null) { - this.environments = - environments - .entrySet() - .stream() - .collect(toMap(Map.Entry::getKey, entry -> new EnvironmentImpl(entry.getValue()))); - } - if (commands != null) { - this.commands = commands.stream().map(CommandImpl::new).collect(toList()); - } - if (projects != null) { - this.projects = projects.stream().map(ProjectConfigImpl::new).collect(toList()); - } - if (attributes != null) { - this.attributes = new HashMap<>(attributes); - } - } - - public WorkspaceConfigImpl(WorkspaceConfig workspaceConfig) { - this( - workspaceConfig.getName(), - workspaceConfig.getDescription(), - workspaceConfig.getDefaultEnv(), - workspaceConfig.getCommands(), - workspaceConfig.getProjects(), - workspaceConfig.getEnvironments(), - workspaceConfig.getAttributes()); - } - - @Override - public String getName() { - return name; - } - - @Override - @Nullable - public String getDescription() { - return description; - } - - @Override - public String getDefaultEnv() { - return defaultEnv; - } - - @Override - public List getCommands() { - if (commands == null) { - commands = new ArrayList<>(); - } - return commands; - } - - @Override - public List getProjects() { - if (projects == null) { - projects = new ArrayList<>(); - } - return projects; - } - - @Override - public Map getEnvironments() { - if (environments == null) { - environments = new HashMap<>(); - } - return environments; - } - - @Override - public Map getAttributes() { - if (attributes == null) { - attributes = new HashMap<>(); - } - return attributes; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof WorkspaceConfigImpl)) { - return false; - } - final WorkspaceConfigImpl that = (WorkspaceConfigImpl) obj; - return Objects.equals(name, that.name) - && Objects.equals(description, that.description) - && Objects.equals(defaultEnv, that.defaultEnv) - && getCommands().equals(that.getCommands()) - && getProjects().equals(that.getProjects()) - && getEnvironments().equals(that.getEnvironments()) - && getAttributes().equals(that.getAttributes()); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(name); - hash = 31 * hash + Objects.hashCode(description); - hash = 31 * hash + Objects.hashCode(defaultEnv); - hash = 31 * hash + getCommands().hashCode(); - hash = 31 * hash + getProjects().hashCode(); - hash = 31 * hash + getEnvironments().hashCode(); - hash = 31 * hash + getAttributes().hashCode(); - return hash; - } - - @Override - public String toString() { - return "WorkspaceConfigImpl{" - + "name='" - + name - + '\'' - + ", description='" - + description - + '\'' - + ", defaultEnv='" - + defaultEnv - + '\'' - + ", commands=" - + commands - + ", projects=" - + projects - + ", environments=" - + environments - + ", attributes=" - + attributes - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceImpl.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceImpl.java deleted file mode 100644 index b6a1b07d539..00000000000 --- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/model/WorkspaceImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace.model; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.eclipse.che.api.core.model.workspace.Runtime; -import org.eclipse.che.api.core.model.workspace.Workspace; -import org.eclipse.che.api.core.model.workspace.WorkspaceConfig; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.api.core.model.workspace.devfile.Devfile; -import org.eclipse.che.api.workspace.shared.dto.WorkspaceDto; -import org.eclipse.che.commons.annotation.Nullable; - -/** Data object for {@link Workspace}. */ -public class WorkspaceImpl implements Workspace { - - private String id; - private String namespace; - private WorkspaceConfigImpl config; - private Map attributes; - private boolean isTemporary; - private WorkspaceStatus status; - private RuntimeImpl runtime; - private Map links; - - public WorkspaceImpl(WorkspaceImpl workspace) { - this( - workspace.getId(), - workspace.getNamespace(), - workspace.getConfig(), - workspace.getRuntime(), - workspace.getAttributes(), - workspace.isTemporary(), - workspace.getStatus(), - workspace.getLinks(), - workspace.getRuntime() != null ? workspace.getRuntime().getMachineToken() : null); - } - - public WorkspaceImpl(WorkspaceDto workspace) { - this( - workspace.getId(), - workspace.getNamespace(), - workspace.getConfig(), - workspace.getRuntime(), - workspace.getAttributes(), - workspace.isTemporary(), - workspace.getStatus(), - workspace.getLinks(), - workspace.getRuntime() != null ? workspace.getRuntime().getMachineToken() : null); - } - - private WorkspaceImpl( - String id, - String namespace, - WorkspaceConfig config, - Runtime runtime, - Map attributes, - boolean isTemporary, - WorkspaceStatus status, - Map links, - String machineToken) { - - this.id = id; - this.namespace = namespace; - if (config != null) { - this.config = new WorkspaceConfigImpl(config); - } - if (runtime != null) { - this.runtime = - new RuntimeImpl( - runtime.getActiveEnv(), - runtime.getMachines(), - runtime.getOwner(), - machineToken, - runtime.getCommands(), - runtime.getWarnings()); - } - if (attributes != null) { - this.attributes = new HashMap<>(attributes); - } - this.isTemporary = isTemporary; - this.status = status; - if (links != null) { - this.links = new HashMap<>(links); - } - } - - @Override - public String getId() { - return id; - } - - @Override - public String getNamespace() { - return namespace; - } - - @Override - public WorkspaceConfigImpl getConfig() { - return config; - } - - @Override - public Devfile getDevfile() { - throw new UnsupportedOperationException("Devfile is not supported by GWT IDE"); - } - - @Override - public Map getAttributes() { - if (attributes == null) { - attributes = new HashMap<>(); - } - return attributes; - } - - @Override - public boolean isTemporary() { - return isTemporary; - } - - @Override - public WorkspaceStatus getStatus() { - return status; - } - - public Map getLinks() { - if (links == null) { - links = new HashMap<>(); - } - return links; - } - - @Nullable - @Override - public RuntimeImpl getRuntime() { - return runtime; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (!(obj instanceof WorkspaceImpl)) return false; - final WorkspaceImpl other = (WorkspaceImpl) obj; - return Objects.equals(id, other.id) - && Objects.equals(getNamespace(), other.getNamespace()) - && Objects.equals(config, other.config) - && getAttributes().equals(other.getAttributes()) - && isTemporary == other.isTemporary - && Objects.equals(status, other.status) - && Objects.equals(runtime, other.runtime); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + Objects.hashCode(id); - hash = 31 * hash + Objects.hashCode(getNamespace()); - hash = 31 * hash + Objects.hashCode(config); - hash = 31 * hash + getAttributes().hashCode(); - hash = 31 * hash + Boolean.hashCode(isTemporary); - hash = 31 * hash + Objects.hashCode(status); - hash = 31 * hash + Objects.hashCode(runtime); - return hash; - } - - @Override - public String toString() { - return "WorkspaceImpl{" - + "id='" - + id - + '\'' - + ", namespace='" - + namespace - + '\'' - + ", config=" - + config - + ", attributes=" - + attributes - + ", isTemporary=" - + isTemporary - + ", status=" - + status - + ", runtime=" - + runtime - + '}'; - } -} diff --git a/ide/che-core-ide-api/src/main/module.gwt.xml b/ide/che-core-ide-api/src/main/module.gwt.xml deleted file mode 100644 index 5010ae5d094..00000000000 --- a/ide/che-core-ide-api/src/main/module.gwt.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/agent/exec/Exec.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/agent/exec/Exec.gwt.xml deleted file mode 100644 index 4e9e8bac3a0..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/agent/exec/Exec.gwt.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/auth/Auth.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/auth/Auth.gwt.xml deleted file mode 100644 index 32bbe467d08..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/auth/Auth.gwt.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/Core.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/Core.gwt.xml deleted file mode 100644 index 7341c57bb70..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/Core.gwt.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/model/Model.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/model/Model.gwt.xml deleted file mode 100644 index 88d8900ab7f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/core/model/Model.gwt.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/debug/Debug.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/debug/Debug.gwt.xml deleted file mode 100644 index a52b011a28f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/debug/Debug.gwt.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/factory/Factory.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/factory/Factory.gwt.xml deleted file mode 100644 index a52b011a28f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/factory/Factory.gwt.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/git/Git.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/git/Git.gwt.xml deleted file mode 100644 index c50a15d19ab..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/git/Git.gwt.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/machine/Machine.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/machine/Machine.gwt.xml deleted file mode 100644 index afbf79775e9..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/machine/Machine.gwt.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/project/Project.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/project/Project.gwt.xml deleted file mode 100644 index f7406062340..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/project/Project.gwt.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/ssh/Ssh.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/ssh/Ssh.gwt.xml deleted file mode 100644 index c13978d8791..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/ssh/Ssh.gwt.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/testing/Testing.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/testing/Testing.gwt.xml deleted file mode 100644 index a52b011a28f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/testing/Testing.gwt.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/user/User.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/user/User.gwt.xml deleted file mode 100644 index 32bbe467d08..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/user/User.gwt.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/workspace/Workspace.gwt.xml b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/workspace/Workspace.gwt.xml deleted file mode 100644 index 611f1f34619..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/api/workspace/Workspace.gwt.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/codeassist/AutocompleteComponent.css b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/codeassist/AutocompleteComponent.css deleted file mode 100644 index 7e4284bf04f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/codeassist/AutocompleteComponent.css +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -.container { - box-sizing: border-box; - border: 1px solid completionPopupBorderColor; - background-color: completionPopupBackgroundColor; - -webkit-box-shadow: 0 2px 5px 0 rgba(50, 50, 50, 0.75); - -moz-box-shadow: 0 2px 5px 0 rgba(50, 50, 50, 0.75); - box-shadow: 0 2px 5px 0 rgba(50, 50, 50, 0.75); - padding: 3px; - min-width: 150px; - max-width: 450px; - overflow-x: auto !important; -} - -.items { - border-width: 0; - border-spacing: 0; - width: 100%; -} - -.proposalIcon { - max-width: 16px; - text-align: center; - vertical-align: middle; - color: toolbarIconColor; -} - -.proposalIcon img { - vertical-align: middle; -} - -.proposalIcon svg { - vertical-align: middle; - width: 16px; - height: 16px; -} - -.proposalLabel { - text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5); - color: mainFontColor; - font-family: mainFontFamily; -} -.proposalGroup { - padding-left: 5px; - color: grey; - text-align: right; - max-width: 250px; -} diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/texteditor/Editor.css b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/texteditor/Editor.css deleted file mode 100644 index b0e439fe05c..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/editor/texteditor/Editor.css +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -@external .annotation, .breakpoints; - -/*@sprite .lineWarning {*/ -.lineWarning { - /*gwt-image: "squiggleWarning";*/ - /*background-position: bottom;*/ - /*background-repeat: repeat-x;*/ - margin: 0; - padding: 0; - height: auto; - width: auto; - overflow: visible; - text-decoration: underline; - color: #FFD31E; -} - -/*@sprite .lineError {*/ -.lineError { - /*gwt-image: "squiggle";*/ - /*background-position: bottom;*/ - /*background-repeat: repeat-x;*/ - margin: 0; - padding: 0; - height: auto; - width: auto; - overflow: visible; - text-decoration: underline; - color: red; -} - -.debugLine { - background-color: rgba(255, 120, 100, 0.5) !important; -} diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/arrow-bottom.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/arrow-bottom.svg deleted file mode 100644 index b683b706b3f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/arrow-bottom.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/close-icon.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/close-icon.svg deleted file mode 100644 index 2ec8033c8cc..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/close-icon.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/collapse-expand-icon.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/collapse-expand-icon.svg deleted file mode 100644 index a7a81e378a8..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/collapse-expand-icon.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/erase.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/erase.svg deleted file mode 100644 index 6867c538f16..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/erase.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/maximize-part.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/maximize-part.svg deleted file mode 100644 index 614b60328fd..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/maximize-part.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/partstack.css b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/partstack.css deleted file mode 100644 index abb474e5e3f..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/partstack.css +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -@url tabLineError tabLineError; -@url tabLineWarning tabLineWarning; - -.listItemPanel { - background-color: openedFilesDropdownListBackgroundColor; - border: none; - box-shadow: 0 2px 2px 0 openedFilesDropdownListShadowColor; - max-height: 300px; - overflow-y: auto; - width: 200px; -} - -div[maximized="true"] div[name="maximizePart"] i { - color: blueIconColor; -} - -div[maximized="true"] svg[name="workBenchIconMaximize"], -div[maximized="true"] svg[name="workBenchIconMaximize"] * { - fill: blueIconColor; -} - -.ide-PartStack-Tab-Line-Error { - margin: 0; - padding: 0; - height: auto; - width: auto; - overflow: visible; - - background: tabLineError 0 1.3em; - background-repeat: repeat-x; - background-size: 15px 7px; -} - -.ide-PartStack-Tab-Line-Warning { - margin: 0; - padding: 0; - height: auto; - width: auto; - overflow: visible; - - background: tabLineWarning 0 1.3em; - background-repeat: repeat-x; - background-size: 15px 7px; -} diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineError.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineError.svg deleted file mode 100644 index 42b218815f4..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineError.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineWarning.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineWarning.svg deleted file mode 100644 index 8da16e5e2b9..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/tabLineWarning.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/wrap-text.svg b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/wrap-text.svg deleted file mode 100644 index 4f8d9ea72b6..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/parts/wrap-text.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/ui/style.css b/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/ui/style.css deleted file mode 100644 index 6e728db5d8e..00000000000 --- a/ide/che-core-ide-api/src/main/resources/org/eclipse/che/ide/api/ui/style.css +++ /dev/null @@ -1,417 +0,0 @@ -/** - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -/* Tabs */ - -/** Tab panel background */ -@eval tabsPanelBackground org.eclipse.che.ide.api.theme.Style.theme.tabsPanelBackground(); - -/** Tab button border color */ -@eval tabBorderColor org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); - -/** Color used for underlining active tab */ -@eval tabUnderlineColor org.eclipse.che.ide.api.theme.Style.theme.tabUnderlineColor(); - -/** Tab button text color */ -@eval tabTextColor org.eclipse.che.ide.api.theme.Style.theme.tabTextColor(); - -/** Hovered tab button text color */ -@eval hoveredTabTextColor org.eclipse.che.ide.api.theme.Style.theme.hoveredTabTextColor(); - -/** Background color for active tab */ -@eval activeTabBackground org.eclipse.che.ide.api.theme.Style.theme.activeTabBackground(); - -/** Border color for active tab */ -@eval activeTabBorderColor org.eclipse.che.ide.api.theme.Style.theme.activeTabBorderColor(); - -/** Text color for active tab */ -@eval activeTabTextColor org.eclipse.che.ide.api.theme.Style.theme.activeTabTextColor(); - -/** Text shadow for active tab */ -@eval activeTabTextShadow org.eclipse.che.ide.api.theme.Style.theme.activeTabTextShadow(); - -/** Icon stroke color for active tab */ -@eval activeTabIconColor org.eclipse.che.ide.api.theme.Style.theme.activeTabIconColor(); - -@eval activeEditorTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.activeEditorTabBackgroundColor(); -@eval focusedEditorTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.focusedEditorTabBackgroundColor(); -@eval focusedEditorTabBorderBottomColor org.eclipse.che.ide.api.theme.Style.theme.focusedEditorTabBorderBottomColor(); - -@eval inactiveTabBackground org.eclipse.che.ide.api.theme.Style.theme.inactiveTabBackground(); -@eval inactiveTabBorderColor org.eclipse.che.ide.api.theme.Style.theme.inactiveTabBorderColor(); - -@eval openedFilesDropdownListBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListBackgroundColor(); -@eval openedFilesDropdownListShadowColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListShadowColor(); - -@eval partBackground org.eclipse.che.ide.api.theme.Style.theme.partBackground(); -@eval partToolbar org.eclipse.che.ide.api.theme.Style.theme.partToolbar(); -@eval partToolbarActive org.eclipse.che.ide.api.theme.Style.theme.partToolbarActive(); -@eval partToolbarShadow org.eclipse.che.ide.api.theme.Style.theme.partToolbarShadow(); -@eval partToolbarSeparatorTopColor org.eclipse.che.ide.api.theme.Style.theme.partToolbarSeparatorTopColor(); -@eval partToolbarSeparatorBottomColor org.eclipse.che.ide.api.theme.Style.theme.partToolbarSeparatorBottomColor(); - -@eval outputBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.outputBackgroundColor(); - -@eval consolePanelColor org.eclipse.che.ide.api.theme.Style.theme.consolePanelColor(); -@eval consolesToolbarBackground org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarBackground(); -@eval colsolesToolbarBorderColor org.eclipse.che.ide.api.theme.Style.theme.colsolesToolbarBorderColor(); -@eval consolesToolbarButtonColor org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarButtonColor(); -@eval consolesToolbarHoveredButtonColor org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarHoveredButtonColor(); -@eval consolesToolbarDisabledButtonColor org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarDisabledButtonColor(); -@eval consolesToolbarToggledButtonColor org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarToggledButtonColor(); -@eval consolesToolbarToggledButtonBorderColor org.eclipse.che.ide.api.theme.Style.theme.consolesToolbarToggledButtonBorderColor(); - -@eval tabBorderShadow org.eclipse.che.ide.api.theme.Style.theme.tabBorderShadow(); - -@eval progressColor org.eclipse.che.ide.api.theme.Style.theme.progressColor(); - -/* Background color for an item selected with the keyboard */ -@eval keyboardSelectionBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.keyboardSelectionBackgroundColor(); - -/* Tree */ -@eval hoverBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.hoverBackgroundColor(); - -@eval selectionBackground org.eclipse.che.ide.api.theme.Style.theme.selectionBackground(); -@eval inactiveSelectionBackground org.eclipse.che.ide.api.theme.Style.theme.inactiveSelectionBackground(); -@eval treeTextFileColor org.eclipse.che.ide.api.theme.Style.theme.treeTextFileColor(); -@eval treeTextFolderColor org.eclipse.che.ide.api.theme.Style.theme.treeTextFolderColor(); -@eval treeTextShadow org.eclipse.che.ide.api.theme.Style.theme.treeTextShadow(); -@eval treeIconFileColor org.eclipse.che.ide.api.theme.Style.theme.treeIconFileColor(); - -/*Button */ -@def buttonHeight 22px; -@def buttonLineHeight 20px; -@def buttonPadding 16px; -@def buttonMinWidth 60px; - -/* Default Button */ -@eval buttonBackground org.eclipse.che.ide.api.theme.Style.getButtonBackground(); -@eval buttonBorderColor org.eclipse.che.ide.api.theme.Style.getButtonBorderColor(); -@eval buttonFontColor org.eclipse.che.ide.api.theme.Style.getButtonFontColor(); -@eval buttonHoverBackground org.eclipse.che.ide.api.theme.Style.getButtonHoverBackground(); -@eval buttonHoverBorderColor org.eclipse.che.ide.api.theme.Style.getButtonHoverBorderColor(); -@eval buttonHoverFontColor org.eclipse.che.ide.api.theme.Style.getButtonHoverFontColor(); -@eval buttonClickedBackground org.eclipse.che.ide.api.theme.Style.getButtonClickedBackground(); -@eval buttonClickedBorderColor org.eclipse.che.ide.api.theme.Style.getButtonClickedBorderColor(); -@eval buttonClickedFontColor org.eclipse.che.ide.api.theme.Style.getButtonClickedFontColor(); -@eval buttonDisabledBackground org.eclipse.che.ide.api.theme.Style.getButtonDisabledBackground(); -@eval buttonDisabledBorderColor org.eclipse.che.ide.api.theme.Style.getButtonDisabledBorderColor(); -@eval buttonDisabledFontColor org.eclipse.che.ide.api.theme.Style.getButtonDisabledFontColor(); - -/* Primary Button */ -@eval primaryButtonBackground org.eclipse.che.ide.api.theme.Style.getPrimaryButtonBackground(); -@eval primaryButtonBorderColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonBorderColor(); -@eval primaryButtonFontColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonFontColor(); -@eval primaryButtonHoverBackground org.eclipse.che.ide.api.theme.Style.getPrimaryButtonHoverBackground(); -@eval primaryButtonHoverBorderColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonHoverBorderColor(); -@eval primaryButtonHoverFontColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonHoverFontColor(); -@eval primaryButtonClickedBackground org.eclipse.che.ide.api.theme.Style.getPrimaryButtonClickedBackground(); -@eval primaryButtonClickedBorderColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonClickedBorderColor(); -@eval primaryButtonClickedFontColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonClickedFontColor(); -@eval primaryButtonDisabledBackground org.eclipse.che.ide.api.theme.Style.getPrimaryButtonDisabledBackground(); -@eval primaryButtonDisabledBorderColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonDisabledBorderColor(); -@eval primaryButtonDisabledFontColor org.eclipse.che.ide.api.theme.Style.getPrimaryButtonDisabledFontColor(); - -@eval socialButtonColor org.eclipse.che.ide.api.theme.Style.getSocialButtonColor(); - -/* notable button */ -@eval notableButtonTopColor org.eclipse.che.ide.api.theme.Style.getNotableButtonTopColor(); -@eval notableButtonColor org.eclipse.che.ide.api.theme.Style.getNotableButtonColor(); - -/*Editor*/ -@eval editorPanelBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPanelBackgroundColor(); -@eval editorTabsBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorTabsBackgroundColor(); -@eval editorTabIconColor org.eclipse.che.ide.api.theme.Style.theme.getEditorTabIconColor(); -@eval editorBackgroundColor org.eclipse.che.ide.api.theme.Style.getEditorBackgroundColor(); -@eval editorCurrentLineColor org.eclipse.che.ide.api.theme.Style.getEditorCurrentLineColor(); -@eval editorDefaultFontColor org.eclipse.che.ide.api.theme.Style.getEditorDefaultFontColor(); -@eval editorCursorColor org.eclipse.che.ide.api.theme.Style.getEditorCursorColor(); -@eval editorSelectionColor org.eclipse.che.ide.api.theme.Style.getEditorSelectionColor(); -@eval editorInactiveSelectionColor org.eclipse.che.ide.api.theme.Style.getEditorInactiveSelectionColor(); - -@eval editorGutterColor org.eclipse.che.ide.api.theme.Style.getEditorGutterColor(); -@eval editorGutterLineNumberColor org.eclipse.che.ide.api.theme.Style.getEditorLineNumberColor(); -@eval editorGutterLineNumberBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorGutterLineNumberBackgroundColor(); -@eval editorGutterSeparatorColor org.eclipse.che.ide.api.theme.Style.getEditorSeparatorColor(); - -@eval completionPopupBorderColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupBorderColor(); -@eval completionPopupBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupBackgroundColor(); -@eval completionPopupHeaderBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupHeaderBackgroundColor(); -@eval completionPopupHeaderTextColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupHeaderTextColor(); -@eval completionPopupSelectedItemBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupSelectedItemBackgroundColor(); -@eval completionPopupItemTextColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupItemTextColor(); -@eval completionPopupItemSubtitleTextColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupItemSubtitleTextColor(); -@eval completionPopupItemHighlightTextColor org.eclipse.che.ide.api.theme.Style.theme.completionPopupItemHighlightTextColor(); - -@eval editorInfoBorderColor org.eclipse.che.ide.api.theme.Style.getEditorInfoBorderColor(); -@eval editorInfoBorderShadowColor org.eclipse.che.ide.api.theme.Style.getEditorInfoBorderShadowColor(); -@eval editorInfoBackgroundColor org.eclipse.che.ide.api.theme.Style.getEditorInfoBackgroundColor(); -@eval editorInfoTextColor org.eclipse.che.ide.api.theme.Style.theme.editorInfoTextColor(); - -/* Text fields */ -@eval textFieldTitleColor org.eclipse.che.ide.api.theme.Style.getTextFieldTitleColor(); -@eval textFieldColor org.eclipse.che.ide.api.theme.Style.getTextFieldColor(); -@eval textFieldBackgroundColor org.eclipse.che.ide.api.theme.Style.getTextFieldBackgroundColor(); -@eval textFieldFocusedColor org.eclipse.che.ide.api.theme.Style.getTextFieldFocusedColor(); -@eval textFieldFocusedBackgroundColor org.eclipse.che.ide.api.theme.Style.getTextFieldFocusedBackgroundColor(); -@eval textFieldDisabledColor org.eclipse.che.ide.api.theme.Style.getTextFieldDisabledColor(); -@eval textFieldDisabledBackgroundColor org.eclipse.che.ide.api.theme.Style.getTextFieldDisabledBackgroundColor(); -@eval textFieldBorderColor org.eclipse.che.ide.api.theme.Style.getTextFieldBorderColor(); - -/* Sizes */ -@def dividerThickness 1px; -@def popupPadding 24px; -@def titlePaddingBottom 16px; -@def buttonSideSpacing 9px; -@def labelPaddingBottom 6px; -@def examplePaddingTop 4px; -@def formButtonPaddingTop 18px; -@def sideBarHorizontalPadding 12px; -@def splitterWidth 8px; -@def splitterOverlap 4px; -@def toolbarIconSize 16px; -@def menuIconSize 12px; - -/* Font Sizes */ -@def fontSize 9pt; -@def largeFontSize 16px; -@def productFontSize 20px; -@def landingTitleFontSize 20px; -@def titleFontSize 16px; -@def secondaryTextFontSize 11px; -@def smallFontSize 10px; -@def largeLabel 12px; -@def largeDropdownLabel 12px; -@def buttonFontSize 9pt; - -@def consoleFontSize 9pt; -@def consoleLineHeight 13px; - -/* Fonts */ -@def alternativeFontFamily "Helvetica Neue", "Myriad Pro","open sans", arial, sans-serif; -@def fileTreeFontFamily "Helvetica Neue", "Myriad Pro","Lucida Grande", Verdana, Arial; -@def fileTreeFontFamilyFile "Helvetica Neue Regular", "Myriad Pro","Lucida Grande", Verdana, Arial; -@def mainFontFamily "Open Sans", sans-serif; -@def editorLineHeight 15px; -@def editorFontFamily 'Andale Mono', monospace; -@def outputFontFamily 'Droid Sans Mono', monospace; - -/* Text fields */ -@def textFieldFontFamily "Open Sans", sans-serif; -@def textFieldFontSize 9pt; - -/*Menu*/ -@eval menuBackgroundColor org.eclipse.che.ide.api.theme.Style.getMenuBackgroundColor(); -@eval menuBackgroundImage org.eclipse.che.ide.api.theme.Style.getMenuBackgroundImage(); - -/*Main Menu*/ -@eval mainMenuBkgColor org.eclipse.che.ide.api.theme.Style.getMainMenuBkgColor(); -@eval mainMenuDelimiterBackground org.eclipse.che.ide.api.theme.Style.theme.mainMenuDelimiterBackground(); -@eval mainMenuSelectedBkgColor org.eclipse.che.ide.api.theme.Style.getMainMenuSelectedBkgColor(); -@eval mainMenuSelectedBorderColor org.eclipse.che.ide.api.theme.Style.getMainMenuSelectedBorderColor(); -@eval mainMenuFontColor org.eclipse.che.ide.api.theme.Style.getMainMenuFontColor(); -@eval disabledMenuColor org.eclipse.che.ide.api.theme.Style.theme.getDisabledMenuColor(); -@eval mainMenuFontHoverColor org.eclipse.che.ide.api.theme.Style.getMainMenuFontHoverColor(); -@eval mainMenuFontSelectedColor org.eclipse.che.ide.api.theme.Style.getMainMenuFontSelectedColor(); -@def fontMenuSize 9pt; - -@eval popupBkgColor org.eclipse.che.ide.api.theme.Style.getPopupBkgColor(); -@eval popupBorderColor org.eclipse.che.ide.api.theme.Style.getPopupBorderColor(); -@eval popupShadowColor org.eclipse.che.ide.api.theme.Style.getPopupShadowColor(); -@eval popupHoverColor org.eclipse.che.ide.api.theme.Style.getPopupHoverColor(); -@eval popupHotKeyColor org.eclipse.che.ide.api.theme.Style.getPopupHotKeyColor(); -@def fontPopupSize 9pt; - -@eval mainFontColor org.eclipse.che.ide.api.theme.Style.getMainFontColor(); -@eval welcomeFontColor org.eclipse.che.ide.api.theme.Style.getWelcomeFontColor(); -@eval captionFontColor org.eclipse.che.ide.api.theme.Style.getCaptionFontColor(); -@eval factoryLinkColor org.eclipse.che.ide.api.theme.Style.getFactoryLinkColor(); -@eval radioButtonBackgroundColor org.eclipse.che.ide.api.theme.Style.getRadioButtonBackgroundColor(); -@eval disabledMenuItemColor org.eclipse.che.ide.api.theme.Style.theme.getDisabledMenuColor(); - -/*Commands toolbar*/ -@eval commandsToolbarBackgroundColor org.eclipse.che.ide.api.theme.Style.getCommandsToolbarBackgroundColor(); -@eval commandsToolbarProcessesLabelBackground org.eclipse.che.ide.api.theme.Style.getCommandsToolbarProcessesLabelBackground(); -@eval commandsToolbarProcessesLabelBorder org.eclipse.che.ide.api.theme.Style.getCommandsToolbarProcessesLabelBorder(); -@eval commandsToolbarMachineNameColor org.eclipse.che.ide.api.theme.Style.getCommandsToolbarMachineNameColor(); -@eval commandsToolbarCommandNameColor org.eclipse.che.ide.api.theme.Style.getCommandsToolbarCommandNameColor(); - -/*Commands editor*/ -@eval commandEditorProjectsTableHeaderColor org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectsTableHeaderColor(); -@eval commandEditorProjectsTableRowColor org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectsTableRowColor(); -@eval commandEditorProjectSwitcherBorder org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectSwitcherBorder(); - -/*Icons colors*/ -@eval blueIconColor org.eclipse.che.ide.api.theme.Style.theme.getBlueIconColor(); -@eval redIconColor org.eclipse.che.ide.api.theme.Style.theme.getRedIconColor(); - -/*Placeholder*/ -@eval placeholderColor org.eclipse.che.ide.api.theme.Style.theme.placeholderColor(); - -/*Toolbar*/ -@eval toolbarBackgroundImage org.eclipse.che.ide.api.theme.Style.getToolbarBackgroundImage(); -@eval toolbarActionGroupShadowColor org.eclipse.che.ide.api.theme.Style.getToolbarActionGroupShadowColor(); -@eval toolbarActionGroupBackgroundColor org.eclipse.che.ide.api.theme.Style.getToolbarActionGroupBackgroundColor(); -@eval toolbarActionGroupBorderColor org.eclipse.che.ide.api.theme.Style.getToolbarActionGroupBorderColor(); -@eval toolbarBackgroundColor org.eclipse.che.ide.api.theme.Style.getToolbarBackgroundColor(); -@eval toolbarIconColor org.eclipse.che.ide.api.theme.Style.getToolbarIconColor(); -@eval toolbarHoverIconColor org.eclipse.che.ide.api.theme.Style.getToolbarHoverIconColor(); -@eval toolbarSelectedIconFilter org.eclipse.che.ide.api.theme.Style.getToolbarSelectedIconFilter(); -@eval tooltipBackgroundColor org.eclipse.che.ide.api.theme.Style.getTooltipBackgroundColor(); - -/*PerspectiveSwitcher*/ -@eval perspectiveSwitcherBackgroundColor org.eclipse.che.ide.api.theme.Style.getPerspectiveSwitcherBackgroundColor(); - -/*SelectCommandComboBox*/ -@eval selectCommandActionColor org.eclipse.che.ide.api.theme.Style.getSelectCommandActionColor(); -@eval selectCommandActionHoverColor org.eclipse.che.ide.api.theme.Style.getSelectCommandActionHoverColor(); -@eval selectCommandActionIconColor org.eclipse.che.ide.api.theme.Style.getSelectCommandActionIconColor(); -@eval selectCommandActionIconBackgroundColor org.eclipse.che.ide.api.theme.Style.getSelectCommandActionIconBackgroundColor(); - -/*DialogBox*/ -@eval dialogTopLeft org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogTopCenter org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogTopRight org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogMiddleLeft org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogMiddleRight org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogBottomLeft org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogBottomCenter org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogBottomRight org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); -@eval dialogContentBackground org.eclipse.che.ide.api.theme.Style.getDialogContentBackground(); - -/*DropdownList*/ -@eval dropdownListBackground org.eclipse.che.ide.api.theme.Style.getDropdownListBackground(); -@eval hoveredDropdownListBackground org.eclipse.che.ide.api.theme.Style.getHoveredDropdownListBackground(); -@eval activeDropdownListBackground org.eclipse.che.ide.api.theme.Style.getActiveDropdownListBackground(); -@eval dropdownListBorder org.eclipse.che.ide.api.theme.Style.getDropdownListBorder(); -@eval dropdownListButtonColor org.eclipse.che.ide.api.theme.Style.getDropdownListButtonColor(); - -/*MenuButton*/ -@eval menuButtonBackground org.eclipse.che.ide.api.theme.Style.getMenuButtonBackground(); -@eval hoveredMenuButtonBackground org.eclipse.che.ide.api.theme.Style.getHoveredMenuButtonBackground(); -@eval activeMenuButtonBackground org.eclipse.che.ide.api.theme.Style.getActiveMenuButtonBackground(); -@eval menuButtonBorder org.eclipse.che.ide.api.theme.Style.getActiveMenuButtonBorder(); - -/* Toolbar controller menu button */ -@eval toolbarControllerBackground org.eclipse.che.ide.api.theme.Style.theme.toolbarControllerBackground(); -@eval toolbarControllerLeftColor org.eclipse.che.ide.api.theme.Style.theme.toolbarControllerLeftColor(); -@eval toolbarControllerTopColor org.eclipse.che.ide.api.theme.Style.theme.toolbarControllerTopColor(); - -/*Window*/ -@eval windowContentBackground org.eclipse.che.ide.api.theme.Style.getWindowContentBackground(); -@eval windowContentFontColor org.eclipse.che.ide.api.theme.Style.getWindowContentFontColor(); -@eval windowShadowColor org.eclipse.che.ide.api.theme.Style.getWindowShadowColor(); -@eval windowHeaderBackground org.eclipse.che.ide.api.theme.Style.getWindowHeaderBackground(); -@eval windowHeaderBorderColor org.eclipse.che.ide.api.theme.Style.getWindowHeaderBorderColor(); -@eval windowFooterBackground org.eclipse.che.ide.api.theme.Style.getWindowFooterBackground(); -@eval windowFooterBorderColor org.eclipse.che.ide.api.theme.Style.getWindowFooterBorderColor(); -@eval windowSeparatorColor org.eclipse.che.ide.api.theme.Style.getWindowSeparatorColor(); -@eval windowTitleFontColor org.eclipse.che.ide.api.theme.Style.getWindowTitleFontColor(); -@def windowTitleFontSize 9pt; - -/*syntax highlight*/ -@eval keyword org.eclipse.che.ide.api.theme.Style.getEditorKeyWord(); -@eval atom org.eclipse.che.ide.api.theme.Style.getEditorAtom(); -@eval number org.eclipse.che.ide.api.theme.Style.getEditorNumber(); -@eval deff org.eclipse.che.ide.api.theme.Style.getEditorDef(); -@eval variable org.eclipse.che.ide.api.theme.Style.getEditorVariable(); -@eval variable2 org.eclipse.che.ide.api.theme.Style.getEditorVariable2(); -@eval property org.eclipse.che.ide.api.theme.Style.getEditorProperty(); -@eval operator org.eclipse.che.ide.api.theme.Style.getEditorOperator(); -@eval comment org.eclipse.che.ide.api.theme.Style.getEditorComment(); -@eval string org.eclipse.che.ide.api.theme.Style.getEditorString(); -@eval string2 org.eclipse.che.ide.api.theme.Style.getEditorString2(); -@eval smeta org.eclipse.che.ide.api.theme.Style.getEditorMeta(); -@eval error org.eclipse.che.ide.api.theme.Style.getEditorError(); -@eval builtin org.eclipse.che.ide.api.theme.Style.getEditorBuiltin(); -@eval tag org.eclipse.che.ide.api.theme.Style.getEditorTag(); -@eval attribute org.eclipse.che.ide.api.theme.Style.getEditorAttribute(); - -/*wizard*/ -@eval stepsPanelColor org.eclipse.che.ide.api.theme.Style.getWizardStepsColor(); -@eval stepsPanelBorerColor org.eclipse.che.ide.api.theme.Style.getWizardStepsBorderColor(); - -/*Cell widgets*/ -@eval cellOddRow org.eclipse.che.ide.api.theme.Style.getCellOddRow(); -@eval cellEvenRow org.eclipse.che.ide.api.theme.Style.getCellEvenRow(); -@eval cellKeyboardSelectedRow org.eclipse.che.ide.api.theme.Style.getCellKeyboardSelectedRow(); -@eval cellHoveredRow org.eclipse.che.ide.api.theme.Style.getCellHoveredRow(); - -/*Events*/ -@eval successEventColor org.eclipse.che.ide.api.theme.Style.getSuccessEventColor(); -@eval errorEventColor org.eclipse.che.ide.api.theme.Style.getErrorEventColor(); -@eval linkColor org.eclipse.che.ide.api.theme.Style.getLinkColor(); -@eval delimeterColor org.eclipse.che.ide.api.theme.Style.getDelimeterColor(); - -/*Events*/ -@eval outputFontColor org.eclipse.che.ide.api.theme.Style.theme.getOutputFontColor(); -@eval outputLinkColor org.eclipse.che.ide.api.theme.Style.getOutputLinkColor(); - -/*Colors*/ -@eval panelBackgroundColor org.eclipse.che.ide.api.theme.Style.getPanelBackgroundColor(); -@eval primaryHighlightColor org.eclipse.che.ide.api.theme.Style.getPrimaryHighlightsColor(); - -@eval iconColor org.eclipse.che.ide.api.theme.Style.theme.iconColor(); -@eval activeIconColor org.eclipse.che.ide.api.theme.Style.theme.activeIconColor(); - -@eval separatorColor org.eclipse.che.ide.api.theme.Style.getSeparatorColor(); -@eval errorColor org.eclipse.che.ide.api.theme.Style.getErrorColor(); -@eval successColor org.eclipse.che.ide.api.theme.Style.getSuccessColor(); - -/*ListBox*/ -@eval listBoxHoverBackgroundColor org.eclipse.che.ide.api.theme.Style.getListBoxHoverBackgroundColor(); -@eval listBoxColor org.eclipse.che.ide.api.theme.Style.getListBoxColor(); -@eval listBoxDisabledColor org.eclipse.che.ide.api.theme.Style.getListBoxDisabledColor(); -@eval listBoxDisabledBackgroundColor org.eclipse.che.ide.api.theme.Style.getListBoxDisabledBackgroundColor(); -@eval listBoxDropdownBackgroundColor org.eclipse.che.ide.api.theme.Style.getListBoxDropdownBackgroundColor(); -@eval listBoxDropdownShadowColor org.eclipse.che.ide.api.theme.Style.theme.listBoxDropdownShadowColor(); - -/*CategoriesList*/ -@eval categoriesListHeaderTextColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListHeaderTextColor(); -@eval categoriesListHeaderIconColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListHeaderIconColor(); -@eval categoriesListHeaderBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListHeaderBackgroundColor(); -@eval categoriesListItemTextColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListItemTextColor(); -@eval categoriesListItemBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListItemBackgroundColor(); - -/*Scrollbar*/ -@eval scrollbarBorderColor org.eclipse.che.ide.api.theme.Style.theme.scrollbarBorderColor(); -@eval scrollbarBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.scrollbarBackgroundColor(); -@eval scrollbarHoverBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.scrollbarHoverBackgroundColor(); - -/*RadioButton*/ -@eval radioButtonIconColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonIconColor(); -@eval radioButtonBorderColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonBorderColor(); -@eval radioButtonBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonBackgroundColor(); -@eval radioButtonFontColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonFontColor(); -@eval radioButtonDisabledFontColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonDisabledFontColor(); -@eval radioButtonDisabledIconColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonDisabledIconColor(); -@eval radioButtonDisabledBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.radioButtonDisabledBackgroundColor(); - -/*CheckBox*/ -@eval checkBoxIconColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxIconColor(); -@eval checkBoxIndeterminateIconColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxIndeterminateIconColor(); -@eval checkBoxFontColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxFontColor(); -@eval checkBoxBorderColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxBorderColor(); -@eval checkBoxBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxBackgroundColor(); -@eval checkBoxDisabledIconColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxDisabledIconColor(); -@eval checkBoxDisabledFontColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxDisabledFontColor(); -@eval checkBoxDisabledBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.checkBoxDisabledBackgroundColor(); - -/*Loader*/ -@eval loaderBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.loaderBackgroundColor(); -@eval loaderBorderColor org.eclipse.che.ide.api.theme.Style.theme.loaderBorderColor(); -@eval loaderBoxShadow org.eclipse.che.ide.api.theme.Style.theme.loaderBoxShadow(); -@eval loaderSVGFill org.eclipse.che.ide.api.theme.Style.theme.loaderSVGFill(); -@eval loaderLabelColor org.eclipse.che.ide.api.theme.Style.theme.loaderLabelColor(); - -/*Find results*/ -@eval findResultsBackground org.eclipse.che.ide.api.theme.Style.theme.findResultsBackground(); -@eval findResultsTextColor org.eclipse.che.ide.api.theme.Style.theme.findResultsTextColor(); diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/AbstractPerspectiveActionTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/AbstractPerspectiveActionTest.java deleted file mode 100644 index abd769da025..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/AbstractPerspectiveActionTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.gwtmockito.GwtMockitoTestRunner; -import java.util.Arrays; -import java.util.List; -import javax.validation.constraints.NotNull; -import javax.ws.rs.NotSupportedException; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Dmitry Shnurenko */ -@RunWith(GwtMockitoTestRunner.class) -public class AbstractPerspectiveActionTest { - - private static final String SOME_TEXT = "someText"; - - @Mock private PerspectiveManager manager; - @Mock private ActionEvent event; - - private DummyAction dummyAction; - - @Before - public void setUp() { - dummyAction = new DummyAction(Arrays.asList(SOME_TEXT), SOME_TEXT, SOME_TEXT, null); - } - - @Test - public void actionShouldBePerformed() { - Presentation presentation = new Presentation(); - when(event.getPresentation()).thenReturn(presentation); - when(manager.getPerspectiveId()).thenReturn("123"); - - dummyAction.update(event); - - verify(event).getPresentation(); - verify(manager).getPerspectiveId(); - } - - private class DummyAction extends AbstractPerspectiveAction { - - public DummyAction( - @NotNull List activePerspectives, - @NotNull String tooltip, - @NotNull String description, - @NotNull SVGResource icon) { - super(activePerspectives, tooltip, description, icon); - perspectiveManager = () -> AbstractPerspectiveActionTest.this.manager; - appContext = () -> null; - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - throw new NotSupportedException("Method isn't supported in current mode..."); - } - - @Override - public void actionPerformed(ActionEvent e) { - throw new NotSupportedException("Method isn't supported in current mode..."); - } - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/DefaultActionGroupTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/DefaultActionGroupTest.java deleted file mode 100644 index e998e307e66..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/action/DefaultActionGroupTest.java +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.action; - -import static org.eclipse.che.ide.api.constraints.Anchor.AFTER; -import static org.eclipse.che.ide.api.constraints.Anchor.BEFORE; -import static org.fest.assertions.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.gwtmockito.GwtMockitoTestRunner; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; - -/** @author Mihail Kuznyetsov. */ -@RunWith(GwtMockitoTestRunner.class) -public class DefaultActionGroupTest { - - @Mock BaseAction firstAction; - - @Mock BaseAction secondAction; - - @Mock BaseAction thirdAction; - - @Mock BaseAction fourthAction; - - @Mock BaseAction fifthAction; - - @Mock BaseAction sixthAction; - - @Mock ActionManager actionManager; - - DefaultActionGroup defaultActionGroup; - - @Before - public void setup() { - defaultActionGroup = new DefaultActionGroup(actionManager); - } - - @Test - public void shouldNotAddSameActionTwice() { - BaseAction action = mock(BaseAction.class); - - defaultActionGroup.add(action, new Constraints(AFTER, "someAction")); - defaultActionGroup.add(action, new Constraints(BEFORE, "someAction")); - - assertThat(defaultActionGroup.getChildrenCount()).isEqualTo(1); - } - - @Test - public void shouldReturnEmptyArrayWhenThereIsNoActions() { - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)).isEmpty(); - } - - @Test - public void addActionsWithNoExplicitConstraints() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addOneFirst() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, Constraints.FIRST); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - thirdAction, firstAction, secondAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addTwoFirst() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, Constraints.FIRST); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction, Constraints.FIRST); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - fifthAction, thirdAction, firstAction, secondAction, fourthAction, sixthAction); - } - - @Test - public void addOneLast() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, Constraints.LAST); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addOneBefore() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, new Constraints(BEFORE, "secondAction")); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, thirdAction, secondAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addTwoBefore() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, new Constraints(BEFORE, "secondAction")); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction, new Constraints(BEFORE, "secondAction")); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, thirdAction, fifthAction, secondAction, fourthAction, sixthAction); - } - - @Test - public void addOneBeforeNotAdded() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction, new Constraints(BEFORE, "fifthAction")); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, fourthAction, thirdAction, fifthAction, sixthAction); - } - - @Test - public void addComplexBefore() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(BEFORE, "fourthAction")); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction, new Constraints(BEFORE, "sixthAction")); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, thirdAction, fifthAction, secondAction, fourthAction, sixthAction); - } - - @Test - public void addOneAfter() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction, new Constraints(AFTER, "firstAction")); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, fourthAction, secondAction, thirdAction, fifthAction, sixthAction); - } - - @Test - public void addTwoAfter() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(AFTER, "fifthAction")); - defaultActionGroup.add(thirdAction, new Constraints(AFTER, "fifthAction")); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, fourthAction, fifthAction, thirdAction, secondAction, sixthAction); - } - - @Test - public void addComplexAfter() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(AFTER, "fifthAction")); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction, new Constraints(AFTER, "firstAction")); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, fifthAction, secondAction, thirdAction, fourthAction, sixthAction); - } - - @Test - public void addOneAfterNotAdded() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(AFTER, "fifthAction")); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, thirdAction, fourthAction, fifthAction, secondAction, sixthAction); - } - - @Test - public void addActionToTheEndWhenConstraintUnsatisfied() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(AFTER, "tenthAction")); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, thirdAction, fourthAction, fifthAction, sixthAction, secondAction); - } - - @Test - public void shouldResortAllActionsAfterAddingOne() { - // add some actions - defaultActionGroup.add(firstAction); - when(actionManager.getId(eq(firstAction))).thenReturn("firstAction"); - - defaultActionGroup.add(secondAction, Constraints.FIRST); - when(actionManager.getId(eq(secondAction))).thenReturn("secondAction"); - - defaultActionGroup.add(thirdAction, new Constraints(AFTER, "fourthAction")); - - // verify order - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - assertThat(Arrays.asList(result)).containsExactly(secondAction, firstAction, thirdAction); - - // add other actions - defaultActionGroup.add(fourthAction); - - defaultActionGroup.add(fifthAction, Constraints.FIRST); - when(actionManager.getId(eq(fifthAction))).thenReturn("fifthAction"); - - defaultActionGroup.add(sixthAction, new Constraints(BEFORE, "firstAction")); - when(actionManager.getId(eq(sixthAction))).thenReturn("sixthAction"); - - // verify that actions have been resorted - Action[] newResult = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - assertThat(Arrays.asList(newResult)) - .hasSize(6) - .containsExactly( - fifthAction, secondAction, sixthAction, firstAction, fourthAction, thirdAction); - } - - @Test - public void getChildrenCount() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction, new Constraints(AFTER, "fifthAction")); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - int count = defaultActionGroup.getChildrenCount(); - // then - assertThat(count).isEqualTo(6); - } - - @Test - public void addActionsAndSeparators() { - // given - mockRegisterActions(); - - defaultActionGroup.addSeparator(); - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.addSeparator(); - defaultActionGroup.add(thirdAction); - defaultActionGroup.addSeparator(); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - defaultActionGroup.addSeparator(); - - // when - Action[] newResult = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(newResult)) - .hasSize(10) - .containsExactly( - Separator.getInstance(), - firstAction, - secondAction, - Separator.getInstance(), - thirdAction, - Separator.getInstance(), - fourthAction, - fifthAction, - sixthAction, - Separator.getInstance()); - } - - @Test - public void addActionsFromActionGroup() { - // given - mockRegisterActions(); - DefaultActionGroup newGroup = new DefaultActionGroup(actionManager); - - newGroup.add(firstAction); - newGroup.add(secondAction); - newGroup.add(thirdAction); - newGroup.add(fourthAction); - newGroup.add(fifthAction); - newGroup.add(sixthAction); - - defaultActionGroup.addAll(newGroup); - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addCollectionOfActions() { - // given - mockRegisterActions(); - List actions = - new ArrayList<>( - Arrays.asList( - new Action[] { - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction - })); - - defaultActionGroup.addAll(actions); - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void addActionsWithVarArg() { - // given - mockRegisterActions(); - defaultActionGroup.addAll( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - // then - assertThat(Arrays.asList(result)) - .hasSize(6) - .containsExactly( - firstAction, secondAction, thirdAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void removeOneAction() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - defaultActionGroup.remove(thirdAction); - - // when - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - - // then - assertThat(Arrays.asList(result)) - .containsExactly(firstAction, secondAction, fourthAction, fifthAction, sixthAction); - } - - @Test - public void removeOneActionAndResortConstraints() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - defaultActionGroup.remove(fourthAction); - - // then - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - assertThat(Arrays.asList(result)) - .containsExactly(firstAction, secondAction, thirdAction, fifthAction, sixthAction); - } - - @Test - public void removeAllActions() { - // given - mockRegisterActions(); - - defaultActionGroup.add(firstAction); - defaultActionGroup.add(secondAction); - defaultActionGroup.add(thirdAction); - defaultActionGroup.add(fourthAction); - defaultActionGroup.add(fifthAction); - defaultActionGroup.add(sixthAction); - - // when - defaultActionGroup.removeAll(); - - // then - Action[] result = defaultActionGroup.getChildren(mock(ActionEvent.class)); - assertThat(Arrays.asList(result)).isEmpty(); - } - - private void mockRegisterActions() { - when(actionManager.getId(eq(firstAction))).thenReturn("firstAction"); - when(actionManager.getId(eq(secondAction))).thenReturn("secondAction"); - when(actionManager.getId(eq(thirdAction))).thenReturn("thirdAction"); - when(actionManager.getId(eq(fourthAction))).thenReturn("fourthAction"); - when(actionManager.getId(eq(fifthAction))).thenReturn("fifthAction"); - when(actionManager.getId(eq(sixthAction))).thenReturn("sixthAction"); - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/AnnotationIteratorTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/AnnotationIteratorTest.java deleted file mode 100644 index 017dc14a230..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/AnnotationIteratorTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor; - -import static org.fest.assertions.Assertions.assertThat; -import static org.mockito.Mockito.when; - -import com.google.gwtmockito.GwtMockitoTestRunner; -import java.util.Iterator; -import org.eclipse.che.ide.api.editor.annotation.AnnotationModelImpl; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMap; -import org.eclipse.che.ide.api.editor.text.Position; -import org.eclipse.che.ide.api.editor.text.annotation.Annotation; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; - -/** */ -@RunWith(GwtMockitoTestRunner.class) -public class AnnotationIteratorTest { - - @Mock private DocumentPositionMap documentPositionMap; - - @Mock private DocumentHandle documentHandle; - - @Mock private Document document; - private AnnotationModelImpl annotationModel; - - @Before - public void setUp() throws Exception { - - when(documentHandle.getDocument()).thenReturn(document); - - annotationModel = new AnnotationModelImpl(documentPositionMap); - annotationModel.setDocumentHandle(documentHandle); - } - - @Test - public void emptyIterator() throws Exception { - when(document.getContentsCharCount()).thenReturn(10); - - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(0, 8)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(2, 5)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(5, 8)); - - Iterator iterator = annotationModel.getAnnotationIterator(9, 1, true, true); - assertThat(iterator).isNotNull().hasSize(0); - } - - @Test - public void testIterator() throws Exception { - - when(document.getContentsCharCount()).thenReturn(20); - - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(0, 10)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(2, 5)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(5, 10)); - - Iterator iterator = annotationModel.getAnnotationIterator(1, 6, true, true); - assertThat(iterator).isNotNull().hasSize(3); - } - - @Test - public void testCanStartBefore() throws Exception { - when(document.getContentsCharCount()).thenReturn(20); - - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(0, 10)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(2, 5)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(5, 10)); - - Iterator iterator = annotationModel.getAnnotationIterator(1, 6, false, true); - assertThat(iterator).isNotNull().hasSize(2); - } - - @Test - public void testCanEndAfter() throws Exception { - when(document.getContentsCharCount()).thenReturn(20); - - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(0, 10)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(2, 5)); - annotationModel.addAnnotation(new Annotation("aa", true, "aa"), new Position(5, 10)); - - Iterator iterator = annotationModel.getAnnotationIterator(1, 6, true, false); - assertThat(iterator).isNotNull().hasSize(2); - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/changeintercept/changeintercept/CloseCStyleCommentChangeInterceptorTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/changeintercept/changeintercept/CloseCStyleCommentChangeInterceptorTest.java deleted file mode 100644 index 0fb291881b3..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/editor/changeintercept/changeintercept/CloseCStyleCommentChangeInterceptorTest.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.editor.changeintercept.changeintercept; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.mockito.Mockito.doReturn; - -import org.eclipse.che.ide.api.editor.changeintercept.CloseCStyleCommentChangeInterceptor; -import org.eclipse.che.ide.api.editor.changeintercept.TextChange; -import org.eclipse.che.ide.api.editor.document.ReadOnlyDocument; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -/** Test of the c-style bloc comment close interceptor. */ -@RunWith(MockitoJUnitRunner.class) -public class CloseCStyleCommentChangeInterceptorTest { - - @Mock private ReadOnlyDocument document; - - @InjectMocks private CloseCStyleCommentChangeInterceptor interceptor; - - /** The input is a normal /* */ comment without leading spaces. */ - @Ignore - @Test - public void testNotFirstLineNoLeadingSpaces() { - doReturn("").when(document).getLineContent(0); - doReturn("/*").when(document).getLineContent(1); - doReturn(" *").when(document).getLineContent(2); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(1, 2)) - .to(new TextPosition(2, 2)) - .insert("\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNotNull(output); - final TextChange expected = - new TextChange.Builder() - .from(new TextPosition(1, 2)) - .to(new TextPosition(3, 3)) - .insert("\n * \n */") - .build(); - Assert.assertEquals(expected, output); - } - - @Ignore - @Test - public void testFirstLineNoLeadingSpaces() { - doReturn("/*").when(document).getLineContent(0); - doReturn(" *").when(document).getLineContent(1); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(0, 2)) - .to(new TextPosition(1, 2)) - .insert("\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNotNull(output); - final TextChange expected = - new TextChange.Builder() - .from(new TextPosition(0, 2)) - .to(new TextPosition(2, 3)) - .insert("\n * \n */") - .build(); - Assert.assertEquals(expected, output); - } - - @Test - public void testStartNotEmptyLine() { - doReturn("s/*").when(document).getLineContent(1); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(1, 3)) - .to(new TextPosition(2, 2)) - .insert("\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNull(output); - } - - @Ignore - @Test - public void test3LeadingSpaces() { - testWithLeading(" "); - } - - @Ignore - @Test - public void testLeadingTab() { - testWithLeading("\t"); - } - - @Ignore - @Test - public void testLeadingMixed() { - testWithLeading(" \t"); - } - - private void testWithLeading(final String lead) { - doReturn(lead + "/*").when(document).getLineContent(1); - doReturn(lead + " *").when(document).getLineContent(2); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(1, 2 + lead.length())) - .to(new TextPosition(2, 2 + lead.length())) - .insert("\n" + lead + " *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNotNull(output); - final TextChange expected = - new TextChange.Builder() - .from(new TextPosition(1, 2 + lead.length())) - .to(new TextPosition(3, 3 + lead.length())) - .insert("\n" + lead + " * " + "\n" + lead + " */") - .build(); - Assert.assertEquals(expected, output); - } - - @Ignore - @Test - public void testAddWithComment() { - doReturn("/*").when(document).getLineContent(0); - doReturn("/*").when(document).getLineContent(1); - doReturn(" *").when(document).getLineContent(2); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(1, 2)) - .to(new TextPosition(2, 2)) - .insert("\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNull(output); - } - - @Ignore - @Test - public void testJavadocStyleComment() { - doReturn("/**").when(document).getLineContent(0); - doReturn(" *").when(document).getLineContent(1); - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(0, 3)) - .to(new TextPosition(1, 2)) - .insert("\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNotNull(output); - final TextChange expected = - new TextChange.Builder() - .from(new TextPosition(0, 3)) - .to(new TextPosition(2, 3)) - .insert("\n * \n */") - .build(); - Assert.assertEquals(expected, output); - } - - @Test - public void testPasteWholeCommentStart() { - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(0, 0)) - .to(new TextPosition(1, 2)) - .insert("/**\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNull(output); - } - - @Test - public void testCloseComment() { - final TextChange input = - new TextChange.Builder() - .from(new TextPosition(0, 0)) - .to(new TextPosition(1, 2)) - .insert("/**\n *") - .build(); - final TextChange output = interceptor.processChange(input, document); - assertNull(output); - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/macro/BaseMacroTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/macro/BaseMacroTest.java deleted file mode 100644 index 6e2ae790912..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/macro/BaseMacroTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.macro; - -import static org.junit.Assert.assertSame; - -import com.google.gwtmockito.GwtMockitoTestRunner; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Unit tests for the {@link BaseMacro} - * - * @author Vlad Zhukovskyi - */ -@RunWith(GwtMockitoTestRunner.class) -public class BaseMacroTest { - - public static final String NAME = "name"; - public static final String VALUE = "value"; - public static final String DESCRIPTION = "description"; - - private BaseMacro macro; - - @Before - public void init() throws Exception { - macro = new BaseMacro(NAME, VALUE, DESCRIPTION); - } - - @Test - public void getKey() throws Exception { - assertSame(macro.getName(), NAME); - } - - @Test - public void getValue() throws Exception { - macro - .expand() - .then( - value -> { - assertSame(value, VALUE); - }); - } - - @Test - public void getDescription() throws Exception { - assertSame(macro.getDescription(), DESCRIPTION); - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardPageTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardPageTest.java deleted file mode 100644 index c8571a37a73..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardPageTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import java.util.HashMap; -import java.util.Map; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; - -/** - * Testing {@link AbstractWizardPage}. - * - * @author Artem Zatsarynnyi - */ -@RunWith(MockitoJUnitRunner.class) -public class AbstractWizardPageTest { - private AbstractWizardPage wizardPage; - - @Before - public void setUp() { - wizardPage = new DummyWizardPage(); - } - - @Test - public void shouldInitPage() throws Exception { - String dataObject = "dataObject"; - wizardPage.init(dataObject); - assertEquals(dataObject, wizardPage.dataObject); - } - - @Test - public void shouldSetContext() throws Exception { - Map context = new HashMap<>(); - wizardPage.setContext(context); - assertEquals(context, wizardPage.context); - } - - @Test - public void shouldSetUpdateDelegate() throws Exception { - Wizard.UpdateDelegate updateDelegate = mock(Wizard.UpdateDelegate.class); - wizardPage.setUpdateDelegate(updateDelegate); - assertEquals(updateDelegate, wizardPage.updateDelegate); - } - - @Test - public void shouldNotSkipped() throws Exception { - assertFalse(wizardPage.canSkip()); - } - - @Test - public void shouldBeCompleted() throws Exception { - assertTrue(wizardPage.isCompleted()); - } - - private class DummyWizardPage extends AbstractWizardPage { - @Override - public void go(AcceptsOneWidget container) { - // do nothing - } - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardTest.java deleted file mode 100644 index 53494c5ccf8..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/wizard/AbstractWizardTest.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.wizard; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.mockito.ArgumentMatchers.anyMapOf; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import javax.validation.constraints.NotNull; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -/** - * Testing {@link AbstractWizard}. - * - * @author Andrey Plotnikov - * @author Artem Zatsarynnyi - */ -@RunWith(MockitoJUnitRunner.class) -public class AbstractWizardTest { - private final String dataObject = "dataObject"; - @Mock private WizardPage page1; - @Mock private WizardPage page2; - @Mock private WizardPage page3; - @Mock private WizardPage page4; - @Mock private Wizard.UpdateDelegate updateDelegate; - private AbstractWizard wizard; - - @Before - public void setUp() { - wizard = new DummyWizard(dataObject); - wizard.setUpdateDelegate(updateDelegate); - } - - @Test - public void testAddPage() throws Exception { - wizard.addPage(page1); - wizard.addPage(page2); - wizard.addPage(page3); - - verify(page1).setUpdateDelegate(eq(updateDelegate)); - verify(page1).setContext(anyMapOf(String.class, String.class)); - verify(page1).init(eq(dataObject)); - - verify(page2).setUpdateDelegate(eq(updateDelegate)); - verify(page2).setContext(anyMapOf(String.class, String.class)); - verify(page2).init(eq(dataObject)); - - verify(page3).setUpdateDelegate(eq(updateDelegate)); - verify(page3).setContext(anyMapOf(String.class, String.class)); - verify(page3).init(eq(dataObject)); - - assertEquals(page1, wizard.navigateToFirst()); - assertEquals(page2, wizard.navigateToNext()); - assertEquals(page3, wizard.navigateToNext()); - assertNull(wizard.navigateToNext()); - } - - @Test - public void testAddPageByIndex() throws Exception { - wizard.addPage(page1); - wizard.addPage(page3); - wizard.addPage(page2, 1, false); - - assertEquals(page1, wizard.navigateToFirst()); - assertEquals(page2, wizard.navigateToNext()); - assertEquals(page3, wizard.navigateToNext()); - assertNull(wizard.navigateToNext()); - } - - @Test - public void testAddPageWithReplace() throws Exception { - wizard.addPage(page1); - wizard.addPage(page3); - wizard.addPage(page2, 1, true); - - assertEquals(page1, wizard.navigateToFirst()); - assertEquals(page2, wizard.navigateToNext()); - assertNull(wizard.navigateToNext()); - } - - @Test - public void testNavigateToFirstWhenNeedToSkipFirstPages() throws Exception { - when(page1.canSkip()).thenReturn(true); - - wizard.addPage(page1); - wizard.addPage(page2); - wizard.addPage(page3); - - assertEquals(page2, wizard.navigateToFirst()); - } - - @Test - public void testNavigateToFirst() throws Exception { - wizard.addPage(page1); - - assertEquals(page1, wizard.navigateToFirst()); - } - - @Test - public void testCanCompleteWhenAllPagesIsCompleted() throws Exception { - when(page1.isCompleted()).thenReturn(true); - when(page2.isCompleted()).thenReturn(true); - when(page3.isCompleted()).thenReturn(true); - - wizard.addPage(page1); - wizard.addPage(page2); - wizard.addPage(page3); - - assertEquals(true, wizard.canComplete()); - } - - @Test - public void testCanCompleteWhenSomePageIsNotCompleted() throws Exception { - when(page1.isCompleted()).thenReturn(true); - when(page2.isCompleted()).thenReturn(false); - - wizard.addPage(page1); - wizard.addPage(page2); - - assertEquals(false, wizard.canComplete()); - } - - @Test - public void testNavigateToNextUseCase1() throws Exception { - prepareTestCase1(); - - assertEquals(page1, wizard.navigateToFirst()); - assertEquals(page2, wizard.navigateToNext()); - assertEquals(page4, wizard.navigateToNext()); - assertNull(wizard.navigateToNext()); - } - - @Test - public void testNavigateToPreviousUseCase1() throws Exception { - prepareTestCase1(); - - wizard.navigateToFirst(); - navigatePages(wizard, 2); - - assertEquals(page2, wizard.navigateToPrevious()); - assertEquals(page1, wizard.navigateToPrevious()); - } - - @Test - public void testHasNextUseCase1() throws Exception { - prepareTestCase1(); - - wizard.navigateToFirst(); - assertEquals(true, wizard.hasNext()); - - navigatePages(wizard, 1); - assertEquals(true, wizard.hasNext()); - - navigatePages(wizard, 1); - assertEquals(false, wizard.hasNext()); - } - - @Test - public void testHasPreviousUseCase1() throws Exception { - prepareTestCase1(); - - wizard.navigateToFirst(); - assertEquals(false, wizard.hasPrevious()); - - navigatePages(wizard, 1); - assertEquals(true, wizard.hasPrevious()); - - navigatePages(wizard, 1); - assertEquals(true, wizard.hasPrevious()); - } - - /** In case the wizard has got 3 skipped pages and 1 not skipped page. */ - private void prepareTestCase1() { - when(page1.canSkip()).thenReturn(false); - - when(page2.canSkip()).thenReturn(false); - - when(page3.canSkip()).thenReturn(true); - - when(page4.canSkip()).thenReturn(false); - - wizard.addPage(page1); - wizard.addPage(page2); - wizard.addPage(page3); - wizard.addPage(page4); - } - - @Test - public void testNavigateToNextUseCase2() throws Exception { - prepareTestCase2(); - - assertEquals(page1, wizard.navigateToFirst()); - assertEquals(page2, wizard.navigateToNext()); - assertNull(wizard.navigateToNext()); - } - - @Test - public void testNavigateToPreviousUseCase2() throws Exception { - prepareTestCase2(); - - wizard.navigateToFirst(); - navigatePages(wizard, 1); - - assertEquals(page1, wizard.navigateToPrevious()); - } - - @Test - public void testHasNextUseCase2() throws Exception { - prepareTestCase2(); - - wizard.navigateToFirst(); - assertEquals(true, wizard.hasNext()); - - navigatePages(wizard, 1); - assertEquals(false, wizard.hasNext()); - } - - @Test - public void testHasPreviousUseCase2() throws Exception { - prepareTestCase2(); - - wizard.navigateToFirst(); - assertEquals(false, wizard.hasPrevious()); - - navigatePages(wizard, 1); - assertEquals(true, wizard.hasPrevious()); - } - - /** In case the wizard has got 2 not skipped pages and 2 skipped page. */ - private void prepareTestCase2() { - when(page1.canSkip()).thenReturn(false); - - when(page2.canSkip()).thenReturn(false); - - when(page3.canSkip()).thenReturn(true); - - when(page4.canSkip()).thenReturn(true); - - wizard.addPage(page1); - wizard.addPage(page2); - wizard.addPage(page3); - wizard.addPage(page4); - } - - private void navigatePages(Wizard wizard, int count) { - for (int i = 0; i < count; i++) { - wizard.navigateToNext(); - } - } - - private class DummyWizard extends AbstractWizard { - DummyWizard(String dataObject) { - super(dataObject); - } - - @Override - public void complete(@NotNull CompleteCallback callback) { - // do nothing - } - } -} diff --git a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtilTest.java b/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtilTest.java deleted file mode 100644 index d365a5879c8..00000000000 --- a/ide/che-core-ide-api/src/test/java/org/eclipse/che/ide/api/workspace/WsAgentServerUtilTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.api.workspace; - -import static java.util.Collections.singletonMap; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_WS_AGENT_HTTP_REFERENCE; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_WS_AGENT_WEBSOCKET_REFERENCE; -import static org.eclipse.che.ide.api.workspace.WsAgentServerUtil.WSAGENT_SERVER_REF_PREFIX_PARAM; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import org.eclipse.che.ide.QueryParameters; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -/** Tests for the {@link WsAgentServerUtil}. */ -@RunWith(MockitoJUnitRunner.class) -public class WsAgentServerUtilTest { - - static final String REF_PREFIX = "dev-"; - - @Mock AppContext appContext; - @Mock QueryParameters queryParameters; - - @Mock RuntimeImpl runtime; - @Mock WorkspaceImpl workspace; - @Mock MachineImpl machine; - @Mock ServerImpl serverWsAgentHTTP; - @Mock ServerImpl serverWsAgentWebSocket; - - @InjectMocks WsAgentServerUtil util; - - @Test - public void shouldReturnWsAgentServerMachine() throws Exception { - mockRuntime(); - - Optional machineOpt = util.getWsAgentServerMachine(); - - assertTrue(machineOpt.isPresent()); - assertEquals(machine, machineOpt.get()); - } - - @Test - public void shouldReturnServerByRef() throws Exception { - mockRuntime(); - - Optional serverOpt = util.getServerByRef(SERVER_WS_AGENT_HTTP_REFERENCE); - - assertTrue(serverOpt.isPresent()); - assertEquals(serverWsAgentHTTP, serverOpt.get()); - } - - @Test - public void shouldNotReturnServerByWrongRef() throws Exception { - mockRuntime(); - - Optional serverOpt = util.getServerByRef("wrong-ref"); - - assertFalse(serverOpt.isPresent()); - } - - @Test - public void shouldReturnWsAgentHttpServerReferenceWithPrefix() throws Exception { - when(queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM)).thenReturn(REF_PREFIX); - - String serverRef = util.getWsAgentHttpServerReference(); - - verify(queryParameters).getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - assertEquals(REF_PREFIX + SERVER_WS_AGENT_HTTP_REFERENCE, serverRef); - } - - @Test - public void shouldReturnWsAgentHttpServerReferenceWithoutPrefix() throws Exception { - when(queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM)).thenReturn(""); - - String serverRef = util.getWsAgentHttpServerReference(); - - verify(queryParameters).getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - assertEquals(SERVER_WS_AGENT_HTTP_REFERENCE, serverRef); - } - - @Test - public void shouldReturnWsAgentWebSocketServerReferenceWithPrefix() throws Exception { - when(queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM)).thenReturn(REF_PREFIX); - - String serverRef = util.getWsAgentWebSocketServerReference(); - - verify(queryParameters).getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - assertEquals(REF_PREFIX + SERVER_WS_AGENT_WEBSOCKET_REFERENCE, serverRef); - } - - @Test - public void shouldReturnWsAgentWebSocketServerReferenceWithoutPrefix() throws Exception { - when(queryParameters.getByName(WSAGENT_SERVER_REF_PREFIX_PARAM)).thenReturn(""); - - String serverRef = util.getWsAgentWebSocketServerReference(); - - verify(queryParameters).getByName(WSAGENT_SERVER_REF_PREFIX_PARAM); - assertEquals(SERVER_WS_AGENT_WEBSOCKET_REFERENCE, serverRef); - } - - @Test - public void shouldReturnWorkspaceRuntime() throws Exception { - mockRuntime(); - - Optional runtimeOpt = util.getWorkspaceRuntime(); - - assertTrue(runtimeOpt.isPresent()); - assertEquals(runtime, runtimeOpt.get()); - } - - private void mockRuntime() { - Map servers = new HashMap<>(); - servers.put(SERVER_WS_AGENT_HTTP_REFERENCE, serverWsAgentHTTP); - servers.put(SERVER_WS_AGENT_WEBSOCKET_REFERENCE, serverWsAgentWebSocket); - - when(appContext.getWorkspace()).thenReturn(workspace); - when(workspace.getRuntime()).thenReturn(runtime); - when(runtime.getMachines()).thenReturn(singletonMap("dev-machine", machine)); - when(machine.getServers()).thenReturn(servers); - } -} diff --git a/ide/che-core-ide-app/pom.xml b/ide/che-core-ide-app/pom.xml deleted file mode 100644 index b131e16d632..00000000000 --- a/ide/che-core-ide-app/pom.xml +++ /dev/null @@ -1,415 +0,0 @@ - - - - 4.0.0 - - che-core-ide-parent - org.eclipse.che.core - 7.0.0-rc-4.0-SNAPSHOT - - che-core-ide-app - gwt-lib - Che Core :: IDE :: App - - false - ${project.build.directory}/generated-sources/gen - UTF-8 - ${project.build.directory}/${project.build.finalName} - - - - com.google.code.findbugs - jsr305 - - - com.google.guava - guava - - - com.google.gwt.inject - gin - - - com.google.inject - guice - - - com.google.inject.extensions - guice-assistedinject - - - com.google.jsinterop - jsinterop-annotations - - - javax.inject - javax.inject - - - javax.validation - validation-api - - - org.eclipse.che - che-exec-agent-shared - - - org.eclipse.che - che-exec-agent-shared - sources - - - org.eclipse.che.core - che-core-api-auth-shared - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-core - sources - - - org.eclipse.che.core - che-core-api-debug-shared - - - org.eclipse.che.core - che-core-api-debug-shared - sources - - - org.eclipse.che.core - che-core-api-factory-shared - - - org.eclipse.che.core - che-core-api-factory-shared - sources - - - org.eclipse.che.core - che-core-api-git-shared - - - org.eclipse.che.core - che-core-api-git-shared - sources - - - org.eclipse.che.core - che-core-api-model - - - org.eclipse.che.core - che-core-api-model - sources - - - org.eclipse.che.core - che-core-api-project-shared - - - org.eclipse.che.core - che-core-api-project-templates-shared - - - org.eclipse.che.core - che-core-api-project-templates-shared - sources - - - org.eclipse.che.core - che-core-api-ssh-shared - - - org.eclipse.che.core - che-core-api-ssh-shared - sources - - - org.eclipse.che.core - che-core-api-user-shared - - - org.eclipse.che.core - che-core-api-user-shared - sources - - - org.eclipse.che.core - che-core-api-workspace-shared - - - org.eclipse.che.core - che-core-api-workspace-shared - sources - - - org.eclipse.che.core - che-core-commons-annotations - - - org.eclipse.che.core - che-core-commons-gwt - - - org.eclipse.che.core - che-core-ide-api - - - org.eclipse.che.core - che-core-ide-generators - - - org.eclipse.che.core - che-core-ide-ui - gwt-lib - - - org.eclipse.che.lib - che-terminal-client - - - org.slf4j - slf4j-api - - - com.google.gwt - gwt-dev - provided - - - com.google.gwt - gwt-elemental - provided - - - com.google.gwt - gwt-user - provided - - - org.vectomatic - lib-gwt-svg - provided - - - com.google.gwt.gwtmockito - gwtmockito - test - - - javax.ws.rs - javax.ws.rs-api - test - - - junit - junit - test - - - org.easytesting - fest-assert - test - - - org.eclipse.che.core - che-core-commons-lang - test - - - org.eclipse.che.core - che-core-commons-test - test - - - org.hamcrest - hamcrest-core - test - - - org.mockito - mockito-core - test - - - - - - true - src/main/resources - - - - - net.ltgt.gwt.maven - gwt-maven-plugin - true - - org.eclipse.che.ide.Core - - - - org.codehaus.mojo - exec-maven-plugin - - - extManager-client - generate-sources - - java - - - org.eclipse.che.util.ExtensionManagerGenerator - - --rootDir=${generated.sources.directory} - - - - - IDEInjector-client - generate-sources - - java - - - org.eclipse.che.util.IDEInjectorGenerator - - --rootDir=${generated.sources.directory} - - - - - DtoRegistry-client - generate-sources - - java - - - org.eclipse.che.util.DtoFactoryVisitorRegistryGenerator - - --rootDir=${generated.sources.directory} - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${generated.sources.directory} - - - - - - - org.eclipse.che.core - che-core-dyna-provider-generator-maven-plugin - ${project.version} - - - generate-sources - - generate - - - - - ${generated.sources.directory} - - - - com.mycila - license-maven-plugin - - - **/OutputCustomizer.java - **/AbstractOutputCustomizer.java - **/BaseOutputCustomizerTest.java - **/JavaOutputCustomizer.java - **/JavaOutputCustomizerTest.java - **/CompoundOutputCustomizer.java - **/CompoundOutputCustomizerTest.java - **/CSharpOutputCustomizer.java - **/CSharpOutputCustomizerTest.java - **/CPPOutputCustomizer.java - **/CPPOutputCustomizerTest.java - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-terminal - process-resources - - unpack - - - - - org.eclipse.che.lib - che-terminal-client - ${che.lib.version} - jar - false - ${project.build.outputDirectory}/org/eclipse/che/public/term - org/**,META-INF/** - - - - - - analyze - - - org.eclipse.che.core:che-core-ide-generators - - org.eclipse.che.core:che-core-api-factory-shared - org.eclipse.che.core:che-core-api-core - org.eclipse.che.core:che-core-api-model - org.eclipse.che.core:che-core-api-git-shared - org.eclipse.che.core:che-core-api-ssh-shared - org.eclipse.che.core:che-core-api-workspace-shared - org.eclipse.che.core:che-core-api-user-shared - org.eclipse.che.core:che-core-api-project-templates-shared - org.eclipse.che.core:che-core-api-debug-shared - org.eclipse.che:che-exec-agent-shared - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java deleted file mode 100644 index 3300048429d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/CoreLocalizationConstant.java +++ /dev/null @@ -1,1362 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide; - -import com.google.gwt.i18n.client.Messages; - -/** @author Andrey Plotnikov */ -public interface CoreLocalizationConstant extends Messages { - @Key("createProjectFromTemplate.nameField") - String createProjectFromTemplateName(); - - @Key("createProjectFromTemplate.project.exists") - String createProjectFromTemplateProjectExists(String projectName); - - @Key("extension.title") - String extensionTitle(); - - @Key("extension.category") - String extensionCategory(); - - @Key("action.revealResource.text") - String actionRevealResourceText(); - - @Key("action.revealResource.description") - String actionRevealResourceDescription(); - - @Key("action.navigateToFile.text") - String actionNavigateToFileText(); - - @Key("action.navigateToFile.description") - String actionNavigateToFileDescription(); - - @Key("navigateToFile.view.title") - String navigateToFileViewTitle(); - - @Key("navigateToFile.view.file.field.title") - String navigateToFileViewFileFieldTitle(); - - @Key("navigateToFile.view.file.field.prompt") - String navigateToFileViewFileFieldPrompt(); - - @Key("navigateToFile.searchIsCaseSensitive") - String navigateToFileSearchIsCaseSensitive(); - - @Key("general.title") - String generalTitle(); - - @Key("general.category") - String generalCategory(); - - /* Add resources to File Watcher excludes */ - @Key("action.fileWatcher.add.excludes.text") - String addToFileWatcherExludesName(); - - @Key("action.fileWatcher.add.excludes.description") - String addToFileWatcherExludesDescription(); - - /* Remove resources from File Watcher excludes */ - @Key("action.fileWatcher.remove.excludes.text") - String removeFromFileWatcherExludesName(); - - @Key("action.fileWatcher.remove.excludes.description") - String removeFromFileWatcherExludesDescription(); - - /* DeleteItem */ - @Key("action.delete.text") - String deleteItemActionText(); - - @Key("action.delete.description") - String deleteItemActionDescription(); - - @Key("action.goInto.text") - String goIntoActionText(); - - @Key("action.goBack.text") - String goBackActionText(); - - /* Cut */ - @Key("action.cut.text") - String cutItemsActionText(); - - @Key("action.cut.description") - String cutItemsActionDescription(); - - /* Copy */ - @Key("action.copy.text") - String copyItemsActionText(); - - @Key("action.copy.description") - String copyItemsActionDescription(); - - /* Paste */ - @Key("action.paste.text") - String pasteItemsActionText(); - - @Key("action.paste.description") - String pasteItemsActionDescription(); - - @Key("action.export.text") - String exportConfigText(); - - @Key("deleteDialogTitle") - String deleteDialogTitle(); - - @Key("deleteAddToIndexDialogTitle") - String deleteAddToIndexDialogTitle(); - - @Key("deleteAddToIndexDialogText") - String deleteAddToIndexDialogText(); - - @Key("deleteAddToIndexIndexFailedToUpdate") - String deleteAddToIndexIndexFailedToUpdate(); - - @Key("deleteAddToIndexIndexUpdated") - String deleteAddToIndexIndexUpdated(); - - @Key("deleteAddToIndexDialogNotification") - String deleteAddToIndexDialogNotification(); - - @Key("deleteAllFilesAndSubdirectories") - String deleteAllFilesAndSubdirectories(String name); - - @Key("deleteFilesAndSubdirectoriesInTheSelectedDirectory") - String deleteFilesAndSubdirectoriesInTheSelectedDirectory(); - - @Key("mixedProjectDeleteMessage") - String mixedProjectDeleteMessage(); - - @Key("action.switch.editor.displaying.title") - String switchEditorDisplayingTitle(); - - @Key("action.switch.editor.displaying.description") - String switchEditorDisplayingDescription(); - - @Key("action.switch.project.explorer.displaying.title") - String switchProjectExplorerDisplayingTitle(); - - @Key("action.switch.project.explorer.displaying.description") - String switchProjectExplorerDisplayingDescription(); - - @Key("action.switch.command.explorer.displaying.title") - String switchCommandExplorerDisplayingTitle(); - - @Key("action.switch.command.explorer.displaying.description") - String switchCommandExplorerDisplayingDescription(); - - @Key("action.switch.find.part.displaying.title") - String switchFindPartDisplayingTitle(); - - @Key("action.switch.find.part.displaying.description") - String switchFindPartDisplayingDescription(); - - @Key("action.switch.event.logs.displaying.title") - String switchEventLogsDisplayingTitle(); - - @Key("action.switch.event.logs.displaying.description") - String switchEventLogsDisplayingDescription(); - - @Key("action.switch.terminal.displaying.title") - String switchTerminalDisplayingTitle(); - - @Key("action.switch.terminal.displaying.description") - String switchTerminalDisplayingDescription(); - - /* RenameItem */ - @Key("action.rename.text") - String renameItemActionText(); - - @Key("action.rename.description") - String renameItemActionDescription(); - - @Key("action.collapseAll.title") - String collapseAllActionTitle(); - - @Key("action.collapseAll.description") - String collapseAllActionDescription(); - - @Key("action.refresh.title") - String refreshActionTitle(); - - @Key("action.refresh.description") - String refreshActionDescription(); - - @Key("renameNodeDialogTitle") - String renameNodeDialogTitle(); - - @Key("renameFileDialogTitle") - String renameFileDialogTitle(String name); - - @Key("renameFolderDialogTitle") - String renameFolderDialogTitle(String name); - - @Key("renameProjectDialogTitle") - String renameProjectDialogTitle(String name); - - @Key("renameDialogNewNameLabel") - String renameDialogNewNameLabel(); - - @Key("createProjectFromTemplate.descriptionField") - String createProjectFromTemplateDescription(); - - @Key("createProjectFromTemplate.projectPrivacy") - String createProjectFromTemplateProjectPrivacy(); - - @Key("createProjectFromTemplate.public") - String createProjectFromTemplatePublic(); - - @Key("createProjectFromTemplate.private") - String createProjectFromTemplatePrivate(); - - @Key("projectWizard.defaultTitleText") - String projectWizardDefaultTitleText(); - - @Key("projectWizard.titleText") - String projectWizardTitleText(); - - @Key("projectWizard.defaultSaveButtonText") - String projectWizardDefaultSaveButtonText(); - - @Key("projectWizard.saveButtonText") - String projectWizardSaveButtonText(); - - @Key("projectWizard.updateProject") - String projectWizardUpdateProject(String projectName); - - @Key("projectWizard.createProject.failed") - String projectWizardCreateProjectFailed(); - - @Key("projectWizard.importProject.failed") - String projectWizardImportProjectFailed(); - - @Key("projectWizard.updateProject.failed") - String projectWizardUpdateProjectFailed(); - - @Key("projectWizard.defaultErrorTitle") - String projectWizardDefaultErrorTitle(); - - @Key("format.name") - String formatName(); - - @Key("format.description") - String formatDescription(); - - @Key("undo.name") - String undoName(); - - @Key("undo.description") - String undoDescription(); - - @Key("redo.name") - String redoName(); - - @Key("redo.description") - String redoDescription(); - - @Key("softWrap") - String softWrap(); - - @Key("uploadFile.name") - String uploadFileName(); - - @Key("uploadFile.description") - String uploadFileDescription(); - - @Key("uploadFile.title") - String uploadFileTitle(); - - @Key("uploadFile.overwrite") - String uploadFileOverwrite(); - - @Key("uploadZipFolder.title") - String uploadZipFolderTitle(); - - @Key("uploadFolderFromZip.name") - String uploadFolderFromZipName(); - - @Key("uploadFolderFromZip.description") - String uploadFolderFromZipDescription(); - - @Key("downloadZip.project.name") - String downloadProjectAsZipName(); - - @Key("downloadZip.project.description") - String downloadProjectAsZipDescription(); - - @Key("download.item.name") - String downloadItemName(); - - @Key("download.item.description") - String downloadItemDescription(); - - @Key("uploadFolderFromZip.overwrite") - String uploadFolderFromZipOverwrite(); - - @Key("uploadFolderFromZip.skipFirstLevel") - String uploadFolderFromZipSkipFirstLevel(); - - @Key("cancelButton") - String cancelButton(); - - @Key("uploadButton") - String uploadButton(); - - @Key("openFileFieldTitle") - String openFileFieldTitle(); - - @Key("uploadFolderFromZip.openZipFieldTitle") - String uploadFolderFromZipOpenZipFieldTitle(); - - @Key("projectExplorer.linkWithEditor.tooltip") - String projectExplorerLinkWithEditorTooltip(); - - @Key("projectExplorer.button.title") - String projectExplorerButtonTitle(); - - @Key("projectExplorer.titleBar.text") - String projectExplorerTitleBarText(); - - @Key("importProject.message.success") - String importProjectMessageSuccess(String projectName); - - @Key("importProject.message.failure") - String importProjectMessageFailure(String projectName); - - @Key("importProject.message.startWithWhiteSpace") - String importProjectMessageStartWithWhiteSpace(); - - @Key("importProject.message.urlInvalid") - String importProjectMessageUrlInvalid(); - - @Key("importProject.message.unableGetSshKey") - String importProjectMessageUnableGetSshKey(); - - @Key("importProjectFromLocation.name") - String importProjectFromLocationName(); - - @Key("importProjectFromLocation.description") - String importProjectFromLocationDescription(); - - @Key("importLocalProject.name") - String importLocalProjectName(); - - @Key("importLocalProject.description") - String importLocalProjectDescription(); - - @Key("importLocalProject.openZipTitle") - String importLocalProjectOpenZipTitle(); - - @Key("importProject.importButton") - String importProjectButton(); - - @Key("importProject.importing") - String importingProject(String projectName); - - @Key("importProject.uriFieldTitle") - String importProjectUriFieldTitle(); - - @Key("importProject.viewTitle") - String importProjectViewTitle(); - - @Key("importProject.importer.info") - String importProjectImporterInfo(); - - @Key("importProject.project.info") - String importProjectInfo(); - - @Key("importProject.name.prompt") - String importProjectNamePrompt(); - - @Key("importProject.description.prompt") - String importProjectDescriptionPrompt(); - - @Key("importProject.zipImporter.skipFirstLevel") - String importProjectZipImporterSkipFirstLevel(); - - @Key("import.project.error") - String importProjectError(); - - /* Authorization */ - @Key("authorization.dialog.title") - String authorizationDialogTitle(); - - @Key("authorization.dialog.text") - String authorizationDialogText(); - - @Key("oauth.failed.to.get.authenticator.title") - String oauthFailedToGetAuthenticatorTitle(); - - @Key("oauth.failed.to.get.authenticator.text") - String oauthFailedToGetAuthenticatorText(); - - @Key("importProject.ssh.key.upload.failed.title") - String importProjectSshKeyUploadFailedTitle(); - - @Key("importProject.ssh.key.upload.failed.text") - String importProjectSshKeyUploadFailedText(); - - /* Actions */ - @Key("action.newFolder.title") - String actionNewFolderTitle(); - - @Key("action.newFolder.description") - String actionNewFolderDescription(); - - @Key("action.newFile.title") - String actionNewFileTitle(); - - @Key("action.newFile.description") - String actionNewFileDescription(); - - @Key("action.newFile.add.to.index.title") - String actionNewFileAddToIndexTitle(); - - @Key("action.newFile.add.to.index.text") - String actionNewFileAddToIndexText(String file); - - @Key("action.newFile.add.to.index.notification") - String actionNewFileAddToIndexNotification(String file); - - @Key("action.git.index.updated") - String actionGitIndexUpdated(); - - @Key("action.git.index.update.failed") - String actionGitIndexUpdateFailed(); - - @Key("action.newXmlFile.title") - String actionNewXmlFileTitle(); - - @Key("action.newXmlFile.description") - String actionNewXmlFileDescription(); - - @Key("action.link.with.editor") - String actionLinkWithEditor(); - - @Key("action.show.toolbar") - String actionShowToolbar(); - - @Key("action.projectConfiguration.description") - String actionProjectConfigurationDescription(); - - @Key("action.projectConfiguration.title") - String actionProjectConfigurationTitle(); - - @Key("action.previewImage.description") - String actionPreviewImageDescription(); - - @Key("action.previewImage.title") - String actionPreviewImageTitle(); - - @Key("action.findAction.description") - String actionFindActionDescription(); - - @Key("action.findAction.title") - String actionFindActionTitle(); - - @Key("action.showHiddenFiles.title") - String actionShowHiddenFilesTitle(); - - @Key("action.showHiddenFiles.description") - String actionShowHiddenFilesDescription(); - - @Key("action.maximizePart.title") - String actionMaximizePartTitle(); - - @Key("action.maximizePart.description") - String actionMaximizePartDescription(); - - @Key("action.restorePart.title") - String actionRestorePartTitle(); - - @Key("action.restorePart.description") - String actionRestorePartDescription(); - - @Key("action.hidePart.title") - String actionHidePartTitle(); - - @Key("action.hidePart.description") - String actionHidePartDescription(); - - @Key("maximizePartStack.title") - String maximizePartStackTitle(); - - @Key("restorePartStack.title") - String restorePartStackTitle(); - - @Key("minimizePartStack.title") - String minimizePartStackTitle(); - - @Key("partStackOptions.title") - String partStackOptionsTitle(); - - /* NewResource */ - @Key("newResource.title") - String newResourceTitle(String title); - - @Key("newResource.label") - String newResourceLabel(String title); - - @Key("newResource.invalidName") - String invalidName(); - - /* Messages */ - @Key("messages.closeTabConfirmation") - String closeTabConfirmation(); - - @Key("messages.changesMayBeLost") - String changesMayBeLost(); - - @Key("messages.someFilesCanNotBeSaved") - String someFilesCanNotBeSaved(); - - @Key("messages.saveChanges") - String messagesSaveChanges(String name); - - @Key("messages.promptSaveChanges") - String messagesPromptSaveChanges(); - - @Key("messages.command.invalid") - String messagesInvalidCommand(); - - @Key("messages.unableOpenResource") - String unableOpenResource(String path); - - @Key("messages.canNotOpenFileInSplitMode") - String canNotOpenFileInSplitMode(String path); - - @Key("messages.canNotOpenFileWithoutParams") - String canNotOpenFileWithoutParams(); - - @Key("messages.fileToOpenIsNotSpecified") - String fileToOpenIsNotSpecified(); - - @Key("messages.fileToOpenLineIsNotANumber") - String fileToOpenLineIsNotANumber(); - - @Key("messages.canNotOpenNodeWithoutParams") - String canNotOpenNodeWithoutParams(); - - @Key("messages.nodeToOpenIsNotSpecified") - String nodeToOpenIsNotSpecified(); - - @Key("messages.noOpenedProject") - String noOpenedProject(); - - @Key("messages.startingOperation") - String startingOperation(String operation); - - @Key("messages.startingMachine") - String startingMachine(String machineName); - - /* Buttons */ - @DefaultMessage("Yes") - String yesButtonTitle(); - - @DefaultMessage("No") - String noButtonTitle(); - - @Key("ok") - String ok(); - - @Key("cancel") - String cancel(); - - @Key("open") - String open(); - - @Key("next") - String next(); - - @Key("back") - String back(); - - @Key("close") - String close(); - - @Key("save") - String save(); - - @Key("apply") - String apply(); - - @Key("refresh") - String refresh(); - - @Key("delete") - String delete(); - - @Key("print") - String print(); - - @Key("debug") - String debug(); - - @Key("projectProblem.title") - String projectProblemTitle(); - - @Key("projectProblem.message") - String projectProblemMessage(); - - @Key("action.expandEditor.title") - String actionExpandEditorTitle(); - - @Key("askWindow.close.title") - String askWindowCloseTitle(); - - @Key("action.completions.title") - String actionCompetitionsTitle(); - - /* Preferences widget */ - @Key("unable.to.save.preference") - String unableToSavePreference(); - - @Key("unable.to.load.preference") - String unableToLoadPreference(); - - @Key("create.ws.title") - String createWsTitle(); - - @Key("create.ws.recipe.url") - String createWsRecipeUrl(); - - @Key("create.ws.find.by.tags") - String createWsFindByTags(); - - @Key("create.ws.name") - String createWsName(); - - @Key("create.ws.url.not.valid") - String createWsUrlNotValid(); - - @Key("create.ws.recipe.not.found") - String createWsRecipeNotFound(); - - @Key("create.ws.button") - String createWsButton(); - - @Key("create.ws.default.name") - String createWsDefaultName(); - - @Key("create.ws.name.is.not.correct") - String createWsNameIsNotCorrect(); - - @Key("create.ws.predefined.recipe") - String createWsPredefinedRecipe(); - - @Key("placeholder.input.recipe.url") - String placeholderInputRecipeUrl(); - - @Key("placeholder.choose.predefined") - String placeholderChoosePredefined(); - - @Key("placeholder.find.by.tags") - String placeholderFindByTags(); - - @Key("start.ws.button") - String startWsButton(); - - @Key("restart.ws.agent.button") - String restartWsAgentButton(); - - @Key("ignore.ws.agent.button") - String ignoreWsAgentButton(); - - @Key("placeholder.select.ws.to.start") - String placeholderSelectWsToStart(); - - @Key("start.ws.title") - String startWsTitle(); - - @Key("start.ws.description") - String startWsDescription(); - - @Key("stop.ws.title") - String stopWsTitle(); - - @Key("stop.ws.description") - String stopWsDescription(); - - @Key("started.ws") - String startedWs(); - - @Key("ext.server.started") - String extServerStarted(); - - @Key("ext.server.stopped") - String extServerStopped(); - - @Key("workspace.recovering.dialog.title") - String workspaceRecoveringDialogTitle(); - - @Key("workspace.subscribe.on.events.failed") - String workspaceSubscribeOnEventsFailed(); - - @Key("workspace.start.failed") - String workspaceStartFailed(); - - @Key("failed.to.load.factory") - String failedToLoadFactory(); - - @Key("workspace.config.undefined") - String workspaceConfigUndefined(); - - @Key("workspace.id.undefined") - String workspaceIdUndefined(); - - @Key("workspace.get.failed") - String workspaceGetFailed(); - - @Key("workspace.not.ready") - String workspaceNotReady(String workspaceId); - - @Key("workspace.not.running") - String workspaceNotRunning(); - - @Key("workspace.status.title") - String workspaceStatusTitle(); - - @Key("start.ws.error.title") - String startWsErrorTitle(); - - @Key("start.ws.error.content") - String startWsErrorContent(String workspaceName, String reason); - - @Key("create.ws.name.length.is.not.correct") - String createWsNameLengthIsNotCorrect(); - - @Key("create.ws.name.already.exist") - String createWsNameAlreadyExist(); - - @Key("get.ws.error.dialog.title") - String getWsErrorDialogTitle(); - - @Key("get.ws.error.dialog.content") - String getWsErrorDialogContent(String reason); - - @Key("project.explorer.project.configuration.failed") - String projectExplorerProjectConfigurationFailed(String name); - - @Key("project.explorer.project.update.failed") - String projectExplorerProjectUpdateFailed(); - - @Key("project.explorer.projects.load.failed") - String projectExplorerProjectsLoadFailed(); - - @Key("project.explorer.invalid.project.detected") - String projectExplorerInvalidProjectDetected(); - - @Key("project.explorer.detected.unconfigured.project") - String projectExplorerDetectedUnconfiguredProject(); - - @Key("project.explorer.extension.server.stopped") - String projectExplorerExtensionServerStopped(); - - @Key("project.explorer.extension.server.stopped.description") - String projectExplorerExtensionServerStoppedDescription(); - - @Key("project.explorer.part.tooltip") - String projectExplorerPartTooltip(); - - @Key("switch.to.left.editor.action.description") - String switchToLeftEditorActionDescription(); - - @Key("switch.to.left.editor.action") - String switchToLeftEditorAction(); - - @Key("switch.to.right.editor.action.description") - String switchToRightEditorActionDescription(); - - @Key("switch.to.right.editor.action") - String switchToRightEditorAction(); - - @Key("key.bindings.action.name") - String keyBindingsActionName(); - - @Key("key.bindings.action.description") - String keyBindingsActionDescription(); - - @Key("key.bindings.dialog.title") - String keyBindingsDialogTitle(); - - @Key("hot.keys.table.action.description.title") - String hotKeysTableActionDescriptionTitle(); - - @Key("hot.keys.table.item.title") - String hotKeysTableItemTitle(); - - @Key("action.full.text.search") - String actionFullTextSearch(); - - @Key("action.full.text.search.description") - String actionFullTextSearchDescription(); - - @Key("text.search.wholeword.label") - String textSearchFileWholeWordLabel(); - - String search(); - - @Key("text.search.scope.label") - String textSearchScopeLabel(); - - @Key("text.search.fileFilter.label") - String textSearchFileFilterLabel(); - - @Key("text.search.content.label") - String textSearchContentLabel(); - - @Key("text.search.title") - String textSearchTitle(); - - @Key("text.search.file.mask") - String textSearchFileMask(); - - @Key("text.search.directory") - String textSearchDirectory(); - - @Key("select.path.window.title") - String selectPathWindowTitle(); - - @Key("open.recent.file.title") - String openRecentFileTitle(); - - @Key("open.recent.file.description") - String openRecentFileDescription(); - - @Key("open.recent.files.title") - String openRecentFilesTitle(); - - @Key("open.recent.file.clear.title") - String openRecentFileClearTitle(); - - @Key("open.recent.file.clear.description") - String openRecentFileClearDescription(); - - @Key("editor.pane.menu.close.pane") - String editorClosePane(); - - @Key("editor.pane.menu.close.pane.description") - String editorClosePaneDescription(); - - @Key("editor.pane.menu.close.all.in.pane") - String editorCloseAllTabsInPane(); - - @Key("editor.pane.menu.close.all.in.pane.description") - String editorCloseAllTabsInPaneDescription(); - - @Key("editor.tab.context.menu.split.vertically") - String editorTabSplitVertically(); - - @Key("editor.tab.context.menu.split.vertically.description") - String editorTabSplitVerticallyDescription(); - - @Key("editor.tab.context.menu.split.horizontally") - String editorTabSplitHorizontally(); - - @Key("editor.tab.context.menu.split.horizontally.description") - String editorTabSplitHorizontallyDescription(); - - @Key("editor.tab.context.menu.close") - String editorTabClose(); - - @Key("editor.tab.context.menu.close.description") - String editorTabCloseDescription(); - - @Key("editor.tab.context.menu.close.all") - String editorTabCloseAll(); - - @Key("editor.tab.context.menu.close.all.description") - String editorTabCloseAllDescription(); - - @Key("editor.tab.context.menu.close.all.but.pinned") - String editorTabCloseAllButPinned(); - - @Key("editor.tab.context.menu.close.all.but.pinned.description") - String editorTabCloseAllButPinnedDescription(); - - @Key("editor.tab.context.menu.close.all.except.selected") - String editorTabCloseAllExceptSelected(); - - @Key("editor.tab.context.menu.close.all.except.selected.description") - String editorTabCloseAllExceptSelectedDescription(); - - @Key("editor.tab.context.menu.pin") - String editorTabPin(); - - @Key("editor.tab.context.menu.pin.description") - String editorTabPinDescription(); - - @Key("editor.tab.context.menu.reopen.closed.tab") - String editorTabReopenClosedTab(); - - @Key("editor.tab.context.menu.reopen.closed.tab.description") - String editorTabReopenClosedTabDescription(); - - @Key("failed.to.copy.items") - String failedToCopyItems(); - - @Key("failed.to.move.items") - String failedToMoveItems(); - - @Key("failed.to.update.project") - String failedToUpdateProject(String name); - - @Key("failed.to.import.project") - String failedToImportProject(); - - @Key("failed.to.upload.files") - String failedToUploadFiles(); - - @Key("failed.to.upload.files.from.zip") - String failedToUploadFilesFromZip(); - - @Key("synchronize.dialog.title") - String synchronizeDialogTitle(); - - @Key("button.import") - String buttonImport(); - - @Key("button.remove") - String buttonRemove(); - - @Key("project.removed") - String projectRemoved(String projectName); - - @Key("project.remove.error") - String projectRemoveError(String projectName); - - @Key("location.incorrect") - String locationIncorrect(); - - @Key("exist.in.workspace.dialog.content") - String existInWorkspaceDialogContent(String projectName); - - @Key("exist.in.file.system.dialog.content") - String existInFileSystemDialogContent(String projectName); - - @Key("button.configure") - String buttonConfigure(); - - @Key("location.dialog.title") - String locationDialogTitle(); - - @Key("project.configuration.changed") - String projectConfigurationChanged(); - - @Key("button.keep.blank") - String buttonKeepBlank(); - - @Key("project.update.error") - String projectUpdateError(String projectName); - - @Key("project.status.title") - String projectStatusTitle(); - - @Key("project.status.content") - String projectStatusContent(String projectName); - - @Key("error.configuration.title") - String errorConfigurationTitle(); - - @Key("error.configuration.content") - String errorConfigurationContent(); - - @Key("show.reference") - String showReference(); - - @Key("reference.label") - String referenceLabel(); - - @Key("path.label") - String pathLabel(); - - @Key("parent.directory") - String projectRoot(); - - @Key("action.convert.folder.to.project") - String actionConvertFolderToProject(); - - @Key("action.convert.folder.to.project.description") - String actionConvertFolderToProjectDescription(); - - @Key("signature.name") - String signatureName(); - - @Key("signature.description") - String signatureDescription(); - - @Key("macro.editor.current.project.name.description") - String macroEditorCurrentProjectNameDescription(); - - @Key("macro.editor.current.project.type.description") - String macroEditorCurrentProjectTypeDescription(); - - @Key("macro.editor.current.file.relpath.description") - String macroEditorCurrentFileRelpathDescription(); - - @Key("macro.editor.current.file.name.description") - String macroEditorCurrentFileNameDescription(); - - @Key("macro.editor.current.file.base.name.description") - String macroEditorCurrentFileBaseNameDescription(); - - @Key("macro.editor.current.file.path.description") - String macroEditorCurrentFilePathDescription(); - - @Key("macro.workspace.name.description") - String macroWorkspaceNameDescription(); - - @Key("macro.workspace.namespace.description") - String macroWorkspaceNamespaceDescription(); - - @Key("macro.explorer.current.file.name.description") - String macroExplorerCurrentFileNameDescription(); - - @Key("macro.explorer.current.file.base.name.description") - String macroExplorerCurrentFileBaseNameDescription(); - - @Key("macro.explorer.current.project.name.description") - String macroExplorerCurrentProjectNameDescription(); - - @Key("macro.explorer.current.file.relpath.description") - String macroExplorerCurrentFileRelpathDescription(); - - @Key("macro.explorer.current.project.type.description") - String macroExplorerCurrentProjectTypeDescription(); - - @Key("macro.explorer.current.file.parent.path.description") - String macroExplorerCurrentFileParentPathDescription(); - - @Key("macro.explorer.current.file.path.description") - String macroExplorerCurrentFilePathDescription(); - - @Key("empty.state.no.projects") - String emptyStateNoProjects(); - - @Key("empty.state.no.files") - String emptyStateNoFiles(); - - @Key("authentication.dialog.title") - String authenticationDialogTitle(); - - @Key("authentication.dialog.username") - String authenticationDialogUsername(); - - @Key("authentication.dialog.password") - String authenticationDialogPassword(); - - @Key("authentication.dialog.authenticate.button") - String authenticationDialogAuthenticate(); - - @Key("authentication.dialog.rejected.by.user") - String authenticationDialogRejectedByUser(); - - /* Factories */ - @Key("projects.import.configuring.cloning") - String cloningSource(); - - @Key("create.factory.action.title") - String createFactoryActionTitle(); - - @Key("create.factory.already.exist") - String createFactoryAlreadyExist(); - - @Key("create.factory.unable.create.from.current.workspace") - String createFactoryFromCurrentWorkspaceFailed(); - - @Key("create.factory.form.title") - String createFactoryTitle(); - - @Key("create.factory.label.name") - String createFactoryName(); - - @Key("create.factory.label.link") - String createFactoryLink(); - - @Key("create.factory.button.create") - String createFactoryButton(); - - @Key("create.factory.button.close") - String createFactoryButtonClose(); - - @Key("create.factory.configure.button.tooltip") - String createFactoryConfigureTooltip(); - - @Key("create.factory.launch.button.tooltip") - String createFactoryLaunchTooltip(); - - @Key("project.import.configured.cloned") - String clonedSource(String projectName); - - @Key("project.already.imported") - String projectAlreadyImported(String projectName); - - @Key("project.import.cloned.with.checkout") - String clonedSourceWithCheckout(String projectName, String repoName, String ref, String branch); - - @Key("project.import.cloned.with.checkout.start.point") - String clonedWithCheckoutOnStartPoint( - String projectName, String repoName, String startPoint, String branch); - - @Key("project.import.configuring.cloning") - String cloningSource(String projectName); - - @Key("project.import.ssh.key.upload.failed.title") - String cloningSourceSshKeyUploadFailedTitle(); - - @Key("project.import.ssh.key.upload.failed.text") - String cloningSourcesSshKeyUploadFailedText(); - - @Key("message.ssh.key.not.found.text") - String acceptSshNotFoundText(); - - @Key("project.import.cloning.failed.without.start.point") - String cloningSourceWithCheckoutFailed(String branch, String repoName); - - @Key("project.import.cloning.failed.with.start.point") - String cloningSourceCheckoutFailed(String project, String branch); - - @Key("project.import.cloning.failed.title") - String cloningSourceFailedTitle(String projectName); - - @Key("project.import.configuring.failed") - String configuringSourceFailed(String projectName); - - @Key("welcome.preferences.title") - String welcomePreferencesTitle(); - - @Key("export.config.view.name") - String exportConfigName(); - - @Key("export.config.view.description") - String exportConfigDescription(); - - @Key("export.config.error.message") - String exportConfigErrorMessage(); - - @Key("export.config.dialog.not.under.vcs.title") - String exportConfigDialogNotUnderVcsTitle(); - - @Key("export.config.dialog.not.under.vcs.text") - String exportConfigDialogNotUnderVcsText(); - - @Key("macro.current.project.path.description") - String macroCurrentProjectPathDescription(); - - @Key("macro.current.project.eldest.parent.path.description") - String macroCurrentProjectEldestParentPathDescription(); - - @Key("macro.current.project.relpath.description") - String macroCurrentProjectRelpathDescription(); - - @Key("macro.machine.dev.hostname.description") - String macroMachineDevHostnameDescription(); - - @Key("failed.to.connect.the.terminal") - String failedToConnectTheTerminal(); - - @Key("connection.failed.with.terminal") - String connectionFailedWithTerminal(); - - @Key("terminal.error.connection") - String terminalErrorConnection(); - - @Key("terminal.can.not.load.script") - String terminalCanNotLoadScript(); - - @Key("terminal.restart.trying") - String terminalTryRestarting(); - - @Key("terminal.error.start") - String terminalErrorStart(); - - @Key("view.processes.title") - String viewProcessesTitle(); - - @Key("view.processes.tooltip") - String viewProcessesTooltip(); - - @Key("messages.machine.not.found") - String machineNotFound(String machineId); - - @Key("message.projectCreated") - String projectCreated(String projectName); - - @Key("message.switch.editors.in.readOnly.mode") - String messageSwitchEditorsInReadOnlyMode(); - - @Key("ssh.connect.info") - String sshConnectInfo( - String machineName, - String machineHost, - String machinePort, - String workspaceName, - String userName, - String sshKeyDetails); - - @Key("ssh.connect.ssh.key.available") - String sshConnectInfoPrivateKey(String privateKey); - - @Key("ssh.connect.ssh.key.not.available") - String sshConnectInfoNoPrivateKey(); - - @Key("failed.to.execute.command") - String failedToExecuteCommand(); - - /* OutputsContainerView */ - @Key("view.outputsConsole.stopProcessConfirmation") - String outputsConsoleViewStopProcessConfirmation(String processName); - - @Key("view.processes.terminal.node.title") - String viewProcessesTerminalNodeTitle(String terminalIndex); - - @Key("failed.to.get.processes") - String failedToGetProcesses(String machineId); - - @Key("control.runCommand.empty.params") - String runCommandEmptyParamsMessage(); - - @Key("control.runCommand.empty.name") - String runCommandEmptyNameMessage(); - - @Key("control.terminal.new") - String newTerminal(); - - @Key("control.terminal.create.description") - String newTerminalDescription(); - - @Key("control.open.in.terminal") - @DefaultMessage("Open in Terminal") - String openInTerminalAction(); - - @Key("machine.output.action.title") - String machineOutputActionTitle(); - - @Key("machine.output.action.description") - String machineOutputActionDescription(); - - @Key("machine.ssh.action.title") - String machineSSHActionTitle(); - - @Key("machine.ssh.action.description") - String machineSSHActionDescription(); - - @Key("control.connect.ssh") - String connectViaSSH(); - - @Key("action.showConsoleTree.title") - String actionShowConsoleTreeTitle(); - - @Key("control.rerun.title") - String reRunControlTitle(); - - @Key("control.rerun.description") - String reRunControlDescription(); - - @Key("control.stop.title") - String stopControlTitle(); - - @Key("control.stop.description") - String stopControlDescription(); - - @Key("control.close.title") - String closeControlTitle(); - - @Key("control.close.description") - String closeControlDescription(); - - @Key("consoles.reRunButton.tooltip") - String consolesReRunButtonTooltip(); - - @Key("consoles.stopButton.tooltip") - String consolesStopButtonTooltip(); - - @Key("consoles.clearOutputsButton.tooltip") - String consolesClearOutputsButtonTooltip(); - - @Key("consoles.wrapTextButton.tooltip") - String consolesWrapTextButtonTooltip(); - - @Key("consoles.autoScrollButton.tooltip") - String consolesAutoScrollButtonTooltip(); - - @Key("view.processes.command.title") - String viewProcessesCommandTitle(); - - @Key("view.stop.process.tooltip") - String viewStropProcessTooltip(); - - @Key("view.new.terminal.tooltip") - String viewNewTerminalTooltip(); - - @Key("view.machine.running.tooltip") - String viewMachineRunningTooltip(); - - @Key("view.close.processOutput.tooltip") - String viewCloseProcessOutputTooltip(); - - @Key("failed.to.find.machine") - String failedToFindMachine(String machineId); - - @Key("menu.loader.machineStarting") - String menuLoaderMachineStarting(String machine); - - @Key("menu.loader.machineRunning") - String menuLoaderMachineRunning(String machine); - - @Key("menu.loader.workspaceStarted") - String menuLoaderWorkspaceStarted(); - - @Key("menu.loader.workspaceStopping") - String menuLoaderWorkspaceStopping(); - - @Key("menu.loader.workspaceStopped") - String menuLoaderWorkspaceStopped(); - - @Key("menu.loader.waitingWorkspace") - String menuLoaderWaitingWorkspace(); - - @Key("menu.loader.pullingImage") - String menuLoaderPullingImage(String image); - - @Key("gwt_recompile.action.setup.title") - String gwtDevModeSetUpActionTitle(); - - @Key("gwt_recompile.action.off.title") - String gwtDevModeOffActionTitle(); - - @Key("gwt_recompile.dialog.title") - String gwtRecompileDialogTitle(); - - @Key("gwt_recompile.dialog.message.recompiling") - String gwtRecompileDialogRecompilingMessage(String host); - - @Key("gwt_recompile.dialog.message.no_server") - String gwtRecompileDialogNoServerMessage(); - - @Key("resource.copy.move.error.title") - String resourceCopyMoveErrorTitle(); - - @Key("resource.copy.move.same.path.error.message") - String resourceCopyMoveSamePathErrorMessage(String sourceName); - - @Key("resource.copy.move.already.exist.error.message") - String resourceCopyMoveAlreadyExistErrorMessage(String sourceName, String path); - - @Key("low.disk.space") - String lowDiskSpace(); - - @Key("low.disk.space.description") - String lowDiskSpaceDescription(); - - @Key("low.disk.space.status.bar.message") - String lowDiskSpaceStatusBarMessage(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/Resources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/Resources.java deleted file mode 100644 index 21f5857f323..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/Resources.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide; - -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.resources.client.CssResource.NotStrict; -import com.google.gwt.resources.client.TextResource; -import org.eclipse.che.ide.api.parts.PartStackUIResources; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.machine.MachineResources; -import org.eclipse.che.ide.menu.MenuResources; -import org.eclipse.che.ide.notification.NotificationResources; -import org.eclipse.che.ide.projecttype.wizard.ProjectWizardResources; -import org.eclipse.che.ide.ui.DialogBoxResources; -import org.eclipse.che.ide.ui.buttonLoader.ButtonLoaderResources; -import org.eclipse.che.ide.ui.cellview.CellTableResources; -import org.eclipse.che.ide.ui.cellview.CellTreeResources; -import org.eclipse.che.ide.ui.cellview.DataGridResources; -import org.eclipse.che.ide.ui.list.CategoriesList; -import org.eclipse.che.ide.ui.list.SimpleList; -import org.eclipse.che.ide.ui.smartTree.TreeStyles; -import org.eclipse.che.ide.ui.tree.Tree; -import org.eclipse.che.ide.ui.zeroclipboard.ClipboardResources; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Interface for resources, e.g., css, images, text files, etc. - * - * @author Codenvy crowd - */ -public interface Resources - extends Tree.Resources, - PartStackUIResources, - SimpleList.Resources, - MenuResources, - DialogBoxResources, - ClipboardResources, - NotificationResources, - DataGridResources, - CellTableResources, - CellTreeResources, - CategoriesList.Resources, - ButtonLoaderResources, - ProjectWizardResources, - MachineResources, - CommandResources, - TreeStyles { - - @Source({ - "Core.css", - "org/eclipse/che/ide/ui/constants.css", - "org/eclipse/che/ide/api/ui/style.css" - }) - @NotStrict - CoreCss coreCss(); - - @Source("workspace/recipe.svg") - SVGResource recipe(); - - @Source("actions/newProject.svg") - SVGResource newProject(); - - @Source("actions/showHiddenFiles.svg") - SVGResource showHiddenFiles(); - - @Source("texteditor/multi-file-icon.svg") - SVGResource multiFileIcon(); - - @Source("xml/xml.svg") - SVGResource xmlFile(); - - @Source("console/clear.svg") - SVGResource clear(); - - @Source("actions/about.svg") - SVGResource about(); - - @Source("actions/find.svg") - SVGResource find(); - - @Source("actions/find-actions.svg") - SVGResource findActions(); - - @Source("actions/undo.svg") - SVGResource undo(); - - @Source("actions/redo.svg") - SVGResource redo(); - - @Source("actions/project-configuration.svg") - SVGResource projectConfiguration(); - - @Source("actions/delete.svg") - SVGResource delete(); - - @Source("actions/cut.svg") - SVGResource cut(); - - @Source("actions/copy.svg") - SVGResource copy(); - - @Source("actions/paste.svg") - SVGResource paste(); - - @Source("actions/new-resource.svg") - SVGResource newResource(); - - @Source("actions/navigate-to-file.svg") - SVGResource navigateToFile(); - - @Source("actions/save.svg") - SVGResource save(); - - @Source("actions/preferences.svg") - SVGResource preferences(); - - @Source("actions/rename.svg") - SVGResource rename(); - - @Source("actions/format.svg") - SVGResource format(); - - @Source("actions/import.svg") - SVGResource importProject(); - - @Source("actions/importProjectFromLocation.svg") - SVGResource importProjectFromLocation(); - - @Source("actions/importGroup.svg") - SVGResource importProjectGroup(); - - @Source("actions/upload-file.svg") - SVGResource uploadFile(); - - @Source("actions/zip-folder.svg") - SVGResource downloadZip(); - - @Source("actions/refresh.svg") - SVGResource refresh(); - - @Source("defaulticons/file.svg") - SVGResource defaultFile(); - - @Source("defaulticons/default.svg") - SVGResource defaultIcon(); - - @Source("defaulticons/folder.svg") - SVGResource defaultFolder(); - - @Source("defaulticons/project.svg") - SVGResource defaultProject(); - - @Source("defaulticons/projectFolder.svg") - SVGResource projectFolder(); - - @Source("defaulticons/image-icon.svg") - SVGResource defaultImage(); - - @Source("defaulticons/md.svg") - SVGResource mdFile(); - - @Source("defaulticons/json.svg") - SVGResource jsonFile(); - - @Source("part/project-explorer-part-icon.svg") - SVGResource projectExplorerPartIcon(); - - @Source("part/events-part-icon.svg") - SVGResource eventsPartIcon(); - - @Source("part/output-part-icon.svg") - SVGResource outputPartIcon(); - - @Source("hotkeys/print_template.html") - TextResource printTemplate(); - - @Source("actions/evaluate.svg") - SVGResource compile(); - - @Source("part/che-logo.svg") - SVGResource cheLogo(); - - @Source("panel/panel-selector-bottom.svg") - SVGResource panelSelectorBottom(); - - @Source("panel/panel-selector-full-editor.svg") - SVGResource panelSelectorFullEditor(); - - @Source("panel/panel-selector-left.svg") - SVGResource panelSelectorLeft(); - - @Source("panel/panel-selector-left-bottom.svg") - SVGResource panelSelectorLeftBottom(); - - @Source("panel/panel-selector-left-right-bottom.svg") - SVGResource panelSelectorLeftRightBottom(); - - @Source("panel/panel-selector-right.svg") - SVGResource panelSelectorRight(); - - @Source("machine/machine-cube.svg") - SVGResource machineCube(); - - @Source("searchMatch.svg") - SVGResource searchMatch(); - - @Source("run/run.svg") - SVGResource run(); - - @Source("run/debug.svg") - SVGResource debug(); - - /** Interface for css resources. */ - interface CoreCss extends CssResource { - String editorPaneMenuDelimiter(); - - String simpleListContainer(); - - String mainText(); - - // wizard's styles - String mainFont(); - - String mainBoldFont(); - - String defaultFont(); - - String warningFont(); - - String errorFont(); - - String greyFontColor(); - - String cursorPointer(); - - String line(); - - String editorFullScreen(); - - String createWsTagsPopup(); - - @ClassName("found-highlight") - String foundPhraseHighlight(); - - @ClassName("found-item") - String foundItem(); - - @ClassName("search-match") - String searchMatch(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionApiModule.java deleted file mode 100644 index 74fda36b73b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionApiModule.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.inject.Singleton; -import org.eclipse.che.ide.actions.find.FindActionView; -import org.eclipse.che.ide.actions.find.FindActionViewImpl; -import org.eclipse.che.ide.api.action.ActionManager; - -/** GIN module for configuring Action API components. */ -public class ActionApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(StartUpActionsProcessor.class).asEagerSingleton(); - bind(ActionManager.class).to(ActionManagerImpl.class).in(Singleton.class); - bind(FindActionView.class).to(FindActionViewImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionManagerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionManagerImpl.java deleted file mode 100644 index 88a2f89057d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ActionManagerImpl.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.FunctionException; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionGroup; -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.action.Presentation; -import org.eclipse.che.ide.api.action.PromisableAction; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.util.Pair; -import org.eclipse.che.ide.util.loging.Log; - -/** - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -public class ActionManagerImpl implements ActionManager { - public static final String[] EMPTY_ARRAY = new String[0]; - - private final Map myId2Action; - private final Map> myPlugin2Id; - private final Map myId2Index; - private final Map myAction2Id; - private final PresentationFactory presentationFactory; - private final Provider managerProvider; - - private int myRegisteredActionsCount; - - @Inject - public ActionManagerImpl( - PresentationFactory presentationFactory, Provider managerProvider) { - this.presentationFactory = presentationFactory; - this.managerProvider = managerProvider; - this.myId2Action = new HashMap<>(); - this.myPlugin2Id = new HashMap<>(); - this.myId2Index = new HashMap<>(); - this.myAction2Id = new HashMap<>(); - registerDefaultActionGroups(); - } - - private void registerDefaultActionGroups() { - // register default action groups for main menu - DefaultActionGroup mainMenu = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_MAIN_MENU, mainMenu); - - DefaultActionGroup workspaceGroup = new DefaultActionGroup("Workspace", true, this); - registerAction(IdeActions.GROUP_WORKSPACE, workspaceGroup); - mainMenu.add(workspaceGroup); - - DefaultActionGroup projectGroup = new DefaultActionGroup("Project", true, this); - registerAction(IdeActions.GROUP_PROJECT, projectGroup); - mainMenu.add(projectGroup); - - DefaultActionGroup editGroup = new DefaultActionGroup("Edit", true, this); - registerAction(IdeActions.GROUP_EDIT, editGroup); - mainMenu.add(editGroup); - - DefaultActionGroup assistantGroup = new DefaultActionGroup("Assistant", true, this); - registerAction(IdeActions.GROUP_ASSISTANT, assistantGroup); - mainMenu.add(assistantGroup); - - DefaultActionGroup runGroup = new DefaultActionGroup("Run", true, this); - registerAction(IdeActions.GROUP_RUN, runGroup); - mainMenu.add(runGroup); - - DefaultActionGroup profileGroup = new DefaultActionGroup("Profile", true, this); - registerAction(IdeActions.GROUP_PROFILE, profileGroup); - mainMenu.add(profileGroup); - - DefaultActionGroup helpGroup = new DefaultActionGroup("Help", true, this); - registerAction(IdeActions.GROUP_HELP, helpGroup); - mainMenu.add(helpGroup); - - // register default action groups for context menu - DefaultActionGroup mainContextMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_MAIN_CONTEXT_MENU, false, this); - registerAction(IdeActions.GROUP_MAIN_CONTEXT_MENU, mainContextMenuGroup); - - DefaultActionGroup runContextMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_RUN_CONTEXT_MENU, false, this); - registerAction(IdeActions.GROUP_RUN_CONTEXT_MENU, runContextMenuGroup); - mainContextMenuGroup.add(runContextMenuGroup); - - DefaultActionGroup debugContextMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_DEBUG_CONTEXT_MENU, false, this); - registerAction(IdeActions.GROUP_DEBUG_CONTEXT_MENU, debugContextMenuGroup); - mainContextMenuGroup.add(debugContextMenuGroup); - - // register default action groups for part menu - DefaultActionGroup partMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_PART_MENU, false, this); - registerAction(IdeActions.GROUP_PART_MENU, partMenuGroup); - - // register default action groups for toolbar controller menu - DefaultActionGroup toolbarControllerMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_TOOLBAR_CONTROLLER, false, this); - registerAction(IdeActions.GROUP_TOOLBAR_CONTROLLER, toolbarControllerMenuGroup); - - DefaultActionGroup leftMainMenu = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_LEFT_MAIN_MENU, leftMainMenu); - - DefaultActionGroup rightMainMenu = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_RIGHT_MAIN_MENU, rightMainMenu); - - DefaultActionGroup projectExplorerContextMenuGroup = - new DefaultActionGroup(IdeActions.GROUP_PROJECT_EXPLORER_CONTEXT_MENU, false, this); - registerAction(IdeActions.GROUP_PROJECT_EXPLORER_CONTEXT_MENU, projectExplorerContextMenuGroup); - - // Register context menu group for editor tab - registerAction( - IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU, - new DefaultActionGroup(IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU, false, this)); - - // Register context menu group for consoles tree - registerAction( - IdeActions.GROUP_CONSOLES_TREE_CONTEXT_MENU, - new DefaultActionGroup(IdeActions.GROUP_CONSOLES_TREE_CONTEXT_MENU, false, this)); - - // register default action groups for main toolbar - DefaultActionGroup mainToolbarGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_MAIN_TOOLBAR, mainToolbarGroup); - // register default action groups for center part of toolbar - DefaultActionGroup centerToolbarGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_CENTER_TOOLBAR, centerToolbarGroup); - // register default action groups for right part of toolbar - DefaultActionGroup rightToolbarGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_RIGHT_TOOLBAR, rightToolbarGroup); - - // register default action groups for status panel - DefaultActionGroup leftStatusPanelGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_LEFT_STATUS_PANEL, leftStatusPanelGroup); - - DefaultActionGroup centerStatusPanelGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_CENTER_STATUS_PANEL, centerStatusPanelGroup); - - DefaultActionGroup rightStatusPanelGroup = new DefaultActionGroup(this); - registerAction(IdeActions.GROUP_RIGHT_STATUS_PANEL, rightStatusPanelGroup); - } - - private static void reportActionError(final String pluginId, final String message) { - if (pluginId == null) { - Log.error(ActionManagerImpl.class, message); - } else { - Log.error(ActionManagerImpl.class, pluginId, message); - } - } - - @Override - public Action getAction(String id) { - return getActionImpl(id, false); - } - - private Action getActionImpl(String id, boolean canReturnStub) { - return (Action) myId2Action.get(id); - } - - @Override - public String getId(Action action) { - return myAction2Id.get(action); - } - - @Override - public String[] getActionIds(String idPrefix) { - ArrayList idList = new ArrayList<>(); - for (String id : myId2Action.keySet()) { - if (id.startsWith(idPrefix)) { - idList.add(id); - } - } - return idList.toArray(new String[idList.size()]); - } - - @Override - public boolean isGroup(String actionId) { - return getActionImpl(actionId, true) instanceof ActionGroup; - } - - @Override - public Promise performActions( - List> actions, boolean breakOnFail) { - Promise promise = Promises.resolve(null); - return chainActionsRecursively(promise, actions.listIterator(), breakOnFail); - } - - @Override - public void performAction(String actionId, Map parameters) { - final Action action; - if (actionId != null && (action = getAction(actionId)) != null) { - final Presentation presentation = presentationFactory.getPresentation(action); - final ActionEvent actionEvent = new ActionEvent(presentation, this, parameters); - - action.update(actionEvent); - - if (presentation.isEnabled() && presentation.isVisible()) { - action.actionPerformed(actionEvent); - } - } - } - - /** - * Recursively chains the given promise with the promise that performs the next action from the - * given iterator. - */ - private Promise chainActionsRecursively( - Promise promise, - ListIterator> iterator, - boolean breakOnFail) { - if (!iterator.hasNext()) { - return promise; - } - - final Pair actionWithEvent = iterator.next(); - - final Promise derivedPromise = - promise.thenPromise( - new Function>() { - @Override - public Promise apply(Void arg) throws FunctionException { - return promiseAction(actionWithEvent.first, actionWithEvent.second); - } - }); - - if (breakOnFail) { - return chainActionsRecursively(derivedPromise, iterator, breakOnFail); - } - - final Promise derivedErrorSafePromise = - derivedPromise.catchErrorPromise( - new Function>() { - @Override - public Promise apply(PromiseError arg) throws FunctionException { - // 'hide' the error to avoid rejecting chain of promises - return Promises.resolve(null); - } - }); - - return chainActionsRecursively(derivedErrorSafePromise, iterator, breakOnFail); - } - - /** - * Returns promise returned by PromisableAction or already resolved promise for - * non-PromisableAction. - */ - private Promise promiseAction(final Action action, final ActionEvent event) { - if (action instanceof PromisableAction) { - return ((PromisableAction) action).promise(event); - } else { - action.actionPerformed(event); - return Promises.resolve(null); - } - } - - public Action getParentGroup( - final String groupId, final String actionName, final String pluginId) { - if (groupId == null || groupId.length() == 0) { - reportActionError(pluginId, actionName + ": attribute \"group-id\" should be defined"); - return null; - } - Action parentGroup = getActionImpl(groupId, true); - if (parentGroup == null) { - reportActionError( - pluginId, - actionName - + ": group with id \"" - + groupId - + "\" isn't registered; action will be added to the \"Other\" group"); - parentGroup = getActionImpl(IdeActions.GROUP_OTHER_MENU, true); - } - if (!(parentGroup instanceof DefaultActionGroup)) { - reportActionError( - pluginId, - actionName - + ": group with id \"" - + groupId - + "\" should be instance of " - + DefaultActionGroup.class.getName() - + " but was " - + parentGroup.getClass()); - return null; - } - return parentGroup; - } - - @Override - public void registerAction(String actionId, Action action, String pluginId) { - if (myId2Action.containsKey(actionId)) { - reportActionError( - pluginId, - "action with the ID \"" - + actionId - + "\" was already registered. Action being registered is " - + action.toString() - + "; Registered action is " - + myId2Action.get(actionId) - + pluginId); - return; - } - if (myAction2Id.containsKey(action)) { - reportActionError( - pluginId, - "action was already registered for another ID. ID is " - + myAction2Id.get(action) - + pluginId); - return; - } - myId2Action.put(actionId, action); - myId2Index.put(actionId, myRegisteredActionsCount++); - myAction2Id.put(action, actionId); - if (pluginId != null && !(action instanceof ActionGroup)) { - Set pluginActionIds = myPlugin2Id.get(pluginId); - if (pluginActionIds == null) { - pluginActionIds = new HashSet<>(); - myPlugin2Id.put(pluginId, pluginActionIds); - } - pluginActionIds.add(actionId); - } - } - - @Override - public void registerAction(String actionId, Action action) { - registerAction(actionId, action, null); - } - - @Override - public void unregisterAction(String actionId) { - if (!myId2Action.containsKey(actionId)) { - Log.debug(getClass(), "action with ID " + actionId + " wasn't registered"); - return; - } - Action oldValue = (Action) myId2Action.remove(actionId); - myAction2Id.remove(oldValue); - myId2Index.remove(actionId); - - for (Entry> entry : myPlugin2Id.entrySet()) { - final Set pluginActions = entry.getValue(); - if (pluginActions != null) { - pluginActions.remove(actionId); - } - } - } - - public Comparator getRegistrationOrderComparator() { - return new Comparator() { - public int compare(String id1, String id2) { - return myId2Index.get(id1) - myId2Index.get(id2); - } - }; - } - - public String[] getPluginActions(String pluginName) { - if (myPlugin2Id.containsKey(pluginName)) { - final Set pluginActions = myPlugin2Id.get(pluginName); - return pluginActions.toArray(new String[pluginActions.size()]); - } - return EMPTY_ARRAY; - } - - public Set getActionIds() { - return new HashSet<>(myId2Action.keySet()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/AddToFileWatcherExcludesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/AddToFileWatcherExcludesAction.java deleted file mode 100644 index 1dbbf6977c6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/AddToFileWatcherExcludesAction.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Arrays.asList; -import static java.util.Arrays.stream; -import static java.util.Collections.singletonList; -import static java.util.stream.Collectors.toSet; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.filewatcher.FileWatcherExcludesOperation; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Adds resources which are in application context to File Watcher excludes. - * - * @author Roman Nikitenko - */ -@Singleton -public class AddToFileWatcherExcludesAction extends AbstractPerspectiveAction { - - private AppContext appContext; - private NotificationManager notificationManager; - private FileWatcherExcludesOperation fileWatcherExcludesOperation; - - @Inject - public AddToFileWatcherExcludesAction( - AppContext appContext, - CoreLocalizationConstant locale, - NotificationManager notificationManager, - FileWatcherExcludesOperation fileWatcherExcludesOperation) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.addToFileWatcherExludesName(), - locale.addToFileWatcherExludesDescription()); - this.appContext = appContext; - this.notificationManager = notificationManager; - this.fileWatcherExcludesOperation = fileWatcherExcludesOperation; - } - - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - Set pathsToExclude = - stream(resources).map(resource -> resource.getLocation().toString()).collect(toSet()); - - fileWatcherExcludesOperation - .addToFileWatcherExcludes(pathsToExclude) - .catchError( - error -> { - notificationManager.notify(error.getMessage(), FAIL, EMERGE_MODE); - }); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation().setEnabled(containsResourcesToExcludes(resources)); - } - - private boolean containsResourcesToExcludes(Resource[] resources) { - if (resources == null || resources.length <= 0) { - return false; - } - - List resourcesToExclude = asList(resources); - return resourcesToExclude - .stream() - .map(resource -> resource.getLocation().toString()) - .anyMatch(pathToExclude -> !fileWatcherExcludesOperation.isExcluded(pathToExclude)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CloseActiveEditorAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CloseActiveEditorAction.java deleted file mode 100644 index cec85ea8bdf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CloseActiveEditorAction.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; - -/** - * General action which listens current active editor and closes it if need. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class CloseActiveEditorAction extends AbstractPerspectiveAction { - - private final EditorAgent editorAgent; - - @Inject - public CloseActiveEditorAction(CoreLocalizationConstant locale, EditorAgent editorAgent) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.editorTabClose(), - locale.editorTabCloseDescription()); - this.editorAgent = editorAgent; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(editorAgent.getActiveEditor() != null); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - editorAgent.closeEditor(editorAgent.getActiveEditor()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CollapseAllAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CollapseAllAction.java deleted file mode 100644 index 759cfc516dc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CollapseAllAction.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; - -/** - * Action to collapse all opened nodes in Project Explorer. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class CollapseAllAction extends BaseAction implements ActivePartChangedHandler { - - private ProjectExplorerPresenter projectExplorer; - private PartPresenter activePart; - - @Inject - public CollapseAllAction( - ProjectExplorerPresenter projectExplorer, - CoreLocalizationConstant localizationConstant, - EventBus eventBus) { - super( - localizationConstant.collapseAllActionTitle(), - localizationConstant.collapseAllActionDescription()); - this.projectExplorer = projectExplorer; - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePart = event.getActivePart(); - } - - @Override - public void update(ActionEvent e) { - if (!(activePart instanceof ProjectExplorerPresenter)) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - e.getPresentation().setEnabledAndVisible(true); - } - - @Override - public void actionPerformed(ActionEvent e) { - projectExplorer.collapseAll(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CompleteAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CompleteAction.java deleted file mode 100644 index c34a702b687..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CompleteAction.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.HandlesTextOperations; -import org.eclipse.che.ide.api.editor.texteditor.TextEditorOperations; - -/** - * Calls editor complete(Ctrl+Space) - * - * @author Evgen Vidolob - */ -@Singleton -public class CompleteAction extends AbstractPerspectiveAction { - - private EditorAgent editorAgent; - - @Inject - public CompleteAction( - CoreLocalizationConstant coreLocalizationConstant, EditorAgent editorAgent) { - super(null, coreLocalizationConstant.actionCompetitionsTitle()); - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor instanceof HandlesTextOperations) { - ((HandlesTextOperations) activeEditor).doOperation(TextEditorOperations.CODEASSIST_PROPOSALS); - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - if (activeEditor instanceof HandlesTextOperations) { - e.getPresentation().setVisible(true); - if (((HandlesTextOperations) activeEditor) - .canDoOperation(TextEditorOperations.CODEASSIST_PROPOSALS)) { - e.getPresentation().setEnabled(true); - } else { - e.getPresentation().setEnabled(false); - } - } - } else { - e.getPresentation().setEnabledAndVisible(false); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ConvertFolderToProjectAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ConvertFolderToProjectAction.java deleted file mode 100644 index 2ebb1314963..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ConvertFolderToProjectAction.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.projecttype.wizard.presenter.ProjectWizardPresenter; -import org.eclipse.che.ide.resource.Path; - -/** - * The special action which allows call business logic which can convert folder to project. - * - * @author Valeriy Svydenko - */ -public class ConvertFolderToProjectAction extends AbstractPerspectiveAction { - private final AppContext appContext; - private final ProjectWizardPresenter projectConfigWizard; - - @Inject - public ConvertFolderToProjectAction( - CoreLocalizationConstant locale, - AppContext appContext, - ProjectWizardPresenter projectConfigWizard) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.actionConvertFolderToProject(), - locale.actionConvertFolderToProjectDescription()); - this.appContext = appContext; - this.projectConfigWizard = projectConfigWizard; - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(getSelectedItem() != null); - } - - private Resource getSelectedItem() { - Resource resource = appContext.getResource(); - if (resource != null && resource.isFolder()) { - return resource; - } - - return null; - } - - @Override - public void actionPerformed(ActionEvent event) { - Resource folder = getSelectedItem(); - if (folder == null) { - return; - } - - Path location = folder.getLocation(); - if (location == null) { - return; - } - - MutableProjectConfig mutableProjectConfig = new MutableProjectConfig(); - mutableProjectConfig.setPath(location.toString()); - mutableProjectConfig.setName(folder.getName()); - - projectConfigWizard.show(mutableProjectConfig); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CreateProjectAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CreateProjectAction.java deleted file mode 100644 index 78833ebf802..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/CreateProjectAction.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.projecttype.wizard.presenter.ProjectWizardPresenter; -import org.eclipse.che.ide.resource.Path; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class CreateProjectAction extends AbstractPerspectiveAction { - - private final ProjectWizardPresenter wizard; - - @Inject - public CreateProjectAction(Resources resources, ProjectWizardPresenter wizard) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - "Create Project...", - "Create new project", - resources.newProject()); - this.wizard = wizard; - } - - @Override - public void actionPerformed(ActionEvent e) { - wizard.show(Path.ROOT); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DeleteResourceAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DeleteResourceAction.java deleted file mode 100644 index 4b15c23d528..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DeleteResourceAction.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper.createFromCallback; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.gwt.core.client.Callback; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.PromisableAction; -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.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; -import org.eclipse.che.ide.command.explorer.CommandsExplorerView; -import org.eclipse.che.ide.resources.DeleteResourceManager; - -/** - * Deletes resources which are in application context. - * - * @author Artem Zatsarynnyi - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - * @see DeleteResourceManager - */ -@Singleton -public class DeleteResourceAction extends AbstractPerspectiveAction implements PromisableAction { - - private final DeleteResourceManager deleteResourceManager; - private final AppContext appContext; - private final CommandsExplorerPresenter commandsExplorer; - private final CommandManager commandManager; - - private Callback actionCompletedCallBack; - private PartPresenter activePart; - - @Inject - public DeleteResourceAction( - Resources resources, - DeleteResourceManager deleteResourceManager, - CoreLocalizationConstant localization, - AppContext appContext, - EventBus eventBus, - CommandsExplorerPresenter commandsExplorer, - CommandManager commandManager) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localization.deleteItemActionText(), - localization.deleteItemActionDescription(), - resources.delete()); - this.deleteResourceManager = deleteResourceManager; - this.appContext = appContext; - this.commandsExplorer = commandsExplorer; - this.commandManager = commandManager; - - eventBus.addHandler(ActivePartChangedEvent.TYPE, event -> activePart = event.getActivePart()); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - if (activePart instanceof CommandsExplorerPresenter) { - CommandImpl command = - ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - if (command != null) { - commandManager - .removeCommand(command.getName()) - .then(this::onSuccess) - .catchError(this::onFailure); - } - } else { - deleteResourceManager - .delete(true, appContext.getResources()) - .then(this::onSuccess) - .catchError(this::onFailure); - } - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setVisible(true); - - if (activePart instanceof CommandsExplorerPresenter) { - CommandImpl command = - ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - event.getPresentation().setEnabled(command != null); - return; - } - - final Resource[] resources = appContext.getResources(); - - event - .getPresentation() - .setEnabled( - resources != null - && resources.length > 0 - && !(activePart instanceof TextEditor) - && !(activePart.getSelection() instanceof Selection.NoSelectionProvided)); - } - - /** {@inheritDoc} */ - @Override - public Promise promise(final ActionEvent event) { - final CallbackPromiseHelper.Call call = - callback -> { - actionCompletedCallBack = callback; - actionPerformed(event); - }; - - return createFromCallback(call); - } - - private void onSuccess(Void arg) { - if (actionCompletedCallBack != null) { - actionCompletedCallBack.onSuccess(arg); - } - } - - private void onFailure(PromiseError error) { - if (actionCompletedCallBack != null) { - actionCompletedCallBack.onFailure(error.getCause()); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadProjectAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadProjectAction.java deleted file mode 100644 index a58ed11f89f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadProjectAction.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.download.DownloadContainer; - -/** - * Download selected root project in the application context. - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - * @see AppContext#getRootProject() - */ -@Singleton -public class DownloadProjectAction extends AbstractPerspectiveAction { - - private final AppContext appContext; - private DownloadContainer downloadContainer; - - @Inject - public DownloadProjectAction( - AppContext appContext, - CoreLocalizationConstant locale, - Resources resources, - DownloadContainer downloadContainer) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.downloadProjectAsZipName(), - locale.downloadProjectAsZipDescription(), - resources.downloadZip()); - this.appContext = appContext; - this.downloadContainer = downloadContainer; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource resource = appContext.getResource(); - - if (resource == null || resource.getResourceType() != PROJECT) { - return; - } - final Project project = (Project) resource; - - downloadContainer.setUrl(project.getURL()); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation() - .setEnabled( - resources != null - && resources.length == 1 - && resources[0].getResourceType() == PROJECT); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadResourceAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadResourceAction.java deleted file mode 100644 index b80d43d6650..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadResourceAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.download.DownloadContainer; - -/** - * Download resource which is in context now to the local machine. - * - * @author Roman Nikitenko - * @author Vlad Zhukovskyi - * @see AppContext#getResource() - */ -@Singleton -public class DownloadResourceAction extends AbstractPerspectiveAction { - - private final AppContext appContext; - private final DownloadContainer downloadContainer; - private final AgentURLModifier urlModifier; - - @Inject - public DownloadResourceAction( - AppContext appContext, - CoreLocalizationConstant locale, - DownloadContainer downloadContainer, - AgentURLModifier urlModifier) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.downloadItemName(), - locale.downloadItemDescription()); - this.appContext = appContext; - this.downloadContainer = downloadContainer; - this.urlModifier = urlModifier; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource resource = appContext.getResource(); - - checkState(resource != null, "Null resource occurred"); - - downloadContainer.setUrl(urlModifier.modify(resource.getURL())); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation().setEnabled(resources != null && resources.length == 1); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadWsAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadWsAction.java deleted file mode 100644 index 64b0d8ca50f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/DownloadWsAction.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.download.DownloadContainer; - -/** - * Download all projects from the workspace. - * - * @author Valeriy Svydenko - */ -@Singleton -public class DownloadWsAction extends AbstractPerspectiveAction { - - private final AppContext appContext; - private final AgentURLModifier agentURLModifier; - private final DownloadContainer downloadContainer; - - @Inject - public DownloadWsAction( - AppContext appContext, - AgentURLModifier agentURLModifier, - CoreLocalizationConstant locale, - Resources resources, - DownloadContainer downloadContainer) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.downloadProjectAsZipName(), - locale.downloadProjectAsZipDescription(), - resources.downloadZip()); - this.appContext = appContext; - this.agentURLModifier = agentURLModifier; - this.downloadContainer = downloadContainer; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - downloadContainer.setUrl( - agentURLModifier.modify(appContext.getWsAgentServerApiEndpoint() + "/project/export/")); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Project[] projects = appContext.getProjects(); - e.getPresentation().setVisible(true); - e.getPresentation().setEnabled(projects != null && projects.length > 0); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditFileAction.java deleted file mode 100644 index 5acbccb0f9d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditFileAction.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Opens file based resources taken from the application context in the editor. - * - * @author Vitaliy Guliy - * @author Vlad Zhukovskyi - * @see AppContext#getResources() - */ -@Singleton -public class EditFileAction extends AbstractPerspectiveAction { - - private final AppContext appContext; - private final EditorAgent editorAgent; - - @Inject - public EditFileAction(AppContext appContext, Resources resources, EditorAgent editorAgent) { - super(singletonList(PROJECT_PERSPECTIVE_ID), "Edit file", null, resources.defaultFile()); - this.appContext = appContext; - this.editorAgent = editorAgent; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - checkState( - resources != null && resources.length == 1 && resources[0] instanceof File, - "Files only are allowed to be opened in editor"); - - editorAgent.openEditor((File) resources[0]); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation() - .setEnabled(resources != null && resources.length == 1 && resources[0] instanceof File); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditorActions.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditorActions.java deleted file mode 100644 index 0051e82d16d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/EditorActions.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -/** - * Contains IDs for editor's actions - * - * @author Roman Nikitenko - */ -public final class EditorActions { - public static final String CLOSE = "closeEditor"; - public static final String CLOSE_ALL = "closeAllEditors"; - public static final String CLOSE_ALL_EXCEPT_PINNED = "closeAllEditorExceptPinned"; - public static final String CLOSE_OTHER = "closeOtherEditorExceptCurrent"; - public static final String REOPEN_CLOSED = "reopenClosedEditorTab"; - public static final String PIN_TAB = "pinEditorTab"; - public static final String SPLIT_HORIZONTALLY = "splitHorizontally"; - public static final String SPLIT_VERTICALLY = "splitVertically"; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ExpandEditorAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ExpandEditorAction.java deleted file mode 100644 index 0d361adcc63..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ExpandEditorAction.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.MouseOverEvent; -import com.google.gwt.event.dom.client.MouseOverHandler; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.action.CustomComponentAction; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackType; -import org.eclipse.che.ide.api.parts.Perspective; -import org.eclipse.che.ide.api.parts.PerspectiveManager; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -@Singleton -public class ExpandEditorAction extends BaseAction implements CustomComponentAction { - - private final Resources resources; - private final CoreLocalizationConstant constant; - private final PerspectiveManager perspectiveManager; - - private FlowPanel buttonPanel; - private FlowPanel button; - - @Inject - public ExpandEditorAction( - Resources resources, - PerspectiveManager perspectiveManager, - CoreLocalizationConstant constant) { - super(constant.actionExpandEditorTitle(), null, FontAwesome.EXPAND); - this.resources = resources; - this.perspectiveManager = perspectiveManager; - this.constant = constant; - } - - @Override - public void actionPerformed(ActionEvent e) { - toggleExpand(); - } - - @Override - public Widget createCustomComponent(Presentation presentation) { - if (buttonPanel != null) { - return buttonPanel; - } - - final Element tooltip = DOM.createSpan(); - tooltip.setInnerHTML(constant.actionExpandEditorTitle()); - - buttonPanel = new FlowPanel(); - buttonPanel.addStyleName(resources.coreCss().editorFullScreen()); - - button = new FlowPanel(); - button.getElement().setInnerHTML(FontAwesome.EXPAND); - button.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - toggleExpand(); - } - }, - ClickEvent.getType()); - - buttonPanel.add(button); - buttonPanel.getElement().appendChild(tooltip); - - buttonPanel.addDomHandler( - new MouseOverHandler() { - @Override - public void onMouseOver(MouseOverEvent event) { - final Element panel = event.getRelativeElement(); - tooltip - .getStyle() - .setProperty("top", (panel.getAbsoluteTop() + panel.getOffsetHeight() + 9) + "px"); - tooltip - .getStyle() - .setProperty( - "right", - (Document.get().getClientWidth() - panel.getAbsoluteRight() - 2) + "px"); - } - }, - MouseOverEvent.getType()); - - return buttonPanel; - } - - /** Expands or restores the editor. */ - public void toggleExpand() { - Perspective perspective = perspectiveManager.getActivePerspective(); - if (perspective == null) { - return; - } - - PartStack partStack = perspective.getPartStack(PartStackType.EDITING); - if (partStack == null) { - return; - } - - if (partStack.getPartStackState() == PartStack.State.NORMAL) { - perspective.maximizeCentralPartStack(); - button.getElement().setInnerHTML(FontAwesome.COMPRESS); - } else { - perspective.restore(); - button.getElement().setInnerHTML(FontAwesome.EXPAND); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FormatterAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FormatterAction.java deleted file mode 100644 index 7e49f580bfa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FormatterAction.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.HandlesTextOperations; -import org.eclipse.che.ide.api.editor.texteditor.TextEditorOperations; - -/** - * Formatter Action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - */ -public class FormatterAction extends AbstractPerspectiveAction { - - private final EditorAgent editorAgent; - - @Inject - public FormatterAction( - EditorAgent editorAgent, CoreLocalizationConstant localization, Resources resources) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localization.formatName(), - localization.formatDescription(), - resources.format()); - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - final EditorPartPresenter editor = editorAgent.getActiveEditor(); - HandlesTextOperations handlesOperations; - if (editor instanceof HandlesTextOperations) { - handlesOperations = (HandlesTextOperations) editor; - if (handlesOperations.canDoOperation(TextEditorOperations.FORMAT)) { - handlesOperations.doOperation(TextEditorOperations.FORMAT); - } - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - final EditorPartPresenter editor = editorAgent.getActiveEditor(); - boolean isCanDoOperation = false; - - HandlesTextOperations handlesOperations; - if (editor instanceof HandlesTextOperations) { - handlesOperations = (HandlesTextOperations) editor; - isCanDoOperation = handlesOperations.canDoOperation(TextEditorOperations.FORMAT); - } - - event.getPresentation().setEnabled(isCanDoOperation); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FullTextSearchAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FullTextSearchAction.java deleted file mode 100644 index 67b4f5048f1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/FullTextSearchAction.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.search.FullTextSearchPresenter; - -/** - * Action for finding text in the files on the workspace. - * - * @author Valeriy Svydenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class FullTextSearchAction extends AbstractPerspectiveAction { - - private final FullTextSearchPresenter presenter; - private final AppContext appContext; - - @Inject - public FullTextSearchAction( - FullTextSearchPresenter presenter, - AppContext appContext, - Resources resources, - CoreLocalizationConstant locale) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.actionFullTextSearch(), - locale.actionFullTextSearchDescription(), - resources.find()); - this.presenter = presenter; - this.appContext = appContext; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - final Project project = appContext.getRootProject(); - - event.getPresentation().setVisible(true); - event.getPresentation().setEnabled(project != null); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - final Path searchPath; - - if (resources == null || resources.length == 0 || resources.length > 1) { - searchPath = Path.ROOT; - } else { - if (resources[0] instanceof Container) { - searchPath = resources[0].getLocation(); - } else { - final Container parent = resources[0].getParent(); - searchPath = parent != null ? parent.getLocation() : Path.ROOT; - } - } - - presenter.showDialog(searchPath); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/GoIntoAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/GoIntoAction.java deleted file mode 100644 index 0c123d6099e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/GoIntoAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ProjectAction; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Sets "Go Into" mode on node which is supports that mode. - * - * @author Vlad Zhukovskiy - * @see Node#supportGoInto() - */ -@Singleton -public class GoIntoAction extends ProjectAction { - - private final ProjectExplorerPresenter projectExplorer; - private final CoreLocalizationConstant localizationConstant; - - @Inject - public GoIntoAction( - ProjectExplorerPresenter projectExplorer, CoreLocalizationConstant localizationConstant) { - super(localizationConstant.goIntoActionText()); - - this.projectExplorer = projectExplorer; - this.localizationConstant = localizationConstant; - } - - /** {@inheritDoc} */ - @Override - protected void updateProjectAction(ActionEvent e) { - if (projectExplorer.isGoIntoActivated()) { - e.getPresentation().setText(localizationConstant.goBackActionText()); - e.getPresentation().setEnabledAndVisible(true); - return; - } - - e.getPresentation().setText(localizationConstant.goIntoActionText()); - - List selection = projectExplorer.getSelection().getAllElements(); - - e.getPresentation() - .setEnabledAndVisible( - !projectExplorer.isGoIntoActivated() - && selection.size() == 1 - && isNodeSupportGoInto(selection.get(0))); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - if (projectExplorer.isGoIntoActivated()) { - projectExplorer.goBack(); - return; - } - - List selection = projectExplorer.getSelection().getAllElements(); - - if (selection.isEmpty() || selection.size() > 1) { - throw new IllegalArgumentException("Node isn't selected"); - } - - Object node = selection.get(0); - - if (isNodeSupportGoInto(node)) { - projectExplorer.goInto((Node) node); - } - } - - private boolean isNodeSupportGoInto(Object node) { - return node instanceof Node && ((Node) node).supportGoInto(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/HotKeysListAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/HotKeysListAction.java deleted file mode 100644 index 1fd1f694dfe..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/HotKeysListAction.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.hotkeys.dialog.HotKeysDialogPresenter; - -/** - * Show hotKeys list for IDE and editor - * - * @author Alexander Andrienko - */ -public class HotKeysListAction extends AbstractPerspectiveAction { - - private HotKeysDialogPresenter hotKeysDialogPresenter; - - @Inject - public HotKeysListAction( - HotKeysDialogPresenter hotKeysDialogPresenter, CoreLocalizationConstant locale) { - super(null, locale.keyBindingsActionName(), locale.keyBindingsActionDescription()); - this.hotKeysDialogPresenter = hotKeysDialogPresenter; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - hotKeysDialogPresenter.showHotKeys(); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ImportProjectAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ImportProjectAction.java deleted file mode 100644 index 3dfa5cc0247..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ImportProjectAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.projectimport.wizard.presenter.ImportProjectWizardPresenter; - -/** - * Import project from location action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - */ -@Singleton -public class ImportProjectAction extends AbstractPerspectiveAction { - - private final ImportProjectWizardPresenter presenter; - - @Inject - public ImportProjectAction( - ImportProjectWizardPresenter presenter, - CoreLocalizationConstant locale, - Resources resources) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.importProjectFromLocationName(), - locale.importProjectFromLocationDescription(), - resources.importProjectFromLocation()); - this.presenter = presenter; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - presenter.show(); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/LinkWithEditorAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/LinkWithEditorAction.java deleted file mode 100644 index f826fa99115..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/LinkWithEditorAction.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ToggleAction; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; - -/** - * The Project Explorer view has a Link with Editor feature. This can be enabled in header of the - * Project Explorer view by choosing Link with editor button. If Link wih Editor is enabled - the - * current file open in the Editor will be highlighted in Project Explorer. - */ -@Singleton -public class LinkWithEditorAction extends ToggleAction implements ActivePartChangedHandler { - - public static final String LINK_WITH_EDITOR = "linkWithEditor"; - - private final Provider editorAgentProvider; - private final EventBus eventBus; - private final PreferencesManager preferencesManager; - - private PartPresenter activePart; - - @Inject - public LinkWithEditorAction( - CoreLocalizationConstant localizationConstant, - Provider editorAgentProvider, - EventBus eventBus, - PreferencesManager preferencesManager) { - super(localizationConstant.actionLinkWithEditor()); - - this.editorAgentProvider = editorAgentProvider; - this.eventBus = eventBus; - this.preferencesManager = preferencesManager; - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(activePart instanceof ProjectExplorerPresenter); - } - - @Override - public boolean isSelected(ActionEvent e) { - final String linkWithEditor = preferencesManager.getValue(LINK_WITH_EDITOR); - return Boolean.parseBoolean(linkWithEditor); - } - - @Override - public void setSelected(ActionEvent e, boolean state) { - preferencesManager.setValue(LINK_WITH_EDITOR, Boolean.toString(state)); - - if (!state) { - return; - } - - final EditorPartPresenter activeEditor = editorAgentProvider.get().getActiveEditor(); - if (activeEditor == null) { - return; - } - final EditorInput editorInput = activeEditor.getEditorInput(); - if (editorInput == null) { - return; - } - eventBus.fireEvent(new RevealResourceEvent(editorInput.getFile().getLocation())); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePart = event.getActivePart(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NavigateToFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NavigateToFileAction.java deleted file mode 100644 index 47476c38419..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NavigateToFileAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.navigation.NavigateToFilePresenter; - -/** - * Action for finding file by name and opening it. - * - * @author Ann Shumilova - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class NavigateToFileAction extends AbstractPerspectiveAction { - - private final Provider navigateToFilePresenterProvider; - - @Inject - public NavigateToFileAction( - Provider navigateToFilePresenterProvider, - Resources resources, - CoreLocalizationConstant localizationConstant) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizationConstant.actionNavigateToFileText(), - localizationConstant.actionNavigateToFileDescription(), - resources.navigateToFile()); - this.navigateToFilePresenterProvider = navigateToFilePresenterProvider; - } - - @Override - public void actionPerformed(ActionEvent e) { - navigateToFilePresenterProvider.get().showDialog(); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NewXmlFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NewXmlFileAction.java deleted file mode 100644 index f8a84c5fe8e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/NewXmlFileAction.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.newresource.AbstractNewResourceAction; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; - -/** - * Action to create new XML file. - * - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class NewXmlFileAction extends AbstractNewResourceAction { - private static final String DEFAULT_CONTENT = "\n"; - - @Inject - public NewXmlFileAction( - CoreLocalizationConstant localizationConstant, - Resources resources, - DialogFactory dialogFactory, - CoreLocalizationConstant coreLocalizationConstant, - EventBus eventBus, - AppContext appContext, - NotificationManager notificationManager, - Provider editorAgentProvider) { - super( - localizationConstant.actionNewXmlFileTitle(), - localizationConstant.actionNewXmlFileDescription(), - resources.defaultFile(), - dialogFactory, - coreLocalizationConstant, - eventBus, - appContext, - notificationManager, - editorAgentProvider); - } - - @Override - protected String getExtension() { - return "xml"; - } - - @Override - protected String getDefaultContent() { - return DEFAULT_CONTENT; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/OpenFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/OpenFileAction.java deleted file mode 100644 index dac5cf1d44e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/OpenFileAction.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.lang.Integer.parseInt; -import static org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper.createFromCallback; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.FLOAT_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; - -import com.google.gwt.core.client.Callback; -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper.Call; -import org.eclipse.che.api.promises.client.js.JsPromiseError; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.action.PromisableAction; -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.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.loging.Log; - -/** - * @author Sergii Leschenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class OpenFileAction extends BaseAction implements PromisableAction { - - /** ID of the parameter to specify file path to open. */ - public static final String FILE_PARAM_ID = "file"; - - public static final String LINE_PARAM_ID = "line"; - - private final EventBus eventBus; - private final CoreLocalizationConstant localization; - private final NotificationManager notificationManager; - private final AppContext appContext; - private final EditorAgent editorAgent; - - private Callback actionCompletedCallback; - - @Inject - public OpenFileAction( - EventBus eventBus, - CoreLocalizationConstant localization, - NotificationManager notificationManager, - AppContext appContext, - EditorAgent editorAgent) { - this.eventBus = eventBus; - this.localization = localization; - this.notificationManager = notificationManager; - this.appContext = appContext; - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent event) { - if (event.getParameters() == null) { - Log.error(getClass(), localization.canNotOpenFileWithoutParams()); - return; - } - - final String pathToOpen = event.getParameters().get(FILE_PARAM_ID); - if (pathToOpen == null) { - Log.error(getClass(), localization.fileToOpenIsNotSpecified()); - return; - } - - appContext - .getWorkspaceRoot() - .getFile(pathToOpen) - .then( - optionalFile -> { - if (optionalFile.isPresent()) { - if (actionCompletedCallback != null) { - actionCompletedCallback.onSuccess(null); - } - - editorAgent.openEditor( - optionalFile.get(), - new EditorAgent.OpenEditorCallback() { - @Override - public void onEditorOpened(EditorPartPresenter editor) { - scrollToLine(editor, event.getParameters().get(LINE_PARAM_ID)); - } - - @Override - public void onInitializationFailed() {} - - @Override - public void onEditorActivated(EditorPartPresenter editor) { - scrollToLine(editor, event.getParameters().get(LINE_PARAM_ID)); - } - }); - - } else { - if (actionCompletedCallback != null) { - actionCompletedCallback.onFailure(null); - } - - notificationManager.notify( - localization.unableOpenResource(pathToOpen), FAIL, FLOAT_MODE); - } - }); - } - - private void scrollToLine(EditorPartPresenter editor, String lineParam) { - if (!(editor instanceof TextEditor)) { - return; - } - new Timer() { - @Override - public void run() { - try { - int lineNumber = parseInt(lineParam); - TextEditor textEditor = (TextEditor) editor; - textEditor.getDocument().setCursorPosition(new TextPosition(lineNumber - 1, 0)); - } catch (NumberFormatException e) { - Log.error(getClass(), localization.fileToOpenLineIsNotANumber()); - } - } - }.schedule(300); - } - - @Override - public Promise promise(final ActionEvent actionEvent) { - if (actionEvent.getParameters() == null) { - return Promises.reject(JsPromiseError.create(localization.canNotOpenFileWithoutParams())); - } - - final String pathToOpen = actionEvent.getParameters().get(FILE_PARAM_ID); - if (pathToOpen == null) { - return Promises.reject(JsPromiseError.create(localization.fileToOpenIsNotSpecified())); - } - - final Call call = - new Call() { - HandlerRegistration handlerRegistration; - - @Override - public void makeCall(final Callback callback) { - actionCompletedCallback = callback; - handlerRegistration = - eventBus.addHandler( - ActivePartChangedEvent.TYPE, - event -> { - if (event.getActivePart() instanceof EditorPartPresenter) { - EditorPartPresenter editor = (EditorPartPresenter) event.getActivePart(); - handlerRegistration.removeHandler(); - if (Path.valueOf(pathToOpen) - .equals(editor.getEditorInput().getFile().getLocation())) { - callback.onSuccess(null); - } - } - }); - actionPerformed(actionEvent); - } - }; - - return createFromCallback(call); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ProjectConfigurationAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ProjectConfigurationAction.java deleted file mode 100644 index 750923b0dcf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ProjectConfigurationAction.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.projecttype.wizard.presenter.ProjectWizardPresenter; - -/** - * Call Project wizard to change project type - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class ProjectConfigurationAction extends AbstractPerspectiveAction { - - private final AppContext appContext; - private final ProjectWizardPresenter projectWizard; - - @Inject - public ProjectConfigurationAction( - AppContext appContext, - CoreLocalizationConstant localization, - Resources resources, - ProjectWizardPresenter projectWizard) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localization.actionProjectConfigurationTitle(), - localization.actionProjectConfigurationDescription(), - resources.projectConfiguration()); - this.appContext = appContext; - this.projectWizard = projectWizard; - } - - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - checkState(resources != null && resources.length == 1); - - final Resource project = resources[0].getProject(); - - checkState(project != null); - - if (project.getResourceType() == PROJECT) { - final MutableProjectConfig config = new MutableProjectConfig((Project) project); - - projectWizard.show(config); - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - final Resource[] resources = appContext.getResources(); - event.getPresentation().setText("Update Project Configuration..."); - event.getPresentation().setEnabledAndVisible(resources != null && resources.length == 1); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedoAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedoAction.java deleted file mode 100644 index c7bdafecf84..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RedoAction.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import java.util.Arrays; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.HandlesUndoRedo; -import org.eclipse.che.ide.api.editor.texteditor.UndoableEditor; - -/** - * Redo Action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - */ -public class RedoAction extends AbstractPerspectiveAction { - - private EditorAgent editorAgent; - - @Inject - public RedoAction( - EditorAgent editorAgent, CoreLocalizationConstant localization, Resources resources) { - super( - Arrays.asList(PROJECT_PERSPECTIVE_ID), - localization.redoName(), - localization.redoDescription(), - resources.redo()); - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - if (activeEditor != null && activeEditor instanceof UndoableEditor) { - final HandlesUndoRedo undoRedo = ((UndoableEditor) activeEditor).getUndoRedo(); - if (undoRedo != null) { - undoRedo.redo(); - } - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - boolean mustEnable = false; - if (activeEditor != null && activeEditor instanceof UndoableEditor) { - final HandlesUndoRedo undoRedo = ((UndoableEditor) activeEditor).getUndoRedo(); - if (undoRedo != null) { - mustEnable = undoRedo.redoable(); - } - } - event.getPresentation().setEnabled(mustEnable); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RefreshPathAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RefreshPathAction.java deleted file mode 100644 index d7981c31b66..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RefreshPathAction.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; - -/** - * Refresh current selected container. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class RefreshPathAction extends AbstractPerspectiveAction - implements ActivePartChangedHandler { - - private final AppContext appContext; - - private PartPresenter activePart; - - @Inject - public RefreshPathAction( - AppContext appContext, CoreLocalizationConstant localizationConstant, EventBus eventBus) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizationConstant.refreshActionTitle(), - localizationConstant.refreshActionDescription()); - this.appContext = appContext; - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - if (!(activePart instanceof ProjectExplorerPresenter)) { - event.getPresentation().setEnabledAndVisible(false); - return; - } - - event.getPresentation().setText("Refresh"); - event.getPresentation().setVisible(true); - - final Resource[] resources = appContext.getResources(); - - if (resources == null || resources.length != 1) { - event.getPresentation().setEnabled(false); - return; - } - - final Resource resource = resources[0]; - - if (resource instanceof Container) { - event.getPresentation().setText("Refresh '" + resource.getName() + "'"); - } else { - final Container parent = resource.getParent(); - - if (parent != null) { - event.getPresentation().setText("Refresh '" + parent.getName() + "'"); - } else { - event.getPresentation().setEnabled(false); - return; - } - } - - event.getPresentation().setEnabled(true); - } - - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - if (resources == null || resources.length != 1) { - return; - } - - final Resource resource = resources[0]; - - if (resource instanceof Container) { - ((Container) resource).synchronize(); - } else { - final Container parent = resource.getParent(); - - if (parent != null) { - parent.synchronize(); - } - } - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - this.activePart = event.getActivePart(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RemoveFromFileWatcherExcludesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RemoveFromFileWatcherExcludesAction.java deleted file mode 100644 index 951a0159485..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RemoveFromFileWatcherExcludesAction.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Arrays.asList; -import static java.util.Arrays.stream; -import static java.util.Collections.singletonList; -import static java.util.stream.Collectors.toSet; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.filewatcher.FileWatcherExcludesOperation; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Removes resources which are in application context from File Watcher excludes. - * - * @author Roman Nikitenko - */ -@Singleton -public class RemoveFromFileWatcherExcludesAction extends AbstractPerspectiveAction { - - private AppContext appContext; - private NotificationManager notificationManager; - private FileWatcherExcludesOperation fileWatcherExcludesOperation; - - @Inject - public RemoveFromFileWatcherExcludesAction( - AppContext appContext, - CoreLocalizationConstant locale, - NotificationManager notificationManager, - FileWatcherExcludesOperation fileWatcherExcludesOperation) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.removeFromFileWatcherExludesName(), - locale.removeFromFileWatcherExludesDescription()); - this.appContext = appContext; - this.notificationManager = notificationManager; - this.fileWatcherExcludesOperation = fileWatcherExcludesOperation; - } - - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - Set pathsToRemove = - stream(resources).map(resource -> resource.getLocation().toString()).collect(toSet()); - - fileWatcherExcludesOperation - .removeFromFileWatcherExcludes(pathsToRemove) - .catchError( - error -> { - notificationManager.notify(error.getMessage(), FAIL, EMERGE_MODE); - }); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation().setEnabled(containsResourcesToRemoveFromExcludes(resources)); - } - - private boolean containsResourcesToRemoveFromExcludes(Resource[] resources) { - if (resources == null || resources.length <= 0) { - return false; - } - - List resourcesToExclude = asList(resources); - return resourcesToExclude - .stream() - .map(resource -> resource.getLocation().toString()) - .anyMatch(pathToExclude -> fileWatcherExcludesOperation.isExcluded(pathToExclude)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RenameItemAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RenameItemAction.java deleted file mode 100644 index 5c424a60228..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RenameItemAction.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Sets.newConcurrentHashSet; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.api.resources.Resource.FILE; -import static org.eclipse.che.ide.api.resources.Resource.FOLDER; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import java.util.Set; -import java.util.function.BiConsumer; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -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.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.api.resources.RenamingSupport; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.input.InputCallback; -import org.eclipse.che.ide.ui.dialogs.input.InputDialog; -import org.eclipse.che.ide.ui.dialogs.input.InputValidator; -import org.eclipse.che.ide.util.NameUtils; - -/** - * Rename selected resource in the application context. - * - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - * @see AppContext#getResource() - */ -@Singleton -public class RenameItemAction extends AbstractPerspectiveAction { - private final CoreLocalizationConstant localization; - private final Set renamingSupport; - private final EditorAgent editorAgent; - private final NotificationManager notificationManager; - private final DialogFactory dialogFactory; - private final AppContext appContext; - private final WorkspaceAgent workspaceAgent; - - private final Set> customActions = newConcurrentHashSet(); - - @Inject - public RenameItemAction( - Resources resources, - CoreLocalizationConstant localization, - Set renamingSupport, - EditorAgent editorAgent, - NotificationManager notificationManager, - DialogFactory dialogFactory, - AppContext appContext, - WorkspaceAgent workspaceAgent) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localization.renameItemActionText(), - localization.renameItemActionDescription(), - resources.rename()); - this.localization = localization; - this.renamingSupport = renamingSupport; - this.editorAgent = editorAgent; - this.notificationManager = notificationManager; - this.dialogFactory = dialogFactory; - this.appContext = appContext; - this.workspaceAgent = workspaceAgent; - } - - /** - * Add an action that will be performed right after a successful rename of the resource - * - * @param action action represented by a binary consume where the first parameter is a old - * resource and a the second - newly renamed resource - */ - public void addCustomAction(BiConsumer action) { - customActions.add(action); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - - final Resource resource = appContext.getResource(); - - checkState(resource != null, "Null resource occurred"); - - final String resourceName = resource.getName(); - final int selectionLength = - resourceName.indexOf('.') >= 0 ? resourceName.lastIndexOf('.') : resourceName.length(); - final InputValidator validator; - final String dialogTitle; - - if (resource.getResourceType() == FILE) { - validator = new FileNameValidator(resourceName); - dialogTitle = localization.renameFileDialogTitle(resourceName); - } else if (resource.getResourceType() == FOLDER) { - validator = new FolderNameValidator(resourceName); - dialogTitle = localization.renameFolderDialogTitle(resourceName); - } else if (resource.getResourceType() == PROJECT) { - validator = new ProjectNameValidator(resourceName); - dialogTitle = localization.renameProjectDialogTitle(resourceName); - } else { - throw new IllegalStateException("Not a resource"); - } - - final InputCallback inputCallback = - new InputCallback() { - @Override - public void accepted(final String value) { - // we shouldn't perform renaming file with the same name - if (!value.trim().equals(resourceName)) { - - closeRelatedEditors(resource); - - final Path destination = resource.getLocation().parent().append(value); - - resource - .move(destination) - .then( - newResource -> { - customActions.forEach(it -> it.accept(resource, newResource)); - }) - .catchError( - new Operation() { - @Override - public void apply(PromiseError arg) throws OperationException { - notificationManager.notify("", arg.getMessage(), FAIL, EMERGE_MODE); - } - }); - } - } - }; - - InputDialog inputDialog = - dialogFactory.createInputDialog( - dialogTitle, - localization.renameDialogNewNameLabel(), - resource.getName(), - 0, - selectionLength, - inputCallback, - null); - inputDialog.withValidator(validator); - inputDialog.show(); - } - - private void closeRelatedEditors(Resource resource) { - if (!resource.isProject()) { - return; - } - - final List openedEditors = editorAgent.getOpenedEditors(); - - for (EditorPartPresenter editor : openedEditors) { - if (resource.getLocation().isPrefixOf(editor.getEditorInput().getFile().getLocation())) { - editorAgent.closeEditor(editor); - } - } - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - - if (workspaceAgent.getActivePart() == null - || workspaceAgent.getActivePart() instanceof EditorPartPresenter) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - final Resource[] resources = appContext.getResources(); - e.getPresentation().setVisible(true); - - if (resources == null || resources.length != 1) { - e.getPresentation().setEnabled(false); - return; - } - - for (RenamingSupport validator : renamingSupport) { - if (!validator.isRenameAllowed(resources[0])) { - e.getPresentation().setEnabled(false); - return; - } - } - - e.getPresentation().setEnabled(true); - } - - private abstract class AbstractNameValidator implements InputValidator { - private final String selfName; - - public AbstractNameValidator(final String selfName) { - this.selfName = selfName; - } - - @Override - public Violation validate(String value) { - if (value.trim().equals(selfName)) { - return new Violation() { - @Override - public String getMessage() { - return ""; - } - - @Override - public String getCorrectedValue() { - return null; - } - }; - } - - return isValidName(value); - } - - public abstract Violation isValidName(String value); - } - - private class FileNameValidator extends AbstractNameValidator { - - public FileNameValidator(String selfName) { - super(selfName); - } - - @Override - public Violation isValidName(String value) { - if (!NameUtils.checkFileName(value)) { - return new Violation() { - @Override - public String getMessage() { - return localization.invalidName(); - } - - @Nullable - @Override - public String getCorrectedValue() { - return null; - } - }; - } - return null; - } - } - - private class FolderNameValidator extends AbstractNameValidator { - - public FolderNameValidator(String selfName) { - super(selfName); - } - - @Override - public Violation isValidName(String value) { - if (!NameUtils.checkFolderName(value)) { - return new Violation() { - @Override - public String getMessage() { - return localization.invalidName(); - } - - @Nullable - @Override - public String getCorrectedValue() { - return null; - } - }; - } - return null; - } - } - - private class ProjectNameValidator extends AbstractNameValidator { - - public ProjectNameValidator(String selfName) { - super(selfName); - } - - @Override - public Violation isValidName(String value) { - return new Violation() { - @Override - public String getMessage() { - return localization.invalidName(); - } - - @Nullable - @Override - public String getCorrectedValue() { - if (NameUtils.checkProjectName(value)) { - return value.contains(" ") ? value.replaceAll(" ", "-") : value; - } - return null; - } - }; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RunCommandAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RunCommandAction.java deleted file mode 100644 index dbc913196fd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RunCommandAction.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Allows to run predefined command without UI. - * - * @author Max Shaposhnik - */ -public class RunCommandAction extends BaseAction { - - public static final String NAME_PARAM_ID = "name"; - - private final CommandManager commandManager; - private final CommandExecutor commandExecutor; - private final WsAgentServerUtil wsAgentServerUtil; - private final CoreLocalizationConstant localizationConstant; - - @Inject - public RunCommandAction( - CommandManager commandManager, - CoreLocalizationConstant localizationConstant, - CommandExecutor commandExecutor, - WsAgentServerUtil wsAgentServerUtil) { - this.commandManager = commandManager; - this.localizationConstant = localizationConstant; - this.commandExecutor = commandExecutor; - this.wsAgentServerUtil = wsAgentServerUtil; - } - - @Override - public void actionPerformed(ActionEvent event) { - if (event.getParameters() == null) { - Log.error(getClass(), localizationConstant.runCommandEmptyParamsMessage()); - return; - } - - final String name = event.getParameters().get(NAME_PARAM_ID); - if (name == null) { - Log.error(getClass(), localizationConstant.runCommandEmptyNameMessage()); - return; - } - - wsAgentServerUtil - .getWsAgentServerMachine() - .ifPresent( - m -> - commandManager - .getCommand(name) - .ifPresent(command -> commandExecutor.executeCommand(command, m.getName()))); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAction.java deleted file mode 100644 index c00646fda04..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ProjectAction; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorWithAutoSave; - -/** - * Save editor content Action - * - * @author Evgen Vidolob - */ -@Singleton -public class SaveAction extends ProjectAction { - - private final EditorAgent editorAgent; - - @Inject - public SaveAction(Resources resources, EditorAgent editorAgent) { - super("Save", "Save changes for current file", resources.save()); - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - editorAgent.getActiveEditor().doSave(); - } - - @Override - public void updateProjectAction(ActionEvent e) { - EditorPartPresenter editor = editorAgent.getActiveEditor(); - if (editor != null) { - if (editor instanceof EditorWithAutoSave) { - if (((EditorWithAutoSave) editor).isAutoSaveEnabled()) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - } - e.getPresentation().setVisible(true); - e.getPresentation().setEnabled(editor.isDirty()); - - } else { - e.getPresentation().setEnabledAndVisible(false); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAllAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAllAction.java deleted file mode 100644 index c2b20712c52..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SaveAllAction.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ProjectAction; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorWithAutoSave; -import org.eclipse.che.ide.util.loging.Log; - -/** @author Evgen Vidolob */ -@Singleton -public class SaveAllAction extends ProjectAction { - - private final EditorAgent editorAgent; - - @Inject - public SaveAllAction(EditorAgent editorAgent, Resources resources) { - super("Save All", "Save all changes for project", resources.save()); - this.editorAgent = editorAgent; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - save(editorAgent.getOpenedEditors()); - } - - private void save(final List editors) { - if (editors.isEmpty()) { - return; - } - - final EditorPartPresenter editorPartPresenter = editors.get(0); - if (editorPartPresenter.isDirty()) { - editorPartPresenter.doSave( - new AsyncCallback() { - @Override - public void onFailure(Throwable caught) { - Log.error(SaveAllAction.class, caught); - // try to save other files - editors.remove(editorPartPresenter); - save(editors); - } - - @Override - public void onSuccess(EditorInput result) { - editors.remove(editorPartPresenter); - save(editors); - } - }); - } else { - editors.remove(editorPartPresenter); - save(editors); - } - } - - /** {@inheritDoc} */ - @Override - public void updateProjectAction(ActionEvent e) { - boolean hasDirtyEditor = false; - for (EditorPartPresenter editor : editorAgent.getOpenedEditors()) { - if (editor instanceof EditorWithAutoSave) { - if (((EditorWithAutoSave) editor).isAutoSaveEnabled()) { - continue; - } - } - if (editor.isDirty()) { - hasDirtyEditor = true; - break; - } - } - e.getPresentation().setEnabledAndVisible(hasDirtyEditor); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowConsoleTreeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowConsoleTreeAction.java deleted file mode 100644 index 94ef8142a8f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowConsoleTreeAction.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ToggleAction; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.processes.panel.ProcessesPanelPresenter; - -/** - * Action to show / hide console tree. - * - * @author Vitaliy Guliy - */ -@Singleton -public class ShowConsoleTreeAction extends ToggleAction implements ActivePartChangedHandler { - - private final ProcessesPanelPresenter processesPanelPresenter; - - private PartPresenter activePart; - - @Inject - public ShowConsoleTreeAction( - final EventBus eventBus, - final ProcessesPanelPresenter processesPanelPresenter, - final CoreLocalizationConstant machineLocalizationConstant) { - super(machineLocalizationConstant.actionShowConsoleTreeTitle()); - - this.processesPanelPresenter = processesPanelPresenter; - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public boolean isSelected(ActionEvent e) { - return processesPanelPresenter.isProcessesTreeVisible(); - } - - @Override - public void setSelected(ActionEvent e, boolean state) { - processesPanelPresenter.setProcessesTreeVisible(state); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePart = event.getActivePart(); - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(activePart instanceof ProcessesPanelPresenter); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowHiddenFilesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowHiddenFilesAction.java deleted file mode 100644 index b300bb0b6e9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowHiddenFilesAction.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper.createFromCallback; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.gwt.core.client.Callback; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper; -import org.eclipse.che.api.promises.client.js.JsPromiseError; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.PromisableAction; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; - -/** - * Action for showing/hiding hidden files. - * - * @author Artem Zatsarynnyi - * @author Dmitry Shnurenko - */ -@Singleton -public class ShowHiddenFilesAction extends AbstractPerspectiveAction implements PromisableAction { - - public static final String SHOW_HIDDEN_FILES_PARAM_ID = "showHiddenFiles"; - private final AppContext appContext; - private final ProjectExplorerPresenter projectExplorerPresenter; - - @Inject - public ShowHiddenFilesAction( - AppContext appContext, - CoreLocalizationConstant localizationConstant, - ProjectExplorerPresenter projectExplorerPresenter, - Resources resources) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizationConstant.actionShowHiddenFilesTitle(), - localizationConstant.actionShowHiddenFilesDescription(), - resources.showHiddenFiles()); - this.appContext = appContext; - this.projectExplorerPresenter = projectExplorerPresenter; - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setVisible(appContext.getRootProject() != null); - } - - @Override - public void actionPerformed(ActionEvent e) { - boolean isShow = projectExplorerPresenter.isShowHiddenFiles(); - projectExplorerPresenter.showHiddenFiles(!isShow); - } - - @Override - public Promise promise(final ActionEvent event) { - if (event.getParameters() == null - || event.getParameters().get(SHOW_HIDDEN_FILES_PARAM_ID) == null) { - return Promises.reject( - JsPromiseError.create( - "Mandatory parameter" + SHOW_HIDDEN_FILES_PARAM_ID + " is not specified")); - } - - final String showHiddenFilesKey = event.getParameters().get(SHOW_HIDDEN_FILES_PARAM_ID); - final boolean isShowHiddenFiles = Boolean.valueOf(showHiddenFilesKey); - - final CallbackPromiseHelper.Call call = - new CallbackPromiseHelper.Call() { - - @Override - public void makeCall(final Callback callback) { - projectExplorerPresenter.showHiddenFiles(isShowHiddenFiles); - - callback.onSuccess(null); - } - }; - - return createFromCallback(call); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowPreferencesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowPreferencesAction.java deleted file mode 100644 index 5fbf80cb14b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowPreferencesAction.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.preferences.PreferencesPresenter; - -/** - * Show preferences action. - * - * @author Evgen Vidolob - * @author Vlad Zhukovskyi - */ -@Singleton -public class ShowPreferencesAction extends AbstractPerspectiveAction { - - private final PreferencesPresenter presenter; - - private final AppContext appContext; - - @Inject - public ShowPreferencesAction( - Resources resources, PreferencesPresenter presenter, AppContext appContext) { - super(null, "Preferences", "Preferences", resources.preferences()); - this.presenter = presenter; - this.appContext = appContext; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - presenter.showPreferences(); - } - - @Override - public void updateInPerspective(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowReferenceAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowReferenceAction.java deleted file mode 100644 index 16e482ac5c9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowReferenceAction.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.reference.ShowReferencePresenter; - -/** - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class ShowReferenceAction extends BaseAction { - - private final ShowReferencePresenter showReferencePresenter; - private final AppContext appContext; - - @Inject - public ShowReferenceAction( - CoreLocalizationConstant locale, - ShowReferencePresenter showReferencePresenter, - AppContext appContext) { - super(locale.showReference()); - - this.showReferencePresenter = showReferencePresenter; - this.appContext = appContext; - } - - /** {@inheritDoc} */ - @Override - public void update(ActionEvent event) { - final Resource[] resources = appContext.getResources(); - - event.getPresentation().setVisible(true); - event.getPresentation().setEnabled(resources != null && resources.length == 1); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - final Resource resource = appContext.getResource(); - - checkState(resource != null, "Null resource occurred"); - - showReferencePresenter.show(resource); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowToolbarAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowToolbarAction.java deleted file mode 100644 index b453dd5ac9f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ShowToolbarAction.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ToggleAction; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.workspace.WorkspaceView; - -/** Action to show or hide Toolbar. */ -@Singleton -public class ShowToolbarAction extends ToggleAction { - - public static final String SHOW_TOOLBAR = "showToolbar"; - - private final PreferencesManager preferencesManager; - - private final WorkspaceView workspaceView; - - @Inject - public ShowToolbarAction( - CoreLocalizationConstant localizationConstant, - PreferencesManager preferencesManager, - WorkspaceView workspaceView) { - super(localizationConstant.actionShowToolbar()); - this.preferencesManager = preferencesManager; - this.workspaceView = workspaceView; - - String showToolbar = preferencesManager.getValue(SHOW_TOOLBAR); - workspaceView.showToolbar(Boolean.parseBoolean(showToolbar)); - } - - @Override - public boolean isSelected(ActionEvent e) { - return workspaceView.isToolbarVisible(); - } - - @Override - public void setSelected(ActionEvent e, boolean state) { - preferencesManager.setValue(SHOW_TOOLBAR, Boolean.toString(state)); - workspaceView.showToolbar(state); - preferencesManager.flushPreferences(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SignatureHelpAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SignatureHelpAction.java deleted file mode 100644 index 88780dfd336..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SignatureHelpAction.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.HandlesTextOperations; -import org.eclipse.che.ide.api.editor.texteditor.TextEditorOperations; - -/** - * Action for 'Signature help', in general should show signature of something callable. - * - * @author Evgen Vidolob - */ -@Singleton -public class SignatureHelpAction extends AbstractPerspectiveAction { - - private final EditorAgent editorAgent; - - @Inject - public SignatureHelpAction(EditorAgent editorAgent, CoreLocalizationConstant constant) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - constant.signatureName(), - constant.signatureDescription()); - this.editorAgent = editorAgent; - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - final EditorPartPresenter editor = editorAgent.getActiveEditor(); - boolean isCanDoOperation = false; - - HandlesTextOperations handlesOperations; - if (editor instanceof HandlesTextOperations) { - handlesOperations = (HandlesTextOperations) editor; - isCanDoOperation = handlesOperations.canDoOperation(TextEditorOperations.SIGNATURE_HELP); - } - - event.getPresentation().setEnabledAndVisible(isCanDoOperation); - } - - @Override - public void actionPerformed(ActionEvent e) { - final EditorPartPresenter editor = editorAgent.getActiveEditor(); - HandlesTextOperations handlesOperations; - if (editor instanceof HandlesTextOperations) { - handlesOperations = (HandlesTextOperations) editor; - if (handlesOperations.canDoOperation(TextEditorOperations.SIGNATURE_HELP)) { - handlesOperations.doOperation(TextEditorOperations.SIGNATURE_HELP); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SoftWrapAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SoftWrapAction.java deleted file mode 100644 index 1790e29aefc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/SoftWrapAction.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.inject.Inject; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ToggleAction; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.CanWrapLines; - -/** - * Toggle wrapping long lines action - * - * @author Vitaliy Guliy - */ -public class SoftWrapAction extends ToggleAction { - - private EditorAgent editorAgent; - - @Inject - public SoftWrapAction(EditorAgent editorAgent, CoreLocalizationConstant localization) { - super(localization.softWrap()); - this.editorAgent = editorAgent; - } - - @Override - public boolean isSelected(ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null && activeEditor instanceof CanWrapLines) { - return ((CanWrapLines) activeEditor).isWrapLines(); - } - - return false; - } - - @Override - public void setSelected(ActionEvent e, boolean state) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null && activeEditor instanceof CanWrapLines) { - ((CanWrapLines) activeEditor).toggleWrapLines(); - } - } - - @Override - public void update(ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - if (activeEditor != null && activeEditor instanceof CanWrapLines) { - e.getPresentation().setEnabled(true); - } else { - e.getPresentation().setEnabled(false); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsParser.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsParser.java deleted file mode 100644 index 1064a2e06ce..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsParser.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.gwt.user.client.Window; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.app.StartUpAction; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Utility class that parse IDE URL and get start up parameters form it according specific rules. - * URL for parsing comes from {@link Window.Location}. - * - *

        For example: after parsing URL like it - * http://localhost:8080/ide/dev6?action=createProject:projectName=test;projectType=maven we will - * get list with one action {@link StartUpAction} with ID 'createProject' and two parameters - * 'projectName' :: 'test' 'projectType' :: 'maven' - * - * @author Vitalii Parfonov - */ -public class StartUpActionsParser { - - public static List getStartUpActions() { - final Map> parameterMap = Window.Location.getParameterMap(); - List startUpActions = new ArrayList<>(); - if (!parameterMap.isEmpty() && parameterMap.containsKey("action")) { - final List actions = parameterMap.get("action"); - for (String action : actions) { - final StartUpAction startUpAction = parseActionQuery(action); - startUpActions.add(startUpAction); - } - } - return startUpActions; - } - - protected static StartUpAction parseActionQuery(String action) { - String actionId; - String params; - if (action.contains(":")) { // action has parameters - final String[] split = action.split(":"); - actionId = split[0]; - params = split[1]; - return new StartUpAction(actionId, parseActionParameters(params)); - } else { - return new StartUpAction(action, null); - } - } - - protected static Map parseActionParameters(String actionParam) { - Log.info(StartUpActionsParser.class, " parametersMap " + actionParam); - final String[] parametersQuery = actionParam.split(";"); - Map params = new HashMap<>(parametersQuery.length); - for (int i = 0; i < parametersQuery.length; i++) { - final String parameterString = parametersQuery[i]; - final String[] param = parameterString.split("="); - final String paramName = param[0]; - if (param.length > 1) { - final String paramValue = param[1]; - params.put(paramName, paramValue); - } else { - params.put(paramName, null); - } - } - return params; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsProcessor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsProcessor.java deleted file mode 100644 index e9f9324447b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/StartUpActionsProcessor.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.List; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.app.StartUpAction; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerRunningEvent; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; - -/** - * Will process all start-up actions which come from {@link AppContext#getStartAppActions()} after - * starting ws-agent. - * - * @author Vitalii Parfonov - */ -@Singleton -public class StartUpActionsProcessor { - - private final AppContext appContext; - private final ActionManager actionManager; - - @Inject - public StartUpActionsProcessor( - AppContext appContext, ActionManager actionManager, EventBus eventBus) { - this.appContext = appContext; - this.actionManager = actionManager; - - // delay is required because we need to wait some time while different components initialized - eventBus.addHandler(WsAgentServerRunningEvent.TYPE, e -> performActionsWithDelay()); - eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> performActionsWithDelay()); - } - - private void performActionsWithDelay() { - new Timer() { - @Override - public void run() { - performActions(); - } - }.schedule(1000); - } - - private void performActions() { - List startAppActions = appContext.getStartAppActions(); - - for (StartUpAction action : startAppActions) { - actionManager.performAction(action.getActionId(), action.getParameters()); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UndoAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UndoAction.java deleted file mode 100644 index a516e1ea4e0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UndoAction.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import java.util.Arrays; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.texteditor.HandlesUndoRedo; -import org.eclipse.che.ide.api.editor.texteditor.UndoableEditor; - -/** - * Undo Action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - */ -public class UndoAction extends AbstractPerspectiveAction { - - private EditorAgent editorAgent; - - @Inject - public UndoAction( - EditorAgent editorAgent, CoreLocalizationConstant localization, Resources resources) { - super( - Arrays.asList(PROJECT_PERSPECTIVE_ID), - localization.undoName(), - localization.undoDescription(), - resources.undo()); - this.editorAgent = editorAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - if (activeEditor != null && activeEditor instanceof UndoableEditor) { - final HandlesUndoRedo undoRedo = ((UndoableEditor) activeEditor).getUndoRedo(); - if (undoRedo != null) { - undoRedo.undo(); - } - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - boolean mustEnable = false; - if (activeEditor != null && activeEditor instanceof UndoableEditor) { - final HandlesUndoRedo undoRedo = ((UndoableEditor) activeEditor).getUndoRedo(); - if (undoRedo != null) { - mustEnable = undoRedo.undoable(); - } - } - event.getPresentation().setEnabled(mustEnable); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFileAction.java deleted file mode 100644 index 78e3b7b1235..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFileAction.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.upload.file.UploadFilePresenter; - -/** - * Upload file Action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class UploadFileAction extends AbstractPerspectiveAction { - - private final UploadFilePresenter presenter; - private final AppContext appContext; - - @Inject - public UploadFileAction( - UploadFilePresenter presenter, - CoreLocalizationConstant locale, - Resources resources, - AppContext appContext) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.uploadFileName(), - locale.uploadFileDescription(), - resources.uploadFile()); - this.presenter = presenter; - this.appContext = appContext; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - checkState(resources != null && resources.length == 1 && resources[0] instanceof Container); - - presenter.showDialog((Container) resources[0]); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation() - .setEnabled( - resources != null && resources.length == 1 && resources[0] instanceof Container); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFolderAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFolderAction.java deleted file mode 100644 index 52b61242540..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/UploadFolderAction.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.upload.folder.UploadFolderFromZipPresenter; - -/** - * Upload folder from zip Action - * - * @author Roman Nikitenko - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class UploadFolderAction extends AbstractPerspectiveAction { - - private final UploadFolderFromZipPresenter presenter; - private final AppContext appContext; - - @Inject - public UploadFolderAction( - UploadFolderFromZipPresenter presenter, - CoreLocalizationConstant locale, - Resources resources, - AppContext appContext) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.uploadFolderFromZipName(), - locale.uploadFolderFromZipDescription(), - resources.uploadFile()); - this.presenter = presenter; - this.appContext = appContext; - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - checkState(resources != null && resources.length == 1 && resources[0] instanceof Container); - - presenter.showDialog((Container) resources[0]); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - final Resource[] resources = appContext.getResources(); - - e.getPresentation().setVisible(true); - e.getPresentation() - .setEnabled( - resources != null && resources.length == 1 && resources[0] instanceof Container); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/CollapseTreeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/CollapseTreeAction.java deleted file mode 100644 index 25fcd549996..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/CollapseTreeAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.common; - -import static com.google.common.base.Preconditions.checkNotNull; - -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.ui.smartTree.data.TreeExpander; - -/** - * Base tree collapse action which consumes instance of {@link TreeExpander}. - * - * @author Vlad Zhukovskyi - * @see TreeExpander - * @since 5.0.0 - */ -public abstract class CollapseTreeAction extends BaseAction { - - public abstract TreeExpander getTreeExpander(); - - public CollapseTreeAction() { - super("Collapse All"); - } - - @Override - public void actionPerformed(ActionEvent e) { - final TreeExpander treeExpander = getTreeExpander(); - - checkNotNull(treeExpander); - - if (!treeExpander.isCollapseEnabled()) { - return; - } - - treeExpander.collapseTree(); - } - - @Override - public void update(ActionEvent e) { - final TreeExpander treeExpander = getTreeExpander(); - - e.getPresentation().setEnabledAndVisible(treeExpander.isCollapseEnabled()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/ExpandTreeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/ExpandTreeAction.java deleted file mode 100644 index fdea1aaa4dd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/ExpandTreeAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.common; - -import static com.google.common.base.Preconditions.checkNotNull; - -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.ui.smartTree.data.TreeExpander; - -/** - * Base tree expand action which consumes instance of {@link TreeExpander}. - * - * @author Vlad Zhukovskyi - * @see TreeExpander - * @since 5.0.0 - */ -public abstract class ExpandTreeAction extends BaseAction { - - public abstract TreeExpander getTreeExpander(); - - public ExpandTreeAction() { - super("Expand All"); - } - - @Override - public void actionPerformed(ActionEvent e) { - final TreeExpander treeExpander = getTreeExpander(); - - checkNotNull(treeExpander); - - if (!treeExpander.isExpandEnabled()) { - return; - } - - treeExpander.expandTree(); - } - - @Override - public void update(ActionEvent e) { - final TreeExpander treeExpander = getTreeExpander(); - - e.getPresentation().setEnabledAndVisible(treeExpander.isExpandEnabled()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/HidePartAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/HidePartAction.java deleted file mode 100644 index 7e9e160726b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/HidePartAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.common; - -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartStack; - -/** - * Action to hide active part and corresponding part stack. - * - * @author Vitaliy Guliy - */ -public class HidePartAction extends BaseAction implements ActivePartChangedHandler { - - private PartStack activePartStack; - - @Inject - public HidePartAction( - final EventBus eventBus, final CoreLocalizationConstant coreLocalizationConstant) { - super( - coreLocalizationConstant.actionHidePartTitle(), - coreLocalizationConstant.actionHidePartDescription()); - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void update(ActionEvent e) { - if (activePartStack == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - e.getPresentation() - .setEnabledAndVisible(PartStack.State.NORMAL == activePartStack.getPartStackState()); - } - - @Override - public void actionPerformed(ActionEvent e) { - activePartStack.hide(true); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePartStack = event.getActivePart().getPartStack(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/MaximizePartAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/MaximizePartAction.java deleted file mode 100644 index ecc77bd6448..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/MaximizePartAction.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.common; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartStack; - -/** - * Action to maximize active part and corresponding part stack. - * - * @author Vitaliy Guliy - */ -@Singleton -public class MaximizePartAction extends BaseAction implements ActivePartChangedHandler { - - private PartStack activePartStack; - - @Inject - public MaximizePartAction( - final EventBus eventBus, final CoreLocalizationConstant coreLocalizationConstant) { - super( - coreLocalizationConstant.actionMaximizePartTitle(), - coreLocalizationConstant.actionMaximizePartDescription()); - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void update(ActionEvent e) { - if (activePartStack == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - e.getPresentation() - .setEnabledAndVisible(PartStack.State.NORMAL == activePartStack.getPartStackState()); - } - - @Override - public void actionPerformed(ActionEvent e) { - activePartStack.maximize(); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePartStack = event.getActivePart().getPartStack(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/RestorePartAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/RestorePartAction.java deleted file mode 100644 index b3cf17c29b3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/common/RestorePartAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.common; - -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartStack; - -/** - * Action to restore active part and corresponding part stack from maximized state. - * - * @author Vitaliy Guliy - */ -public class RestorePartAction extends BaseAction implements ActivePartChangedHandler { - - private PartStack activePartStack; - - @Inject - public RestorePartAction( - final EventBus eventBus, final CoreLocalizationConstant coreLocalizationConstant) { - super( - coreLocalizationConstant.actionRestorePartTitle(), - coreLocalizationConstant.actionRestorePartDescription()); - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - } - - @Override - public void update(ActionEvent e) { - if (activePartStack == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - - e.getPresentation() - .setEnabledAndVisible(PartStack.State.MAXIMIZED == activePartStack.getPartStackState()); - } - - @Override - public void actionPerformed(ActionEvent e) { - activePartStack.restore(); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePartStack = event.getActivePart().getPartStack(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionAction.java deleted file mode 100644 index a8f810bae47..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionAction.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.find; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; - -/** - * Action fo find action action - * - * @author Evgen Vidolob - */ -@Singleton -public class FindActionAction extends AbstractPerspectiveAction { - - private FindActionPresenter presenter; - - @Inject - public FindActionAction( - FindActionPresenter presenter, CoreLocalizationConstant localization, Resources resources) { - super( - null, - localization.actionFindActionDescription(), - localization.actionFindActionTitle(), - resources.findActions()); - this.presenter = presenter; - } - - @Override - public void actionPerformed(ActionEvent e) { - presenter.show(); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionPresenter.java deleted file mode 100644 index 1b9480e2714..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionPresenter.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.find; - -import static java.util.Collections.unmodifiableList; - -import com.google.gwt.regexp.shared.RegExp; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.actions.ActionManagerImpl; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionGroup; -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.action.Presentation; -import org.eclipse.che.ide.api.action.Separator; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.util.StringUtils; -import org.eclipse.che.ide.util.UnicodeUtils; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class FindActionPresenter implements Presenter, FindActionView.ActionDelegate { - - private final PresentationFactory presentationFactory; - private final FindActionView view; - private final ActionManager actionManager; - private final Map actionsMap; - private final Comparator actionComparator = - new Comparator() { - @Override - public int compare(Action o1, Action o2) { - int compare = - compare( - o1.getTemplatePresentation().getText(), o2.getTemplatePresentation().getText()); - if (compare == 0 && !o1.equals(o2)) { - return o1.hashCode() - o2.hashCode(); - } - return compare; - } - - public int compare(@Nullable String o1, @Nullable String o2) { - if (o1 == null) return o2 == null ? 0 : -1; - if (o2 == null) return 1; - return o1.compareTo(o2); - } - }; - - @Inject - public FindActionPresenter(FindActionView view, ActionManager actionManager) { - this.view = view; - this.actionManager = actionManager; - view.setDelegate(this); - presentationFactory = new PresentationFactory(); - actionsMap = new TreeMap<>(actionComparator); - } - - private static boolean containsOnlyUppercaseLetters(String s) { - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (c != '*' && c != ' ' && !Character.isUpperCase(c)) return false; - } - return true; - } - - @Override - public void go(AcceptsOneWidget container) {} - - public void show() { - view.show(); - Action action = actionManager.getAction(IdeActions.GROUP_MAIN_MENU); - collectActions(actionsMap, (ActionGroup) action, action.getTemplatePresentation().getText()); - view.focusOnInput(); - if (view.getName() != null) { - nameChanged(view.getName(), view.getCheckBoxState()); - } - } - - private void collectActions( - Map result, ActionGroup group, final String containingGroupName) { - final Action[] actions = group.getChildren(null); - includeGroup(result, group, actions, containingGroupName); - for (Action action : actions) { - if (action != null) { - if (action instanceof ActionGroup) { - final ActionGroup actionGroup = (ActionGroup) action; - final String groupName = actionGroup.getTemplatePresentation().getText(); - collectActions( - result, - actionGroup, - StringUtils.isNullOrEmpty(groupName) || !actionGroup.isPopup() - ? containingGroupName - : groupName); - } else { - final String groupName = group.getTemplatePresentation().getText(); - if (result.containsKey(action)) { - result.put(action, null); - } else { - result.put( - action, StringUtils.isNullOrEmpty(groupName) ? containingGroupName : groupName); - } - } - } - } - } - - private void includeGroup( - Map result, ActionGroup group, Action[] actions, String containingGroupName) { - boolean showGroup = true; - for (Action action : actions) { - if (actionManager.getId(action) != null) { - showGroup = false; - break; - } - } - if (showGroup) { - result.put(group, containingGroupName); - } - } - - @Override - public void nameChanged(String name, boolean checkBoxState) { - if (name.isEmpty()) { - view.hideActions(); - return; - } - String pattern = convertPattern(name.trim()); - RegExp regExp = RegExp.compile(pattern); - Map actions = new TreeMap<>(actionComparator); - if (checkBoxState) { - Set ids = ((ActionManagerImpl) actionManager).getActionIds(); - for (Action action : actionsMap.keySet()) { - ids.remove(actionManager.getId(action)); - } - for (String id : ids) { - Action action = actionManager.getAction(id); - Presentation presentation = action.getTemplatePresentation(); - String text = presentation.getText(); - if (text != null && regExp.test(text)) { - actions.put(action, null); - } - } - } - - List excludedActionIds = getExcludedActionIds(actionManager); - - for (Entry entry : actionsMap.entrySet()) { - final Action action = entry.getKey(); - final String groupName = entry.getValue(); - - if (excludedActionIds.contains(actionManager.getId(action))) { - continue; - } - - Presentation presentation = action.getTemplatePresentation(); - String text = presentation.getText(); - if (text != null && regExp.test(text)) { - actions.put(action, groupName); - } - } - - if (!actions.isEmpty()) { - view.showActions(actions); - } else { - view.hideActions(); - } - } - - @Override - public void onClose() { - actionsMap.clear(); - } - - @Override - public void onActionSelected(Action action) { - ActionEvent e = new ActionEvent(presentationFactory.getPresentation(action), actionManager); - action.update(e); - if (e.getPresentation().isEnabled() && e.getPresentation().isVisible()) { - view.hide(); - action.actionPerformed(e); - } - } - - private String convertPattern(String pattern) { - final int eol = pattern.indexOf('\n'); - if (eol != -1) { - pattern = pattern.substring(0, eol); - } - if (pattern.length() >= 80) { - pattern = pattern.substring(0, 80); - } - - final StringBuilder buffer = new StringBuilder(); - - boolean allowToLower = true; - if (containsOnlyUppercaseLetters(pattern)) { - allowToLower = false; - } - - boolean firstIdentifierLetter = true; - for (int i = 0; i < pattern.length(); i++) { - final char c = pattern.charAt(i); - if (Character.isLetterOrDigit(c) - || UnicodeUtils.regexpIdentifierOrWhitespace.test(String.valueOf(c))) { - // This logic allows to use uppercase letters only to catch the name like PDM for - // PsiDocumentManager - if (Character.isUpperCase(c) || Character.isDigit(c)) { - - if (!firstIdentifierLetter) { - buffer.append("[^A-Z]*"); - } - - buffer.append("["); - buffer.append(c); - if (allowToLower || i == 0) { - buffer.append('|'); - buffer.append(Character.toLowerCase(c)); - } - buffer.append("]"); - } else if (Character.isLowerCase(c)) { - buffer.append('['); - buffer.append(c); - buffer.append('|'); - buffer.append(Character.toUpperCase(c)); - buffer.append(']'); - } else { - buffer.append(c); - } - - firstIdentifierLetter = false; - } else if (c == '*') { - buffer.append(".*"); - firstIdentifierLetter = true; - } else if (c == '.') { - buffer.append("\\."); - firstIdentifierLetter = true; - } else if (c == ' ') { - buffer.append("[^A-Z]*\\ "); - firstIdentifierLetter = true; - } else { - firstIdentifierLetter = true; - // for standard RegExp engine - buffer.append("\\u"); - buffer.append(Integer.toHexString(c + 0x20000).substring(1)); - - // for OROMATCHER RegExp engine - // buffer.append("\\x"); - // buffer.append(Integer.toHexString(c + 0x20000).substring(3)); - } - } - - return buffer.toString(); - } - - private List getExcludedActionIds(ActionManager actionManager) { - List ids = new ArrayList<>(); - - DefaultActionGroup editGroup = - (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_RECENT_FILES); - Action[] children = editGroup.getChildActionsOrStubs(); - for (Action child : children) { - if (child instanceof Separator) { - continue; - } - - ids.add(actionManager.getId(child)); - } - - return unmodifiableList(ids); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionView.java deleted file mode 100644 index e89a7be7fff..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionView.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.find; - -import java.util.Map; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.mvp.View; - -/** @author Evgen Vidolob */ -public interface FindActionView extends View { - - void focusOnInput(); - - void show(); - - void hide(); - - String getName(); - - void showActions(Map actions); - - void hideActions(); - - boolean getCheckBoxState(); - - interface ActionDelegate { - - void nameChanged(String name, boolean checkBoxState); - - void onClose(); - - void onActionSelected(Action action); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.java deleted file mode 100644 index 52112ad034c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.find; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.KeyCodes; -import com.google.gwt.event.dom.client.KeyDownEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.CheckBox; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.TextBox; -import com.google.inject.Inject; -import elemental.dom.Element; -import elemental.dom.Node; -import elemental.html.TableCellElement; -import elemental.html.TableElement; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.editor.codeassist.AutoCompleteResources; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.ui.ElementWidget; -import org.eclipse.che.ide.ui.list.SimpleList; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.ui.toolbar.ToolbarResources; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.input.KeyMapUtil; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public class FindActionViewImpl extends PopupPanel implements FindActionView { - - interface FindActionViewImplUiBinder extends UiBinder {} - - private final AutoCompleteResources.Css css; - - private final PresentationFactory presentationFactory; - - private final SimpleList.ListEventDelegate eventDelegate = - new SimpleList.ListEventDelegate() { - @Override - public void onListItemClicked(Element listItemBase, Action itemData) { - list.getSelectionModel().setSelectedItem(itemData); - } - - @Override - public void onListItemDoubleClicked(Element listItemBase, Action itemData) { - delegate.onActionSelected(itemData); - } - }; - - private final SimpleList.ListItemRenderer listItemRenderer = - new SimpleList.ListItemRenderer() { - @Override - public void render(Element itemElement, Action itemData) { - TableCellElement icon = Elements.createTDElement(css.proposalIcon()); - TableCellElement label = Elements.createTDElement(css.proposalLabel()); - TableCellElement group = Elements.createTDElement(css.proposalGroup()); - - Presentation presentation = presentationFactory.getPresentation(itemData); - itemData.update(new ActionEvent(presentation, actionManager)); - - if (presentation.getImageElement() != null) { - ElementWidget image = new ElementWidget(presentation.getImageElement()); - image.getElement().setAttribute("class", toolbarResources.toolbar().iconButtonIcon()); - image.getElement().getStyle().setMargin(0, Style.Unit.PX); - icon.appendChild((Node) image.getElement()); - - } else if (presentation.getHTMLResource() != null) { - icon.setInnerHTML(presentation.getHTMLResource()); - } - - String hotKey = - KeyMapUtil.getShortcutText( - keyBindingAgent.getKeyBinding(actionManager.getId(itemData))); - if (hotKey == null) { - hotKey = " "; - } else { - hotKey = " [" + hotKey + "] "; - } - label.setInnerHTML(presentation.getText() + hotKey); - if (!presentation.isEnabled() || !presentation.isVisible()) { - itemElement.getStyle().setProperty("opacity", "0.6"); - } - String groupName = actions.get(itemData); - if (groupName != null) { - group.setInnerHTML(groupName); - } - itemElement.appendChild(icon); - itemElement.appendChild(label); - itemElement.appendChild(group); - } - - @Override - public Element createElement() { - return Elements.createTRElement(); - } - }; - - @UiField TextBox nameField; - - @UiField CheckBox includeNonMenu; - - private ActionDelegate delegate; - private Resources resources; - private KeyBindingAgent keyBindingAgent; - private ActionManager actionManager; - - @UiField DockLayoutPanel layoutPanel; - - @UiField FlowPanel actionsPanel; - - @UiField HTML actionsContainer; - - private SimpleList list; - private Map actions; - private ToolbarResources toolbarResources; - - @Inject - public FindActionViewImpl( - Resources resources, - KeyBindingAgent keyBindingAgent, - ActionManager actionManager, - AutoCompleteResources autoCompleteResources, - ToolbarResources toolbarResources, - FindActionViewImplUiBinder uiBinder) { - this.resources = resources; - this.keyBindingAgent = keyBindingAgent; - this.actionManager = actionManager; - this.toolbarResources = toolbarResources; - this.presentationFactory = new PresentationFactory(); - - css = autoCompleteResources.autocompleteComponentCss(); - css.ensureInjected(); - - DockLayoutPanel rootElement = uiBinder.createAndBindUi(this); - setWidget(rootElement); - setAutoHideEnabled(true); - setAnimationEnabled(true); - - layoutPanel.setWidgetHidden(actionsPanel, true); - layoutPanel.setHeight("60px"); - - addCloseHandler(event -> delegate.onClose()); - - includeNonMenu.addValueChangeHandler( - event -> { - includeNonMenu.getElement().setAttribute("checked", Boolean.toString(event.getValue())); - delegate.nameChanged(nameField.getText(), event.getValue()); - }); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void focusOnInput() { - nameField.setFocus(true); - } - - @Override - public void show() { - super.show(); - - if (nameField.getValue() != null && nameField.getValue().trim().isEmpty()) { - hideActions(); - } - - Scheduler.get().scheduleDeferred(() -> center()); - } - - @Override - public String getName() { - return nameField.getText(); - } - - @Override - public void showActions(Map actions) { - this.actions = actions; - - actionsContainer.getElement().setInnerHTML(""); - - TableElement itemHolder = Elements.createTableElement(); - itemHolder.setClassName(css.items()); - actionsContainer.getElement().appendChild(((com.google.gwt.dom.client.Element) itemHolder)); - - list = - SimpleList.create( - (SimpleList.View) actionsContainer.getElement().cast(), - (Element) actionsContainer.getElement(), - itemHolder, - resources.defaultSimpleListCss(), - listItemRenderer, - eventDelegate); - - list.render(new ArrayList<>(actions.keySet())); - - if (!actions.isEmpty()) { - list.getSelectionModel().setSelectedItem(0); - } - - layoutPanel.setWidgetHidden(actionsPanel, false); - layoutPanel.setHeight("250px"); - - if (isVisible()) { - Scheduler.get().scheduleDeferred(() -> center()); - } - } - - @Override - public void hideActions() { - actions = new HashMap<>(); - actionsContainer.getElement().setInnerHTML(""); - - layoutPanel.setWidgetHidden(actionsPanel, true); - layoutPanel.setHeight("60px"); - - if (isVisible()) { - Scheduler.get().scheduleDeferred(() -> center()); - } - } - - @Override - public boolean getCheckBoxState() { - return includeNonMenu.getValue(); - } - - @UiHandler("nameField") - void handleKeyDown(KeyDownEvent event) { - switch (event.getNativeKeyCode()) { - case KeyCodes.KEY_UP: - event.stopPropagation(); - event.preventDefault(); - list.getSelectionModel().selectPrevious(); - break; - - case KeyCodes.KEY_DOWN: - event.stopPropagation(); - event.preventDefault(); - list.getSelectionModel().selectNext(); - break; - - case KeyCodes.KEY_PAGEUP: - event.stopPropagation(); - event.preventDefault(); - list.getSelectionModel().selectPreviousPage(); - break; - - case KeyCodes.KEY_PAGEDOWN: - event.stopPropagation(); - event.preventDefault(); - list.getSelectionModel().selectNextPage(); - break; - - case KeyCodes.KEY_ENTER: - event.stopPropagation(); - event.preventDefault(); - delegate.onActionSelected(list.getSelectionModel().getSelectedItem()); - break; - - case KeyCodes.KEY_ESCAPE: - event.stopPropagation(); - event.preventDefault(); - hide(); - break; - default: - // here we need some delay to be sure that input box initiated with given value - // in manually testing hard to reproduce this problem but it reproduced with selenium tests - new Timer() { - @Override - public void run() { - delegate.nameChanged(nameField.getText(), includeNonMenu.getValue()); - } - }.schedule(300); - break; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.ui.xml deleted file mode 100644 index 6d527c5e251..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/find/FindActionViewImpl.ui.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - @eval windowContentBackground org.eclipse.che.ide.api.theme.Style.getWindowContentBackground(); - - .noborder { - border: none; - position: absolute; - width: 100%; - height: 100%; - overflow: auto; - background-color: windowContentBackground!important; - } - - .noborder * { - border: none!important; - overflow: visible!important; - } - - .noborder tr > td:last-child { - padding-right: 0px; - } - - .title { - margin-top: 2px; - } - - - - - - - - Enter action name: - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/CommandsExplorerDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/CommandsExplorerDisplayingModeAction.java deleted file mode 100644 index 4e3a08f5c0b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/CommandsExplorerDisplayingModeAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.parts.PartStackType.NAVIGATION; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; - -/** - * Switches Commands Explorer display mode depends on the current state of IDE: - * - *

          - *
        • Commands Explorer is invisible -> make it visible and active - *
        • Commands Explorer is active -> make it invisible - *
        • Commands Explorer is inactive -> make it active - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class CommandsExplorerDisplayingModeAction extends AbstractPerspectiveAction { - private EditorAgent editorAgent; - private WorkspaceAgent workspaceAgent; - private Provider commandsExplorerPresenterProvider; - - @Inject - public CommandsExplorerDisplayingModeAction( - Resources resources, - EditorAgent editorAgent, - CoreLocalizationConstant localizedConstant, - WorkspaceAgent workspaceAgent, - Provider commandsExplorerPresenterProvider) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchCommandExplorerDisplayingTitle(), - localizedConstant.switchCommandExplorerDisplayingDescription(), - resources.editCommands()); - this.editorAgent = editorAgent; - this.workspaceAgent = workspaceAgent; - this.commandsExplorerPresenterProvider = commandsExplorerPresenterProvider; - } - - @Override - public void actionPerformed(ActionEvent e) { - CommandsExplorerPresenter commandsExplorerPresenter = commandsExplorerPresenterProvider.get(); - PartPresenter activePart = workspaceAgent.getActivePart(); - if (activePart != null && activePart instanceof CommandsExplorerPresenter) { - workspaceAgent.hidePart(commandsExplorerPresenter); - - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - return; - } - - workspaceAgent.openPart(commandsExplorerPresenter, NAVIGATION); - workspaceAgent.setActivePart(commandsExplorerPresenter); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EditorDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EditorDisplayingModeAction.java deleted file mode 100644 index d6d32565059..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EditorDisplayingModeAction.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static java.util.stream.Collectors.toSet; -import static org.eclipse.che.ide.FontAwesome.FILE_TEXT; -import static org.eclipse.che.ide.api.parts.PartStack.State.HIDDEN; -import static org.eclipse.che.ide.api.parts.PartStack.State.MINIMIZED; -import static org.eclipse.che.ide.api.parts.PartStackType.INFORMATION; -import static org.eclipse.che.ide.api.parts.PartStackType.NAVIGATION; -import static org.eclipse.che.ide.api.parts.PartStackType.TOOLING; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashSet; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStack.State; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; - -/** - * Switches Editor display mode depends on the current state of IDE: - * - *
          - *
        • Editor is inactive -> make it active - *
        • Editor is active -> maximize it - *
        • Editor is maximized -> set normal mode - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorDisplayingModeAction extends AbstractPerspectiveAction { - private EditorAgent editorAgent; - private WorkspaceAgent workspaceAgent; - - @Inject - public EditorDisplayingModeAction( - EditorAgent editorAgent, - WorkspaceAgent workspaceAgent, - CoreLocalizationConstant localizedConstant) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchEditorDisplayingTitle(), - localizedConstant.switchEditorDisplayingDescription(), - FILE_TEXT); - this.editorAgent = editorAgent; - this.workspaceAgent = workspaceAgent; - } - - @Override - public void actionPerformed(ActionEvent e) { - Set partStacks = new HashSet<>(3); - partStacks.add(workspaceAgent.getPartStack(NAVIGATION)); - partStacks.add(workspaceAgent.getPartStack(TOOLING)); - partStacks.add(workspaceAgent.getPartStack(INFORMATION)); - - Set states = partStacks.stream().map(PartStack::getPartStackState).collect(toSet()); - if (states.stream().anyMatch(state -> MINIMIZED == state)) { - partStacks.forEach(PartStack::restore); - activateEditor(); - return; - } - - PartPresenter activePart = workspaceAgent.getActivePart(); - if (activePart == null || !(activePart instanceof EditorPartPresenter)) { - activateEditor(); - return; - } - - if (states.stream().allMatch(state -> HIDDEN == state)) { - partStacks.forEach(PartStack::show); - activateEditor(); - return; - } - - partStacks.forEach(PartStack::minimize); - activateEditor(); - } - - private void activateEditor() { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EventLogsDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EventLogsDisplayingModeAction.java deleted file mode 100644 index 448a6adb2fa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/EventLogsDisplayingModeAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.parts.PartStackType.INFORMATION; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; - -/** - * Switches Event Logs display mode depends on the current state of IDE: - * - *
          - *
        • Event Logs part is invisible -> make it visible and active - *
        • Event Logs part is active -> make it invisible - *
        • Event Logs part is inactive -> make it active - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class EventLogsDisplayingModeAction extends AbstractPerspectiveAction { - private EditorAgent editorAgent; - private WorkspaceAgent workspaceAgent; - private Provider notificationManagerProvider; - - @Inject - public EventLogsDisplayingModeAction( - Resources resources, - EditorAgent editorAgent, - CoreLocalizationConstant localizedConstant, - WorkspaceAgent workspaceAgent, - Provider notificationManagerProvider) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchEventLogsDisplayingTitle(), - localizedConstant.switchEventLogsDisplayingDescription(), - resources.eventsPartIcon()); - this.editorAgent = editorAgent; - this.workspaceAgent = workspaceAgent; - this.notificationManagerProvider = notificationManagerProvider; - } - - @Override - public void actionPerformed(ActionEvent e) { - NotificationManager notificationManager = notificationManagerProvider.get(); - PartPresenter activePart = workspaceAgent.getActivePart(); - if (activePart != null && activePart instanceof NotificationManager) { - workspaceAgent.hidePart(notificationManager); - - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - return; - } - - workspaceAgent.openPart(notificationManager, INFORMATION); - workspaceAgent.setActivePart(notificationManager); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/FindResultDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/FindResultDisplayingModeAction.java deleted file mode 100644 index a89b11642b6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/FindResultDisplayingModeAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.parts.PartStackType.INFORMATION; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.search.presentation.FindResultPresenter; - -/** - * Switches Find part display mode depends on the current state of IDE: - * - *
          - *
        • Find part is invisible -> make it visible and active - *
        • Find part is active -> make it invisible - *
        • Find part is inactive -> make it active - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class FindResultDisplayingModeAction extends AbstractPerspectiveAction { - private EditorAgent editorAgent; - private WorkspaceAgent workspaceAgent; - private Provider findResultPresenterProvider; - - @Inject - public FindResultDisplayingModeAction( - Resources resources, - EditorAgent editorAgent, - CoreLocalizationConstant localizedConstant, - WorkspaceAgent workspaceAgent, - Provider findResultPresenterProvider) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchFindPartDisplayingTitle(), - localizedConstant.switchFindPartDisplayingDescription(), - resources.find()); - this.editorAgent = editorAgent; - this.workspaceAgent = workspaceAgent; - this.findResultPresenterProvider = findResultPresenterProvider; - } - - @Override - public void actionPerformed(ActionEvent e) { - FindResultPresenter findResultPresenter = findResultPresenterProvider.get(); - PartPresenter activePart = workspaceAgent.getActivePart(); - if (activePart != null && activePart instanceof FindResultPresenter) { - workspaceAgent.hidePart(findResultPresenter); - - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - return; - } - - workspaceAgent.openPart(findResultPresenter, INFORMATION); - workspaceAgent.setActivePart(findResultPresenter); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/ProjectExplorerDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/ProjectExplorerDisplayingModeAction.java deleted file mode 100644 index 1acb72056bc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/ProjectExplorerDisplayingModeAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.parts.PartStackType.NAVIGATION; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; - -/** - * Switches Project Explorer display mode depends on the current state of IDE: - * - *
          - *
        • Project Explorer is invisible -> make it visible and active - *
        • Project Explorer is active -> make it invisible - *
        • Project Explorer is inactive -> make it active - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class ProjectExplorerDisplayingModeAction extends AbstractPerspectiveAction { - private EditorAgent editorAgent; - private WorkspaceAgent workspaceAgent; - private Provider projectExplorerPresenterProvider; - - @Inject - public ProjectExplorerDisplayingModeAction( - Resources resources, - EditorAgent editorAgent, - CoreLocalizationConstant localizedConstant, - WorkspaceAgent workspaceAgent, - Provider projectExplorerPresenterProvider) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchProjectExplorerDisplayingTitle(), - localizedConstant.switchProjectExplorerDisplayingDescription(), - resources.projectExplorerPartIcon()); - this.editorAgent = editorAgent; - this.workspaceAgent = workspaceAgent; - this.projectExplorerPresenterProvider = projectExplorerPresenterProvider; - } - - @Override - public void actionPerformed(ActionEvent e) { - ProjectExplorerPresenter projectExplorerPresenter = projectExplorerPresenterProvider.get(); - PartPresenter activePart = workspaceAgent.getActivePart(); - if (activePart != null && activePart instanceof ProjectExplorerPresenter) { - workspaceAgent.hidePart(projectExplorerPresenter); - - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - return; - } - - workspaceAgent.openPart(projectExplorerPresenter, NAVIGATION); - workspaceAgent.setActivePart(projectExplorerPresenter); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/TerminalDisplayingModeAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/TerminalDisplayingModeAction.java deleted file mode 100644 index 5687cb879a0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/switching/TerminalDisplayingModeAction.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.actions.switching; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; -import static org.eclipse.che.ide.processes.ProcessTreeNode.ProcessNodeType.TERMINAL_NODE; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.processes.ProcessTreeNode; -import org.eclipse.che.ide.processes.ProcessTreeNodeSelectedEvent; -import org.eclipse.che.ide.processes.panel.ProcessesPanelPresenter; - -/** - * Switches Terminal display mode depends on the current state of IDE: - * - *
          - *
        • Terminal part is invisible -> make it visible and active - *
        • Terminal part is active -> make it invisible - *
        • Terminal part is inactive -> make it active - *
        - * - * @author Roman Nikitenko - */ -@Singleton -public class TerminalDisplayingModeAction extends AbstractPerspectiveAction - implements ProcessTreeNodeSelectedEvent.Handler { - private EditorAgent editorAgent; - private Provider workspaceAgentProvider; - private Provider processesPanelPresenterProvider; - private ProcessTreeNode selectedNode; - - @Inject - public TerminalDisplayingModeAction( - Resources resources, - EventBus eventBus, - EditorAgent editorAgent, - CoreLocalizationConstant localizedConstant, - Provider workspaceAgentProvider, - Provider processesPanelPresenterProvider) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - localizedConstant.switchTerminalDisplayingTitle(), - localizedConstant.switchTerminalDisplayingDescription(), - resources.terminal()); - this.editorAgent = editorAgent; - this.workspaceAgentProvider = workspaceAgentProvider; - this.processesPanelPresenterProvider = processesPanelPresenterProvider; - - eventBus.addHandler(ProcessTreeNodeSelectedEvent.TYPE, this); - } - - @Override - public void actionPerformed(ActionEvent e) { - WorkspaceAgent workspaceAgent = workspaceAgentProvider.get(); - ProcessesPanelPresenter processesPanelPresenter = processesPanelPresenterProvider.get(); - if (isProcessesPanelActive() && isTerminalActive()) { - workspaceAgent.hidePart(processesPanelPresenter); - - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor != null) { - workspaceAgent.setActivePart(activeEditor); - } - return; - } - - processesPanelPresenter.provideTerminal(); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } - - @Override - public void onProcessTreeNodeSelected(ProcessTreeNodeSelectedEvent event) { - selectedNode = event.getProcessTreeNode(); - } - - private boolean isProcessesPanelActive() { - PartPresenter activePart = workspaceAgentProvider.get().getActivePart(); - return activePart != null && activePart instanceof ProcessesPanelPresenter; - } - - private boolean isTerminalActive() { - return selectedNode != null && selectedNode.getType() == TERMINAL_NODE; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BasicIDEInitializedEvent.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BasicIDEInitializedEvent.java deleted file mode 100644 index e25d54433bd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BasicIDEInitializedEvent.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** - * Fired when Basic IDE is initialized. Intended to be used exclusively by Basic IDE's components to - * be able to start it's initialization. - * - *

        Basically event is useful for components which depend on {@link - * org.eclipse.che.ide.api.app.AppContext}. - */ -public class BasicIDEInitializedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onIDEInitialized(this); - } - - public interface Handler extends EventHandler { - void onIDEInitialized(BasicIDEInitializedEvent event); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BootstrapModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BootstrapModule.java deleted file mode 100644 index 300750f1471..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/BootstrapModule.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import com.google.gwt.inject.client.AbstractGinModule; -import org.eclipse.che.ide.api.extension.ExtensionGinModule; - -@ExtensionGinModule -public class BootstrapModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(IdeInitializationStrategy.class).toProvider(IdeInitializationStrategyProvider.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/CurrentUserInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/CurrentUserInitializer.java deleted file mode 100644 index 89cc63eef27..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/CurrentUserInitializer.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import static org.eclipse.che.ide.MimeType.APPLICATION_JSON; -import static org.eclipse.che.ide.rest.HTTPHeader.ACCEPT; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Map; -import org.eclipse.che.api.promises.client.Function; -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.user.shared.dto.ProfileDto; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.app.CurrentUser; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.context.CurrentUserImpl; -import org.eclipse.che.ide.preferences.PreferencesManagerImpl; -import org.eclipse.che.ide.rest.AsyncRequestFactory; -import org.eclipse.che.ide.rest.DtoUnmarshallerFactory; - -/** - * Initializes the {@link CurrentUser}: - * - *

          - *
        • loads user's profile; - *
        • loads user's preferences. - *
        - */ -@Singleton -class CurrentUserInitializer { - - private final PreferencesManager preferencesManager; - private final CoreLocalizationConstant messages; - private final AppContext appContext; - private final AsyncRequestFactory asyncRequestFactory; - private final DtoUnmarshallerFactory dtoUnmarshallerFactory; - - @Inject - CurrentUserInitializer( - PreferencesManagerImpl preferencesManager, - CoreLocalizationConstant messages, - AppContext appContext, - AsyncRequestFactory asyncRequestFactory, - DtoUnmarshallerFactory dtoUnmarshallerFactory) { - this.preferencesManager = preferencesManager; - this.messages = messages; - this.appContext = appContext; - this.asyncRequestFactory = asyncRequestFactory; - this.dtoUnmarshallerFactory = dtoUnmarshallerFactory; - } - - Promise init() { - final CurrentUserImpl user = new CurrentUserImpl(); - - return loadProfile() - .thenPromise( - profile -> { - user.setId(profile.getUserId()); - - return loadPreferences() - .then( - preferences -> { - updateGitCommitterPreferencesIfEmpty(preferences, profile); - }); - }) - .then( - (Function, Void>) - preferences -> { - user.setPreferences(preferences); - - ((AppContextImpl) appContext).setCurrentUser(user); - - return null; - }); - } - - private Promise loadProfile() { - return getUserProfile() - .catchError( - (Operation) - arg -> { - throw new OperationException("Unable to load user's profile: " + arg.getCause()); - }); - } - - private Promise> loadPreferences() { - return preferencesManager - .loadPreferences() - .catchError( - (Operation) - arg -> { - throw new OperationException( - messages.unableToLoadPreference() + ": " + arg.getCause()); - }); - } - - private void updateGitCommitterPreferencesIfEmpty( - Map preferences, ProfileDto profile) { - String name = profile.getAttributes().get("name"); - String email = profile.getEmail(); - - if (name == null || email == null) { - return; - } - - String gitCommitterNamePreference = "git.committer.name"; - String gitCommitterEmailPreference = "git.committer.email"; - - String gitCommitterName = preferences.get(gitCommitterNamePreference); - String gitCommitterEmail = preferences.get(gitCommitterEmailPreference); - - if (gitCommitterName == null || gitCommitterEmail == null) { - if (gitCommitterName == null) { - preferencesManager.setValue(gitCommitterNamePreference, name); - } - if (gitCommitterEmail == null) { - preferencesManager.setValue(gitCommitterEmailPreference, email); - } - preferencesManager.flushPreferences(); - } - } - - private Promise getUserProfile() { - return asyncRequestFactory - .createGetRequest(appContext.getMasterApiEndpoint() + "/profile/") - .header(ACCEPT, APPLICATION_JSON) - .send(dtoUnmarshallerFactory.newUnmarshaller(ProfileDto.class)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/DefaultIdeInitializationStrategy.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/DefaultIdeInitializationStrategy.java deleted file mode 100644 index 9906ae37f64..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/DefaultIdeInitializationStrategy.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import static org.eclipse.che.ide.actions.StartUpActionsParser.getStartUpActions; -import static org.eclipse.che.ide.api.WindowActionEvent.createWindowClosedEvent; -import static org.eclipse.che.ide.api.WindowActionEvent.createWindowClosingEvent; - -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.RootLayoutPanel; -import com.google.gwt.user.client.ui.SimpleLayoutPanel; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.api.promises.client.Function; -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.ide.api.app.AppContext; -import org.eclipse.che.ide.api.app.CurrentUser; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.api.theme.ThemeAgent; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.context.BrowserAddress; -import org.eclipse.che.ide.core.StandardComponentInitializer; -import org.eclipse.che.ide.preferences.StyleInjector; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.workspace.WorkspacePresenter; -import org.eclipse.che.ide.workspace.WorkspaceServiceClient; - -/** - * Represents the default strategy for initializing Basic IDE. Performs the minimum required - * initialization steps, such as: - * - *
          - *
        • initializing {@link CurrentUser} (loading profile, preferences); - *
        • initializing UI (setting theme, injecting CSS styles); - *
        • initializing {@link AppContext}. - *
        - */ -@Singleton -class DefaultIdeInitializationStrategy implements IdeInitializationStrategy { - - protected final WorkspaceServiceClient workspaceServiceClient; - protected final AppContext appContext; - protected final BrowserAddress browserAddress; - protected final CurrentUserInitializer userInitializer; - protected final ThemeAgent themeAgent; - protected final StyleInjector styleInjector; - protected final Provider standardComponentsInitializerProvider; - protected final Provider workspacePresenterProvider; - protected final EventBus eventBus; - protected final DialogFactory dialogFactory; - protected final PreferencesManager preferencesManager; - - @Inject - DefaultIdeInitializationStrategy( - WorkspaceServiceClient workspaceServiceClient, - AppContext appContext, - BrowserAddress browserAddress, - CurrentUserInitializer userInitializer, - ThemeAgent themeAgent, - StyleInjector styleInjector, - Provider standardComponentsInitializerProvider, - Provider workspacePresenterProvider, - EventBus eventBus, - DialogFactory dialogFactory, - PreferencesManager preferencesManager) { - this.workspaceServiceClient = workspaceServiceClient; - this.appContext = appContext; - this.browserAddress = browserAddress; - this.userInitializer = userInitializer; - this.themeAgent = themeAgent; - this.styleInjector = styleInjector; - this.standardComponentsInitializerProvider = standardComponentsInitializerProvider; - this.workspacePresenterProvider = workspacePresenterProvider; - this.eventBus = eventBus; - this.dialogFactory = dialogFactory; - this.preferencesManager = preferencesManager; - } - - @Override - public Promise init() { - return userInitializer - .init() - .catchError( - (Operation) - err -> { - // Fail to initialize the current user. - // Since we can't get theme ID from the user's preferences - // try to inject CSS styles with a default theme at least - // in order to be able to use a minimal UI (dialogs) - // for displaying an error information to the user. - styleInjector.inject(); - - // Prevent further initialization steps. - throw new OperationException(err.getMessage(), err.getCause()); - }) - .then(initUI()) - .thenPromise(aVoid -> initAppContext()) - .then(showUI()) - .then( - arg -> { - eventBus.fireEvent(new BasicIDEInitializedEvent()); - }); - } - - @Override - public Promise getWorkspaceToStart() { - return workspaceServiceClient.getWorkspace(browserAddress.getWorkspaceKey()); - } - - private Operation initUI() { - return aVoid -> { - themeAgent.setTheme(preferencesManager.getValue(ThemeAgent.PREFERENCE_KEY)); - styleInjector.inject(); - }; - } - - protected Promise initAppContext() { - return getWorkspaceToStart() - .then( - (Function) - workspace -> { - ((AppContextImpl) appContext).setWorkspace(workspace); - ((AppContextImpl) appContext).setStartAppActions(getStartUpActions()); - - return null; - }) - .catchError( - (Operation) - err -> { - throw new OperationException("Can not get workspace: " + err.getCause()); - }); - } - - private Operation showUI() { - return aVoid -> { - standardComponentsInitializerProvider.get().initialize(); - showRootPresenter(); - - // Bind browser's window events - Window.addWindowClosingHandler(event -> eventBus.fireEvent(createWindowClosingEvent(event))); - Window.addCloseHandler(event -> eventBus.fireEvent(createWindowClosedEvent())); - }; - } - - private void showRootPresenter() { - SimpleLayoutPanel mainPanel = new SimpleLayoutPanel(); - RootLayoutPanel.get().add(mainPanel); - RootLayoutPanel.get().getElement().getStyle().setZIndex(0); - - workspacePresenterProvider.get().go(mainPanel); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/ExtensionInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/ExtensionInitializer.java deleted file mode 100644 index bca58c5e102..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/ExtensionInitializer.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.Map; -import java.util.Map.Entry; -import org.eclipse.che.ide.api.extension.ExtensionsInitializedEvent; -import org.eclipse.che.ide.client.ExtensionManager; -import org.eclipse.che.ide.util.loging.Log; - -/** - * {@link ExtensionInitializer} responsible for bringing up Extensions. It uses {@link - * ExtensionManager} to acquire Extension description and dependencies. - * - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - */ -@Singleton -class ExtensionInitializer { - - private final ExtensionManager extensionManager; - private final EventBus eventBus; - - @Inject - ExtensionInitializer(ExtensionManager extensionManager, EventBus eventBus) { - this.extensionManager = extensionManager; - this.eventBus = eventBus; - } - - void startExtensions() { - Map providers = extensionManager.getExtensions(); - for (Entry entry : providers.entrySet()) { - final String extensionFqn = entry.getKey(); - final Provider extensionProvider = entry.getValue(); - - try { - // Order of startup is managed by GIN dependency injection framework - extensionProvider.get(); - } catch (Throwable e) { - Log.error(ExtensionInitializer.class, "Can't initialize extension: " + extensionFqn, e); - } - } - - eventBus.fireEvent(new ExtensionsInitializedEvent()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/FactoryIdeInitializationStrategy.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/FactoryIdeInitializationStrategy.java deleted file mode 100644 index c11f7fbb266..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/FactoryIdeInitializationStrategy.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.api.factory.shared.dto.FactoryDto; -import org.eclipse.che.api.promises.client.Function; -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.ide.QueryParameters; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.factory.FactoryServiceClient; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.api.theme.ThemeAgent; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.context.BrowserAddress; -import org.eclipse.che.ide.core.StandardComponentInitializer; -import org.eclipse.che.ide.preferences.StyleInjector; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.workspace.WorkspacePresenter; -import org.eclipse.che.ide.workspace.WorkspaceServiceClient; - -/** - * Represents IDE initialization strategy in case of loading from a Factory. Inherits initialization - * steps from {@link DefaultIdeInitializationStrategy} and adds. - */ -@Singleton -class FactoryIdeInitializationStrategy extends DefaultIdeInitializationStrategy { - - private final QueryParameters queryParameters; - private final FactoryServiceClient factoryServiceClient; - - @Inject - FactoryIdeInitializationStrategy( - WorkspaceServiceClient workspaceServiceClient, - AppContext appContext, - BrowserAddress browserAddress, - CurrentUserInitializer currentUserInitializer, - ThemeAgent themeAgent, - StyleInjector styleInjector, - Provider standardComponentsInitializerProvider, - Provider workspacePresenterProvider, - EventBus eventBus, - QueryParameters queryParameters, - DialogFactory dialogFactory, - FactoryServiceClient factoryServiceClient, - PreferencesManager preferencesManager) { - super( - workspaceServiceClient, - appContext, - browserAddress, - currentUserInitializer, - themeAgent, - styleInjector, - standardComponentsInitializerProvider, - workspacePresenterProvider, - eventBus, - dialogFactory, - preferencesManager); - - this.queryParameters = queryParameters; - this.factoryServiceClient = factoryServiceClient; - } - - @Override - protected Promise initAppContext() { - return super.initAppContext() - .thenPromise( - aVoid -> - getFactory() - .then( - (Function) - factory -> { - ((AppContextImpl) appContext).setFactory(factory); - return null; - }) - .catchError( - (Operation) - err -> { - throw new OperationException( - "Unable to load Factory: " + err.getMessage(), err.getCause()); - }) - .then( - arg -> { - if (RUNNING != appContext.getWorkspace().getStatus()) { - throw new OperationException( - "Can't load Factory. Workspace is not running."); - } - })); - } - - @Override - public Promise getWorkspaceToStart() { - final String workspaceId = queryParameters.getByName("workspaceId"); - - return workspaceServiceClient.getWorkspace(workspaceId); - } - - private Promise getFactory() { - Map factoryParameters = new HashMap<>(); - for (Map.Entry queryParam : queryParameters.getAll().entrySet()) { - String key = queryParam.getKey(); - if (key.startsWith("factory-")) { - factoryParameters.put(key.substring("factory-".length()), queryParam.getValue()); - } - } - - Promise factoryPromise; - // Factory may be based on id or on parameters - if (factoryParameters.containsKey("id")) { - factoryPromise = factoryServiceClient.getFactory(factoryParameters.get("id"), true); - } else { - factoryPromise = factoryServiceClient.resolveFactory(factoryParameters, true); - } - - return factoryPromise; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeBootstrap.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeBootstrap.java deleted file mode 100644 index b5452b4d3a6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeBootstrap.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.util.loging.Log; - -/** Performs initial startup of the CHE IDE application. */ -@Singleton -public class IdeBootstrap { - - private final DialogFactory dialogFactory; - - @Inject - IdeBootstrap(DialogFactory dialogFactory) { - this.dialogFactory = dialogFactory; - } - - @Inject - void bootstrap( - ExtensionInitializer extensionInitializer, - IdeInitializationStrategyProvider initializationStrategyProvider) { - try { - IdeInitializationStrategy strategy = initializationStrategyProvider.get(); - - strategy - .init() - .then( - aVoid -> { - extensionInitializer.startExtensions(); - }) - .catchError(handleError()) - .catchError(handleErrorFallback()); - } catch (Exception e) { - onInitializationFailed("IDE initialization failed. " + e.getMessage()); - } - } - - /** Handle an error with IDE UI. */ - private Operation handleError() { - return err -> { - dialogFactory.createMessageDialog("IDE initialization failed", err.getMessage(), null).show(); - Log.error(IdeBootstrap.class, err); - }; - } - - /** Handle an error without IDE UI, as a fallback (when DialogFactory can't be used). */ - private Operation handleErrorFallback() { - return err -> onInitializationFailed(err.getMessage()); - } - - /** - * Tries to call initializationFailed function which is defined in IDE.jsp for handling IDE - * initialization errors. - */ - private native void onInitializationFailed(String reason) /*-{ - try { - $wnd.IDE.eventHandlers.initializationFailed(reason); - } catch (e) { - console.log(e.message); - } - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategy.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategy.java deleted file mode 100644 index 8f643a0e4be..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategy.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; - -/** - * Represents strategy for initializing IDE application. - * - * @see DefaultIdeInitializationStrategy - * @see FactoryIdeInitializationStrategy - */ -interface IdeInitializationStrategy { - - /** Performs the essential initialization routines of IDE application. */ - Promise init(); - - /** Returns the opening workspace. */ - Promise getWorkspaceToStart(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategyProvider.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategyProvider.java deleted file mode 100644 index 74e4f14d6f7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/bootstrap/IdeInitializationStrategyProvider.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.bootstrap; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import org.eclipse.che.ide.QueryParameters; - -/** - * Provides {@link IdeInitializationStrategy} depending on the loading mode (default or factory). - * - * @see IdeInitializationStrategy - * @see DefaultIdeInitializationStrategy - * @see FactoryIdeInitializationStrategy - */ -@Singleton -class IdeInitializationStrategyProvider implements Provider { - - private final IdeInitializationStrategy currentStrategy; - - @Inject - IdeInitializationStrategyProvider( - QueryParameters queryParameters, - DefaultIdeInitializationStrategy defaultStrategy, - FactoryIdeInitializationStrategy factoryStrategy) { - final boolean factoryMode = !queryParameters.getByName("factory").isEmpty(); - - currentStrategy = factoryMode ? factoryStrategy : defaultStrategy; - } - - /** @throws IllegalStateException if initialization strategy cannot be found */ - @Override - public IdeInitializationStrategy get() { - if (currentStrategy != null) { - return currentStrategy; - } - - throw new IllegalStateException("IDE initialization strategy cannot be found."); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/IDE.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/IDE.java deleted file mode 100644 index 0fe51fbc97c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/client/IDE.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.client; - -import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.core.client.GWT; -import org.eclipse.che.ide.bootstrap.IdeBootstrap; -import org.eclipse.che.ide.client.inject.IDEInjector; - -/** The EntryPoint of the IDE application */ -public class IDE implements EntryPoint { - /** This is the entry point method. */ - @Override - public void onModuleLoad() { - IDEInjector injector = GWT.create(IDEInjector.class); - @SuppressWarnings("unused") - IdeBootstrap bootstrap = injector.getIdeBootstrap(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/clipboard/ClipboardModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/clipboard/ClipboardModule.java deleted file mode 100644 index a11a63cfe6c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/clipboard/ClipboardModule.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.clipboard; - -import com.google.gwt.inject.client.AbstractGinModule; -import org.eclipse.che.ide.ui.zeroclipboard.ClipboardButtonBuilder; -import org.eclipse.che.ide.ui.zeroclipboard.ClipboardButtonBuilderImpl; - -/** GIN module for configuring components related to clipboard support. */ -public class ClipboardModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(ClipboardButtonBuilder.class).to(ClipboardButtonBuilderImpl.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandApiModule.java deleted file mode 100644 index 1f1063395be..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandApiModule.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command; - -import static org.eclipse.che.ide.command.node.CommandFileNode.FILE_TYPE_EXT; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.gwt.inject.client.multibindings.GinMultibinder; -import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandProducer; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.command.editor.CommandEditorView; -import org.eclipse.che.ide.command.editor.CommandEditorViewImpl; -import org.eclipse.che.ide.command.editor.page.goal.GoalPageView; -import org.eclipse.che.ide.command.editor.page.goal.GoalPageViewImpl; -import org.eclipse.che.ide.command.editor.page.name.NamePageView; -import org.eclipse.che.ide.command.editor.page.name.NamePageViewImpl; -import org.eclipse.che.ide.command.editor.page.project.ProjectsPageView; -import org.eclipse.che.ide.command.editor.page.project.ProjectsPageViewImpl; -import org.eclipse.che.ide.command.editor.page.text.PageWithTextEditorView; -import org.eclipse.che.ide.command.editor.page.text.PageWithTextEditorViewImpl; -import org.eclipse.che.ide.command.execute.CommandExecutorImpl; -import org.eclipse.che.ide.command.execute.ExecuteCommandActionFactory; -import org.eclipse.che.ide.command.execute.ExecuteCommandActionManager; -import org.eclipse.che.ide.command.execute.GoalPopUpGroupFactory; -import org.eclipse.che.ide.command.explorer.CommandsExplorerView; -import org.eclipse.che.ide.command.explorer.CommandsExplorerViewImpl; -import org.eclipse.che.ide.command.goal.BuildGoal; -import org.eclipse.che.ide.command.goal.CommandGoalRegistryImpl; -import org.eclipse.che.ide.command.goal.CommonGoal; -import org.eclipse.che.ide.command.goal.DebugGoal; -import org.eclipse.che.ide.command.goal.DeployGoal; -import org.eclipse.che.ide.command.goal.RunGoal; -import org.eclipse.che.ide.command.goal.TestGoal; -import org.eclipse.che.ide.command.manager.CommandManagerImpl; -import org.eclipse.che.ide.command.node.NodeFactory; -import org.eclipse.che.ide.command.palette.CommandsPaletteView; -import org.eclipse.che.ide.command.palette.CommandsPaletteViewImpl; -import org.eclipse.che.ide.command.producer.CommandProducerActionFactory; -import org.eclipse.che.ide.command.producer.CommandProducerActionManager; -import org.eclipse.che.ide.command.toolbar.CommandToolbarView; -import org.eclipse.che.ide.command.toolbar.CommandToolbarViewImpl; -import org.eclipse.che.ide.command.toolbar.ToolbarButtonsFactory; -import org.eclipse.che.ide.command.toolbar.commands.ExecuteCommandView; -import org.eclipse.che.ide.command.toolbar.commands.ExecuteCommandViewImpl; -import org.eclipse.che.ide.command.toolbar.commands.button.MenuItemsFactory; -import org.eclipse.che.ide.command.toolbar.controller.ToolbarControllerView; -import org.eclipse.che.ide.command.toolbar.controller.ToolbarControllerViewImpl; -import org.eclipse.che.ide.command.toolbar.previews.PreviewsView; -import org.eclipse.che.ide.command.toolbar.previews.PreviewsViewImpl; -import org.eclipse.che.ide.command.toolbar.processes.ProcessesListView; -import org.eclipse.che.ide.command.toolbar.processes.ProcessesListViewImpl; -import org.eclipse.che.ide.command.toolbar.selector.PanelSelectorView; -import org.eclipse.che.ide.command.toolbar.selector.PanelSelectorViewImpl; -import org.eclipse.che.ide.command.type.CommandTypeRegistryImpl; -import org.eclipse.che.ide.command.type.chooser.CommandTypeChooserView; -import org.eclipse.che.ide.command.type.chooser.CommandTypeChooserViewImpl; -import org.eclipse.che.ide.command.type.custom.CustomCommandType; - -/** - * GIN module for configuring Command API components. - * - * @author Artem Zatsarynnyi - */ -public class CommandApiModule extends AbstractGinModule { - - @Override - protected void configure() { - GinMultibinder.newSetBinder(binder(), CommandType.class); - - // predefined goals - GinMultibinder goalBinder = - GinMultibinder.newSetBinder(binder(), CommandGoal.class); - goalBinder.addBinding().to(BuildGoal.class); - goalBinder.addBinding().to(TestGoal.class); - goalBinder.addBinding().to(RunGoal.class); - goalBinder.addBinding().to(DebugGoal.class); - goalBinder.addBinding().to(DeployGoal.class); - goalBinder.addBinding().to(CommonGoal.class); - - bind(CommandTypeRegistry.class).to(CommandTypeRegistryImpl.class).in(Singleton.class); - bind(CommandGoalRegistry.class).to(CommandGoalRegistryImpl.class).in(Singleton.class); - - bind(CommandManager.class).to(CommandManagerImpl.class).in(Singleton.class); - bind(CommandManager.class).asEagerSingleton(); - bind(ExecuteCommandActionManager.class).asEagerSingleton(); - - GinMultibinder commandProducerBinder = - GinMultibinder.newSetBinder(binder(), CommandProducer.class); - bind(CommandProducerActionManager.class).asEagerSingleton(); - - install(new GinFactoryModuleBuilder().build(ExecuteCommandActionFactory.class)); - install(new GinFactoryModuleBuilder().build(GoalPopUpGroupFactory.class)); - install(new GinFactoryModuleBuilder().build(NodeFactory.class)); - install(new GinFactoryModuleBuilder().build(CommandProducerActionFactory.class)); - - bind(CommandsExplorerView.class).to(CommandsExplorerViewImpl.class).in(Singleton.class); - bind(CommandTypeChooserView.class).to(CommandTypeChooserViewImpl.class); - bind(CommandsPaletteView.class).to(CommandsPaletteViewImpl.class).in(Singleton.class); - - // command editor - bind(CommandEditorView.class).to(CommandEditorViewImpl.class); - bind(NamePageView.class).to(NamePageViewImpl.class); - bind(GoalPageView.class).to(GoalPageViewImpl.class); - bind(ProjectsPageView.class).to(ProjectsPageViewImpl.class); - bind(PageWithTextEditorView.class).to(PageWithTextEditorViewImpl.class); - - // toolbar - bind(CommandToolbarView.class).to(CommandToolbarViewImpl.class).in(Singleton.class); - bind(ExecuteCommandView.class).to(ExecuteCommandViewImpl.class).in(Singleton.class); - bind(ProcessesListView.class).to(ProcessesListViewImpl.class).in(Singleton.class); - bind(PreviewsView.class).to(PreviewsViewImpl.class).in(Singleton.class); - - // Panel selector - bind(PanelSelectorView.class).to(PanelSelectorViewImpl.class).in(Singleton.class); - - // Toolbar controller - bind(ToolbarControllerView.class).to(ToolbarControllerViewImpl.class).in(Singleton.class); - - install(new GinFactoryModuleBuilder().build(ToolbarButtonsFactory.class)); - install(new GinFactoryModuleBuilder().build(MenuItemsFactory.class)); - - bind(CommandExecutor.class).to(CommandExecutorImpl.class).in(Singleton.class); - GinMultibinder.newSetBinder(binder(), CommandType.class) - .addBinding() - .to(CustomCommandType.class); - } - - @Provides - @Singleton - @Named("CommandFileType") - protected FileType provideCommandFileType(Resources resources) { - return new FileType(resources.defaultImage(), FILE_TYPE_EXT); - } - - /** Provides the goal which is used for grouping commands which doesn't belong to any goal. */ - @Provides - @Named("default") - @Singleton - protected CommandGoal provideDefaultGoal(CommonGoal commonGoal) { - return commonGoal; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandResources.java deleted file mode 100644 index 136354bee59..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandResources.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.resources.client.DataResource; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Client bundle for Command related resources. - * - * @author Artem Zatsarynnyi - */ -public interface CommandResources extends ClientBundle { - - /** Resource is used as CSS constant's value for setting 'background-image' property. */ - @DataResource.MimeType("image/svg+xml") - @Source("magnifier.svg") - DataResource magnifier(); - - @Source("explorer/explorer-part.svg") - SVGResource explorerPart(); - - @Source("explorer/add-command-button.svg") - SVGResource addCommand(); - - @Source("explorer/duplicate-command-button.svg") - SVGResource duplicateCommand(); - - @Source("explorer/remove-command-button.svg") - SVGResource removeCommand(); - - @Source({"explorer/styles.css", "org/eclipse/che/ide/api/ui/style.css"}) - ExplorerCSS commandsExplorerCss(); - - @Source({"palette/styles.css", "org/eclipse/che/ide/api/ui/style.css"}) - PaletteCSS commandsPaletteCss(); - - @Source({"toolbar/processes/styles.css", "org/eclipse/che/ide/api/ui/style.css"}) - ToolbarCSS commandToolbarCss(); - - @Source({"editor/styles.css", "org/eclipse/che/ide/api/ui/style.css"}) - EditorCSS editorCss(); - - @Source({"type/styles.css", "org/eclipse/che/ide/api/ui/style.css"}) - CommandTypeChooserCSS commandTypeChooserCss(); - - interface ExplorerCSS extends CssResource { - String commandGoalNode(); - - String commandNode(); - - String commandNodeText(); - - String commandNodeButtonsPanel(); - } - - interface PaletteCSS extends CssResource { - String filterField(); - } - - interface ToolbarCSS extends CssResource { - String toolbarButton(); - - String processesListExecLabel(); - - String processesListLoader(); - - String processesListLoaderBar1(); - - String processesListLoaderBar2(); - - String processesListLoaderBar3(); - - String processWidgetText(); - - String processWidgetMachineNameLabel(); - - String processWidgetCommandNameLabel(); - - String processWidgetPidLabel(); - - String processWidgetActionButton(); - - String previewUrlWidget(); - - String loaderPanel(); - - String loaderPanelLabel(); - - String loaderPanelProgressBar(); - } - - interface EditorCSS extends CssResource { - String sectionLabel(); - - String section(); - } - - interface CommandTypeChooserCSS extends CssResource { - String chooserPopup(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandUtils.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandUtils.java deleted file mode 100644 index ac38eb1f44c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/CommandUtils.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * A smattering of useful methods to work with commands. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CommandUtils { - - private final CommandGoalRegistry goalRegistry; - private final CommandTypeRegistry commandTypeRegistry; - private final IconRegistry iconRegistry; - - @Inject - public CommandUtils( - CommandGoalRegistry commandGoalRegistry, - CommandTypeRegistry commandTypeRegistry, - IconRegistry iconRegistry) { - this.goalRegistry = commandGoalRegistry; - this.commandTypeRegistry = commandTypeRegistry; - this.iconRegistry = iconRegistry; - } - - /** - * Groups the given {@code commands} by its goal. - * - * @return map that contains the given {@code commands} grouped by its goal - */ - public Map> groupCommandsByGoal(List commands) { - final Map> commandsByGoal = new HashMap<>(); - - for (CommandImpl command : commands) { - final String goalId = command.getGoal(); - final CommandGoal commandGoal = goalRegistry.getGoalForId(goalId); - - commandsByGoal.computeIfAbsent(commandGoal, key -> new ArrayList<>()).add(command); - } - - return commandsByGoal; - } - - /** Returns the icon for the given command type ID or {@code null} if none. */ - @Nullable - public SVGResource getCommandTypeIcon(String typeId) { - final Optional commandType = commandTypeRegistry.getCommandTypeById(typeId); - - if (commandType.isPresent()) { - final Icon icon = iconRegistry.getIconIfExist("command.type." + commandType.get().getId()); - - if (icon != null) { - final SVGImage svgImage = icon.getSVGImage(); - - if (svgImage != null) { - return icon.getSVGResource(); - } - } - } - - return null; - } - - /** Returns the icon for the given command goal ID or {@code null} if none. */ - @Nullable - public SVGResource getCommandGoalIcon(String goalId) { - final Optional goalOptional = goalRegistry.getPredefinedGoalById(goalId); - - if (goalOptional.isPresent()) { - final Icon icon = iconRegistry.getIconIfExist("command.goal." + goalOptional.get().getId()); - - if (icon != null) { - final SVGImage svgImage = icon.getSVGImage(); - - if (svgImage != null) { - return icon.getSVGResource(); - } - } - } - - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/ActionMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/ActionMessages.java deleted file mode 100644 index 30064bffdf8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/ActionMessages.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.actions; - -import com.google.gwt.i18n.client.Messages; - -public interface ActionMessages extends Messages { - @Key("rename.command.action.title") - String renameCommandActionTitle(); - - @Key("rename.command.action.description") - String renameCommandActionDescription(); - - @Key("move.command.action.title") - String moveCommandActionTitle(); - - @Key("move.command.action.description") - String moveCommandActionDescription(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/CommandExplorerContextMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/CommandExplorerContextMenu.java deleted file mode 100644 index d4f3c61cf07..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/CommandExplorerContextMenu.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.actions; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.menu.ContextMenu; - -public class CommandExplorerContextMenu extends ContextMenu { - - @Inject - public CommandExplorerContextMenu( - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - super(actionManager, keyBindingAgent, managerProvider); - } - - @Override - protected String getGroupMenu() { - return IdeActions.GROUP_COMMAND_EXPLORER_CONTEXT_MENU; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/MoveCommandAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/MoveCommandAction.java deleted file mode 100644 index 4ff1058a948..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/MoveCommandAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.actions; - -import static org.eclipse.che.ide.FontAwesome.SHARE_SQUARE; - -import com.google.gwt.core.client.Scheduler; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.command.editor.CommandEditor; -import org.eclipse.che.ide.command.editor.page.goal.GoalPage; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; -import org.eclipse.che.ide.command.explorer.CommandsExplorerView; -import org.eclipse.che.ide.command.node.NodeFactory; - -@Singleton -public class MoveCommandAction extends BaseAction { - - private CommandsExplorerPresenter commandsExplorer; - private NodeFactory nodeFactory; - private EditorAgent editorAgent; - - @Inject - public MoveCommandAction( - CommandsExplorerPresenter commandsExplorer, - NodeFactory nodeFactory, - EditorAgent editorAgent, - ActionMessages messages) { - super(messages.moveCommandActionTitle(), messages.moveCommandActionDescription(), SHARE_SQUARE); - this.commandsExplorer = commandsExplorer; - this.nodeFactory = nodeFactory; - this.editorAgent = editorAgent; - } - - @Override - public void update(ActionEvent e) { - CommandImpl command = ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - - e.getPresentation().setEnabledAndVisible(command != null); - } - - @Override - public void actionPerformed(ActionEvent e) { - CommandImpl command = ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - - editorAgent.openEditor( - nodeFactory.newCommandFileNode(command), - new EditorAgent.OpenEditorCallback() { - @Override - public void onEditorOpened(EditorPartPresenter editor) {} - - @Override - public void onEditorActivated(EditorPartPresenter editor) { - if (editor instanceof CommandEditor) { - new DelayedTask() { - @Override - public void onExecute() { - ((CommandEditor) editor) - .getPages() - .stream() - .filter(page -> page instanceof GoalPage) - .findFirst() - .ifPresent(page -> Scheduler.get().scheduleFinally(page::focus)); - } - }.delay(500); - } - } - - @Override - public void onInitializationFailed() {} - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/RenameCommandAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/RenameCommandAction.java deleted file mode 100644 index f07ed50078b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/actions/RenameCommandAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.actions; - -import static org.eclipse.che.ide.FontAwesome.I_CURSOR; - -import com.google.gwt.core.client.Scheduler; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.command.editor.CommandEditor; -import org.eclipse.che.ide.command.editor.page.name.NamePage; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; -import org.eclipse.che.ide.command.explorer.CommandsExplorerView; -import org.eclipse.che.ide.command.node.NodeFactory; - -@Singleton -public class RenameCommandAction extends BaseAction { - - private CommandsExplorerPresenter commandsExplorer; - private NodeFactory nodeFactory; - private EditorAgent editorAgent; - - @Inject - public RenameCommandAction( - CommandsExplorerPresenter commandsExplorer, - NodeFactory nodeFactory, - EditorAgent editorAgent, - ActionMessages messages) { - super(messages.renameCommandActionTitle(), messages.renameCommandActionDescription(), I_CURSOR); - this.commandsExplorer = commandsExplorer; - this.nodeFactory = nodeFactory; - this.editorAgent = editorAgent; - } - - @Override - public void update(ActionEvent e) { - CommandImpl command = ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - - e.getPresentation().setEnabledAndVisible(command != null); - } - - @Override - public void actionPerformed(ActionEvent e) { - CommandImpl command = ((CommandsExplorerView) commandsExplorer.getView()).getSelectedCommand(); - - editorAgent.openEditor( - nodeFactory.newCommandFileNode(command), - new EditorAgent.OpenEditorCallback() { - @Override - public void onEditorOpened(EditorPartPresenter editor) {} - - @Override - public void onEditorActivated(EditorPartPresenter editor) { - if (editor instanceof CommandEditor) { - new DelayedTask() { - @Override - public void onExecute() { - ((CommandEditor) editor) - .getPages() - .stream() - .filter(page -> page instanceof NamePage) - .findFirst() - .ifPresent(page -> Scheduler.get().scheduleFinally(page::focus)); - } - }.delay(500); - } - } - - @Override - public void onInitializationFailed() {} - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditor.java deleted file mode 100644 index 6e582746ef8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditor.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.WARNING; - -import com.google.common.annotations.VisibleForTesting; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import java.util.LinkedList; -import java.util.List; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandRemovedEvent; -import org.eclipse.che.ide.api.command.CommandRemovedEvent.CommandRemovedHandler; -import org.eclipse.che.ide.api.editor.AbstractEditorPresenter; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; -import org.eclipse.che.ide.command.editor.page.commandline.CommandLinePage; -import org.eclipse.che.ide.command.editor.page.goal.GoalPage; -import org.eclipse.che.ide.command.editor.page.name.NamePage; -import org.eclipse.che.ide.command.editor.page.previewurl.PreviewUrlPage; -import org.eclipse.che.ide.command.editor.page.project.ProjectsPage; -import org.eclipse.che.ide.command.node.CommandFileNode; -import org.eclipse.che.ide.command.node.NodeFactory; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Presenter for command editor. */ -public class CommandEditor extends AbstractEditorPresenter - implements CommandEditorView.ActionDelegate, CommandRemovedHandler { - - private final CommandEditorView view; - private final WorkspaceAgent workspaceAgent; - private final IconRegistry iconRegistry; - private final CommandManager commandManager; - private final NotificationManager notificationManager; - private final DialogFactory dialogFactory; - private final EditorAgent editorAgent; - private final CoreLocalizationConstant coreMessages; - private final EditorMessages messages; - private final NodeFactory nodeFactory; - private final EventBus eventBus; - - private final List pages; - - /** Edited command. */ - @VisibleForTesting protected CommandImpl editedCommand; - - private HandlerRegistration commandRemovedHandlerRegistration; - - /** Initial (before any modification) name of the edited command. */ - private String initialCommandName; - - @Inject - public CommandEditor( - CommandEditorView view, - WorkspaceAgent workspaceAgent, - IconRegistry iconRegistry, - CommandManager commandManager, - NamePage namePage, - ProjectsPage projectsPage, - CommandLinePage commandLinePage, - GoalPage goalPage, - PreviewUrlPage previewUrlPage, - NotificationManager notificationManager, - DialogFactory dialogFactory, - EditorAgent editorAgent, - CoreLocalizationConstant coreMessages, - EditorMessages messages, - NodeFactory nodeFactory, - EventBus eventBus) { - this.view = view; - this.workspaceAgent = workspaceAgent; - this.iconRegistry = iconRegistry; - this.commandManager = commandManager; - this.notificationManager = notificationManager; - this.dialogFactory = dialogFactory; - this.editorAgent = editorAgent; - this.coreMessages = coreMessages; - this.messages = messages; - this.nodeFactory = nodeFactory; - this.eventBus = eventBus; - - view.setDelegate(this); - - pages = new LinkedList<>(); - pages.add(previewUrlPage); - pages.add(projectsPage); - pages.add(goalPage); - pages.add(commandLinePage); - pages.add(namePage); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(getView()); - } - - @Override - protected void initializeEditor(EditorAgent.OpenEditorCallback callback) { - commandRemovedHandlerRegistration = eventBus.addHandler(CommandRemovedEvent.getType(), this); - - final VirtualFile file = getEditorInput().getFile(); - - if (file instanceof CommandFileNode) { - // make a copy of the given command to avoid modifying of the provided command - editedCommand = new CommandImpl(((CommandFileNode) file).getData()); - - initializePages(); - - pages.forEach(page -> view.addPage(page.getView(), page.getTitle())); - - callback.onEditorOpened(this); - } else { - callback.onInitializationFailed(); - } - } - - /** Initialize editor's pages with the edited command. */ - private void initializePages() { - initialCommandName = editedCommand.getName(); - - pages.forEach( - page -> { - page.edit(editedCommand); - page.setDirtyStateListener( - () -> { - updateDirtyState(isDirtyPage()); - view.setSaveEnabled(isDirtyPage()); - }); - }); - } - - /** Checks whether any page is dirty. */ - private boolean isDirtyPage() { - for (CommandEditorPage page : pages) { - if (page.isDirty()) { - return true; - } - } - - return false; - } - - private boolean isInvalidData() { - for (CommandEditorPage page : pages) { - if (page.hasInvalidData()) { - return true; - } - } - - return false; - } - - public List getPages() { - return pages; - } - - @Nullable - @Override - public SVGResource getTitleImage() { - final VirtualFile file = getEditorInput().getFile(); - - if (file instanceof CommandFileNode) { - final CommandImpl command = ((CommandFileNode) file).getData(); - final Icon icon = iconRegistry.getIconIfExist("command.type." + command.getType()); - - if (icon != null) { - final SVGImage svgImage = icon.getSVGImage(); - - if (svgImage != null) { - return icon.getSVGResource(); - } - } - } - - return input.getSVGResource(); - } - - @Override - public String getTitle() { - return (isDirty() ? "* " : "") + input.getName(); - } - - @Override - public IsWidget getView() { - return view; - } - - @Nullable - @Override - public String getTitleToolTip() { - return input.getName(); - } - - @Override - public void doSave() { - doSave( - new AsyncCallback() { - @Override - public void onFailure(Throwable caught) {} - - @Override - public void onSuccess(EditorInput result) {} - }); - } - - @Override - public void doSave(AsyncCallback callback) { - if (isInvalidData()) { - dialogFactory - .createMessageDialog( - coreMessages.save(), - coreMessages.messagesInvalidCommand(), - () -> callback.onFailure(null)) - .show(); - return; - } - - commandManager - .updateCommand(initialCommandName, editedCommand) - .then( - arg -> { - // according to the CommandManager#updateCommand contract - // command's name after updating may differ from the proposed name - // in order to prevent name duplication - editedCommand.setName(arg.getName()); - - if (!initialCommandName.equals(editedCommand.getName())) { - input.setFile(nodeFactory.newCommandFileNode(editedCommand)); - initialCommandName = editedCommand.getName(); - firePropertyChange(PROP_INPUT); - } - - updateDirtyState(false); - - initializePages(); - - callback.onSuccess(getEditorInput()); - }) - .catchError( - (Operation) - arg -> { - notificationManager.notify( - messages.editorMessageUnableToSave(), arg.getMessage(), WARNING, EMERGE_MODE); - - callback.onFailure(arg.getCause()); - - throw new OperationException(arg.getMessage()); - }); - } - - @Override - public void doSaveAs() {} - - @Override - public void activate() {} - - @Override - public void close(boolean save) { - workspaceAgent.removePart(this); - } - - @Override - public void onClosing(AsyncCallback callback) { - if (!isDirty()) { - callback.onSuccess(null); - } else { - dialogFactory - .createChoiceDialog( - coreMessages.askWindowCloseTitle(), - coreMessages.messagesSaveChanges(getEditorInput().getName()), - coreMessages.yesButtonTitle(), - coreMessages.noButtonTitle(), - coreMessages.cancelButton(), - () -> - doSave( - new AsyncCallback() { - @Override - public void onSuccess(EditorInput result) { - callback.onSuccess(null); - } - - @Override - public void onFailure(Throwable caught) { - callback.onFailure(null); - } - }), - () -> callback.onSuccess(null), - () -> callback.onFailure(null)) - .show(); - } - } - - @Override - public void onCommandCancel() { - close(false); - } - - @Override - public void onCommandSave() { - doSave(); - } - - @Override - public void onCommandRemoved(CommandRemovedEvent event) { - if (event.getCommand().getName().equals(editedCommand.getName())) { - editorAgent.closeEditor(this); - commandRemovedHandlerRegistration.removeHandler(); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorProvider.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorProvider.java deleted file mode 100644 index 987fd4a10c5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorProvider.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorProvider; - -/** - * Provides {@link CommandEditor} instances. - * - * @author Artem Zatsarynnyi - */ -public class CommandEditorProvider implements EditorProvider { - - private final Provider editorProvider; - private final EditorMessages editorMessages; - - @Inject - public CommandEditorProvider( - Provider editorProvider, EditorMessages editorMessages) { - this.editorProvider = editorProvider; - this.editorMessages = editorMessages; - } - - @Override - public String getId() { - return "che_command_editor"; - } - - @Override - public String getDescription() { - return editorMessages.editorDescription(); - } - - @Override - public EditorPartPresenter getEditor() { - return editorProvider.get(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorView.java deleted file mode 100644 index 6b1d064ff37..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorView.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor; - -import com.google.gwt.user.client.ui.IsWidget; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The view for {@link CommandEditor}. - * - * @author Artem Zatsarynnyi - */ -public interface CommandEditorView extends View { - - /** - * Add page to the view. New page will be added to the top. - * - * @param page page to add - * @param title text that should be used as page's title - */ - void addPage(IsWidget page, String title); - - /** - * Set whether saving command is enabled or not. - * - * @param enable {@code true} if command saving is enabled and {@code false} otherwise - */ - void setSaveEnabled(boolean enable); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when reverting command changes is requested. */ - void onCommandCancel(); - - /** Called when saving command is requested. */ - void onCommandSave(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.java deleted file mode 100644 index 2d35adac840..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import org.eclipse.che.ide.command.CommandResources; - -/** - * Implementation of {@link CommandEditorView}. - * - * @author Artem Zatsarynnyi - */ -public class CommandEditorViewImpl extends Composite implements CommandEditorView { - - private static final CommandEditorViewImplUiBinder UI_BINDER = - GWT.create(CommandEditorViewImplUiBinder.class); - - private final CommandResources resources; - - @UiField Button cancelButton; - - @UiField Button saveButton; - - @UiField ScrollPanel scrollPanel; - - @UiField FlowPanel pagesPanel; - - /** The delegate to receive events from this view. */ - private ActionDelegate delegate; - - @Inject - public CommandEditorViewImpl(CommandResources resources) { - this.resources = resources; - - initWidget(UI_BINDER.createAndBindUi(this)); - setSaveEnabled(false); - } - - @Override - public void addPage(IsWidget page, String title) { - page.asWidget().addStyleName(resources.editorCss().section()); - pagesPanel.insert(page, 0); - - if (!title.isEmpty()) { - Label label = new Label(title); - label.addStyleName(resources.editorCss().sectionLabel()); - pagesPanel.insert(label, 0); - } - - // editor must be scrolled to the top immediately after opening - new Timer() { - @Override - public void run() { - scrollPanel.scrollToTop(); - } - }.schedule(1000); - } - - @Override - public void setSaveEnabled(boolean enable) { - saveButton.setEnabled(enable); - } - - @UiHandler("cancelButton") - public void handleCancelButton(ClickEvent clickEvent) { - delegate.onCommandCancel(); - } - - @UiHandler("saveButton") - public void handleSaveButton(ClickEvent clickEvent) { - delegate.onCommandSave(); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - interface CommandEditorViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.ui.xml deleted file mode 100644 index 0a560c4a6af..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/CommandEditorViewImpl.ui.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - @eval partBackground org.eclipse.che.ide.api.theme.Style.theme.partBackground(); - @eval tabsPanelBackground org.eclipse.che.ide.api.theme.Style.theme.tabsPanelBackground(); - - .main-panel { - background-color: partBackground; - } - - .pages-panel { - width: literal("calc(100% - 40px)"); - } - - .buttons-panel { - height: 38px; - padding-top: 5px; - background-color: tabsPanelBackground; - } - - .button { - float: right; - margin: 5px 0 0 10px; - font-weight: bold; - } - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/EditorMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/EditorMessages.java deleted file mode 100644 index 3c11f128055..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/EditorMessages.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages for the Command Editor. - * - * @author Artem Zatsarynnyi - */ -public interface EditorMessages extends Messages { - - @Key("editor.description") - String editorDescription(); - - @Key("editor.message.unable_save") - String editorMessageUnableToSave(); - - @Key("button.test.text") - String buttonRunText(); - - @Key("button.save.text") - String buttonSaveText(); - - @Key("button.cancel.text") - String buttonCancelText(); - - @Key("page.name.title") - String pageNameTitle(); - - @Key("page.command_line.title") - String pageCommandLineTitle(); - - @Key("page.goal.title") - String pageGoalTitle(); - - @Key("page.goal.new_goal.title") - String pageGoalNewGoalTitle(); - - @Key("page.goal.new_goal.label") - String pageGoalNewGoalLabel(); - - @Key("page.goal.new_goal.button.create") - String pageGoalNewGoalButtonCreate(); - - @Key("page.goal.new_goal.already_exists.message") - String pageGoalNewGoalAlreadyExistsMessage(String newGoalName); - - @Key("page.projects.title") - String pageProjectsTitle(); - - @Key("page.projects.table.header.project.label") - String pageProjectsTableHeaderProjectLabel(); - - @Key("page.projects.table.header.applicable.label") - String pageProjectsTableHeaderApplicableLabel(); - - @Key("page.with_text_editor.macros") - String pageWithTextEditorMacros(); - - @Key("page.preview_url.title") - String pagePreviewUrlTitle(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/AbstractCommandEditorPage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/AbstractCommandEditorPage.java deleted file mode 100644 index cf7fd75cf5d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/AbstractCommandEditorPage.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page; - -import org.eclipse.che.ide.api.command.CommandImpl; - -/** - * Abstract {@link CommandEditorPage} that provides basic functionality. - * - * @author Artem Zatsarynnyi - */ -public abstract class AbstractCommandEditorPage implements CommandEditorPage { - - private final String title; - - protected CommandImpl editedCommand; - - private DirtyStateListener listener; - - /** Creates new page with the given title and tooltip. */ - protected AbstractCommandEditorPage(String title) { - this.title = title; - } - - @Override - public String getTitle() { - return title; - } - - @Override - public void edit(CommandImpl command) { - editedCommand = command; - - initialize(); - notifyDirtyStateChanged(); - } - - /** - * Called every time when command is opening in the editor. Typically, implementor should do - * initial setup of the page with the {@link #editedCommand}. - */ - protected abstract void initialize(); - - /** Should be overwritten by a page to return a data validation state. */ - @Override - public boolean hasInvalidData() { - return false; - } - - @Override - public void setDirtyStateListener(DirtyStateListener listener) { - this.listener = listener; - } - - /** - * Should be called by page every time when any command modifications on the page have been - * performed. - */ - protected void notifyDirtyStateChanged() { - if (listener != null) { - listener.onDirtyStateChanged(); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/CommandEditorPage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/CommandEditorPage.java deleted file mode 100644 index c6676a10c93..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/CommandEditorPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page; - -import com.google.gwt.user.client.ui.IsWidget; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.command.editor.CommandEditor; - -/** - * Defines the requirements for the page for {@link CommandEditor}. - * - * @author Artem Zatsarynnyi - * @see CommandEditor - */ -public interface CommandEditorPage { - - /** Returns page's title. */ - String getTitle(); - - /** Returns page's view. */ - IsWidget getView(); - - /** - * This method is called every time when command is opening in the editor. Typically, implementor - * should hold the given {@code command} instance for subsequent modifying it directly and do - * pages's initial setup. - */ - void edit(CommandImpl command); - - /** - * Whether the page has been modified or not? - * - * @return {@code true} if page is modified, and {@code false} - otherwise - */ - boolean isDirty(); - - /** - * Checks whether this page contains invalid data. - * - * @return {@code true} if some data on this page is invalid, and {@code false} if all data is - * valid - */ - boolean hasInvalidData(); - - /** Sets {@link DirtyStateListener}. */ - void setDirtyStateListener(DirtyStateListener listener); - - /** This method is called when focus need to be set up in the given page. */ - default void focus() {} - - /** - * Listener that should be called by page every time when any command modifications on the page - * have been performed. - */ - interface DirtyStateListener { - void onDirtyStateChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/commandline/CommandLinePage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/commandline/CommandLinePage.java deleted file mode 100644 index 2120ebc2db1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/commandline/CommandLinePage.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.commandline; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.editor.defaulteditor.EditorBuilder; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.command.editor.EditorMessages; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; -import org.eclipse.che.ide.command.editor.page.text.AbstractPageWithTextEditor; -import org.eclipse.che.ide.command.editor.page.text.MacroEditorConfiguration; -import org.eclipse.che.ide.command.editor.page.text.PageWithTextEditorView; -import org.eclipse.che.ide.macro.chooser.MacroChooser; - -/** - * Presenter for {@link CommandEditorPage} which allows to edit command line. - * - * @author Artem Zatsarynnyi - */ -public class CommandLinePage extends AbstractPageWithTextEditor { - - @Inject - public CommandLinePage( - PageWithTextEditorView view, - EditorBuilder editorBuilder, - FileTypeRegistry fileTypeRegistry, - MacroChooser macroChooser, - EditorMessages messages, - MacroEditorConfiguration editorConfiguration) { - super( - view, - editorBuilder, - fileTypeRegistry, - macroChooser, - messages.pageCommandLineTitle(), - editorConfiguration); - - view.asWidget().getElement().setId("command_editor-command_line"); - } - - @Override - protected String getCommandPropertyValue() { - return editedCommand.getCommandLine(); - } - - @Override - protected void updateCommandPropertyValue(String content) { - editedCommand.setCommandLine(content); - } - - @Override - protected String getType() { - return ".sh"; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPage.java deleted file mode 100644 index b4daf9fa090..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPage.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.goal; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.command.editor.EditorMessages; -import org.eclipse.che.ide.command.editor.page.AbstractCommandEditorPage; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.input.InputCallback; - -/** - * {@link CommandEditorPage} which allows to edit command's goal. - * - * @author Artem Zatsarynnyi - */ -public class GoalPage extends AbstractCommandEditorPage implements GoalPageView.ActionDelegate { - - private final GoalPageView view; - private final CommandGoalRegistry goalRegistry; - private final EditorMessages messages; - private final DialogFactory dialogFactory; - - /** Initial value of the command's goal. */ - private String initialGoal; - - @Inject - public GoalPage( - GoalPageView view, - CommandGoalRegistry goalRegistry, - EditorMessages messages, - DialogFactory dialogFactory) { - super(messages.pageGoalTitle()); - - this.view = view; - this.goalRegistry = goalRegistry; - this.messages = messages; - this.dialogFactory = dialogFactory; - - view.setDelegate(this); - } - - @Override - public IsWidget getView() { - return view; - } - - @Override - protected void initialize() { - String goal = editedCommand.getGoal(); - initialGoal = isNullOrEmpty(goal) ? goalRegistry.getDefaultGoal().getId() : goal; - - view.setAvailableGoals(goalRegistry.getAllGoals()); - view.setGoal(initialGoal); - } - - @Override - public boolean isDirty() { - if (editedCommand == null) { - return false; - } - - return !(initialGoal.equals(editedCommand.getGoal())); - } - - @Override - public void onGoalChanged(String goalId) { - editedCommand.setGoal(goalId); - notifyDirtyStateChanged(); - } - - @Override - public void onCreateGoal() { - createGoal(""); - } - - /** - * Asks user for the the new goal name nad creates it if another one with the same name doesn't - * exist. - */ - private void createGoal(String initialName) { - final InputCallback inputCallback = - value -> { - final String newGoalName = value.trim(); - - final Set allGoals = goalRegistry.getAllGoals(); - - final Optional existingGoal = - allGoals - .stream() - .filter(goal -> goal.getId().equalsIgnoreCase(newGoalName)) - .findAny(); - - if (existingGoal.isPresent()) { - dialogFactory - .createMessageDialog( - messages.pageGoalNewGoalTitle(), - messages.pageGoalNewGoalAlreadyExistsMessage(existingGoal.get().getId()), - () -> createGoal(newGoalName)) - .show(); - } else { - setGoal(newGoalName); - } - }; - - dialogFactory - .createInputDialog( - messages.pageGoalNewGoalTitle(), - messages.pageGoalNewGoalLabel(), - initialName, - 0, - initialName.length(), - messages.pageGoalNewGoalButtonCreate(), - inputCallback, - null) - .show(); - } - - /** Set the specified goal name for the currently edited command. */ - private void setGoal(String goalName) { - editedCommand.setGoal(goalName); - - Set allGoals = goalRegistry.getAllGoals(); - allGoals.add(goalRegistry.getGoalForId(goalName)); - - view.setAvailableGoals(allGoals); - view.setGoal(goalName); - - notifyDirtyStateChanged(); - } - - @Override - public void focus() { - view.setFocusOnGoal(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageView.java deleted file mode 100644 index a6ccd528b46..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageView.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.goal; - -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The view of {@link GoalPage}. - * - * @author Artem Zatsarynnyi - */ -public interface GoalPageView extends View { - - /** Set the list of goals which are available to set for command. */ - void setAvailableGoals(Set goals); - - /** Sets the command's goal value. */ - void setGoal(String goalId); - - /** Sets the focus on goal field. */ - void setFocusOnGoal(); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** - * Called when command goal has been changed. - * - * @param goalId new value of the command goal - */ - void onGoalChanged(String goalId); - - /** Called when creating new goal is requested. */ - void onCreateGoal(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.java deleted file mode 100644 index b8df127ecdf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.goal; - -import com.google.common.annotations.VisibleForTesting; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ChangeEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.ui.listbox.CustomListBox; - -/** - * Implementation of {@link GoalPageView}. - * - * @author Artem Zatsarynnyi - */ -public class GoalPageViewImpl extends Composite implements GoalPageView { - - @VisibleForTesting static final String CREATE_GOAL_ITEM = "New Command Goal..."; - - private static final GoalPageViewImplUiBinder UI_BINDER = - GWT.create(GoalPageViewImplUiBinder.class); - - @UiField CustomListBox goalsList; - - private ActionDelegate delegate; - private String lastValue; - - @Inject - public GoalPageViewImpl() { - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void setAvailableGoals(Set goals) { - goalsList.clear(); - goals.forEach(g -> goalsList.addItem(g.getId())); - - goalsList.addItem(CREATE_GOAL_ITEM); - } - - @Override - public void setGoal(String goalId) { - goalsList.select(goalId); - lastValue = goalId; - } - - @UiHandler({"goalsList"}) - void onGoalChanged(ChangeEvent event) { - String chosenValue = goalsList.getValue(); - - if (chosenValue.equals(CREATE_GOAL_ITEM)) { - goalsList.select(lastValue); - delegate.onCreateGoal(); - } else { - lastValue = chosenValue; - delegate.onGoalChanged(lastValue); - } - } - - @Override - public void setFocusOnGoal() { - goalsList.setFocus(true); - } - - interface GoalPageViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.ui.xml deleted file mode 100644 index e2623dcba88..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/goal/GoalPageViewImpl.ui.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - .combo-box { - display: block; - } - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePage.java deleted file mode 100644 index dcceddfbda1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePage.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.name; - -import static org.eclipse.che.ide.util.NameUtils.isValidCommandName; - -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.command.editor.EditorMessages; -import org.eclipse.che.ide.command.editor.page.AbstractCommandEditorPage; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; - -/** - * Presenter for {@link CommandEditorPage} which allows to edit command's name. - * - * @author Artem Zatsarynnyi - */ -public class NamePage extends AbstractCommandEditorPage implements NamePageView.ActionDelegate { - - private final NamePageView view; - private final CommandExecutor commandExecutor; - - /** Initial value of the command's name. */ - private String commandNameInitial; - - @Inject - public NamePage(NamePageView view, EditorMessages messages, CommandExecutor commandExecutor) { - super(messages.pageNameTitle()); - - this.view = view; - this.commandExecutor = commandExecutor; - - view.setDelegate(this); - } - - @Override - public IsWidget getView() { - return view; - } - - @Override - protected void initialize() { - commandNameInitial = editedCommand.getName(); - - view.setCommandName(editedCommand.getName()); - } - - @Override - public boolean isDirty() { - if (editedCommand == null) { - return false; - } - - return !(commandNameInitial.equals(editedCommand.getName())); - } - - @Override - public boolean hasInvalidData() { - return !isValidCommandName(editedCommand.getName()); - } - - @Override - public void onNameChanged(String name) { - name = name.trim(); - - editedCommand.setName(name); - - notifyDirtyStateChanged(); - - view.showWarning(!isValidCommandName(name)); - } - - @Override - public void onCommandRun() { - commandExecutor.executeCommand(editedCommand); - } - - @Override - public void focus() { - view.setFocusOnName(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageView.java deleted file mode 100644 index 154c97a8496..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageView.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.name; - -import org.eclipse.che.ide.api.mvp.View; - -/** - * The view for {@link NamePage}. - * - * @author Artem Zatsarynnyi - */ -public interface NamePageView extends View { - - /** Sets the command's name value. */ - void setCommandName(String name); - - /** Sets the focus on name field. */ - void setFocusOnName(); - - void showWarning(boolean show); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** - * Called when command's name has been changed. - * - * @param name changed value of the command's name - */ - void onNameChanged(String name); - - /** Called when executing command is requested. */ - void onCommandRun(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.java deleted file mode 100644 index bd16c71f21e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.name; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; - -/** - * Implementation of {@link NamePageView}. - * - * @author Artem Zatsarynnyi - */ -public class NamePageViewImpl extends Composite implements NamePageView { - - private static final NamePageViewImplUiBinder UI_BINDER = - GWT.create(NamePageViewImplUiBinder.class); - - @UiField TextBox commandName; - - @UiField Button runButton; - - @UiField Label warningLabel; - - private ActionDelegate delegate; - - @Inject - public NamePageViewImpl() { - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void setCommandName(String name) { - commandName.setValue(name); - } - - @Override - public void setFocusOnName() { - commandName.setFocus(true); - } - - @UiHandler({"commandName"}) - void onNameChanged(KeyUpEvent event) { - delegate.onNameChanged(commandName.getValue()); - } - - @UiHandler("runButton") - public void handleRunButton(ClickEvent clickEvent) { - delegate.onCommandRun(); - } - - @Override - public void showWarning(boolean show) { - warningLabel.setVisible(show); - } - - interface NamePageViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.ui.xml deleted file mode 100644 index d89c6a87ee5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/name/NamePageViewImpl.ui.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - .text-field { - width: literal("calc(100% - 80px)"); - } - - .button { - float: right; - margin-top: 1px; - font-weight: bold; - background: #51b200; - } - - .button:hover { - background: #51b200; - } - - .warning { - color: red; - } - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/previewurl/PreviewUrlPage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/previewurl/PreviewUrlPage.java deleted file mode 100644 index 1758b693939..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/previewurl/PreviewUrlPage.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.previewurl; - -import static org.eclipse.che.api.workspace.shared.Constants.COMMAND_PREVIEW_URL_ATTRIBUTE_NAME; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.editor.defaulteditor.EditorBuilder; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.command.editor.EditorMessages; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; -import org.eclipse.che.ide.command.editor.page.text.AbstractPageWithTextEditor; -import org.eclipse.che.ide.command.editor.page.text.MacroEditorConfiguration; -import org.eclipse.che.ide.command.editor.page.text.PageWithTextEditorView; -import org.eclipse.che.ide.macro.chooser.MacroChooser; - -/** - * Presenter for {@link CommandEditorPage} which allows to edit command's preview URL. - * - * @author Artem Zatsarynnyi - */ -public class PreviewUrlPage extends AbstractPageWithTextEditor { - - @Inject - public PreviewUrlPage( - PageWithTextEditorView view, - EditorBuilder editorBuilder, - FileTypeRegistry fileTypeRegistry, - MacroChooser macroChooser, - EditorMessages messages, - MacroEditorConfiguration editorConfiguration) { - super( - view, - editorBuilder, - fileTypeRegistry, - macroChooser, - messages.pagePreviewUrlTitle(), - editorConfiguration); - - view.asWidget().getElement().setId("command_editor-preview_url"); - } - - @Override - protected String getCommandPropertyValue() { - final String previewUrl = editedCommand.getAttributes().get(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME); - - return previewUrl != null ? previewUrl : ""; - } - - @Override - protected void updateCommandPropertyValue(String content) { - editedCommand.getAttributes().put(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME, content); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.java deleted file mode 100644 index 6f3dd7afe71..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.project; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.logical.shared.ValueChangeHandler; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.HasValue; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import org.eclipse.che.ide.ui.switcher.Switcher; - -/** - * Switcher widget which is associated with some project name. - * - * @author Artem Zatsarynnyi - */ -public class ProjectSwitcher extends Composite implements HasValue { - - private static final ProjectSwitcherUiBinder UI_BINDER = - GWT.create(ProjectSwitcherUiBinder.class); - - @UiField Label label; - - @UiField Switcher switcher; - - ProjectSwitcher(String projectName) { - initWidget(UI_BINDER.createAndBindUi(this)); - - label.setText(projectName); - } - - @Override - public Boolean getValue() { - return switcher.getValue(); - } - - @Override - public void setValue(Boolean value) { - switcher.setValue(value); - } - - @Override - public void setValue(Boolean value, boolean fireEvents) { - switcher.setValue(value, fireEvents); - } - - @Override - public HandlerRegistration addValueChangeHandler(ValueChangeHandler handler) { - return switcher.addValueChangeHandler(handler); - } - - interface ProjectSwitcherUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.ui.xml deleted file mode 100644 index 3a6471068bf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectSwitcher.ui.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - @eval commandEditorProjectsTableRowColor org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectsTableRowColor(); - @eval commandEditorProjectSwitcherBorder org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectSwitcherBorder(); - - .panel { - background-color: commandEditorProjectsTableRowColor; - padding: 5px 0 5px 0; - } - - .label { - display: inline-block; - width: 150px; - margin: 0 0 0 10px; - } - - .switcher { - display: inline-block; - margin-left: 10px; - vertical-align: middle; - border: commandEditorProjectSwitcherBorder; - } - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPage.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPage.java deleted file mode 100644 index 25d9f7d0e19..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPage.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.project; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandImpl.ApplicableContext; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.command.editor.EditorMessages; -import org.eclipse.che.ide.command.editor.page.AbstractCommandEditorPage; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; - -/** Presenter for {@link CommandEditorPage} which allows to edit command's applicable projects. */ -public class ProjectsPage extends AbstractCommandEditorPage - implements ProjectsPageView.ActionDelegate, ResourceChangedHandler { - - private final ProjectsPageView view; - private final AppContext appContext; - - /** Initial value of the applicable projects list. */ - private Set applicableProjectsInitial; - - @Inject - public ProjectsPage( - ProjectsPageView view, AppContext appContext, EditorMessages messages, EventBus eventBus) { - super(messages.pageProjectsTitle()); - - this.view = view; - this.appContext = appContext; - - eventBus.addHandler(ResourceChangedEvent.getType(), this); - - view.setDelegate(this); - } - - @Override - public IsWidget getView() { - return view; - } - - @Override - protected void initialize() { - final ApplicableContext context = editedCommand.getApplicableContext(); - - applicableProjectsInitial = new HashSet<>(context.getApplicableProjects()); - - refreshProjects(); - } - - /** Refresh 'Projects' section in the view. */ - private void refreshProjects() { - final Map projectsStates = new HashMap<>(); - - for (Project project : appContext.getProjects()) { - ApplicableContext context = editedCommand.getApplicableContext(); - boolean applicable = context.getApplicableProjects().contains(project.getPath()); - - projectsStates.put(project, applicable); - } - - view.setProjects(projectsStates); - } - - @Override - public boolean isDirty() { - if (editedCommand == null) { - return false; - } - - ApplicableContext context = editedCommand.getApplicableContext(); - - return !(applicableProjectsInitial.equals(context.getApplicableProjects())); - } - - @Override - public void onApplicableProjectChanged(Project project, boolean applicable) { - final ApplicableContext context = editedCommand.getApplicableContext(); - - if (applicable) { - // if command is bound with one project at least - // then remove command from the workspace - if (context.getApplicableProjects().isEmpty()) { - context.setWorkspaceApplicable(false); - } - - context.addProject(project.getPath()); - } else { - context.removeProject(project.getPath()); - - // if command isn't bound to any project - // then save it to the workspace - if (context.getApplicableProjects().isEmpty()) { - context.setWorkspaceApplicable(true); - } - } - - notifyDirtyStateChanged(); - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - final Resource resource = delta.getResource(); - - if (resource.isProject()) { - // defer refreshing the projects section since appContext#getProjects may return old data - Scheduler.get().scheduleDeferred(this::refreshProjects); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageView.java deleted file mode 100644 index 9aa473bfee1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageView.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.project; - -import java.util.Map; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.resources.Project; - -/** - * The view for {@link ProjectsPage}. - * - * @author Artem Zatsarynnyi - */ -public interface ProjectsPageView extends View { - - /** Sets the applicable projects. */ - void setProjects(Map projects); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when applicable project has been changed. */ - void onApplicableProjectChanged(Project project, boolean applicable); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.java deleted file mode 100644 index 8a47a96fd59..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.project; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.Map; -import org.eclipse.che.ide.api.resources.Project; - -/** - * Implementation of {@link ProjectsPageView}. - * - * @author Artem Zatsarynnyi - */ -public class ProjectsPageViewImpl extends Composite implements ProjectsPageView { - - private static final ProjectsPageViewImplUiBinder UI_BINDER = - GWT.create(ProjectsPageViewImplUiBinder.class); - - @UiField FlowPanel mainPanel; - - @UiField FlowPanel projectsPanel; - - private ActionDelegate delegate; - - @Inject - public ProjectsPageViewImpl() { - initWidget(UI_BINDER.createAndBindUi(this)); - - mainPanel.setVisible(false); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void setProjects(Map projects) { - projectsPanel.clear(); - mainPanel.setVisible(!projects.isEmpty()); - - projects.forEach(this::addProjectSwitcherToPanel); - } - - private void addProjectSwitcherToPanel(Project project, boolean applicable) { - final ProjectSwitcher switcher = new ProjectSwitcher(project.getName()); - switcher.setValue(applicable); - switcher.addValueChangeHandler( - event -> delegate.onApplicableProjectChanged(project, event.getValue())); - - projectsPanel.add(switcher); - } - - interface ProjectsPageViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.ui.xml deleted file mode 100644 index 2a0810399d8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/project/ProjectsPageViewImpl.ui.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - @eval textFieldBorderColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveBorder(); - @eval commandEditorProjectsTableHeaderColor org.eclipse.che.ide.api.theme.Style.getCommandEditorProjectsTableHeaderColor(); - - .table { - border: textFieldBorderColor; - } - - .table-header { - background-color: commandEditorProjectsTableHeaderColor; - } - - .column-header { - display: inline-block; - width: 150px; - margin-left: 10px; - margin-top: 3px; - } - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/AbstractPageWithTextEditor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/AbstractPageWithTextEditor.java deleted file mode 100644 index 4d0d3c4c46b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/AbstractPageWithTextEditor.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import static org.eclipse.che.ide.api.editor.EditorPartPresenter.PROP_DIRTY; -import static org.eclipse.che.ide.api.editor.EditorPartPresenter.PROP_INPUT; - -import com.google.gwt.user.client.ui.IsWidget; -import org.eclipse.che.ide.api.editor.OpenEditorCallbackImpl; -import org.eclipse.che.ide.api.editor.defaulteditor.EditorBuilder; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.api.resources.SyntheticFile; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.command.editor.page.AbstractCommandEditorPage; -import org.eclipse.che.ide.command.editor.page.CommandEditorPage; -import org.eclipse.che.ide.macro.chooser.MacroChooser; - -/** - * Abstract {@link CommandEditorPage} which allows to edit a command's property with a text editor - * that provides autocompletion for macros names. - * - * @author Artem Zatsarynnyi - */ -public abstract class AbstractPageWithTextEditor extends AbstractCommandEditorPage - implements PageWithTextEditorView.ActionDelegate { - - private final PageWithTextEditorView view; - private final FileTypeRegistry fileTypeRegistry; - private final MacroChooser macroChooser; - private final TextEditorConfiguration editorConfiguration; - - private TextEditor editor; - - /** Initial value of the edited command's property. */ - private String initialValue; - - protected AbstractPageWithTextEditor( - PageWithTextEditorView view, - EditorBuilder editorBuilder, - FileTypeRegistry fileTypeRegistry, - MacroChooser macroChooser, - String title, - TextEditorConfiguration editorConfiguration) { - super(""); - - this.view = view; - this.fileTypeRegistry = fileTypeRegistry; - this.macroChooser = macroChooser; - this.editorConfiguration = editorConfiguration; - - view.setDelegate(this); - view.setHeight(getHeight()); - view.setEditorTitle(title); - - initializeEditor(editorBuilder); - } - - private void initializeEditor(EditorBuilder editorBuilder) { - editor = editorBuilder.buildEditor(); - editor.initialize(editorConfiguration); - editor.activate(); - - editor.addPropertyListener( - (source, propId) -> { - switch (propId) { - case PROP_INPUT: - editor.go(view.getEditorContainer()); - - editor.getEditorWidget().setAnnotationRulerVisible(false); - editor.getEditorWidget().setFoldingRulerVisible(false); - editor.getEditorWidget().setZoomRulerVisible(false); - editor.getEditorWidget().setOverviewRulerVisible(false); - editor.getView().setInfoPanelVisible(false); - - break; - case PROP_DIRTY: - updateCommandPropertyValue(editor.getDocument().getContents()); - notifyDirtyStateChanged(); - - break; - default: - } - }); - } - - @Override - public IsWidget getView() { - return view; - } - - @Override - protected void initialize() { - initialValue = getCommandPropertyValue(); - - Document document = editor.getDocument(); - if (document != null) { - document.replace(0, document.getContentsCharCount(), initialValue); - } else { - VirtualFile file = new SyntheticFile(editedCommand.getName() + getType(), initialValue); - editor.init( - new EditorInputImpl(fileTypeRegistry.getFileTypeByFile(file), file), - new OpenEditorCallbackImpl()); - } - } - - @Override - public boolean isDirty() { - if (editedCommand == null) { - return false; - } - - return !initialValue.equals(getCommandPropertyValue()); - } - - /** Returns the current value of the edited command's property. */ - protected abstract String getCommandPropertyValue(); - - /** - * Updates the value of the edited command's property. - * - * @param newValue new value of the edited command's property - */ - protected abstract void updateCommandPropertyValue(String newValue); - - /** Returns height of the page in pixels. Default height is 150 px. */ - protected int getHeight() { - return 150; - } - - /** - * Returns type of the edited content. Type must be specified as file's extension e.g.: .sh, .css. - * Default type is text/plain. - */ - protected String getType() { - return ""; - } - - @Override - public void onExploreMacros() { - macroChooser.show( - macro -> { - Document document = editor.getDocument(); - document.replace(document.getCursorOffset(), 0, macro.getName()); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/EditorInputImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/EditorInputImpl.java deleted file mode 100644 index 8eb73507575..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/EditorInputImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.vectomatic.dom.svg.ui.SVGResource; - -class EditorInputImpl implements EditorInput { - - private VirtualFile file; - private FileType fileType; - - EditorInputImpl(FileType fileType, VirtualFile file) { - this.fileType = fileType; - this.file = file; - } - - @Override - public String getToolTipText() { - return null; - } - - @Override - public String getName() { - return file.getDisplayName(); - } - - @Override - public SVGResource getSVGResource() { - return fileType.getImage(); - } - - @Override - public VirtualFile getFile() { - return file; - } - - @Override - public void setFile(VirtualFile file) { - this.file = file; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCodeAssistProcessor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCodeAssistProcessor.java deleted file mode 100644 index 7366ce7c912..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCodeAssistProcessor.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import java.util.ArrayList; -import java.util.List; -import javax.inject.Inject; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistCallback; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistProcessor; -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroRegistry; -import org.eclipse.che.ide.filters.FuzzyMatches; -import org.eclipse.che.ide.filters.Match; - -/** Code assist processor for macro names. */ -public class MacroCodeAssistProcessor implements CodeAssistProcessor { - - private MacroRegistry registry; - private FuzzyMatches fuzzyMatches; - private Resources resources; - private LastCompletion lastCompletion; - - @Inject - public MacroCodeAssistProcessor( - MacroRegistry registry, FuzzyMatches fuzzyMatches, Resources resources) { - this.registry = registry; - this.fuzzyMatches = fuzzyMatches; - this.resources = resources; - lastCompletion = new LastCompletion(); - } - - @Override - public void computeCompletionProposals( - TextEditor editor, int offset, boolean triggered, CodeAssistCallback callback) { - Document document = editor.getDocument(); - TextPosition position = document.getPositionFromIndex(offset); - - String currentLine = editor.getDocument().getLineContent(position.getLine()); - final String currentWord = getCurrentWord(currentLine, position.getCharacter()); - - List result = new ArrayList<>(); - if (triggered && !lastCompletion.isGoodFor(currentWord, offset)) { - lastCompletion.offset = offset; - lastCompletion.wordStartOffset = offset - currentWord.length(); // start completion word - lastCompletion.word = currentWord; - } - - List macros = registry.getMacros(); - for (Macro macro : macros) { - List matches = fuzzyMatches.fuzzyMatch(currentWord, macro.getName()); - if (matches != null) { - MacroCompletionProposal proposal = - new MacroCompletionProposal( - macro, matches, resources, lastCompletion.wordStartOffset, currentWord.length()); - result.add(proposal); - } - } - - result.sort( - (o1, o2) -> { - MacroCompletionProposal p1 = ((MacroCompletionProposal) o1); - MacroCompletionProposal p2 = ((MacroCompletionProposal) o2); - - return p1.getMacro().getName().compareTo(p2.getMacro().getName()); - }); - - callback.proposalComputed(result); - } - - private String getCurrentWord(String text, int offset) { - int i = offset - 1; - while (i >= 0 && isWordChar(text.charAt(i))) { - i--; - } - return text.substring(i + 1, offset); - } - - private boolean isWordChar(char c) { - return c >= 'a' && c <= 'z' - || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' - || c >= '\u007f' && c <= '\u00ff' - || c == '$' - || c == '{' - || c == '.' - || c == '_' - || c == '-'; - } - - @Override - public String getErrorMessage() { - return null; - } - - private class LastCompletion { - String word = ""; - int wordStartOffset; - int offset; - - boolean isGoodFor(String currentWord, int offset) { - return currentWord.startsWith(word) - && offset - this.offset == currentWord.length() - word.length(); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCompletionProposal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCompletionProposal.java deleted file mode 100644 index 1f5990ae0f6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroCompletionProposal.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import com.google.gwt.dom.client.Style; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import java.util.List; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.editor.codeassist.Completion; -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.filters.Match; - -/** Completion proposal for {@link Macro} that will insert {@link Macro#getName()} value. */ -class MacroCompletionProposal implements CompletionProposal { - - private final Macro macro; - private final List matches; - private Resources resources; - private int offset; - private int length; - - MacroCompletionProposal( - Macro macro, List matches, Resources resources, int offset, int length) { - this.macro = macro; - this.matches = matches; - this.resources = resources; - this.offset = offset; - this.length = length; - } - - @Override - public void getAdditionalProposalInfo(AsyncCallback callback) { - String documentation = macro.getDescription(); - if (documentation == null || documentation.trim().isEmpty()) { - documentation = "No documentation found."; - } - - Label label = new Label(documentation); - label.setWordWrap(true); - label.getElement().getStyle().setFontSize(13, Style.Unit.PX); - label.getElement().getStyle().setMarginLeft(4, Style.Unit.PX); - label.setSize("100%", "100%"); - callback.onSuccess(label); - } - - @Override - public String getDisplayString() { - SafeHtmlBuilder builder = new SafeHtmlBuilder(); - - String label = macro.getName(); - int pos = 0; - for (Match highlight : matches) { - if (highlight.getStart() == highlight.getEnd()) { - continue; - } - - if (pos < highlight.getStart()) { - appendPlain(builder, label.substring(pos, highlight.getStart())); - } - - appendHighlighted(builder, label.substring(highlight.getStart(), highlight.getEnd())); - pos = highlight.getEnd(); - } - - if (pos < label.length()) { - appendPlain(builder, label.substring(pos)); - } - - return builder.toSafeHtml().asString(); - } - - private void appendPlain(SafeHtmlBuilder builder, String text) { - builder.appendEscaped(text); - } - - private void appendHighlighted(SafeHtmlBuilder builder, String text) { - builder.appendHtmlConstant( - ""); - builder.appendEscaped(text); - builder.appendHtmlConstant(""); - } - - @Override - public Icon getIcon() { - return null; - } - - @Override - public void getCompletion(final CompletionCallback callback) { - callback.onCompletion( - new Completion() { - @Override - public void apply(Document document) { - document.replace(offset, length, macro.getName()); - } - - @Override - public LinearRange getSelection(Document document) { - LinearRange.PartialLinearRange start = - LinearRange.createWithStart(offset + macro.getName().length()); - return start.andLength(0); - } - }); - } - - public Macro getMacro() { - return macro; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroEditorConfiguration.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroEditorConfiguration.java deleted file mode 100644 index bec696c0b66..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/MacroEditorConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import java.util.HashMap; -import java.util.Map; -import javax.inject.Inject; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistProcessor; -import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; -import org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration; -import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; - -/** {@link TextEditorConfiguration} which provides {@link CodeAssistProcessor} for macros names. */ -public class MacroEditorConfiguration extends DefaultTextEditorConfiguration { - - private MacroCodeAssistProcessor codeAssistProcessor; - - @Inject - public MacroEditorConfiguration(MacroCodeAssistProcessor codeAssistProcessor) { - this.codeAssistProcessor = codeAssistProcessor; - } - - @Override - public Map getContentAssistantProcessors() { - Map map = new HashMap<>(); - map.put(DocumentPartitioner.DEFAULT_CONTENT_TYPE, codeAssistProcessor); - - return map; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorView.java deleted file mode 100644 index 48c413c1484..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorView.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import com.google.gwt.user.client.ui.SimpleLayoutPanel; -import org.eclipse.che.ide.api.mvp.View; - -/** - * View for {@link AbstractPageWithTextEditor}. - * - * @author Artem Zatsarynnyi - */ -public interface PageWithTextEditorView extends View { - - /** Returns the container where the editor should be placed. */ - SimpleLayoutPanel getEditorContainer(); - - /** Sets height of the view. */ - void setHeight(int height); - - /** Sets title for the editor. */ - void setEditorTitle(String title); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when exploring macros is requested. */ - void onExploreMacros(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.java deleted file mode 100644 index c8b776f087d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.editor.page.text; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.Hyperlink; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimpleLayoutPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; - -/** - * Implementation of {@link PageWithTextEditorView}. - * - * @author Artem Zatsarynnyi - */ -public class PageWithTextEditorViewImpl extends Composite implements PageWithTextEditorView { - - private static final PageWithTextEditorViewImplUiBinder UI_BINDER = - GWT.create(PageWithTextEditorViewImplUiBinder.class); - - @UiField DockLayoutPanel mainPanel; - - @UiField Label title; - - @UiField Hyperlink exploreMacrosLink; - - @UiField SimpleLayoutPanel editorPanel; - - /** The delegate to receive events from this view. */ - private ActionDelegate delegate; - - @Inject - public PageWithTextEditorViewImpl() { - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public SimpleLayoutPanel getEditorContainer() { - return editorPanel; - } - - @Override - public void setHeight(int height) { - mainPanel.setHeight(height + "px"); - } - - @Override - public void setEditorTitle(String title) { - this.title.setText(title); - } - - @UiHandler("exploreMacrosLink") - public void handleExploreMacrosLinkClick(ClickEvent event) { - delegate.onExploreMacros(); - } - - interface PageWithTextEditorViewImplUiBinder - extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.ui.xml deleted file mode 100644 index f9043b0ffc8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/editor/page/text/PageWithTextEditorViewImpl.ui.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - @eval textFieldBorderColor org.eclipse.che.ide.api.theme.Style.theme.toolButtonActiveBorder(); - - .editor { - border: textFieldBorderColor; - } - - .title { - float: left; - margin-left: 0; - } - - .link a, a:visited { - float: right; - margin: 8px 10px 8px 0; - color: #4990E2; - font-size: 11px; - } - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandExecutorImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandExecutorImpl.java deleted file mode 100644 index 17db4c6e97d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandExecutorImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.inject.Inject; -import java.util.Map; -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.macro.MacroProcessor; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.api.selection.SelectionAgent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.console.CommandConsoleFactory; -import org.eclipse.che.ide.console.CommandOutputConsole; -import org.eclipse.che.ide.machine.chooser.MachineChooser; -import org.eclipse.che.ide.processes.panel.ProcessesPanelPresenter; - -/** Implementation of {@link CommandExecutor}. */ -public class CommandExecutorImpl implements CommandExecutor { - - private final MacroProcessor macroProcessor; - private final CommandConsoleFactory commandConsoleFactory; - private final ProcessesPanelPresenter processesPanelPresenter; - private final ExecAgentCommandManager execAgentClient; - private final MachineChooser machineChooser; - private final SelectionAgent selectionAgent; - - @Inject - public CommandExecutorImpl( - MacroProcessor macroProcessor, - CommandConsoleFactory commandConsoleFactory, - ProcessesPanelPresenter processesPanelPresenter, - ExecAgentCommandManager execAgentClient, - MachineChooser machineChooser, - SelectionAgent selectionAgent) { - this.macroProcessor = macroProcessor; - this.commandConsoleFactory = commandConsoleFactory; - this.processesPanelPresenter = processesPanelPresenter; - this.execAgentClient = execAgentClient; - this.machineChooser = machineChooser; - this.selectionAgent = selectionAgent; - } - - @Override - public void executeCommand(Command command, String machineName) { - final String name = command.getName(); - final String type = command.getType(); - final String commandLine = command.getCommandLine(); - final Map attributes = command.getAttributes(); - - macroProcessor - .expandMacros(commandLine) - .then( - expandedCommandLine -> { - final CommandImpl expandedCommand = - new CommandImpl(name, expandedCommandLine, type, attributes); - final CommandOutputConsole console = - commandConsoleFactory.create(expandedCommand, machineName); - - processesPanelPresenter.addCommandOutput(machineName, console, true); - - execAgentClient - .startProcess(machineName, expandedCommand) - .thenIfProcessStartedEvent(console.getProcessStartedConsumer()) - .thenIfProcessDiedEvent(console.getProcessDiedConsumer()) - .thenIfProcessStdOutEvent(console.getStdOutConsumer()) - .thenIfProcessStdErrEvent(console.getStdErrConsumer()); - }); - } - - @Override - public void executeCommand(CommandImpl command) { - final MachineImpl selectedMachine = getSelectedMachine(); - - if (selectedMachine != null) { - executeCommand(command, selectedMachine.getName()); - } else { - machineChooser - .show() - .then( - machine -> { - executeCommand(command, machine.getName()); - }); - } - } - - /** Returns the currently selected machine or {@code null} if none. */ - @Nullable - private MachineImpl getSelectedMachine() { - final Selection selection = selectionAgent.getSelection(); - - if (selection != null && !selection.isEmpty() && selection.isSingleSelection()) { - final Object possibleNode = selection.getHeadElement(); - - if (possibleNode instanceof MachineImpl) { - return (MachineImpl) possibleNode; - } - } - - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandsActionGroup.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandsActionGroup.java deleted file mode 100644 index 17a9a656064..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/CommandsActionGroup.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.api.selection.SelectionAgent; -import org.eclipse.che.ide.resources.tree.ResourceNode; - -/** - * Action group that contains all actions for executing commands. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CommandsActionGroup extends DefaultActionGroup { - - private final SelectionAgent selectionAgent; - - @Inject - public CommandsActionGroup( - ActionManager actionManager, SelectionAgent selectionAgent, ExecMessages messages) { - super(messages.actionCommandsTitle(), true, actionManager); - - this.selectionAgent = selectionAgent; - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(false); - - // action group should be visible when current selection is machine or project - - final Selection selection = selectionAgent.getSelection(); - - if (selection != null && !selection.isEmpty() && selection.isSingleSelection()) { - final Object possibleNode = selection.getHeadElement(); - - if (possibleNode instanceof Machine) { - e.getPresentation().setEnabledAndVisible(true); - } else if (possibleNode instanceof ResourceNode) { - final Resource selectedResource = ((ResourceNode) possibleNode).getData(); - - e.getPresentation().setEnabledAndVisible(selectedResource.isProject()); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecMessages.java deleted file mode 100644 index adecb2636a7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecMessages.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages relate to the command execution. - * - * @author Artem Zatsarynnyi - */ -public interface ExecMessages extends Messages { - - @Key("action.commands.title") - String actionCommandsTitle(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandAction.java deleted file mode 100644 index c6a36c3c787..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandAction.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.command.CommandUtils; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Action for executing a {@link CommandImpl}. */ -class ExecuteCommandAction extends BaseAction { - - private final CommandImpl command; - private final CommandExecutor commandExecutor; - private final CommandManager commandManager; - - @Inject - ExecuteCommandAction( - @Assisted CommandImpl command, - CommandUtils commandUtils, - CommandExecutor commandExecutor, - CommandManager commandManager) { - super(command.getName()); - - this.command = command; - this.commandExecutor = commandExecutor; - this.commandManager = commandManager; - - final SVGResource commandIcon = commandUtils.getCommandTypeIcon(command.getType()); - if (commandIcon != null) { - getTemplatePresentation().setImageElement(new SVGImage(commandIcon).getElement()); - } - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(commandManager.isCommandApplicable(command)); - } - - @Override - public void actionPerformed(ActionEvent e) { - commandExecutor.executeCommand(command); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionFactory.java deleted file mode 100644 index 11f9ba08b33..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import org.eclipse.che.ide.api.command.CommandImpl; - -/** - * Factory for creating {@link ExecuteCommandAction} instances. - * - * @author Artem Zatsarynnyi - */ -public interface ExecuteCommandActionFactory { - - /** - * Creates new instance of {@link ExecuteCommandAction} for executing the specified {@code - * command}. - */ - ExecuteCommandAction create(CommandImpl command); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionManager.java deleted file mode 100644 index 1ab47bb152b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/ExecuteCommandActionManager.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_CONSOLES_TREE_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_CONTEXT_MENU; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.command.CommandAddedEvent; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandRemovedEvent; -import org.eclipse.che.ide.api.command.CommandUpdatedEvent; -import org.eclipse.che.ide.api.command.CommandsLoadedEvent; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerStoppedEvent; - -/** - * Manager listens for creating/removing commands and adds/removes related {@link - * ExecuteCommandAction}s in the context menus. - */ -@Singleton -public class ExecuteCommandActionManager { - - private static final String COMMANDS_ACTION_GROUP_ID_PREFIX = "commandsActionGroup"; - private static final String COMMAND_ACTION_ID_PREFIX = "command_"; - private static final String GOAL_ACTION_GROUP_ID_PREFIX = "goal_"; - - private final Provider commandManagerProvider; - private final ActionManager actionManager; - private final CommandsActionGroup commandsActionGroup; - private final GoalPopUpGroupFactory goalPopUpGroupFactory; - private final ExecuteCommandActionFactory commandActionFactory; - private final CommandGoalRegistry goalRegistry; - - /** Map of command's name to an appropriate {@link ExecuteCommandAction}. */ - private final Map commandActions; - /** Map of command goal's ID to an appropriate action group. */ - private final Map goalPopUpGroups; - - @Inject - public ExecuteCommandActionManager( - Provider commandManagerProvider, - ActionManager actionManager, - CommandsActionGroup commandsActionGroup, - GoalPopUpGroupFactory goalPopUpGroupFactory, - ExecuteCommandActionFactory commandActionFactory, - CommandGoalRegistry goalRegistry, - EventBus eventBus) { - this.commandManagerProvider = commandManagerProvider; - this.actionManager = actionManager; - this.commandsActionGroup = commandsActionGroup; - this.goalPopUpGroupFactory = goalPopUpGroupFactory; - this.commandActionFactory = commandActionFactory; - this.goalRegistry = goalRegistry; - - commandActions = new HashMap<>(); - goalPopUpGroups = new HashMap<>(); - - initialize(); - - eventBus.addHandler(CommandAddedEvent.getType(), e -> addAction(e.getCommand())); - eventBus.addHandler(CommandRemovedEvent.getType(), e -> removeAction(e.getCommand())); - eventBus.addHandler( - CommandUpdatedEvent.getType(), - e -> { - removeAction(e.getInitialCommand()); - addAction(e.getUpdatedCommand()); - }); - - eventBus.addHandler(WsAgentServerStoppedEvent.TYPE, e -> disposeActions()); - - eventBus.addHandler( - CommandsLoadedEvent.getType(), - e -> { - disposeActions(); - registerActions(); - }); - } - - private void initialize() { - actionManager.registerAction(COMMANDS_ACTION_GROUP_ID_PREFIX, commandsActionGroup); - - // inject 'Commands' menu into context menus - ((DefaultActionGroup) actionManager.getAction(GROUP_MAIN_CONTEXT_MENU)) - .add(commandsActionGroup); - ((DefaultActionGroup) actionManager.getAction(GROUP_EDITOR_TAB_CONTEXT_MENU)) - .add(commandsActionGroup); - ((DefaultActionGroup) actionManager.getAction(GROUP_CONSOLES_TREE_CONTEXT_MENU)) - .add(commandsActionGroup); - } - - /** - * Fetch registered action from command manager and constructs actions which should be registered - * in action manager and context menus. - */ - private void registerActions() { - commandManagerProvider.get().getCommands().forEach(ExecuteCommandActionManager.this::addAction); - } - - /** - * Packet dispose of registered actions and remove all action groups. This action need to be - * called for example when workspace is stopped. - */ - private void disposeActions() { - commandActions.values().forEach(ExecuteCommandActionManager.this::removeAction); - goalPopUpGroups.values().forEach(ExecuteCommandActionManager.this::removeAction); - - commandActions.clear(); - goalPopUpGroups.clear(); - } - - /** - * Creates action for executing the given command and adds created action to the appropriate - * action group. - */ - private void addAction(CommandImpl command) { - ExecuteCommandAction action = commandActionFactory.create(command); - - actionManager.registerAction(COMMAND_ACTION_ID_PREFIX + command.getName(), action); - commandActions.put(command.getName(), action); - - getActionGroupForCommand(command).add(action); - } - - /** - * Returns the action group which is appropriate for placing the action for executing the given - * command. If appropriate action group doesn't exist it will be created and added to the right - * place. - */ - private DefaultActionGroup getActionGroupForCommand(CommandImpl command) { - String goalId = command.getGoal(); - if (isNullOrEmpty(goalId)) { - goalId = goalRegistry.getDefaultGoal().getId(); - } - - DefaultActionGroup commandGoalPopUpGroup = goalPopUpGroups.get(goalId); - - if (commandGoalPopUpGroup == null) { - commandGoalPopUpGroup = goalPopUpGroupFactory.create(goalId); - actionManager.registerAction(GOAL_ACTION_GROUP_ID_PREFIX + goalId, commandGoalPopUpGroup); - goalPopUpGroups.put(goalId, commandGoalPopUpGroup); - - commandsActionGroup.add(commandGoalPopUpGroup); - } - - return commandGoalPopUpGroup; - } - - /** Removes actual action and dispose it from the action manager. */ - private void removeAction(Action commandAction) { - String commandActionId = actionManager.getId(commandAction); - - if (commandActionId != null) { - if (actionManager.isGroup(commandActionId)) { - commandsActionGroup.remove(commandAction); - } - - actionManager.unregisterAction(commandActionId); - } - } - - /** - * Removes action for executing the given command and removes the appropriate action group in case - * it's empty. - */ - private void removeAction(CommandImpl command) { - Action commandAction = commandActions.remove(command.getName()); - - if (commandAction != null) { - removeAction(commandAction); - - // remove action from it's action group - String goalId = command.getGoal(); - if (isNullOrEmpty(goalId)) { - goalId = goalRegistry.getDefaultGoal().getId(); - } - - DefaultActionGroup goalPopUpGroup = goalPopUpGroups.get(goalId); - - if (goalPopUpGroup != null) { - goalPopUpGroup.remove(commandAction); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroup.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroup.java deleted file mode 100644 index 871a0822178..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroup.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Action group that represents command goal. - * - * @author Artem Zatsarynnyi - */ -class GoalPopUpGroup extends DefaultActionGroup { - - private final CommandGoal commandGoal; - private final IconRegistry iconRegistry; - - @Inject - GoalPopUpGroup( - @Assisted String goalId, - ActionManager actionManager, - CommandGoalRegistry goalRegistry, - IconRegistry iconRegistry) { - super(actionManager); - - this.iconRegistry = iconRegistry; - commandGoal = goalRegistry.getGoalForId(goalId); - - setPopup(true); - - // set icon - final SVGResource commandTypeIcon = getCommandGoalIcon(); - if (commandTypeIcon != null) { - getTemplatePresentation().setImageElement(new SVGImage(commandTypeIcon).getElement()); - } - } - - @Override - public void update(ActionEvent e) { - if (getChildrenCount() > 0) { - e.getPresentation().setText(commandGoal.getId() + " (" + getChildrenCount() + ")"); - } else { - e.getPresentation().setEnabledAndVisible(false); - } - } - - private SVGResource getCommandGoalIcon() { - final String goalId = commandGoal.getId(); - - final Icon icon = iconRegistry.getIconIfExist("command.goal." + goalId); - - if (icon != null) { - final SVGImage svgImage = icon.getSVGImage(); - - if (svgImage != null) { - return icon.getSVGResource(); - } - } - - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroupFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroupFactory.java deleted file mode 100644 index ee89184dbf7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/GoalPopUpGroupFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -/** - * Factory for creating {@link GoalPopUpGroup} instances. - * - * @author Artem Zatsarynnyi - */ -public interface GoalPopUpGroupFactory { - - /** Creates new {@link GoalPopUpGroup} for the command goal with the given {@code id}. */ - GoalPopUpGroup create(String id); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentCommandManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentCommandManager.java deleted file mode 100644 index 58e2cfec277..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentCommandManager.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import static org.eclipse.che.ide.util.StringUtils.join; - -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.List; -import java.util.function.Consumer; -import javax.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.agent.exec.shared.dto.GetProcessLogsRequestDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessLogsResponseDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessRequestDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessResponseDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessesRequestDto; -import org.eclipse.che.agent.exec.shared.dto.GetProcessesResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessKillRequestDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessKillResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessStartRequestDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessStartResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessSubscribeRequestDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessUnSubscribeRequestDto; -import org.eclipse.che.agent.exec.shared.dto.ProcessUnSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.UpdateSubscriptionRequestDto; -import org.eclipse.che.agent.exec.shared.dto.UpdateSubscriptionResponseDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.model.workspace.config.Command; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.command.exec.ExecAgentConsumer; -import org.eclipse.che.ide.api.command.exec.ExecAgentEventManager; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Implementation of exec-agent command manager based on JSON RPC protocol that uses bi-directional - * request/response transporting. - */ -@Singleton -public class JsonRpcExecAgentCommandManager implements ExecAgentCommandManager { - public static final String PROCESS_START = "process.start"; - public static final String PROCESS_KILL = "process.kill"; - public static final String PROCESS_SUBSCRIBE = "process.subscribe"; - public static final String PROCESS_UNSUBSCRIBE = "process.unsubscribe"; - public static final String PROCESS_UPDATE_SUBSCRIBER = "process.updateSubscriber"; - public static final String PROCESS_GET_LOGS = "process.getLogs"; - public static final String PROCESS_GET_PROCESS = "process.getProcess"; - public static final String PROCESS_GET_PROCESSES = "process.getProcesses"; - - private final DtoFactory dtoFactory; - private final RequestTransmitter transmitter; - private final ExecAgentEventManager eventManager; - - @Inject - protected JsonRpcExecAgentCommandManager( - DtoFactory dtoFactory, - RequestTransmitter transmitter, - ExecAgentEventManager eventManager, - EventBus eventBus) { - this.dtoFactory = dtoFactory; - this.transmitter = transmitter; - this.eventManager = eventManager; - - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, event -> eventManager.cleanAllConsumers()); - } - - @Override - public ExecAgentConsumer startProcess( - final String endpointId, Command command) { - String name = command.getName(); - String commandLine = command.getCommandLine(); - String type = command.getType(); - - Log.debug( - getClass(), - "Starting a process. Name: " + name + ", command line: " + commandLine + ", type: " + type); - - ProcessStartRequestDto dto = - dtoFactory - .createDto(ProcessStartRequestDto.class) - .withCommandLine(commandLine) - .withName(name) - .withType(type); - - final ExecAgentConsumer execAgentConsumer = new ExecAgentConsumer<>(); - - transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_START) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(ProcessStartResponseDto.class) - .onSuccess( - processStartResponseDto -> - subscribe(endpointId, execAgentConsumer, processStartResponseDto)); - - return execAgentConsumer; - } - - @Override - public JsonRpcPromise killProcess(String endpointId, final int pid) { - Log.debug(getClass(), "Killing a process. PID: " + pid); - - ProcessKillRequestDto dto = dtoFactory.createDto(ProcessKillRequestDto.class).withPid(pid); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_KILL) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(ProcessKillResponseDto.class); - } - - @Override - public ExecAgentConsumer subscribe( - final String endpointId, int pid, List eventTypes, String after) { - Log.debug( - getClass(), - "Subscribing to a process. PID: " - + pid - + ", event types: " - + eventTypes - + ", after timestamp: " - + after); - - ProcessSubscribeRequestDto dto = - dtoFactory - .createDto(ProcessSubscribeRequestDto.class) - .withPid(pid) - .withEventTypes(join(eventTypes, ",")) - .withAfter(after); - - final ExecAgentConsumer execAgentConsumer = - new ExecAgentConsumer<>(); - - transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_SUBSCRIBE) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(ProcessSubscribeResponseDto.class) - .onSuccess( - (s, processSubscribeResponseDto) -> - subscribe(endpointId, execAgentConsumer, processSubscribeResponseDto)); - return execAgentConsumer; - } - - @Override - public JsonRpcPromise unsubscribe( - String endpointId, int pid, List eventTypes, String after) { - Log.debug( - getClass(), - "Unsubscribing to a process. PID: " - + pid - + ", event types: " - + eventTypes - + ", after timestamp: " - + after); - - final ProcessUnSubscribeRequestDto dto = - dtoFactory - .createDto(ProcessUnSubscribeRequestDto.class) - .withPid(pid) - .withEventTypes(join(eventTypes, ",")) - .withAfter(after); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_UNSUBSCRIBE) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(ProcessUnSubscribeResponseDto.class); - } - - @Override - public JsonRpcPromise updateSubscription( - String endpointId, int pid, List eventTypes) { - Log.debug( - getClass(), - "Updating subscription to a process. PID: " + pid + ", event types: " + eventTypes); - - final UpdateSubscriptionRequestDto dto = - dtoFactory - .createDto(UpdateSubscriptionRequestDto.class) - .withPid(pid) - .withEventTypes(join(eventTypes, ",")); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_UPDATE_SUBSCRIBER) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(UpdateSubscriptionResponseDto.class); - } - - @Override - public JsonRpcPromise> getProcessLogs( - String endpointId, int pid, String from, String till, int limit, int skip) { - Log.debug( - getClass(), - "Getting process logs" - + ". PID: " - + pid - + ", from: " - + from - + ", till: " - + till - + ", limit: " - + limit - + ", skip: " - + skip); - - GetProcessLogsRequestDto dto = - dtoFactory - .createDto(GetProcessLogsRequestDto.class) - .withPid(pid) - .withFrom(from) - .withTill(till) - .withLimit(limit) - .withSkip(skip); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_GET_LOGS) - .paramsAsDto(dto) - .sendAndReceiveResultAsListOfDto(GetProcessLogsResponseDto.class); - } - - @Override - public JsonRpcPromise getProcess(String endpointId, int pid) { - Log.debug(getClass(), "Getting process info. PID: " + pid); - - GetProcessRequestDto dto = dtoFactory.createDto(GetProcessRequestDto.class).withPid(pid); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_GET_PROCESS) - .paramsAsDto(dto) - .sendAndReceiveResultAsDto(GetProcessResponseDto.class); - } - - @Override - public JsonRpcPromise> getProcesses( - String endpointId, boolean all) { - Log.debug(getClass(), "Getting processes info. All: " + all); - - GetProcessesRequestDto dto = dtoFactory.createDto(GetProcessesRequestDto.class).withAll(all); - - return transmitter - .newRequest() - .endpointId(endpointId) - .methodName(PROCESS_GET_PROCESSES) - .paramsAsDto(dto) - .sendAndReceiveResultAsListOfDto(GetProcessesResponseDto.class); - } - - private void subscribe( - String endpointId, ExecAgentConsumer promise, T arg) { - final int pid = arg.getPid(); - - if (promise.hasProcessDiedEventConsumer()) { - Consumer consumer = promise.getProcessDiedEventDtoConsumer(); - eventManager.registerProcessDiedConsumer(endpointId, pid, consumer); - } - - if (promise.hasProcessStartedEventConsumer()) { - Consumer consumer = promise.getProcessStartedEventDtoConsumer(); - eventManager.registerProcessStartedConsumer(endpointId, pid, consumer); - } - - if (promise.hasProcessStdOutEventConsumer()) { - Consumer consumer = promise.getProcessStdOutEventDtoConsumer(); - eventManager.registerProcessStdOutConsumer(endpointId, pid, consumer); - } - - if (promise.hasProcessStdErrEventConsumer()) { - Consumer consumer = promise.getProcessStdErrEventDtoConsumer(); - eventManager.registerProcessStdErrConsumer(endpointId, pid, consumer); - } - - if (promise.hasOperation()) { - promise.getConsumer().accept(arg); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentEventManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentEventManager.java deleted file mode 100644 index c06cbbc6880..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/execute/JsonRpcExecAgentEventManager.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.execute; - -import com.google.inject.Singleton; -import java.util.function.Consumer; -import javax.inject.Inject; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; -import org.eclipse.che.ide.api.command.exec.ExecAgentEventManager; -import org.eclipse.che.ide.api.command.exec.ProcessDiedEventHandler; -import org.eclipse.che.ide.api.command.exec.ProcessStartedEventHandler; -import org.eclipse.che.ide.api.command.exec.ProcessStdErrEventHandler; -import org.eclipse.che.ide.api.command.exec.ProcessStdOutEventHandler; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Implementation based on json rpc protocol calls - * - * @author Dmitry Kuleshov - */ -@Singleton -public class JsonRpcExecAgentEventManager implements ExecAgentEventManager { - private final ProcessDiedEventHandler processDiedEventHandler; - private final ProcessStartedEventHandler processStartedEventHandler; - private final ProcessStdErrEventHandler processStdErrEventHandler; - private final ProcessStdOutEventHandler processStdOutEventHandler; - - @Inject - public JsonRpcExecAgentEventManager( - ProcessDiedEventHandler processDiedEventHandler, - ProcessStartedEventHandler processStartedEventHandler, - ProcessStdErrEventHandler processStdErrEventHandler, - ProcessStdOutEventHandler processStdOutEventHandler) { - this.processDiedEventHandler = processDiedEventHandler; - this.processStartedEventHandler = processStartedEventHandler; - this.processStdErrEventHandler = processStdErrEventHandler; - this.processStdOutEventHandler = processStdOutEventHandler; - } - - @Override - public void registerProcessDiedConsumer( - String endpointId, int pid, Consumer consumer) { - Log.debug(getClass(), "Registering consumer for process died event for PID: " + pid); - processDiedEventHandler.registerConsumer(endpointId, pid, consumer); - } - - @Override - public void registerProcessStartedConsumer( - String endpointId, int pid, Consumer consumer) { - Log.debug(getClass(), "Registering consumer for process started event for PID: " + pid); - processStartedEventHandler.registerConsumer(endpointId, pid, consumer); - } - - @Override - public void registerProcessStdErrConsumer( - String endpointId, int pid, Consumer consumer) { - Log.debug(getClass(), "Registering consumer for process standard output event for PID: " + pid); - processStdErrEventHandler.registerConsumer(endpointId, pid, consumer); - } - - @Override - public void registerProcessStdOutConsumer( - String endpointId, int pid, Consumer consumer) { - Log.debug(getClass(), "Registering consumer for process error output event for PID: " + pid); - processStdOutEventHandler.registerConsumer(endpointId, pid, consumer); - } - - @Override - public void cleanPidConsumer(String endpointId, int pid) { - processDiedEventHandler.unregisterConsumers(endpointId, pid); - processStartedEventHandler.unregisterConsumers(endpointId, pid); - processStdErrEventHandler.unregisterConsumers(endpointId, pid); - processStdOutEventHandler.unregisterConsumers(endpointId, pid); - } - - @Override - public void cleanAllConsumers() { - processDiedEventHandler.unregisterAllConsumers(); - processStartedEventHandler.unregisterAllConsumers(); - processStdErrEventHandler.unregisterAllConsumers(); - processStdOutEventHandler.unregisterAllConsumers(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerPresenter.java deleted file mode 100644 index f612b8e1c46..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerPresenter.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.explorer; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; - -import com.google.common.annotations.VisibleForTesting; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandAddedEvent; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandImpl.ApplicableContext; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandRemovedEvent; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandUpdatedEvent; -import org.eclipse.che.ide.api.command.CommandsLoadedEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.base.BasePresenter; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.command.node.NodeFactory; -import org.eclipse.che.ide.command.type.chooser.CommandTypeChooser; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.providers.DynaObject; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Presenter for Commands Explorer. */ -@DynaObject -@Singleton -public class CommandsExplorerPresenter extends BasePresenter - implements CommandsExplorerView.ActionDelegate { - - private final CommandsExplorerView view; - private final CommandResources resources; - private final CommandManager commandManager; - private final NotificationManager notificationManager; - private final CommandTypeChooser commandTypeChooser; - private final ExplorerMessages messages; - private final RefreshViewTask refreshViewTask; - private final DialogFactory dialogFactory; - private final NodeFactory nodeFactory; - private final Provider editorAgentProvider; - private final AppContext appContext; - - @Inject - public CommandsExplorerPresenter( - CommandsExplorerView view, - CommandResources commandResources, - CommandManager commandManager, - NotificationManager notificationManager, - CommandTypeChooser commandTypeChooser, - ExplorerMessages messages, - RefreshViewTask refreshViewTask, - DialogFactory dialogFactory, - NodeFactory nodeFactory, - Provider editorAgentProvider, - AppContext appContext, - EventBus eventBus) { - this.view = view; - this.resources = commandResources; - this.commandManager = commandManager; - this.notificationManager = notificationManager; - this.commandTypeChooser = commandTypeChooser; - this.messages = messages; - this.refreshViewTask = refreshViewTask; - this.dialogFactory = dialogFactory; - this.nodeFactory = nodeFactory; - this.editorAgentProvider = editorAgentProvider; - this.appContext = appContext; - - view.setDelegate(this); - - eventBus.addHandler( - CommandAddedEvent.getType(), e -> refreshViewAndSelectCommand(e.getCommand())); - eventBus.addHandler(CommandRemovedEvent.getType(), e -> refreshView()); - eventBus.addHandler(CommandUpdatedEvent.getType(), e -> refreshView()); - eventBus.addHandler(CommandsLoadedEvent.getType(), e -> refreshView()); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(getView()); - - refreshView(); - } - - @Override - public String getTitle() { - return messages.partTitle(); - } - - @Override - public IsWidget getView() { - return view; - } - - @Nullable - @Override - public String getTitleToolTip() { - return messages.partTooltip(); - } - - @Nullable - @Override - public SVGResource getTitleImage() { - return resources.explorerPart(); - } - - @Override - public void onCommandAdd(int left, int top) { - commandTypeChooser.show(left, top).then(createCommand(getDefaultContext())); - } - - /** Returns the default {@link ApplicableContext} for the new command. */ - private ApplicableContext getDefaultContext() { - final ApplicableContext context = new ApplicableContext(); - - if (appContext.getProjects().length > 0) { - context.setWorkspaceApplicable(false); - - Arrays.stream(appContext.getProjects()).forEach(p -> context.addProject(p.getPath())); - } - - return context; - } - - /** Returns an operation which creates a command with the given context. */ - private Operation createCommand(ApplicableContext context) { - return selectedCommandType -> { - final CommandGoal selectedGoal = view.getSelectedGoal(); - - if (selectedGoal == null) { - return; - } - - commandManager - .createCommand(selectedGoal.getId(), selectedCommandType.getId(), context) - .then( - command -> { - refreshViewAndSelectCommand(command); - editorAgentProvider.get().openEditor(nodeFactory.newCommandFileNode(command)); - }) - .catchError(showErrorNotification(messages.unableCreate())); - }; - } - - @Override - public void onCommandDuplicate(CommandImpl command) { - commandManager - .createCommand(command) - .then(this::refreshViewAndSelectCommand) - .catchError(showErrorNotification(messages.unableDuplicate())); - } - - @Override - public void onCommandRemove(CommandImpl command) { - dialogFactory - .createConfirmDialog( - messages.removeCommandConfirmationTitle(), - messages.removeCommandConfirmationMessage(command.getName()), - () -> - commandManager - .removeCommand(command.getName()) - .catchError(showErrorNotification(messages.unableRemove())), - null) - .show(); - } - - /** Returns an operation which shows an error notification with the given title. */ - private Operation showErrorNotification(String title) { - return err -> { - notificationManager.notify(title, err.getMessage(), FAIL, EMERGE_MODE); - throw new OperationException(err.getMessage()); - }; - } - - /** Refresh view with preserving the current selection. */ - private void refreshView() { - refreshViewAndSelectCommand(null); - } - - private void refreshViewAndSelectCommand(CommandImpl command) { - refreshViewTask.delayAndSelectCommand(command); - } - - /** - * {@link DelayedTask} for refreshing the view and optionally selecting the specified command. - * - *

        Tree widget in the view works asynchronously using events and it needs some time to be fully - * rendered. So successive refreshing view must be called with some delay. - */ - // since GIN can't instantiate inner classes - // made it nested in order to allow injection - @VisibleForTesting - static class RefreshViewTask extends DelayedTask { - - // 300 milliseconds should be enough to fully refreshing the tree - private static final int DELAY_MILLIS = 300; - - private final CommandsExplorerView view; - private final CommandGoalRegistry goalRegistry; - private final CommandManager commandManager; - private final CommandUtils commandUtils; - - private CommandImpl commandToSelect; - - @Inject - public RefreshViewTask( - CommandsExplorerView view, - CommandGoalRegistry goalRegistry, - CommandManager commandManager, - CommandUtils commandUtils) { - this.view = view; - this.goalRegistry = goalRegistry; - this.commandManager = commandManager; - this.commandUtils = commandUtils; - } - - @Override - public void onExecute() { - refreshView(); - - if (commandToSelect != null) { - // wait some time while tree in the view will be fully refreshed - new Timer() { - @Override - public void run() { - view.selectCommand(commandToSelect); - } - }.schedule(DELAY_MILLIS); - } - } - - void delayAndSelectCommand(@Nullable CommandImpl command) { - if (command != null) { - commandToSelect = command; - } - - delay(DELAY_MILLIS); - } - - private void refreshView() { - final Map> commandsByGoals = new HashMap<>(); - - // all predefined command goals must be shown in the view - // so populate map by all registered command goals - for (CommandGoal goal : goalRegistry.getAllPredefinedGoals()) { - commandsByGoals.put(goal, new ArrayList<>()); - } - - commandsByGoals.putAll(commandUtils.groupCommandsByGoal(commandManager.getCommands())); - - view.setCommands(commandsByGoals); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerView.java deleted file mode 100644 index 4d586b7cc58..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerView.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.explorer; - -import java.util.List; -import java.util.Map; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.base.BaseActionDelegate; - -/** - * The view for {@link CommandsExplorerPresenter}. - * - * @author Artem Zatsarynnyi - */ -public interface CommandsExplorerView extends View { - - /** - * Sets the commands to display in the view. - * - * @param commands commands grouped by its type - */ - void setCommands(Map> commands); - - /** Returns the currently selected command goal or {@code null} if none. */ - @Nullable - CommandGoal getSelectedGoal(); - - /** Returns the currently selected command or {@code null} if none. */ - @Nullable - CommandImpl getSelectedCommand(); - - /** Select the given {@code command}. */ - void selectCommand(CommandImpl command); - - /** The action delegate for this view. */ - interface ActionDelegate extends BaseActionDelegate { - - /** Called when adding new command is requested. */ - void onCommandAdd(int left, int top); - - /** - * Called when duplicating command is requested. - * - * @param command command duplication of which is requested - */ - void onCommandDuplicate(CommandImpl command); - - /** - * Called when removing command is requested. - * - * @param command command removing of which is requested - */ - void onCommandRemove(CommandImpl command); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.java deleted file mode 100644 index e5da6b2572b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.explorer; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.ui.smartTree.SelectionModel.Mode.SINGLE; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Element; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.parts.base.BaseView; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.actions.CommandExplorerContextMenu; -import org.eclipse.che.ide.command.node.CommandFileNode; -import org.eclipse.che.ide.command.node.CommandGoalNode; -import org.eclipse.che.ide.command.node.NodeFactory; -import org.eclipse.che.ide.ui.smartTree.NodeDescriptor; -import org.eclipse.che.ide.ui.smartTree.NodeLoader; -import org.eclipse.che.ide.ui.smartTree.NodeStorage; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Implementation of {@link CommandsExplorerView}. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CommandsExplorerViewImpl extends BaseView - implements CommandsExplorerView { - - private static final CommandsExplorerViewImplUiBinder UI_BINDER = - GWT.create(CommandsExplorerViewImplUiBinder.class); - - private final CommandsTreeRenderer treeRenderer; - private final NodeFactory nodeFactory; - /** Mapping of the commands to the rendered tree nodes. */ - private final Map commandNodes; - - @UiField(provided = true) - Tree tree; - - @Inject - public CommandsExplorerViewImpl( - ExplorerMessages messages, - CommandResources resources, - NodeFactory nodeFactory, - CommandExplorerContextMenu contextMenu) { - this.nodeFactory = nodeFactory; - commandNodes = new HashMap<>(); - - setTitle(messages.viewTitle()); - - tree = new Tree(new NodeStorage(), new NodeLoader()); - tree.ensureDebugId("commands-explorer"); - - treeRenderer = new CommandsTreeRenderer(tree.getTreeStyles(), resources, delegate); - - tree.setPresentationRenderer(treeRenderer); - tree.getSelectionModel().setSelectionMode(SINGLE); - - tree.getSelectionModel() - .addSelectionHandler( - event -> { - for (Node node : tree.getNodeStorage().getAll()) { - final Element nodeContainerElement = - tree.getNodeDescriptor(node).getNodeContainerElement(); - - if (nodeContainerElement != null) { - nodeContainerElement.removeAttribute("selected"); - } - } - - if (event.getSelectedItem() != null) { - NodeDescriptor nodeDescriptor = tree.getNodeDescriptor(event.getSelectedItem()); - if (nodeDescriptor != null) { - nodeDescriptor.getNodeContainerElement().setAttribute("selected", "selected"); - } - } - }); - - tree.setContextMenuInvocationHandler(contextMenu::show); - - setContentWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - protected void focusView() { - tree.setFocus(true); - } - - @Override - public void setCommands(Map> commands) { - treeRenderer.setDelegate(delegate); - - renderCommands(commands); - } - - private void renderCommands(Map> commands) { - commandNodes.clear(); - tree.getNodeStorage().clear(); - - for (Entry> entry : commands.entrySet()) { - List commandNodes = new ArrayList<>(entry.getValue().size()); - for (CommandImpl command : entry.getValue()) { - final CommandFileNode commandFileNode = nodeFactory.newCommandFileNode(command); - commandNodes.add(commandFileNode); - - this.commandNodes.put(command, commandFileNode); - } - - final CommandGoalNode commandGoalNode = - nodeFactory.newCommandGoalNode(entry.getKey(), commandNodes); - tree.getNodeStorage().add(commandGoalNode); - } - - tree.expandAll(); - } - - @Nullable - @Override - public CommandGoal getSelectedGoal() { - final List selectedNodes = tree.getSelectionModel().getSelectedNodes(); - - if (!selectedNodes.isEmpty()) { - final Node selectedNode = selectedNodes.get(0); - - if (selectedNode instanceof CommandGoalNode) { - return ((CommandGoalNode) selectedNode).getData(); - } - } - - return null; - } - - @Nullable - @Override - public CommandImpl getSelectedCommand() { - final List selectedNodes = tree.getSelectionModel().getSelectedNodes(); - - if (!selectedNodes.isEmpty()) { - final Node selectedNode = selectedNodes.get(0); - - if (selectedNode instanceof CommandFileNode) { - return ((CommandFileNode) selectedNode).getData(); - } - } - - return null; - } - - @Override - public void selectCommand(CommandImpl command) { - tree.getSelectionModel().setSelection(singletonList(commandNodes.get(command))); - } - - interface CommandsExplorerViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.ui.xml deleted file mode 100644 index 7f9088ba7f1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsExplorerViewImpl.ui.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsTreeRenderer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsTreeRenderer.java deleted file mode 100644 index 34be32119c3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/CommandsTreeRenderer.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.explorer; - -import static com.google.gwt.user.client.Event.ONCLICK; - -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.SpanElement; -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.Event; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.explorer.CommandsExplorerView.ActionDelegate; -import org.eclipse.che.ide.command.node.CommandFileNode; -import org.eclipse.che.ide.command.node.CommandGoalNode; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.TreeStyles; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.presentation.DefaultPresentationRenderer; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Renderer for the commands tree. - * - * @author Artem Zatsarynnyi - */ -class CommandsTreeRenderer extends DefaultPresentationRenderer { - - private final CommandResources resources; - - private ActionDelegate delegate; - - CommandsTreeRenderer(TreeStyles treeStyles, CommandResources resources, ActionDelegate delegate) { - super(treeStyles); - - this.resources = resources; - this.delegate = delegate; - } - - /** Sets the delegate that will handle events from the rendered DOM elements. */ - void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Element getPresentableTextContainer(Element content) { - final Element presentableTextContainer = super.getPresentableTextContainer(content); - presentableTextContainer.addClassName(resources.commandsExplorerCss().commandNodeText()); - - return presentableTextContainer; - } - - @Override - public Element render(Node node, String domID, Tree.Joint joint, int depth) { - final Element element = super.render(node, domID, joint, depth); - final Element nodeContainerElement = element.getFirstChildElement(); - - if (node instanceof CommandFileNode) { - CommandFileNode commandNode = (CommandFileNode) node; - - nodeContainerElement.setId("command_" + commandNode.getDisplayName()); - - renderCommandNode(commandNode, nodeContainerElement); - } else if (node instanceof CommandGoalNode) { - CommandGoalNode goalNode = (CommandGoalNode) node; - - nodeContainerElement.setId("goal_" + goalNode.getName()); - - renderCommandGoalNode(nodeContainerElement); - } - - return element; - } - - private void renderCommandNode(CommandFileNode node, Element nodeContainerElement) { - nodeContainerElement.addClassName(resources.commandsExplorerCss().commandNode()); - - final Element removeCommandButton = createButton(FontAwesome.TRASH); - Event.setEventListener( - removeCommandButton, - event -> { - if (ONCLICK == event.getTypeInt()) { - event.stopPropagation(); - delegate.onCommandRemove(node.getData()); - } - }); - - final Element duplicateCommandButton = createButton(resources.duplicateCommand()); - Event.setEventListener( - duplicateCommandButton, - event -> { - if (ONCLICK == event.getTypeInt()) { - event.stopPropagation(); - delegate.onCommandDuplicate(node.getData()); - } - }); - - final Element buttonsPanel = Document.get().createSpanElement(); - buttonsPanel.setClassName(resources.commandsExplorerCss().commandNodeButtonsPanel()); - buttonsPanel.appendChild(removeCommandButton); - buttonsPanel.appendChild(duplicateCommandButton); - - nodeContainerElement.appendChild(buttonsPanel); - - removeCommandButton.setId("commands_tree-button-remove"); - duplicateCommandButton.setId("commands_tree-button-duplicate"); - } - - private void renderCommandGoalNode(Element nodeContainerElement) { - nodeContainerElement.addClassName(resources.commandsExplorerCss().commandGoalNode()); - - final Element addCommandButton = createButton(resources.addCommand()); - - Event.setEventListener( - addCommandButton, - event -> { - if (ONCLICK == event.getTypeInt()) { - event.stopPropagation(); - delegate.onCommandAdd( - addCommandButton.getAbsoluteLeft(), addCommandButton.getAbsoluteTop()); - } - }); - - nodeContainerElement.appendChild(addCommandButton); - - addCommandButton.setId("commands_tree-button-add"); - } - - private Element createButton(Object icon) { - final Element button = Document.get().createSpanElement(); - button.appendChild(getIconElement(icon)); - - Event.sinkEvents(button, ONCLICK); - - return button; - } - - private Element getIconElement(Object icon) { - if (icon instanceof SVGResource) { - return ((SVGResource) icon).getSvg().getElement(); - } else if (icon instanceof String) { - SpanElement element = Document.get().createSpanElement(); - element.getStyle().setFontSize(11., Style.Unit.PT); - element.getStyle().setMarginTop(2., Style.Unit.PT); - element.setInnerHTML((String) icon); - return element; - } - - throw new IllegalArgumentException("Icon type is undefined"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/ExplorerMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/ExplorerMessages.java deleted file mode 100644 index 9e56981d528..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/explorer/ExplorerMessages.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.explorer; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages for the Command Explorer. - * - * @author Artem Zatsarynnyi - */ -public interface ExplorerMessages extends Messages { - - @Key("explorer.part.title") - String partTitle(); - - @Key("explorer.part.tooltip") - String partTooltip(); - - @Key("explorer.view.title") - String viewTitle(); - - @Key("explorer.message.unable_create") - String unableCreate(); - - @Key("explorer.message.unable_duplicate") - String unableDuplicate(); - - @Key("explorer.message.unable_remove") - String unableRemove(); - - @Key("explorer.remove_confirmation.title") - String removeCommandConfirmationTitle(); - - @Key("explorer.remove_confirmation.message") - String removeCommandConfirmationMessage(String commandName); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/BuildGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/BuildGoal.java deleted file mode 100644 index d2c3882a42d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/BuildGoal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Build' goal. - * - * @author Artem Zatsarynnyi - */ -public class BuildGoal extends BaseCommandGoal { - - @Inject - public BuildGoal() { - super("Build"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommandGoalRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommandGoalRegistryImpl.java deleted file mode 100644 index be959acc2b2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommandGoalRegistryImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.Optional.ofNullable; -import static java.util.stream.Collectors.toSet; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.BaseCommandGoal; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandGoalRegistry; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.util.loging.Log; - -/** Implementation of {@link CommandGoalRegistry}. */ -@Singleton -public class CommandGoalRegistryImpl implements CommandGoalRegistry { - - private final CommandGoal defaultGoal; - private final Provider commandManagerProvider; - private final GoalMessages messages; - private final Map predefinedGoals; - - @Inject - public CommandGoalRegistryImpl( - @Named("default") CommandGoal defaultCommandGoal, - Provider commandManagerProvider, - GoalMessages messages) { - defaultGoal = defaultCommandGoal; - this.commandManagerProvider = commandManagerProvider; - this.messages = messages; - - predefinedGoals = new HashMap<>(); - } - - @Inject(optional = true) - private void register(Set goals) { - for (CommandGoal goal : goals) { - final String id = goal.getId(); - - if (!predefinedGoals.containsKey(id)) { - predefinedGoals.put(id, goal); - } else { - Log.warn(getClass(), messages.messageGoalAlreadyRegistered(id)); - } - } - } - - @Override - public Set getAllGoals() { - Set goals = getAllPredefinedGoals(); - goals.addAll( - commandManagerProvider - .get() - .getCommands() - .stream() - .map(command -> getGoalForId(command.getGoal())) - .collect(toSet())); - return goals; - } - - @Override - public Set getAllPredefinedGoals() { - return new HashSet<>(predefinedGoals.values()); - } - - @Override - public CommandGoal getDefaultGoal() { - return defaultGoal; - } - - @Override - public Optional getPredefinedGoalById(String id) { - return ofNullable(predefinedGoals.get(id)); - } - - @Override - public CommandGoal getGoalForId(@Nullable String id) { - if (isNullOrEmpty(id)) { - return getDefaultGoal(); - } - - return getPredefinedGoalById(id).orElse(new BaseCommandGoal(id)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommonGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommonGoal.java deleted file mode 100644 index 61209caa40a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/CommonGoal.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Common' goal. By default it's used for grouping commands which doesn't - * belong to any goal. - * - * @author Artem Zatsarynnyi - */ -public class CommonGoal extends BaseCommandGoal { - - @Inject - public CommonGoal() { - super("Common"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DebugGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DebugGoal.java deleted file mode 100644 index 089e5a1c422..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DebugGoal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Debug' goal. - * - * @author Artem Zatsarynnyi - */ -public class DebugGoal extends BaseCommandGoal { - - @Inject - public DebugGoal() { - super("Debug"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DeployGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DeployGoal.java deleted file mode 100644 index fd584d45e2a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/DeployGoal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Deploy' goal. - * - * @author Artem Zatsarynnyi - */ -public class DeployGoal extends BaseCommandGoal { - - @Inject - public DeployGoal() { - super("Deploy"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/GoalMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/GoalMessages.java deleted file mode 100644 index 8e68e6c04d3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/GoalMessages.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages relate to the command goals. - * - * @author Artem Zatsarynnyi - */ -public interface GoalMessages extends Messages { - - @Key("message.goal_already_registered") - String messageGoalAlreadyRegistered(String goalId); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/RunGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/RunGoal.java deleted file mode 100644 index b978a2670cc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/RunGoal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Run' goal. - * - * @author Artem Zatsarynnyi - */ -public class RunGoal extends BaseCommandGoal { - - @Inject - public RunGoal() { - super("Run"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/TestGoal.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/TestGoal.java deleted file mode 100644 index 3e05f27c48c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/goal/TestGoal.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.goal; - -import com.google.inject.Inject; -import org.eclipse.che.ide.api.command.BaseCommandGoal; - -/** - * Represents predefined 'Test' goal. - * - * @author Artem Zatsarynnyi - */ -public class TestGoal extends BaseCommandGoal { - - @Inject - public TestGoal() { - super("Test"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandManagerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandManagerImpl.java deleted file mode 100644 index 1c9e343f8f2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandManagerImpl.java +++ /dev/null @@ -1,453 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.manager; - -import static java.util.stream.Collectors.toList; -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; - -import com.google.gwt.core.client.Scheduler; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import elemental.util.ArrayOf; -import elemental.util.Collections; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandAddedEvent; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandImpl.ApplicableContext; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandRemovedEvent; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; -import org.eclipse.che.ide.api.command.CommandUpdatedEvent; -import org.eclipse.che.ide.api.command.CommandsLoadedEvent; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.api.selection.SelectionAgent; -import org.eclipse.che.ide.api.workspace.WorkspaceReadyEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.util.loging.Log; - -/** Implementation of {@link CommandManager}. */ -@Singleton -public class CommandManagerImpl implements CommandManager { - - private final AppContext appContext; - private final PromiseProvider promiseProvider; - private final CommandTypeRegistry commandTypeRegistry; - private final ProjectCommandManagerDelegate projectCommandManager; - private final WorkspaceCommandManagerDelegate workspaceCommandManager; - private final SelectionAgent selectionAgent; - private final EventBus eventBus; - private final CommandNameGenerator commandNameGenerator; - - /** Map of the commands' names to the commands. */ - private final Map commands; - - @Inject - public CommandManagerImpl( - AppContext appContext, - PromiseProvider promiseProvider, - CommandTypeRegistry commandTypeRegistry, - ProjectCommandManagerDelegate projectCommandManagerDelegate, - WorkspaceCommandManagerDelegate workspaceCommandManagerDelegate, - SelectionAgent selectionAgent, - EventBus eventBus, - CommandNameGenerator commandNameGenerator) { - this.appContext = appContext; - this.promiseProvider = promiseProvider; - this.commandTypeRegistry = commandTypeRegistry; - this.projectCommandManager = projectCommandManagerDelegate; - this.workspaceCommandManager = workspaceCommandManagerDelegate; - this.selectionAgent = selectionAgent; - this.eventBus = eventBus; - this.commandNameGenerator = commandNameGenerator; - - commands = new HashMap<>(); - registerNative(); - - eventBus.addHandler(WorkspaceReadyEvent.getType(), e -> fetchCommands()); - eventBus.addHandler( - ResourceChangedEvent.getType(), - event -> { - if (ResourceDelta.REMOVED == event.getDelta().getKind() - && event.getDelta().getResource().isProject()) { - commands.clear(); - fetchCommands(); - } - }); - eventBus.addHandler( - WorkspaceStoppedEvent.TYPE, - e -> { - commands.clear(); - notifyCommandsLoaded(); - }); - } - - private void fetchCommands() { - // get all commands related to the workspace - workspaceCommandManager - .fetchCommands() - .then( - workspaceCommands -> { - workspaceCommands.forEach( - workspaceCommand -> - commands.put( - workspaceCommand.getName(), - new CommandImpl(workspaceCommand, new ApplicableContext()))); - - Arrays.stream(appContext.getProjects()) - .forEach( - project -> - projectCommandManager - .getCommands(project) - .forEach( - projectCommand -> { - final CommandImpl existedCommand = - this.commands.get(projectCommand.getName()); - - if (existedCommand == null) { - this.commands.put( - projectCommand.getName(), - new CommandImpl( - projectCommand, - new ApplicableContext(project.getPath()))); - } else { - if (projectCommand.equalsIgnoreContext(existedCommand)) { - existedCommand - .getApplicableContext() - .addProject(project.getPath()); - } else { - // normally, should never happen - Log.error( - CommandManagerImpl.this.getClass(), - "Different commands with the same names found"); - } - } - })); - - notifyCommandsLoaded(); - }); - } - - @Override - public List getCommands() { - return commands.values().stream().map(CommandImpl::new).collect(toList()); - } - - @Override - public java.util.Optional getCommand(String name) { - return commands.values().stream().filter(command -> name.equals(command.getName())).findFirst(); - } - - @Override - public List getApplicableCommands() { - return commands - .values() - .stream() - .filter(this::isCommandApplicable) - .map(CommandImpl::new) - .collect(toList()); - } - - @Override - public boolean isCommandApplicable(CommandImpl command) { - return isMachineSelected() || isCommandApplicableToCurrentProject(command); - } - - /** Checks whether the machine is currently selected. */ - private boolean isMachineSelected() { - final Selection selection = selectionAgent.getSelection(); - - if (selection != null && !selection.isEmpty() && selection.isSingleSelection()) { - return selection.getHeadElement() instanceof Machine; - } - - return false; - } - - /** Checks whether the given command is applicable to the current project. */ - private boolean isCommandApplicableToCurrentProject(CommandImpl command) { - final Set applicableProjects = command.getApplicableContext().getApplicableProjects(); - - if (applicableProjects.isEmpty()) { - return true; - } - - final Resource currentResource = appContext.getResource(); - - if (currentResource != null) { - final Project currentProject = currentResource.getProject(); - if (currentProject != null) { - return applicableProjects.contains(currentProject.getPath()); - } - } - - return false; - } - - @Override - public Promise createCommand(String goalId, String typeId) { - return createCommand(goalId, typeId, null, null, new HashMap<>(), new ApplicableContext()); - } - - @Override - public Promise createCommand( - String goalId, String typeId, ApplicableContext context) { - return createCommand(goalId, typeId, null, null, new HashMap<>(), context); - } - - @Override - public Promise createCommand( - String goalId, - String typeId, - String name, - String commandLine, - Map attributes) { - return createCommand(goalId, typeId, name, commandLine, attributes, new ApplicableContext()); - } - - @Override - public Promise createCommand( - String goalId, - String typeId, - @Nullable String name, - @Nullable String commandLine, - Map attributes, - ApplicableContext context) { - - final Map attr = new HashMap<>(attributes); - attr.put(COMMAND_GOAL_ATTRIBUTE_NAME, goalId); - - final Optional commandType = commandTypeRegistry.getCommandTypeById(typeId); - commandType.ifPresent( - type -> - attr.put( - COMMAND_PREVIEW_URL_ATTRIBUTE_NAME, commandType.get().getPreviewUrlTemplate())); - - final String commandLineTemplate = - commandType.map(CommandType::getCommandLineTemplate).orElse(""); - - return createCommand( - new CommandImpl( - commandNameGenerator.generate(typeId, name), - commandLine != null ? commandLine : commandLineTemplate, - typeId, - attr, - context)); - } - - @Override - public Promise createCommand(CommandImpl command) { - return doCreateCommand(command) - .then( - (Function) - newCommand -> { - // postpone the notification because - // listeners should be notified after returning from #createCommand method - Scheduler.get().scheduleDeferred(() -> notifyCommandAdded(newCommand)); - - return newCommand; - }); - } - - /** Does the actual work for command creation. Doesn't notify listeners. */ - private Promise doCreateCommand(CommandImpl command) { - final ApplicableContext context = command.getApplicableContext(); - if (!context.isWorkspaceApplicable() && context.getApplicableProjects().isEmpty()) { - return promiseProvider.reject( - new Exception("Command has to be applicable to the workspace or at least one project")); - } - - final CommandImpl newCommand = new CommandImpl(command); - newCommand.setName(commandNameGenerator.generate(command.getType(), command.getName())); - - final ArrayOf> commandPromises = Collections.arrayOf(); - - if (context.isWorkspaceApplicable()) { - Promise p = - workspaceCommandManager - .createCommand(newCommand) - .then( - (Function) - aVoid -> { - newCommand.getApplicableContext().setWorkspaceApplicable(true); - return newCommand; - }); - - commandPromises.push(p); - } - - for (final String projectPath : context.getApplicableProjects()) { - final Project project = getProjectByPath(projectPath); - - if (project == null) { - continue; - } - - Promise p = - projectCommandManager - .createCommand(project, newCommand) - .then( - (Function) - arg -> { - newCommand.getApplicableContext().addProject(projectPath); - return newCommand; - }); - - commandPromises.push(p); - } - - return promiseProvider - .all2(commandPromises) - .then( - (Function, CommandImpl>) - ignore -> { - commands.put(newCommand.getName(), newCommand); - return newCommand; - }); - } - - @Override - public Promise updateCommand(String name, CommandImpl commandToUpdate) { - final CommandImpl existedCommand = commands.get(name); - - if (existedCommand == null) { - return promiseProvider.reject(new Exception("Command '" + name + "' does not exist.")); - } - - return doRemoveCommand(name) - .thenPromise( - aVoid -> - doCreateCommand(commandToUpdate) - .then( - (Function) - updatedCommand -> { - // listeners should be notified after returning from #updateCommand - // method - // so let's postpone notification - Scheduler.get() - .scheduleDeferred( - () -> notifyCommandUpdated(existedCommand, updatedCommand)); - - return updatedCommand; - })); - } - - @Override - public Promise removeCommand(String name) { - final CommandImpl command = commands.get(name); - - if (command == null) { - return promiseProvider.reject(new Exception("Command '" + name + "' does not exist.")); - } - - return doRemoveCommand(name) - .then( - aVoid -> { - // listeners should be notified after returning from #removeCommand method - // so let's postpone notification - Scheduler.get().scheduleDeferred(() -> notifyCommandRemoved(command)); - }); - } - - /** Removes the command without notifying listeners. */ - private Promise doRemoveCommand(String name) { - final CommandImpl command = commands.get(name); - - if (command == null) { - return promiseProvider.reject(new Exception("Command '" + name + "' does not exist.")); - } - - final ApplicableContext context = command.getApplicableContext(); - - final ArrayOf> commandPromises = Collections.arrayOf(); - - if (context.isWorkspaceApplicable()) { - commandPromises.push(workspaceCommandManager.removeCommand(name)); - } - - for (final String projectPath : context.getApplicableProjects()) { - final Project project = getProjectByPath(projectPath); - - if (project == null) { - continue; - } - - commandPromises.push(projectCommandManager.removeCommand(project, name)); - } - - return promiseProvider - .all2(commandPromises) - .then( - (Function, Void>) - arg -> { - commands.remove(command.getName()); - return null; - }); - } - - @Nullable - private Project getProjectByPath(String path) { - for (Project project : appContext.getProjects()) { - if (path.equals(project.getPath())) { - return project; - } - } - - return null; - } - - private void notifyCommandsLoaded() { - eventBus.fireEvent(new CommandsLoadedEvent()); - } - - private void notifyCommandAdded(CommandImpl command) { - eventBus.fireEvent(new CommandAddedEvent(command)); - } - - private void notifyCommandRemoved(CommandImpl command) { - eventBus.fireEvent(new CommandRemovedEvent(command)); - } - - private void notifyCommandUpdated(CommandImpl prevCommand, CommandImpl command) { - eventBus.fireEvent(new CommandUpdatedEvent(prevCommand, command)); - } - - /* Expose Command Manager's internal API to the world, to allow selenium tests or clients that use IDE to refresh commands. */ - private native void registerNative() /*-{ - var that = this; - - var CommandManager = {}; - - CommandManager.refresh = $entry(function () { - that.@org.eclipse.che.ide.command.manager.CommandManagerImpl::fetchCommands()(); - }); - - $wnd.IDE.CommandManager = CommandManager; - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandNameGenerator.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandNameGenerator.java deleted file mode 100644 index fffd8242489..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/CommandNameGenerator.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.manager; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.stream.Collectors.toSet; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; - -/** Generator for command names. */ -@Singleton -class CommandNameGenerator { - - private final CommandTypeRegistry typeRegistry; - private final Provider commandManagerProvider; - - @Inject - CommandNameGenerator( - CommandTypeRegistry commandTypeRegistry, Provider commandManagerProvider) { - this.typeRegistry = commandTypeRegistry; - this.commandManagerProvider = commandManagerProvider; - } - - /** - * Generates unique command names. - * - * @param commandTypeId ID of the command type which display name should be used as part of the - * generated name - * @param customName desired name. If some command with {@code customName} already exists then - * generated name will be begin with {@code customName} - * @return command name - */ - String generate(String commandTypeId, @Nullable String customName) { - final Set existingNames = - commandManagerProvider - .get() - .getCommands() - .stream() - .map(CommandImpl::getName) - .collect(toSet()); - - String newName; - - if (isNullOrEmpty(customName)) { - Optional commandType = typeRegistry.getCommandTypeById(commandTypeId); - newName = "new"; - - if (commandType.isPresent()) { - newName = newName + commandType.get().getDisplayName(); - } - } else { - if (!existingNames.contains(customName)) { - return customName; - } - - newName = customName + " copy"; - } - - if (!existingNames.contains(newName)) { - return newName; - } - - for (int count = 1; count < 1000; count++) { - if (!existingNames.contains(newName + "-" + count)) { - return newName + "-" + count; - } - } - - return newName; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/ProjectCommandManagerDelegate.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/ProjectCommandManagerDelegate.java deleted file mode 100644 index bac953c9169..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/ProjectCommandManagerDelegate.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.manager; - -import static org.eclipse.che.api.project.shared.Constants.COMMANDS_ATTRIBUTE_NAME; - -import com.google.gwt.json.client.JSONException; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.api.workspace.shared.dto.CommandDto; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.util.loging.Log; - -/** Responsible for managing the commands which are stored with projects. */ -@Singleton -class ProjectCommandManagerDelegate { - - private final DtoFactory dtoFactory; - private final PromiseProvider promiseProvider; - - @Inject - ProjectCommandManagerDelegate(DtoFactory dtoFactory, PromiseProvider promiseProvider) { - this.dtoFactory = dtoFactory; - this.promiseProvider = promiseProvider; - } - - /** Returns commands for the specified {@code project}. */ - List getCommands(Project project) { - List attrValues = project.getAttributes(COMMANDS_ATTRIBUTE_NAME); - if (attrValues == null) { - return new ArrayList<>(); - } - - Map commands = new HashMap<>(attrValues.size()); - for (String commandJson : attrValues) { - try { - CommandDto commandDto = dtoFactory.createDtoFromJson(commandJson, CommandDto.class); - commands.put(commandDto.getName(), new CommandImpl(commandDto)); - } catch (JSONException e) { - Log.error( - ProjectCommandManagerDelegate.class, - "Unable to parse command of project '" - + project.getPath() - + "': " - + commandJson - + ". " - + e.getMessage()); - } - } - - return new ArrayList<>(commands.values()); - } - - /** - * Creates new command of the specified type. - * - *

        Note that command's name will be generated by {@link CommandManager} and command line - * will be provided by an appropriate {@link CommandType}. - */ - Promise createCommand(Project project, final CommandImpl newCommand) { - final List commands = getCommands(project); - - for (CommandImpl projectCommand : commands) { - if (projectCommand.getName().equals(newCommand.getName())) { - return promiseProvider.reject( - new Exception( - "Command '" - + newCommand.getName() - + "' is already associated to the project '" - + project.getName() - + "'")); - } - } - - commands.add(newCommand); - - return updateProject(project, commands).then((Function) arg -> newCommand); - } - - /** Updates the specified {@code project} with the given {@code commands}. */ - private Promise updateProject(Project project, List commands) { - MutableProjectConfig config = new MutableProjectConfig(project); - Map> attributes = config.getAttributes(); - - List attrValue = new ArrayList<>(attributes.size()); - for (CommandImpl command : commands) { - CommandDto commandDto = - dtoFactory - .createDto(CommandDto.class) - .withName(command.getName()) - .withType(command.getType()) - .withCommandLine(command.getCommandLine()) - .withAttributes(command.getAttributes()); - attrValue.add(dtoFactory.toJson(commandDto)); - } - - attributes.put(COMMANDS_ATTRIBUTE_NAME, attrValue); - - return project.update().withBody(config).send().then((Function) arg -> null); - } - - /** - * Updates the command with the specified {@code name} by replacing it with the given {@code - * command}. - * - *

        Note that name of the updated command may differ from the name provided by the given - * {@code command} in order to prevent name duplication. - */ - Promise updateCommand(Project project, final CommandImpl command) { - final List projectCommands = getCommands(project); - - if (projectCommands.isEmpty()) { - return promiseProvider.reject( - new Exception( - "Command '" - + command.getName() - + "' is not associated with the project '" - + project.getName() - + "'")); - } - - final List commandsToUpdate = new ArrayList<>(); - for (CommandImpl projectCommand : projectCommands) { - // skip existed command with the same name - if (!command.getName().equals(projectCommand.getName())) { - commandsToUpdate.add(projectCommand); - } - } - - commandsToUpdate.add(command); - - return updateProject(project, new ArrayList<>(commandsToUpdate)) - .then((Function) arg -> command); - } - - /** Removes the command with the specified {@code commandName}. */ - Promise removeCommand(Project project, String commandName) { - final List commands = getCommands(project); - - if (commands.isEmpty()) { - return promiseProvider.reject( - new Exception( - "Command '" - + commandName - + "' is not associated with the project '" - + project.getName() - + "'")); - } - - final List commandsToUpdate = new ArrayList<>(); - for (CommandImpl projectCommand : commands) { - if (!commandName.equals(projectCommand.getName())) { - commandsToUpdate.add(projectCommand); - } - } - - return updateProject(project, new ArrayList<>(commandsToUpdate)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/WorkspaceCommandManagerDelegate.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/WorkspaceCommandManagerDelegate.java deleted file mode 100644 index 742b04a2d96..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/manager/WorkspaceCommandManagerDelegate.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.manager; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.api.promises.client.Function; -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.command.CommandType; -import org.eclipse.che.ide.api.workspace.model.WorkspaceConfigImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.workspace.WorkspaceServiceClient; - -/** Responsible for managing the commands which are stored with workspace. */ -@Singleton -class WorkspaceCommandManagerDelegate { - - private final WorkspaceServiceClient workspaceServiceClient; - private final AppContext appContext; - private PromiseProvider promiseProvider; - - @Inject - WorkspaceCommandManagerDelegate( - WorkspaceServiceClient workspaceServiceClient, - AppContext appContext, - PromiseProvider promiseProvider) { - this.workspaceServiceClient = workspaceServiceClient; - this.appContext = appContext; - this.promiseProvider = promiseProvider; - } - - /** Returns commands which are stored in the current workspace. */ - List getCommands() { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final WorkspaceConfigImpl workspaceConfig = workspace.getConfig(); - - return workspaceConfig.getCommands(); - } - - /** Updates the commands. */ - Promise> fetchCommands() { - return workspaceServiceClient - .getWorkspace(appContext.getWorkspaceId()) - .thenPromise( - workspace -> { - updateWorkspace().apply(workspace); - return promiseProvider.resolve(getCommands()); - }); - } - - /** - * Creates new command of the specified type. - * - *

        Note that command's name will be generated by {@link CommandManager} and command line - * will be provided by an appropriate {@link CommandType}. - */ - Promise createCommand(final CommandImpl command) { - return workspaceServiceClient - .addCommand(appContext.getWorkspaceId(), command) - .then(updateWorkspace()); - } - - /** - * Updates the command with the specified {@code name} by replacing it with the given {@code - * command}. - * - *

        Note that name of the updated command may differ from the name provided by the given - * {@code command} in order to prevent name duplication. - */ - Promise updateCommand(final CommandImpl command) { - return workspaceServiceClient - .updateCommand(appContext.getWorkspaceId(), command.getName(), command) - .then(updateWorkspace()); - } - - /** Removes the command with the specified {@code commandName}. */ - Promise removeCommand(String commandName) { - return workspaceServiceClient - .deleteCommand(appContext.getWorkspaceId(), commandName) - .thenPromise( - arg -> - workspaceServiceClient - .getWorkspace(appContext.getWorkspaceId()) - .then(updateWorkspace())); - } - - private Function updateWorkspace() { - return workspace -> { - // update workspace model in AppContext because - // AppContext always must return an actual workspace model - ((AppContextImpl) appContext).setWorkspace(workspace); - - return null; - }; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/AbstractCommandNode.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/AbstractCommandNode.java deleted file mode 100644 index a111c14925b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/AbstractCommandNode.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.node; - -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.data.settings.NodeSettings; -import org.eclipse.che.ide.ui.smartTree.presentation.NodePresentation; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Abstract tree node that represents {@link CommandImpl}. */ -class AbstractCommandNode extends SyntheticNode { - - private final CommandUtils commandUtils; - - AbstractCommandNode(CommandImpl data, NodeSettings nodeSettings, CommandUtils commandUtils) { - super(data, nodeSettings); - - this.commandUtils = commandUtils; - } - - @Override - public void updatePresentation(NodePresentation presentation) { - presentation.setPresentableText(getName()); - - final SVGResource commandTypeIcon = commandUtils.getCommandTypeIcon(getData().getType()); - - if (commandTypeIcon != null) { - presentation.setPresentableIcon(commandTypeIcon); - } - } - - @Override - public String getName() { - return getData().getName(); - } - - @Override - public boolean isLeaf() { - return true; - } - - @Override - protected Promise> getChildrenImpl() { - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandFileNode.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandFileNode.java deleted file mode 100644 index af2a91cb477..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandFileNode.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.node; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.smartTree.data.HasAction; -import org.eclipse.che.ide.ui.smartTree.presentation.NodePresentation; - -/** - * Extension of {@link AbstractCommandNode} that also acts as a {@link VirtualFile} for using it in - * editor. - */ -public class CommandFileNode extends AbstractCommandNode implements HasAction, VirtualFile { - - /** Extension for the file type that represents a command. */ - public static final String FILE_TYPE_EXT = "che_command_internal"; - - private final EditorAgent editorAgent; - - @Inject - public CommandFileNode( - @Assisted CommandImpl data, CommandUtils commandUtils, EditorAgent editorAgent) { - super(data, null, commandUtils); - - this.editorAgent = editorAgent; - } - - @Override - public void updatePresentation(NodePresentation presentation) { - super.updatePresentation(presentation); - - presentation.setPresentableText(getDisplayName()); - presentation.setPresentableTextCss("overflow: hidden; text-overflow: ellipsis;"); - } - - @Override - public void actionPerformed() { - editorAgent.openEditor(this); - } - - @Override - public Path getLocation() { - return Path.valueOf("commands/" + getData().getType() + "/" + getData().getName()); - } - - @Override - public String getName() { - return getData().getName() + "." + FILE_TYPE_EXT; - } - - @Override - public String getDisplayName() { - return getData().getName(); - } - - @Override - public boolean isReadOnly() { - return false; - } - - @Override - public String getContentUrl() { - return null; - } - - @Override - public Promise getContent() { - return null; - } - - @Override - public Promise updateContent(String content) { - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandGoalNode.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandGoalNode.java deleted file mode 100644 index c7d73f33cf2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/CommandGoalNode.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.node; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.presentation.NodePresentation; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Tree node that represents {@link CommandGoal}. */ -public class CommandGoalNode extends SyntheticNode { - - private final List commands; - private final PromiseProvider promiseProvider; - private final CommandUtils commandUtils; - - @Inject - public CommandGoalNode( - @Assisted CommandGoal data, - @Assisted List commands, - PromiseProvider promiseProvider, - CommandUtils commandUtils) { - super(data, null); - - this.commands = commands; - this.promiseProvider = promiseProvider; - this.commandUtils = commandUtils; - } - - @Override - public void updatePresentation(NodePresentation presentation) { - presentation.setPresentableText(getName().toUpperCase() + " (" + commands.size() + ")"); - presentation.setPresentableTextCss("font-weight: bold;"); - - final SVGResource goalIcon = commandUtils.getCommandGoalIcon(getData().getId()); - if (goalIcon != null) { - presentation.setPresentableIcon(goalIcon); - } - } - - @Override - public String getName() { - return getData().getId(); - } - - @Override - public boolean isLeaf() { - return false; - } - - @Override - protected Promise> getChildrenImpl() { - List children = new ArrayList<>(); - children.addAll(commands); - - return promiseProvider.resolve(children); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/ExecutableCommandNode.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/ExecutableCommandNode.java deleted file mode 100644 index d6444dfc5ad..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/ExecutableCommandNode.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.node; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.ui.smartTree.data.HasAction; - -/** - * Extension of {@link AbstractCommandNode} that can execute a command when performing an action is - * requested. - */ -public class ExecutableCommandNode extends AbstractCommandNode implements HasAction { - - private final ActionDelegate actionDelegate; - - @Inject - public ExecutableCommandNode( - @Assisted CommandImpl data, - @Assisted ActionDelegate actionDelegate, - CommandUtils commandUtils) { - super(data, null, commandUtils); - - this.actionDelegate = actionDelegate; - } - - @Override - public void actionPerformed() { - actionDelegate.actionPerformed(); - } - - /** Interface for delegating performing action on node. */ - public interface ActionDelegate { - void actionPerformed(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/NodeFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/NodeFactory.java deleted file mode 100644 index 052d91b3b0e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/node/NodeFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.node; - -import java.util.List; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; - -/** Factory for different command tree nodes. */ -public interface NodeFactory { - - CommandGoalNode newCommandGoalNode( - CommandGoal data, List commands); - - ExecutableCommandNode newExecutableCommandNode( - CommandImpl command, ExecutableCommandNode.ActionDelegate actionDelegate); - - CommandFileNode newCommandFileNode(CommandImpl data); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPalettePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPalettePresenter.java deleted file mode 100644 index eb5d5275d72..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPalettePresenter.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.palette; - -import static java.util.Collections.emptyList; -import static org.eclipse.che.ide.util.StringUtils.containsIgnoreCase; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.core.model.workspace.Runtime; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.command.CommandUtils; -import org.eclipse.che.ide.machine.chooser.MachineChooser; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; - -/** - * Presenter for Commands Palette. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CommandsPalettePresenter implements CommandsPaletteView.ActionDelegate { - - private final CommandsPaletteView view; - private final CommandManager commandManager; - private final CommandExecutor commandExecutor; - private final DialogFactory dialogFactory; - private final AppContext appContext; - private final MachineChooser machineChooser; - private final CommandUtils commandUtils; - private final PaletteMessages messages; - - @Inject - public CommandsPalettePresenter( - CommandsPaletteView view, - CommandManager commandManager, - CommandExecutor commandExecutor, - DialogFactory dialogFactory, - AppContext appContext, - MachineChooser machineChooser, - CommandUtils commandUtils, - PaletteMessages messages) { - this.view = view; - this.commandManager = commandManager; - this.commandExecutor = commandExecutor; - this.dialogFactory = dialogFactory; - this.appContext = appContext; - this.machineChooser = machineChooser; - this.commandUtils = commandUtils; - this.messages = messages; - - view.setDelegate(this); - } - - public void showDialog() { - view.showDialog(); - view.setCommands(commandUtils.groupCommandsByGoal(commandManager.getCommands())); - } - - @Override - public void onFilterChanged(String filterValue) { - final List filteredCommands = commandManager.getCommands(); - - if (!filterValue.isEmpty()) { - filteredCommands.removeIf(command -> !containsIgnoreCase(command.getName(), filterValue)); - } - - view.setCommands(commandUtils.groupCommandsByGoal(filteredCommands)); - } - - @Override - public void onCommandExecute(CommandImpl command) { - view.close(); - - if (getMachines().isEmpty()) { - // should not happen, but let's play safe - dialogFactory.createMessageDialog("", messages.messageNoMachine(), null).show(); - } else { - machineChooser - .show() - .then( - machine -> { - commandExecutor.executeCommand(command, machine.getName()); - }); - } - } - - private List getMachines() { - final Runtime runtime = appContext.getWorkspace().getRuntime(); - - if (runtime != null) { - return new ArrayList<>(runtime.getMachines().values()); - } - - return emptyList(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteView.java deleted file mode 100644 index f24068cc7fc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteView.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.palette; - -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The view for {@link CommandsPalettePresenter}. - * - * @author Artem Zatsarynnyi - */ -public interface CommandsPaletteView extends View { - - /** Show the view. */ - void showDialog(); - - /** Close the view. */ - void close(); - - /** - * Sets the commands to display in the view. - * - * @param commands commands grouped by type - */ - void setCommands(Map> commands); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when filtering commands is requested. */ - void onFilterChanged(String filterValue); - - /** Called when command execution is requested. */ - void onCommandExecute(CommandImpl command); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.java deleted file mode 100644 index 3fe226ebe4d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.palette; - -import static com.google.gwt.event.dom.client.KeyCodes.KEY_DOWN; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_UP; -import static org.eclipse.che.ide.ui.smartTree.SelectionModel.Mode.SINGLE; -import static org.eclipse.che.ide.util.dom.Elements.createDivElement; -import static org.eclipse.che.ide.util.dom.Elements.createSpanElement; -import static org.eclipse.che.ide.util.dom.Elements.createTextNode; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Element; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import elemental.html.DivElement; -import elemental.html.SpanElement; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.command.node.CommandGoalNode; -import org.eclipse.che.ide.command.node.ExecutableCommandNode; -import org.eclipse.che.ide.command.node.NodeFactory; -import org.eclipse.che.ide.ui.smartTree.NodeLoader; -import org.eclipse.che.ide.ui.smartTree.NodeStorage; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.window.Window; - -/** Implementation of {@link CommandsPaletteView}. */ -@Singleton -public class CommandsPaletteViewImpl extends Window implements CommandsPaletteView { - - private static final CommandsPaletteViewImplUiBinder UI_BINDER = - GWT.create(CommandsPaletteViewImplUiBinder.class); - - private final NodeFactory nodeFactory; - - @UiField TextBox filterField; - - @UiField(provided = true) - Tree tree; - - @UiField Label hintLabel; - - private ActionDelegate delegate; - - @Inject - public CommandsPaletteViewImpl(NodeFactory nodeFactory, PaletteMessages messages) { - this.nodeFactory = nodeFactory; - - tree = new Tree(new NodeStorage(), new NodeLoader()); - tree.getSelectionModel().setSelectionMode(SINGLE); - - setWidget(UI_BINDER.createAndBindUi(this)); - setTitle(messages.viewTitle()); - - filterField.getElement().setAttribute("placeholder", messages.filterPlaceholder()); - initHintLabel(); - } - - private void initHintLabel() { - final SpanElement upKeyLabel = createKeyLabel(); - upKeyLabel.setInnerHTML(FontAwesome.ARROW_UP); - - final SpanElement downKeyLabel = createKeyLabel(); - downKeyLabel.setInnerHTML(FontAwesome.ARROW_DOWN); - - final SpanElement enterKeyLabel = createKeyLabel(); - enterKeyLabel.getStyle().setPadding("0px 1px 1px 4px"); - enterKeyLabel.setInnerText(" Enter "); - - final DivElement hintElement = createDivElement(); - hintElement.appendChild(upKeyLabel); - hintElement.appendChild(downKeyLabel); - hintElement.appendChild(createTextNode(" to select and ")); - hintElement.appendChild(enterKeyLabel); - hintElement.appendChild(createTextNode(" to execute")); - - hintLabel.getElement().appendChild((Element) hintElement); - } - - /** Creates an html element for displaying keyboard key. */ - private SpanElement createKeyLabel() { - SpanElement element = createSpanElement(); - - element.getStyle().setFontWeight("bold"); - element.getStyle().setPadding("0 4px 1px 4px"); - element.getStyle().setMargin("0 3px"); - element.getStyle().setBorderWidth("1px"); - element.getStyle().setBorderStyle("solid"); - element.getStyle().setProperty("border-radius", "3px"); - - return element; - } - - @Override - public void showDialog() { - show(filterField); - } - - @Override - protected void onShow() { - filterField.setValue(""); - } - - @Override - public void close() { - hide(); - } - - @Override - public void setCommands(Map> commands) { - renderCommands(commands); - } - - /** Render commands grouped by goals. */ - private void renderCommands(Map> commands) { - tree.getNodeStorage().clear(); - - for (Entry> entry : commands.entrySet()) { - List commandNodes = new ArrayList<>(entry.getValue().size()); - - for (final CommandImpl command : entry.getValue()) { - commandNodes.add( - nodeFactory.newExecutableCommandNode( - command, () -> delegate.onCommandExecute(command))); - } - - final CommandGoalNode commandGoalNode = - nodeFactory.newCommandGoalNode(entry.getKey(), commandNodes); - tree.getNodeStorage().add(commandGoalNode); - } - - tree.expandAll(); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @UiHandler({"filterField"}) - void onFilterChanged(KeyUpEvent event) { - switch (event.getNativeKeyCode()) { - case KEY_UP: - tree.getSelectionModel().selectPrevious(); - break; - case KEY_DOWN: - tree.getSelectionModel().selectNext(); - break; - case KEY_ENTER: - final List selectedNodes = tree.getSelectionModel().getSelectedNodes(); - - if (!selectedNodes.isEmpty()) { - final Node node = selectedNodes.get(0); - - if (node instanceof ExecutableCommandNode) { - delegate.onCommandExecute(((ExecutableCommandNode) node).getData()); - } else if (node instanceof CommandGoalNode) { - tree.setExpanded(node, !tree.isExpanded(node)); - } - } - break; - default: - delegate.onFilterChanged(filterField.getValue()); - } - } - - interface CommandsPaletteViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.ui.xml deleted file mode 100644 index dafe9194ab9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/CommandsPaletteViewImpl.ui.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - @eval partBackground org.eclipse.che.ide.api.theme.Style.theme.partBackground(); - @eval borderColor org.eclipse.che.ide.api.theme.Style.theme.getTextFieldBackgroundColor(); - - .tree { - border: 1px solid; - border-color: borderColor; - background-color: partBackground; - margin-top: 7px; - min-width: 99%; - } - - .hint-label { - margin: 7px auto; - } - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/PaletteMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/PaletteMessages.java deleted file mode 100644 index babc93fdf99..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/PaletteMessages.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.palette; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages for the Commands Palette. - * - * @author Artem Zatsarynnyi - */ -public interface PaletteMessages extends Messages { - - @Key("action.show_palette.title") - String actionShowPaletteTitle(); - - @Key("action.show_palette.description") - String actionShowPaletteDescription(); - - @Key("view.title") - String viewTitle(); - - @Key("view.filter.placeholder") - String filterPlaceholder(); - - @Key("view.hint.text") - String viewHintText(); - - @Key("message.no_machine") - String messageNoMachine(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/ShowCommandsPaletteAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/ShowCommandsPaletteAction.java deleted file mode 100644 index cc756f5d4a2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/palette/ShowCommandsPaletteAction.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.palette; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; - -/** - * Action for opening Commands Palette. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class ShowCommandsPaletteAction extends BaseAction { - - private final CommandsPalettePresenter presenter; - - @Inject - public ShowCommandsPaletteAction(PaletteMessages messages, CommandsPalettePresenter presenter) { - super(messages.actionShowPaletteTitle(), messages.actionShowPaletteDescription()); - - this.presenter = presenter; - } - - @Override - public void actionPerformed(ActionEvent e) { - presenter.showDialog(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerAction.java deleted file mode 100644 index 1163fb8dc64..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.producer; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandProducer; - -/** - * Action for executing command which produced by {@link CommandProducer}. - * - * @author Artem Zatsarynnyi - * @see CommandProducer - */ -public class CommandProducerAction extends BaseAction { - - private final CommandProducer commandProducer; - private final CommandExecutor commandExecutor; - - @Inject - public CommandProducerAction( - @Assisted String name, - @Assisted CommandProducer commandProducer, - CommandExecutor commandExecutor) { - super(name); - - this.commandProducer = commandProducer; - this.commandExecutor = commandExecutor; - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(commandProducer.isApplicable()); - } - - @Override - public void actionPerformed(ActionEvent e) { - CommandImpl command = commandProducer.createCommand(); - commandExecutor.executeCommand(command); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionFactory.java deleted file mode 100644 index 7e2e27761c2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionFactory.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.producer; - -import org.eclipse.che.ide.api.command.CommandProducer; - -/** Factory for creating {@link CommandProducerAction} instances. */ -public interface CommandProducerActionFactory { - - /** Creates action for executing command produced by the specified {@code commandProducer}. */ - CommandProducerAction create(String name, CommandProducer commandProducer); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionManager.java deleted file mode 100644 index fa024df63da..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/CommandProducerActionManager.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.producer; - -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_TOOLBAR; -import static org.eclipse.che.ide.api.constraints.Anchor.AFTER; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Set; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.command.CommandProducer; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.vectomatic.dom.svg.ui.SVGImage; - -/** - * Manages actions for the commands. - * - *

        Manager gets all registered {@link CommandProducer}s and creates related actions in context - * menus. - * - * @see CommandProducer - */ -@Singleton -public class CommandProducerActionManager { - - private final ActionManager actionManager; - private final CommandProducerActionFactory commandProducerActionFactory; - private final Resources resources; - private final ProducerMessages messages; - - private final Set commandProducers; - - private DefaultActionGroup commandActionsPopUpGroup; - - @Inject - public CommandProducerActionManager( - Set commandProducers, - EventBus eventBus, - ActionManager actionManager, - CommandProducerActionFactory commandProducerActionFactory, - Resources resources, - ProducerMessages messages) { - this.actionManager = actionManager; - this.commandProducerActionFactory = commandProducerActionFactory; - this.resources = resources; - this.messages = messages; - - this.commandProducers = new HashSet<>(); - - if (commandProducers != null) { - this.commandProducers.addAll(commandProducers); - } - - eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> init()); - } - - private void init() { - commandActionsPopUpGroup = - new DefaultActionGroup(messages.actionCommandsTitle(), true, actionManager); - actionManager.registerAction("commandActionsPopUpGroup", commandActionsPopUpGroup); - commandActionsPopUpGroup - .getTemplatePresentation() - .setImageElement(new SVGImage(resources.compile()).getElement()); - commandActionsPopUpGroup - .getTemplatePresentation() - .setDescription(messages.actionCommandsDescription()); - - DefaultActionGroup mainContextMenu = - (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_CONTEXT_MENU); - mainContextMenu.add(commandActionsPopUpGroup); - - DefaultActionGroup editorTabContextMenu = - (DefaultActionGroup) actionManager.getAction(GROUP_EDITOR_TAB_CONTEXT_MENU); - editorTabContextMenu.add(commandActionsPopUpGroup); - - // add 'Commands' pop-up group to the main toolbar - DefaultActionGroup commandActionsToolbarGroup = new CommandActionsToolbarGroup(actionManager); - commandActionsToolbarGroup.add(commandActionsPopUpGroup); - DefaultActionGroup mainToolbarGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_TOOLBAR); - mainToolbarGroup.add(commandActionsToolbarGroup, new Constraints(AFTER, "changeResourceGroup")); - - commandProducers.forEach(this::createActionsForProducer); - } - - /** Creates actions for the given {@link CommandProducer}. */ - private void createActionsForProducer(CommandProducer producer) { - BaseAction action = commandProducerActionFactory.create(producer.getName(), producer); - - actionManager.registerAction(producer.getName(), action); - - commandActionsPopUpGroup.add(action); - } - - /** - * Action group for placing {@link CommandProducerAction}s on the toolbar. It's visible when at - * least one {@link CommandProducerAction} exists. - */ - private class CommandActionsToolbarGroup extends DefaultActionGroup { - - CommandActionsToolbarGroup(ActionManager actionManager) { - super(actionManager); - } - - @Override - public void update(ActionEvent e) { - e.getPresentation().setEnabledAndVisible(commandActionsPopUpGroup.getChildrenCount() != 0); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/ProducerMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/ProducerMessages.java deleted file mode 100644 index 75002222adc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/producer/ProducerMessages.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.producer; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages for the command producers related UI. - * - * @author Artem Zatsarynnyi - */ -public interface ProducerMessages extends Messages { - - @Key("action.commands.title") - String actionCommandsTitle(); - - @Key("action.commands.description") - String actionCommandsDescription(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandCreationGuide.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandCreationGuide.java deleted file mode 100644 index b712c5dc5e1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandCreationGuide.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; -import org.eclipse.che.ide.command.goal.RunGoal; -import org.eclipse.che.ide.command.node.NodeFactory; - -/** - * Guides the user into the flow of creating a command and helps him to understand how he can - * configure his workspace's commands. - */ -@Singleton -public class CommandCreationGuide { - - private final Provider workspaceAgentProvider; - private final Provider commandsExplorerPresenterProvider; - private final CommandManager commandManager; - private final Provider editorAgentProvider; - private final NodeFactory nodeFactory; - private final RunGoal runGoal; - - @Inject - public CommandCreationGuide( - Provider workspaceAgentProvider, - Provider commandsExplorerPresenterProvider, - CommandManager commandManager, - Provider editorAgentProvider, - NodeFactory nodeFactory, - RunGoal runGoal) { - this.workspaceAgentProvider = workspaceAgentProvider; - this.commandsExplorerPresenterProvider = commandsExplorerPresenterProvider; - this.commandManager = commandManager; - this.editorAgentProvider = editorAgentProvider; - this.nodeFactory = nodeFactory; - this.runGoal = runGoal; - } - - /** Shows the guide of creating a command of the 'Run' goal. */ - public void guide() { - guide(runGoal); - } - - /** Shows the guide of creating a command of the specified {@code goal}. */ - public void guide(CommandGoal goal) { - workspaceAgentProvider.get().setActivePart(commandsExplorerPresenterProvider.get()); - - commandManager - .createCommand(goal.getId(), "custom") - .then( - command -> { - editorAgentProvider.get().openEditor(nodeFactory.newCommandFileNode(command)); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarPresenter.java deleted file mode 100644 index f43024a6038..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarPresenter.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.command.toolbar.commands.ExecuteCommandPresenter; -import org.eclipse.che.ide.command.toolbar.controller.ToolbarControllerPresenter; -import org.eclipse.che.ide.command.toolbar.previews.PreviewsPresenter; -import org.eclipse.che.ide.command.toolbar.processes.ProcessesListPresenter; -import org.eclipse.che.ide.command.toolbar.selector.PanelSelectorPresenter; - -/** Presenter for the commands toolbar. */ -@Singleton -public class CommandToolbarPresenter implements Presenter, CommandToolbarView.ActionDelegate { - - private final ProcessesListPresenter processesListPresenter; - private final PreviewsPresenter previewsPresenter; - private final ExecuteCommandPresenter executeCommandPresenter; - private final PanelSelectorPresenter panelSelectorPresenter; - private final ToolbarControllerPresenter toolbarControllerPresenter; - private final ToolbarButtonsFactory toolbarButtonsFactory; - private final CommandToolbarView view; - - private ToolbarButton openCommandsPaletteButton; - - @Inject - public CommandToolbarPresenter( - CommandToolbarView view, - ProcessesListPresenter processesListPresenter, - PreviewsPresenter previewsPresenter, - ExecuteCommandPresenter executeCommandPresenter, - PanelSelectorPresenter panelSelectorPresenter, - ToolbarControllerPresenter toolbarControllerPresenter, - ToolbarButtonsFactory toolbarButtonsFactory) { - this.view = view; - this.processesListPresenter = processesListPresenter; - this.previewsPresenter = previewsPresenter; - this.executeCommandPresenter = executeCommandPresenter; - this.panelSelectorPresenter = panelSelectorPresenter; - this.toolbarControllerPresenter = toolbarControllerPresenter; - this.toolbarButtonsFactory = toolbarButtonsFactory; - - initButtons(); - - view.setDelegate(this); - } - - private void initButtons() { - final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); - safeHtmlBuilder.appendHtmlConstant(FontAwesome.LIST); - - openCommandsPaletteButton = - toolbarButtonsFactory.createOpenPaletteButton(safeHtmlBuilder.toSafeHtml()); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - - executeCommandPresenter.go(view.getCommandsPanelContainer()); - processesListPresenter.go(view.getProcessesListContainer()); - previewsPresenter.go(view.getPreviewUrlsListContainer()); - - view.addButton(openCommandsPaletteButton); - - panelSelectorPresenter.go(view.getPanelSelectorContainer()); - - toolbarControllerPresenter.go(view.getToolbarControllerContainer()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarView.java deleted file mode 100644 index 713fd5430ce..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarView.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import org.eclipse.che.ide.api.mvp.View; - -/** View for command toolbar. */ -public interface CommandToolbarView extends View { - - AcceptsOneWidget getCommandsPanelContainer(); - - AcceptsOneWidget getProcessesListContainer(); - - AcceptsOneWidget getPreviewUrlsListContainer(); - - AcceptsOneWidget getPanelSelectorContainer(); - - AcceptsOneWidget getToolbarControllerContainer(); - - void addButton(ToolbarButton button); - - interface ActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.java deleted file mode 100644 index 4b3a5d779d5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import javax.inject.Inject; -import javax.inject.Singleton; - -/** Implementation of {@link CommandToolbarView}. */ -@Singleton -public class CommandToolbarViewImpl implements CommandToolbarView { - - private static final CommandToolbarViewImplUiBinder UI_BINDER = - GWT.create(CommandToolbarViewImplUiBinder.class); - - @UiField FlowPanel rootPanel; - @UiField SimplePanel commandsPanel; - @UiField SimplePanel processesListPanel; - @UiField SimplePanel panelSelectorPanel; - @UiField SimplePanel toolbarControllerPanel; - @UiField SimplePanel buttonsPanel; - @UiField SimplePanel previewUrlListPanel; - - private ActionDelegate delegate; - - @Inject - public CommandToolbarViewImpl() { - UI_BINDER.createAndBindUi(this); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Widget asWidget() { - return rootPanel; - } - - @Override - public AcceptsOneWidget getCommandsPanelContainer() { - return commandsPanel; - } - - @Override - public AcceptsOneWidget getProcessesListContainer() { - return processesListPanel; - } - - @Override - public AcceptsOneWidget getPreviewUrlsListContainer() { - return previewUrlListPanel; - } - - @Override - public AcceptsOneWidget getPanelSelectorContainer() { - return panelSelectorPanel; - } - - @Override - public AcceptsOneWidget getToolbarControllerContainer() { - return toolbarControllerPanel; - } - - @Override - public void addButton(ToolbarButton button) { - buttonsPanel.add(button); - } - - interface CommandToolbarViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.ui.xml deleted file mode 100644 index 3c5733cf06f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/CommandToolbarViewImpl.ui.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - .rootPanel { - margin-top: 5px; - } - - .commandsPanel { - float: left; - } - - .processesListPanel { - width: literal("calc(100% - 323px)"); - float: left; - margin-left: 15px; - } - - .buttonsPanel { - float: right; - margin-left: 0px; - margin-right: 3px; - } - - .previewUrlListPanel { - float: right; - margin-left: 0px; - margin-right: 3px; - } - - .panelSelectorPanel { - float: right; - margin-left: 0px; - margin-right: 3px; - } - - .toolbarControllerPanel { - float: right; - margin-left: 0px; - margin-right: 0px; - margin-top: -5px; - } - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/OpenCommandsPaletteButton.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/OpenCommandsPaletteButton.java deleted file mode 100644 index 9e1f0337afb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/OpenCommandsPaletteButton.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.MIDDLE; -import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; - -import com.google.gwt.safehtml.shared.SafeHtml; -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.assistedinject.Assisted; -import elemental.dom.Element; -import elemental.html.DivElement; -import elemental.html.SpanElement; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.command.palette.CommandsPalettePresenter; -import org.eclipse.che.ide.command.palette.PaletteMessages; -import org.eclipse.che.ide.command.palette.ShowCommandsPaletteAction; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; -import org.eclipse.che.ide.util.input.KeyMapUtil; - -/** Button for opening Commands Palette. */ -class OpenCommandsPaletteButton extends ToolbarButton { - - private final Provider actionManagerProvider; - private final Provider keyBindingAgentProvider; - - @Inject - OpenCommandsPaletteButton( - Provider commandsPalettePresenterProvider, - PaletteMessages messages, - Provider actionManagerProvider, - Provider keyBindingAgentProvider, - Provider showCommandsPaletteActionProvider, - @Assisted SafeHtml content) { - super(content); - - this.actionManagerProvider = actionManagerProvider; - this.keyBindingAgentProvider = keyBindingAgentProvider; - - addClickHandler(event -> commandsPalettePresenterProvider.get().showDialog()); - - // We need to get action's shortcut but action may not be registered yet. - // So postpone tooltip creation and wait 1 sec. while action will be registered. - new Timer() { - @Override - public void run() { - final DivElement divElement = Elements.createDivElement(); - divElement.setInnerText(messages.actionShowPaletteTitle()); - divElement.appendChild(getHotKey(showCommandsPaletteActionProvider.get())); - - Tooltip.create( - (Element) OpenCommandsPaletteButton.this.getElement(), BOTTOM, MIDDLE, divElement); - } - }.schedule(1000); - - ensureDebugId("button-open_command_palette"); - } - - private SpanElement getHotKey(Action action) { - final SpanElement spanElement = Elements.createSpanElement(); - spanElement.getStyle().setMarginLeft("5px"); - spanElement.getStyle().setColor("#aaaaaa"); - - final String actionId = actionManagerProvider.get().getId(action); - final CharCodeWithModifiers keyBinding = keyBindingAgentProvider.get().getKeyBinding(actionId); - final String hotKey = KeyMapUtil.getShortcutText(keyBinding); - - if (hotKey != null) { - spanElement.setInnerText("[" + hotKey + "]"); - } - - return spanElement; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButton.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButton.java deleted file mode 100644 index 2284840d9d2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButton.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Document; -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.safehtml.shared.SafeHtml; -import com.google.gwt.user.client.ui.FocusWidget; - -/** Button for the commands toolbar. */ -class ToolbarButton extends FocusWidget { - - private static final Resources RESOURCES; - - ToolbarButton(SafeHtml content) { - super(Document.get().createDivElement()); - getElement().setInnerSafeHtml(content); - addStyleName(RESOURCES.css().button()); - } - - public interface Resources extends ClientBundle { - @Source({"button.css", "org/eclipse/che/ide/api/ui/style.css"}) - Css css(); - } - - public interface Css extends CssResource { - String button(); - } - - static { - RESOURCES = GWT.create(Resources.class); - RESOURCES.css().ensureInjected(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButtonsFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButtonsFactory.java deleted file mode 100644 index e983831f629..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarButtonsFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.safehtml.shared.SafeHtml; - -/** Factory for the buttons placed on Commands Toolbar. */ -public interface ToolbarButtonsFactory { - - OpenCommandsPaletteButton createOpenPaletteButton(SafeHtml content); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarMessages.java deleted file mode 100644 index e3ba53c00fe..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/ToolbarMessages.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages for the Command Toolbar. - * - * @author Artem Zatsarynnyi - */ -public interface ToolbarMessages extends Messages { - - @Key("guide.label") - String guideItemLabel(String goalName); - - @Key("goal_button.tooltip.no_command") - String goalButtonTooltipNoCommand(String goalId); - - @Key("goal_button.tooltip.choose_command") - String goalButtonTooltipChooseCommand(String goalId); - - @Key("goal_button.tooltip.execute") - String goalButtonTooltipExecute(String commandName); - - @Key("goal_button.tooltip.execute_on_machine") - String goalButtonTooltipExecuteOnMachine(String commandName, String machineName); - - @Key("previews.tooltip") - String previewsTooltip(); - - @Key("previews.no_previews") - String previewsNoPreviews(); - - @Key("previews.error.not_available") - String previewsNotAvailableError(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandPresenter.java deleted file mode 100644 index 404aafd5b53..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandPresenter.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandAddedEvent; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.CommandRemovedEvent; -import org.eclipse.che.ide.api.command.CommandUpdatedEvent; -import org.eclipse.che.ide.api.command.CommandsLoadedEvent; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.command.goal.DebugGoal; -import org.eclipse.che.ide.command.goal.RunGoal; -import org.eclipse.che.ide.command.toolbar.CommandCreationGuide; - -/** Presenter drives the UI for executing commands. */ -@Singleton -public class ExecuteCommandPresenter implements Presenter, ExecuteCommandView.ActionDelegate { - - private final ExecuteCommandView view; - private final Provider commandExecutorProvider; - private final CommandCreationGuide commandCreationGuide; - - /** Command goals to display in the view. */ - private final Set goals; - - @Inject - public ExecuteCommandPresenter( - ExecuteCommandView view, - CommandManager commandManager, - Provider commandExecutorProvider, - CommandCreationGuide commandCreationGuide, - RunGoal runGoal, - DebugGoal debugGoal, - EventBus eventBus) { - this.view = view; - this.commandExecutorProvider = commandExecutorProvider; - this.commandCreationGuide = commandCreationGuide; - - view.setDelegate(this); - - goals = new HashSet<>(); - goals.add(runGoal); - goals.add(debugGoal); - - eventBus.addHandler( - CommandsLoadedEvent.getType(), e -> commandManager.getCommands().forEach(view::addCommand)); - eventBus.addHandler(CommandAddedEvent.getType(), e -> view.addCommand(e.getCommand())); - eventBus.addHandler(CommandRemovedEvent.getType(), e -> view.removeCommand(e.getCommand())); - eventBus.addHandler( - CommandUpdatedEvent.getType(), - e -> { - view.removeCommand(e.getInitialCommand()); - view.addCommand(e.getUpdatedCommand()); - }); - } - - @Override - public void go(AcceptsOneWidget container) { - view.setGoals(goals); - - container.setWidget(view); - } - - @Override - public void onCommandExecute(CommandImpl command) { - commandExecutorProvider.get().executeCommand(command); - } - - @Override - public void onCommandExecute(CommandImpl command, MachineImpl machine) { - commandExecutorProvider.get().executeCommand(command, machine.getName()); - } - - @Override - public void onGuide(CommandGoal goal) { - commandCreationGuide.guide(goal); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandView.java deleted file mode 100644 index 9b24ac99810..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandView.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands; - -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** View for {@link ExecuteCommandPresenter}. */ -public interface ExecuteCommandView extends View { - - /** Set command goals which commands may be added to the view. */ - void setGoals(Set goals); - - /** Add command to the view. */ - void addCommand(CommandImpl command); - - /** Remove command from the view. */ - void removeCommand(CommandImpl command); - - interface ActionDelegate { - - /** Called when command execution has been requested. */ - void onCommandExecute(CommandImpl command); - - /** Called when command execution has been requested on the specified machine. */ - void onCommandExecute(CommandImpl command, MachineImpl machine); - - /** Called when guide of commands creation has been requested. */ - void onGuide(CommandGoal goal); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandViewImpl.java deleted file mode 100644 index 8dcf2ed13f0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/ExecuteCommandViewImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands; - -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.keybinding.KeyBuilder; -import org.eclipse.che.ide.command.goal.DebugGoal; -import org.eclipse.che.ide.command.goal.RunGoal; -import org.eclipse.che.ide.command.toolbar.commands.button.ExecuteCommandButton; -import org.eclipse.che.ide.command.toolbar.commands.button.ExecuteCommandButtonFactory; -import org.eclipse.che.ide.command.toolbar.commands.button.ExecuteCommandButtonItemsProvider; -import org.eclipse.che.ide.ui.menubutton.MenuButton; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** - * Implementation of {@link ExecuteCommandView} uses {@link MenuButton}s for displaying commands - * grouped by goals. Allows to choose command from the {@link MenuButton}'s dropdown menu. - */ -@Singleton -public class ExecuteCommandViewImpl implements ExecuteCommandView { - - /** Stores created buttons by goals. */ - private final Map goalButtons; - - private final FlowPanel buttonsPanel; - - private final ExecuteCommandButtonFactory buttonFactory; - private final RunGoal runGoal; - private final DebugGoal debugGoal; - - private ActionDelegate delegate; - - @Inject - public ExecuteCommandViewImpl( - ExecuteCommandButtonFactory buttonFactory, RunGoal runGoal, DebugGoal debugGoal) { - this.buttonFactory = buttonFactory; - this.runGoal = runGoal; - this.debugGoal = debugGoal; - - goalButtons = new HashMap<>(); - buttonsPanel = new FlowPanel(); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Widget asWidget() { - return buttonsPanel; - } - - @Override - public void setGoals(Set goals) { - goals.forEach(this::createButton); - } - - /** Creates {@link ExecuteCommandButton} for the given goal and adds button to the panel. */ - private void createButton(CommandGoal goal) { - ExecuteCommandButton button = buttonFactory.newButton(goal, delegate, getKeyBinding(goal)); - goalButtons.put(goal.getId(), button); - - button.updateTooltip(); - - buttonsPanel.add(button); - } - - @Override - public void addCommand(CommandImpl command) { - final ExecuteCommandButton button = goalButtons.get(command.getGoal()); - - if (button == null) { - return; - } - - ExecuteCommandButtonItemsProvider itemsProvider = button.getItemsProvider(); - itemsProvider.addCommand(command); - - button.updateTooltip(); - } - - @Override - public void removeCommand(CommandImpl command) { - final ExecuteCommandButton button = goalButtons.get(command.getGoal()); - - if (button == null) { - return; - } - - ExecuteCommandButtonItemsProvider itemsProvider = button.getItemsProvider(); - itemsProvider.removeCommand(command); - - button.updateTooltip(); - } - - @Nullable - private CharCodeWithModifiers getKeyBinding(CommandGoal goal) { - if (goal.equals(runGoal)) { - return new KeyBuilder().alt().charCode('r').build(); - } else if (goal.equals(debugGoal)) { - return new KeyBuilder().alt().charCode('d').build(); - } - - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/AbstractMenuItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/AbstractMenuItem.java deleted file mode 100644 index e44d2d1c754..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/AbstractMenuItem.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.ui.menubutton.MenuItem; - -/** An abstract {@link MenuItem} for {@link ExecuteCommandButton}s. */ -public abstract class AbstractMenuItem implements MenuItem { - - private final CommandImpl command; - - protected AbstractMenuItem(CommandImpl command) { - this.command = command; - } - - public CommandImpl getCommand() { - return command; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/CommandItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/CommandItem.java deleted file mode 100644 index 5b435d17291..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/CommandItem.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.ui.menubutton.MenuItem; - -/** A {@link MenuItem} represents {@link CommandImpl}. */ -public class CommandItem extends AbstractMenuItem { - - @Inject - public CommandItem(@Assisted CommandImpl command) { - super(command); - } - - @Override - public String getName() { - return getCommand().getName(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButton.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButton.java deleted file mode 100644 index e52137545b8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButton.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.MIDDLE; -import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; -import static org.eclipse.che.ide.util.input.KeyMapUtil.getShortcutText; - -import com.google.gwt.safehtml.shared.SafeHtml; -import elemental.dom.Element; -import elemental.html.DivElement; -import elemental.html.SpanElement; -import java.util.Optional; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.menubutton.MenuButton; -import org.eclipse.che.ide.ui.menubutton.MenuItem; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** {@link MenuButton} allows to chose a command for execution. */ -public class ExecuteCommandButton extends MenuButton { - - private static final String ACTION_PREFIX = "execute_command_"; - - private final CommandGoal goal; - private final ToolbarMessages messages; - private final CharCodeWithModifiers keyBinding; - - private Tooltip tooltip; - private String tooltipText; - - ExecuteCommandButton( - CommandGoal goal, - SafeHtml icon, - ExecuteCommandButtonItemsProvider itemsProvider, - ToolbarMessages messages, - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - @Nullable CharCodeWithModifiers keyBinding) { - super(icon, itemsProvider); - - this.goal = goal; - this.messages = messages; - this.keyBinding = keyBinding; - - if (keyBinding != null) { - actionManager.registerAction(ACTION_PREFIX + goal.getId(), new ExecuteDefaultCommandAction()); - keyBindingAgent.getGlobal().addKey(keyBinding, ACTION_PREFIX + goal.getId()); - } - } - - public ExecuteCommandButtonItemsProvider getItemsProvider() { - return (ExecuteCommandButtonItemsProvider) itemsProvider; - } - - /** Updates button's tooltip depending on it's state (what child elements it contains). */ - public void updateTooltip() { - final Optional defaultItem = itemsProvider.getDefaultItem(); - - if (defaultItem.isPresent()) { - MenuItem menuItem = defaultItem.get(); - String message = ""; - if (menuItem instanceof CommandItem) { - message = messages.goalButtonTooltipExecute(menuItem.getName()); - } else if (menuItem instanceof MachineItem) { - MachineItem machineMenuItem = (MachineItem) menuItem; - message = - messages.goalButtonTooltipExecuteOnMachine( - machineMenuItem.getCommand().getName(), machineMenuItem.getName()); - } - - setTooltip(message, keyBinding); - } else if (getItemsProvider().containsGuideItemOnly()) { - setTooltip(messages.goalButtonTooltipNoCommand(goal.getId()), null); - } else { - setTooltip(messages.goalButtonTooltipChooseCommand(goal.getId()), null); - } - } - - private void setTooltip(String newTooltipText, @Nullable CharCodeWithModifiers keyBinding) { - if (newTooltipText.equals(tooltipText)) { - return; - } - - tooltipText = newTooltipText; - - if (tooltip != null) { - tooltip.destroy(); - } - - final DivElement divElement = Elements.createDivElement(); - divElement.setInnerText(newTooltipText); - - if (keyBinding != null) { - final String hotKey = getShortcutText(keyBinding); - if (hotKey != null) { - SpanElement spanElement = Elements.createSpanElement(); - spanElement.getStyle().setMarginLeft("5px"); - spanElement.getStyle().setColor("#aaaaaa"); - spanElement.setInnerText("[" + hotKey + "]"); - - divElement.appendChild(spanElement); - } - } - - tooltip = Tooltip.create((Element) getElement(), BOTTOM, MIDDLE, divElement); - } - - private class ExecuteDefaultCommandAction extends BaseAction { - - ExecuteDefaultCommandAction() { - super("Execute default command of " + goal.getId() + " goal"); - } - - @Override - public void actionPerformed(ActionEvent e) { - itemsProvider - .getDefaultItem() - .ifPresent( - defaultItem -> - getActionHandler().ifPresent(handler -> handler.onAction(defaultItem))); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonFactory.java deleted file mode 100644 index 3e899e3a564..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonFactory.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import com.google.gwt.safehtml.shared.SafeHtml; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.goal.DebugGoal; -import org.eclipse.che.ide.command.goal.RunGoal; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.command.toolbar.commands.ExecuteCommandView.ActionDelegate; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; - -/** Factory for {@link ExecuteCommandButton}s. */ -@Singleton -public class ExecuteCommandButtonFactory { - - private final CommandResources resources; - private final Resources ideResources; - private final AppContext appContext; - private final MenuItemsFactory menuItemsFactory; - private final ActionManager actionManager; - private final KeyBindingAgent keyBindingAgent; - private final ToolbarMessages messages; - private final RunGoal runGoal; - private final DebugGoal debugGoal; - - @Inject - public ExecuteCommandButtonFactory( - CommandResources resources, - AppContext appContext, - MenuItemsFactory menuItemsFactory, - ToolbarMessages messages, - RunGoal runGoal, - DebugGoal debugGoal, - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Resources ideResources) { - this.resources = resources; - this.appContext = appContext; - this.menuItemsFactory = menuItemsFactory; - this.messages = messages; - this.runGoal = runGoal; - this.debugGoal = debugGoal; - this.actionManager = actionManager; - this.keyBindingAgent = keyBindingAgent; - this.ideResources = ideResources; - } - - /** - * Creates new instance of the {@link ExecuteCommandButton}. - * - * @param goal {@link CommandGoal} for displaying commands - * @param delegate delegate for receiving events - * @param keyBinding key binding for the button - * @return {@link ExecuteCommandButton} - */ - public ExecuteCommandButton newButton( - CommandGoal goal, ActionDelegate delegate, @Nullable CharCodeWithModifiers keyBinding) { - final ExecuteCommandButtonItemsProvider itemsProvider = - new ExecuteCommandButtonItemsProvider(appContext, menuItemsFactory, goal); - final ExecuteCommandButton button = - new ExecuteCommandButton( - goal, - getIconForGoal(goal), - itemsProvider, - messages, - actionManager, - keyBindingAgent, - keyBinding); - - button.setActionHandler( - item -> { - if (item instanceof CommandItem) { - final CommandImpl command = ((CommandItem) item).getCommand(); - - delegate.onCommandExecute(command); - itemsProvider.setDefaultItem(item); - button.updateTooltip(); - } else if (item instanceof MachineItem) { - final MachineItem machinePopupItem = (MachineItem) item; - - delegate.onCommandExecute(machinePopupItem.getCommand(), machinePopupItem.getMachine()); - itemsProvider.setDefaultItem(item); - button.updateTooltip(); - } else if (item instanceof GuideItem) { - delegate.onGuide(goal); - } - }); - - button.addStyleName(resources.commandToolbarCss().toolbarButton()); - - button.ensureDebugId("command_toolbar-button_" + goal.getId()); - - return button; - } - - /** Returns {@link FontAwesome} icon for the given goal. */ - private SafeHtml getIconForGoal(CommandGoal goal) { - final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); - - if (goal.equals(runGoal)) { - safeHtmlBuilder.appendHtmlConstant( - ""); - } else if (goal.equals(debugGoal)) { - safeHtmlBuilder.appendHtmlConstant( - ""); - } - - return safeHtmlBuilder.toSafeHtml(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonItemsProvider.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonItemsProvider.java deleted file mode 100644 index 0a42120f315..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/ExecuteCommandButtonItemsProvider.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import static java.util.Optional.ofNullable; -import static java.util.stream.Collectors.toList; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.ui.menubutton.ItemsProvider; -import org.eclipse.che.ide.ui.menubutton.MenuItem; -import org.eclipse.che.ide.util.Pair; - -/** Provides items for {@link ExecuteCommandButton}. */ -public class ExecuteCommandButtonItemsProvider implements ItemsProvider { - - private final AppContext appContext; - private final MenuItemsFactory menuItemsFactory; - private final CommandGoal goal; - private final Set commands; - - private DataChangedHandler dataChangedHandler; - private MenuItem defaultItem; - - ExecuteCommandButtonItemsProvider( - AppContext appContext, MenuItemsFactory menuItemsFactory, CommandGoal goal) { - this.appContext = appContext; - this.menuItemsFactory = menuItemsFactory; - this.goal = goal; - this.commands = new HashSet<>(); - } - - @Override - public Optional getDefaultItem() { - return ofNullable(defaultItem); - } - - void setDefaultItem(MenuItem item) { - defaultItem = item; - } - - @Override - public List getItems() { - final List items = new ArrayList<>(commands.size()); - - if (defaultItem != null && defaultItem instanceof MachineItem) { - items.add(menuItemsFactory.newMachineItem((MachineItem) defaultItem)); - } - - for (CommandImpl command : commands) { - items.add(menuItemsFactory.newCommandItem(command)); - } - - if (items.isEmpty()) { - items.add(menuItemsFactory.newGuideItem(goal)); - } - - return items; - } - - @Override - public boolean isGroup(MenuItem item) { - if (item instanceof CommandItem) { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime != null) { - return runtime.getMachines().size() > 1; - } - } - - return false; - } - - @Override - public Pair, String> getChildren(MenuItem parent) { - List items = new ArrayList<>(); - - if (parent instanceof CommandItem) { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime != null) { - final CommandImpl command = ((CommandItem) parent).getCommand(); - final Map machines = runtime.getMachines(); - - items.addAll( - machines - .values() - .stream() - .map(machine -> menuItemsFactory.newMachineItem(command, machine)) - .collect(toList())); - } - } - - return Pair.of(items, null); - } - - @Override - public void setDataChangedHandler(DataChangedHandler handler) { - dataChangedHandler = handler; - } - - /** Adds the given {@code command} to the provider. */ - public void addCommand(CommandImpl command) { - commands.add(command); - - if (dataChangedHandler != null) { - dataChangedHandler.onDataChanged(); - } - } - - /** Removes the given {@code command} from the provider. */ - public void removeCommand(CommandImpl command) { - commands.remove(command); - - // reset the defaultItem - if (defaultItem instanceof CommandItem) { - final CommandImpl cmd = ((CommandItem) defaultItem).getCommand(); - if (cmd.equals(command)) { - defaultItem = null; - } - } - - if (dataChangedHandler != null) { - dataChangedHandler.onDataChanged(); - } - } - - /** Checks whether the {@link GuideItem} is the only item which provider contains. */ - boolean containsGuideItemOnly() { - List items = getItems(); - - return items.isEmpty() || (items.size() == 1 && items.get(0) instanceof GuideItem); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/GuideItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/GuideItem.java deleted file mode 100644 index 51bc9522deb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/GuideItem.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.ui.menubutton.MenuItem; - -/** - * A {@link MenuItem} represents a hint which guides the user into the flow of creating a command. - */ -public class GuideItem implements MenuItem { - - private final ToolbarMessages messages; - private final CommandGoal goal; - - @Inject - public GuideItem(ToolbarMessages messages, @Assisted CommandGoal goal) { - this.messages = messages; - this.goal = goal; - } - - @Override - public String getName() { - return messages.guideItemLabel(goal.getId()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MachineItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MachineItem.java deleted file mode 100644 index 3cfbb877e12..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MachineItem.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Item contains {@link CommandImpl} and {@link MachineImpl}. */ -public class MachineItem extends AbstractMenuItem { - - private final MachineImpl machine; - private final String name; - - @AssistedInject - public MachineItem(@Assisted CommandImpl command, @Assisted MachineImpl machine) { - super(command); - - this.machine = machine; - this.name = machine.getName(); - } - - @AssistedInject - public MachineItem(@Assisted MachineItem item) { - super(item.getCommand()); - - this.machine = item.machine; - this.name = getCommand().getName() + " on " + machine.getName(); - } - - @Override - public String getName() { - return name; - } - - public MachineImpl getMachine() { - return machine; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MenuItemsFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MenuItemsFactory.java deleted file mode 100644 index a819b38eafc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/commands/button/MenuItemsFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.commands.button; - -import org.eclipse.che.ide.api.command.CommandGoal; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.ui.menubutton.MenuItem; - -/** Factory for {@link MenuItem}s for {@link ExecuteCommandButton}. */ -public interface MenuItemsFactory { - - GuideItem newGuideItem(CommandGoal goal); - - CommandItem newCommandItem(CommandImpl command); - - MachineItem newMachineItem(CommandImpl command, MachineImpl machine); - - MachineItem newMachineItem(MachineItem item); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerMenu.java deleted file mode 100644 index 69af96b9058..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerMenu.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.controller; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.menu.ContextMenu; - -/** Manages toolbar controller menu based on context menu. */ -@Singleton -public class ToolbarControllerMenu extends ContextMenu { - - @Inject - public ToolbarControllerMenu( - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - super(actionManager, keyBindingAgent, managerProvider); - } - - @Override - protected String getGroupMenu() { - return IdeActions.GROUP_TOOLBAR_CONTROLLER; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerPresenter.java deleted file mode 100644 index d5a12b5e4fd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerPresenter.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.controller; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** Manages visibility of Toolbar. */ -@Singleton -public class ToolbarControllerPresenter implements Presenter, ToolbarControllerView.ActionDelegate { - - private ToolbarControllerView view; - private ToolbarControllerMenu toolbarControllerMenu; - - @Inject - public ToolbarControllerPresenter( - ToolbarControllerView view, ToolbarControllerMenu toolbarControllerMenu) { - this.view = view; - this.toolbarControllerMenu = toolbarControllerMenu; - view.setDelegate(this); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public void showMenu(int mouseX, int mouseY) { - toolbarControllerMenu.show(mouseX, mouseY); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerView.java deleted file mode 100644 index 12e65cc2e3b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerView.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.controller; - -import org.eclipse.che.ide.api.mvp.View; - -/** Represents button in the top menu for managing the Toolbar. */ -public interface ToolbarControllerView extends View { - - interface ActionDelegate { - - /** Shows menu by clicking on selector button. */ - void showMenu(int mouseX, int mouseY); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.java deleted file mode 100644 index 23e40f014d3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.controller; - -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; - -/** Top menu widget implementing ToolbarControllerView. */ -@Singleton -public class ToolbarControllerViewImpl extends Composite implements ToolbarControllerView { - - interface ToolbarControllerViewImplUiBinder extends UiBinder {} - - private ActionDelegate delegate; - - @Inject - public ToolbarControllerViewImpl(ToolbarControllerViewImplUiBinder uiBinder) { - initWidget(uiBinder.createAndBindUi(this)); - - addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent clickEvent) { - int left = getAbsoluteLeft(getWidget().getElement()); - int top = getAbsoluteTop(getWidget().getElement()); - delegate.showMenu(left + 20, top + 35); - } - }, - ClickEvent.getType()); - } - - /** - * Returns absolute left position of the element. - * - * @param element element - * @return element left position - */ - private native int getAbsoluteLeft(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().left; - }-*/; - - /** - * Returns absolute top position of the element. - * - * @param element element - * @return element top position - */ - private native int getAbsoluteTop(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().top; - }-*/; - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.ui.xml deleted file mode 100644 index 68509ac97c1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/controller/ToolbarControllerViewImpl.ui.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - .selector { - position: relative; - width: 21px; - height: 34px; - background-color: toolbarControllerBackground; - box-sizing: border-box; - border-top: toolbarControllerTopColor 1px solid; - border-left: toolbarControllerLeftColor 1px solid; - cursor: pointer; - } - - .selector:hover > div { - background-color: #a4acc1; - } - - .box1, - .box2, - .box3 { - position: absolute; - width: 3px; - height: 3px; - background-color: #8e95a9; - left: 9px; - } - - .box1 { - top: 9px; - } - - .box2 { - top: 14px; - } - - .box3 { - top: 19px; - } - - - - - - - - - - - - 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 deleted file mode 100644 index a75c75e2d53..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrl.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.previews; - -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Optional; -import org.eclipse.che.api.core.model.workspace.runtime.Server; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** Represents an item for displaying in the 'Previews' list. */ -class PreviewUrl { - - private final String url; - private final String displayName; - private final WsAgentServerUtil wsAgentServerUtil; - - PreviewUrl(String url, WsAgentServerUtil wsAgentServerUtil) { - this.url = url; - this.wsAgentServerUtil = wsAgentServerUtil; - 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 Optional devMachine = wsAgentServerUtil.getWsAgentServerMachine(); - - if (!devMachine.isPresent()) { - return previewUrl; - } - - for (Entry entry : devMachine.get().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.get().getName() + ':' + 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/PreviewUrlItemRenderer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java deleted file mode 100644 index 3a92db35b39..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewUrlItemRenderer.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.previews; - -import static com.google.gwt.dom.client.Style.Unit.PX; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.ui.dropdown.BaseListItem; -import org.eclipse.che.ide.ui.dropdown.DropdownListItemRenderer; - -/** - * Renders widgets for the 'Previews' list. Always returns the same 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 Widget listWidget; - - PreviewUrlItemRenderer(BaseListItem item) { - this.item = item; - } - - @Override - public Widget renderHeaderWidget() { - return HEADER_WIDGET; - } - - @Override - public Widget renderListWidget() { - if (listWidget == null) { - listWidget = new Label(item.getValue().getDisplayName()); - listWidget.getElement().getStyle().setMarginBottom(0, PX); - } - - return listWidget; - } - - private static class HeaderWidget extends Label { - - private static final CommandResources RESOURCES = GWT.create(CommandResources.class); - - HeaderWidget() { - super(); - - addStyleName(RESOURCES.commandToolbarCss().previewUrlWidget()); - - final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); - safeHtmlBuilder.appendHtmlConstant(FontAwesome.BULLSEYE); - getElement().setInnerSafeHtml(safeHtmlBuilder.toSafeHtml()); - } - } -} 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 deleted file mode 100644 index 72c00026e28..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsPresenter.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.previews; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.agent.exec.shared.dto.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.command.CommandsLoadedEvent; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.command.exec.ProcessFinishedEvent; -import org.eclipse.che.ide.api.command.exec.ProcessStartedEvent; -import org.eclipse.che.ide.api.macro.MacroProcessor; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.util.browser.BrowserUtils; - -/** Drives the UI for displaying preview URLs of the running processes. */ -@Singleton -public class PreviewsPresenter implements Presenter, PreviewsView.ActionDelegate { - - private final PreviewsView view; - private final ExecAgentCommandManager execAgentClient; - private final CommandManager commandManager; - private final AppContext appContext; - private final Provider macroProcessorProvider; - private final PromiseProvider promiseProvider; - private final ToolbarMessages messages; - - @Inject - public PreviewsPresenter( - PreviewsView view, - ExecAgentCommandManager execAgentClient, - CommandManager commandManager, - AppContext appContext, - EventBus eventBus, - Provider macroProcessorProvider, - PromiseProvider promiseProvider, - ToolbarMessages messages) { - this.view = view; - this.execAgentClient = execAgentClient; - this.commandManager = commandManager; - this.appContext = appContext; - this.macroProcessorProvider = macroProcessorProvider; - this.promiseProvider = promiseProvider; - this.messages = messages; - - view.setDelegate(this); - - eventBus.addHandler(ProcessStartedEvent.TYPE, event -> updateView()); - eventBus.addHandler(ProcessFinishedEvent.TYPE, event -> updateView()); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, e -> updateView()); - eventBus.addHandler(CommandsLoadedEvent.getType(), e -> updateView()); - } - - /** Updates view with the preview URLs of running processes. */ - private void updateView() { - view.removeAllURLs(); - - final RuntimeImpl runtime = appContext.getWorkspace().getRuntime(); - - if (runtime == null) { - return; - } - - runtime - .getMachines() - .keySet() - .stream() - .map(machineName -> execAgentClient.getProcesses(machineName, false)) - .forEach( - promise -> - promise.onSuccess( - processes -> - processes - .stream() - .map(GetProcessesResponseDto::getName) - .map(this::getPreviewUrlByName) - .forEach(it -> it.then(view::addUrl)))); - } - - /** - * 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 getPreviewUrlByName(String name) { - return commandManager - .getCommand(name) - .map(CommandImpl::getPreviewURL) - .filter(it -> !it.isEmpty()) - .map(s -> macroProcessorProvider.get().expandMacros(s)) - .orElseGet(() -> promiseProvider.resolve(messages.previewsNotAvailableError())); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public void onUrlChosen(String previewUrl) { - BrowserUtils.openInNewTab(previewUrl); - } -} 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 deleted file mode 100644 index 55cd4964691..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsView.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.previews; - -import org.eclipse.che.ide.api.mvp.View; - -/** View for displaying the preview URLs. */ -public interface PreviewsView extends View { - - /** Add preview URL to the view. */ - void addUrl(String previewUrl); - - /** Remove preview URL from the view. */ - void removeUrl(String previewUrl); - - /** Remove all preview URLs from the view. */ - void removeAllURLs(); - - interface ActionDelegate { - - /** Called when preview URL has been chosen. */ - 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 deleted file mode 100644 index 0363bbba5db..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/previews/PreviewsViewImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.previews; - -import static org.eclipse.che.ide.command.toolbar.previews.PreviewUrlItemRenderer.HEADER_WIDGET; -import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.MIDDLE; -import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; - -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import elemental.dom.Element; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.dropdown.BaseListItem; -import org.eclipse.che.ide.ui.dropdown.DropdownList; -import org.eclipse.che.ide.ui.dropdown.StringItemRenderer; - -/** Implementation of {@link PreviewsView} that displays preview URLs in a dropdown list. */ -@Singleton -public class PreviewsViewImpl implements PreviewsView { - - /** Mapping of URL to list item. */ - private final Map> listItems; - - private final DropdownList dropdownList; - private final NoPreviewsItem noPreviewsItem; - private final NoPreviewsItemRenderer noPreviewsItemRenderer; - private final ToolbarMessages messages; - private final WsAgentServerUtil wsAgentServerUtil; - - private ActionDelegate delegate; - - @Inject - public PreviewsViewImpl(ToolbarMessages messages, WsAgentServerUtil wsAgentServerUtil) { - this.messages = messages; - this.wsAgentServerUtil = wsAgentServerUtil; - - listItems = new HashMap<>(); - - dropdownList = new DropdownList(HEADER_WIDGET, false); - dropdownList.setWidth("43px"); - dropdownList.ensureDebugId("dropdown-preview_url"); - - dropdownList.setSelectionHandler( - item -> - listItems - .entrySet() - .stream() - .filter(entry -> item.equals(entry.getValue())) - .findAny() - .ifPresent(entry -> delegate.onUrlChosen(entry.getKey()))); - - noPreviewsItem = new NoPreviewsItem(); - noPreviewsItemRenderer = new NoPreviewsItemRenderer(); - checkNoPreviewsItem(); - - Tooltip.create((Element) dropdownList.getElement(), BOTTOM, MIDDLE, messages.previewsTooltip()); - } - - private void checkNoPreviewsItem() { - if (listItems.isEmpty()) { - dropdownList.addItem(noPreviewsItem, noPreviewsItemRenderer); - } else { - dropdownList.removeItem(noPreviewsItem); - } - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Widget asWidget() { - return dropdownList; - } - - @Override - public void addUrl(String previewUrl) { - if (listItems.containsKey(previewUrl)) { - return; - } - - final PreviewUrl displayablePreviewUrl = new PreviewUrl(previewUrl, wsAgentServerUtil); - final BaseListItem listItem = new BaseListItem<>(displayablePreviewUrl); - final PreviewUrlItemRenderer renderer = new PreviewUrlItemRenderer(listItem); - - listItems.put(previewUrl, listItem); - dropdownList.addItem(listItem, renderer); - - checkNoPreviewsItem(); - } - - @Override - public void removeUrl(String previewUrl) { - final BaseListItem listItem = listItems.remove(previewUrl); - - if (listItem != null) { - dropdownList.removeItem(listItem); - - checkNoPreviewsItem(); - } - } - - @Override - public void removeAllURLs() { - listItems.clear(); - dropdownList.clear(); - - checkNoPreviewsItem(); - } - - private class NoPreviewsItem extends BaseListItem { - NoPreviewsItem() { - super(messages.previewsNoPreviews()); - } - } - - private class NoPreviewsItemRenderer extends StringItemRenderer { - NoPreviewsItemRenderer() { - super(noPreviewsItem); - } - - @Override - public Widget renderHeaderWidget() { - return HEADER_WIDGET; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ActivateProcessOutputEvent.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ActivateProcessOutputEvent.java deleted file mode 100644 index db739ed82df..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ActivateProcessOutputEvent.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Event for activating particular process's output panel. */ -public class ActivateProcessOutputEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final int pid; - - /** Creates new event with the given PID. */ - public ActivateProcessOutputEvent(int pid) { - this.pid = pid; - } - - public int getPid() { - return pid; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onActivateProcessOutput(this); - } - - public interface Handler extends EventHandler { - - /** Called when activating process's output is requested. */ - void onActivateProcessOutput(ActivateProcessOutputEvent event); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/EmptyListWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/EmptyListWidget.java deleted file mode 100644 index 738f9c6a4aa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/EmptyListWidget.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.InlineHTML; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.command.CommandResources; - -/** - * Empty state widget for processes list. - * - * @see org.eclipse.che.ide.ui.dropdown.DropdownList#DropdownList(Widget) - */ -@Singleton -class EmptyListWidget extends FlowPanel { - - @Inject - EmptyListWidget(CommandResources resources) { - addStyleName(resources.commandToolbarCss().processWidgetText()); - - final Label commandNameLabel = new InlineHTML("Ready"); - commandNameLabel.addStyleName(resources.commandToolbarCss().processWidgetCommandNameLabel()); - - final Label machineNameLabel = new InlineHTML("  - start command"); - machineNameLabel.addStyleName(resources.commandToolbarCss().processWidgetMachineNameLabel()); - - add(commandNameLabel); - add(machineNameLabel); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/Process.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/Process.java deleted file mode 100644 index a3106a94301..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/Process.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -/** Model of the process. */ -public interface Process { - - String getName(); - - String getCommandLine(); - - int getPid(); - - boolean isAlive(); - - String getMachineName(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessImpl.java deleted file mode 100644 index 6518c85103b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import java.util.Objects; - -/** Data object for {@link Process}. */ -public class ProcessImpl implements Process { - - private final String commandName; - private final String commandLine; - private final int pid; - private final boolean alive; - private final String machineName; - - public ProcessImpl( - String commandName, String commandLine, int pid, boolean alive, String machineName) { - this.commandName = commandName; - this.commandLine = commandLine; - this.pid = pid; - this.alive = alive; - this.machineName = machineName; - } - - @Override - public String getName() { - return commandName; - } - - @Override - public String getCommandLine() { - return commandLine; - } - - @Override - public int getPid() { - return pid; - } - - @Override - public boolean isAlive() { - return alive; - } - - @Override - public String getMachineName() { - return machineName; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ProcessImpl process = (ProcessImpl) o; - - return pid == process.pid - && alive == process.alive - && Objects.equals(commandName, process.commandName) - && Objects.equals(commandLine, process.commandLine) - && Objects.equals(machineName, process.machineName); - } - - @Override - public int hashCode() { - return Objects.hash(commandName, commandLine, pid, alive, machineName); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessItemRenderer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessItemRenderer.java deleted file mode 100644 index 9f89151f2e9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessItemRenderer.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.user.client.ui.Widget; -import org.eclipse.che.ide.ui.dropdown.BaseListItem; -import org.eclipse.che.ide.ui.dropdown.DropdownListItemRenderer; - -/** Renders widgets for representing a {@link Process}. */ -class ProcessItemRenderer implements DropdownListItemRenderer { - - private final BaseListItem item; - private final StopProcessHandler stopHandler; - private final RerunProcessHandler reRunHandler; - - private ProcessWidget headerWidget; - private ProcessWidget listWidget; - - ProcessItemRenderer( - BaseListItem listItem, - StopProcessHandler stopProcessHandler, - RerunProcessHandler reRunProcessHandler) { - item = listItem; - stopHandler = stopProcessHandler; - reRunHandler = reRunProcessHandler; - } - - @Override - public Widget renderHeaderWidget() { - if (headerWidget == null) { - headerWidget = new ProcessWidget(item, stopHandler, reRunHandler); - } - - return headerWidget; - } - - @Override - public Widget renderListWidget() { - if (listWidget == null) { - listWidget = new ProcessWidget(item, stopHandler, reRunHandler); - } - - return listWidget; - } - - /** Informs rendered widgets that related process has been stopped. */ - void notifyProcessStopped() { - headerWidget.toggleStopped(); - listWidget.toggleStopped(); - } - - interface StopProcessHandler { - /** Called when stopping {@code process} is requested. */ - void onStopProcess(Process process); - } - - interface RerunProcessHandler { - /** Called when rerunning {@code process} is requested. */ - void onRerunProcess(Process process); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessOutputClosedEvent.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessOutputClosedEvent.java deleted file mode 100644 index 717337a307e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessOutputClosedEvent.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; - -/** Event fired when process's output panel has been closed. */ -public class ProcessOutputClosedEvent extends GwtEvent { - - public static final Type TYPE = new Type<>(); - - private final int pid; - - /** Creates new event with the given PID. */ - public ProcessOutputClosedEvent(int pid) { - this.pid = pid; - } - - /** PID of the associated process. */ - public int getPid() { - return pid; - } - - @Override - public Type getAssociatedType() { - return TYPE; - } - - @Override - protected void dispatch(Handler handler) { - handler.onProcessOutputClosed(this); - } - - public interface Handler extends EventHandler { - - /** Called when process's output panel has been closed. */ - void onProcessOutputClosed(ProcessOutputClosedEvent event); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessWidget.java deleted file mode 100644 index 86abc34beba..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessWidget.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import static com.google.gwt.safehtml.shared.SimpleHtmlSanitizer.sanitizeHtml; -import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.MIDDLE; -import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; - -import com.google.gwt.core.client.Duration; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Document; -import com.google.gwt.safehtml.shared.SafeHtml; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.FocusWidget; -import com.google.gwt.user.client.ui.InlineHTML; -import com.google.gwt.user.client.ui.Label; -import elemental.dom.Element; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.toolbar.processes.ProcessItemRenderer.RerunProcessHandler; -import org.eclipse.che.ide.command.toolbar.processes.ProcessItemRenderer.StopProcessHandler; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.dropdown.BaseListItem; - -/** - * Widget for representing a {@link Process}. Has different states for representing stopped and - * running processes. - */ -class ProcessWidget extends FlowPanel { - - private static final CommandResources RESOURCES = GWT.create(CommandResources.class); - - private final Label pidLabel; - private final Label durationLabel; - private final ActionButton stopButton; - private final ActionButton reRunButton; - private final Timer updateDurationTimer; - - /** Stores true if widget displays stopped process and false for running process. */ - private boolean stopped; - - ProcessWidget( - BaseListItem item, - StopProcessHandler stopProcessHandler, - RerunProcessHandler rerunProcessHandler) { - super(); - - final Process process = item.getValue(); - stopped = !process.isAlive(); - - durationLabel = new Label(); - durationLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); - durationLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetPidLabel()); - durationLabel.ensureDebugId("dropdown-processes-label-duration"); - - updateDurationTimer = new UpdateDurationTimer(); - if (!stopped) { - updateDurationTimer.scheduleRepeating(1000); - } - - pidLabel = new Label('#' + Integer.toString(process.getPid())); - pidLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); - pidLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetPidLabel()); - pidLabel.ensureDebugId("dropdown-processes-label-pid"); - Tooltip.create((Element) pidLabel.getElement(), BOTTOM, MIDDLE, "PID"); - - add(createMachineNameLabel(process)); - add(createCommandNameLabel(process)); - add(stopButton = createStopButton(process, stopProcessHandler)); - add(reRunButton = createRerunButton(process, rerunProcessHandler)); - add(durationLabel); - add(pidLabel); - - checkStopped(); - } - - private Label createMachineNameLabel(Process process) { - final Label label = new InlineHTML(sanitizeHtml(process.getMachineName()) + ": "); - - label.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); - label.addStyleName(RESOURCES.commandToolbarCss().processWidgetMachineNameLabel()); - label.ensureDebugId("dropdown-processes-machine-name"); - - Tooltip.create( - (Element) label.getElement(), BOTTOM, MIDDLE, process.getCommandLine().split("\\n")); - - return label; - } - - private Label createCommandNameLabel(Process process) { - final Label label = new InlineHTML(sanitizeHtml(process.getName())); - - label.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); - label.addStyleName(RESOURCES.commandToolbarCss().processWidgetCommandNameLabel()); - label.ensureDebugId("dropdown-processes-command-name"); - - Tooltip.create( - (Element) label.getElement(), BOTTOM, MIDDLE, process.getCommandLine().split("\\n")); - - return label; - } - - private ActionButton createStopButton(Process process, StopProcessHandler handler) { - final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); - safeHtmlBuilder.appendHtmlConstant(FontAwesome.STOP); - - final ActionButton button = new ActionButton(safeHtmlBuilder.toSafeHtml()); - button.addClickHandler( - event -> { - event.stopPropagation(); // prevent dropdown list from opening/closing - handler.onStopProcess(process); - }); - button.ensureDebugId("dropdown-processes-stop"); - - Tooltip.create((Element) button.getElement(), BOTTOM, MIDDLE, "Stop"); - - return button; - } - - private ActionButton createRerunButton(Process process, RerunProcessHandler handler) { - final SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder(); - safeHtmlBuilder.appendHtmlConstant(FontAwesome.REPEAT); - - final ActionButton button = new ActionButton(safeHtmlBuilder.toSafeHtml()); - button.addClickHandler( - event -> { - event.stopPropagation(); // prevent dropdown list from opening/closing - handler.onRerunProcess(process); - }); - button.ensureDebugId("dropdown-processes-rerun"); - - Tooltip.create((Element) button.getElement(), BOTTOM, MIDDLE, "Re-run"); - - return button; - } - - /** Toggle widget's state for displaying running or stopped process. */ - void toggleStopped() { - stopped = !stopped; - checkStopped(); - updateDurationTimer.cancel(); - } - - /** - * Check whether widget displays stopped or running process and changes widget's state if it's - * required. - */ - private void checkStopped() { - pidLabel.setVisible(!stopped); - reRunButton.setVisible(stopped); - stopButton.setVisible(!stopped); - } - - private static class ActionButton extends FocusWidget { - ActionButton(SafeHtml content) { - super(Document.get().createDivElement()); - - getElement().setInnerSafeHtml(content); - asWidget().addStyleName(RESOURCES.commandToolbarCss().processWidgetActionButton()); - } - } - - /** Timer that updates duration label. */ - private class UpdateDurationTimer extends Timer { - final Duration duration = new Duration(); - - @Override - public void run() { - durationLabel.setText(getElapsedTime()); - } - - /** Returns the time (mm:ss) that have elapsed since this timer was created. */ - private String getElapsedTime() { - final int elapsedSec = duration.elapsedMillis() / 1000; - final int minutesPart = elapsedSec / 60; - final int secondsPart = elapsedSec - minutesPart * 60; - - return (minutesPart < 10 ? "0" + minutesPart : minutesPart) - + ":" - + (secondsPart < 10 ? "0" + secondsPart : secondsPart); - } - - @Override - public void cancel() { - super.cancel(); - - durationLabel.setVisible(false); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListPresenter.java deleted file mode 100644 index fe75f909538..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListPresenter.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashMap; -import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.agent.exec.shared.dto.GetProcessesResponseDto; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandManager; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.command.exec.ProcessFinishedEvent; -import org.eclipse.che.ide.api.command.exec.ProcessStartedEvent; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.command.toolbar.CommandCreationGuide; - -/** Drives the UI for displaying processes list. */ -@Singleton -public class ProcessesListPresenter implements Presenter, ProcessesListView.ActionDelegate { - - private final ProcessesListView view; - private final EventBus eventBus; - private final ExecAgentCommandManager execAgentClient; - private final AppContext appContext; - private final CommandManager commandManager; - private final Provider commandExecutorProvider; - private final CommandCreationGuide commandCreationGuide; - - private final Map runningProcesses; - - @Inject - public ProcessesListPresenter( - ProcessesListView view, - EventBus eventBus, - ExecAgentCommandManager execAgentClient, - AppContext appContext, - CommandManager commandManager, - Provider commandExecutorProvider, - CommandCreationGuide commandCreationGuide) { - this.view = view; - this.eventBus = eventBus; - this.execAgentClient = execAgentClient; - this.appContext = appContext; - this.commandManager = commandManager; - this.commandExecutorProvider = commandExecutorProvider; - this.commandCreationGuide = commandCreationGuide; - - view.setDelegate(this); - - runningProcesses = new HashMap<>(); - - addEventHandlers(); - } - - private void addEventHandlers() { - eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> updateView()); - - eventBus.addHandler( - WorkspaceStoppedEvent.TYPE, - e -> { - runningProcesses.clear(); - view.clearList(); - }); - - eventBus.addHandler( - ProcessStartedEvent.TYPE, - event -> addProcessToList(event.getProcessID(), event.getMachineName())); - - eventBus.addHandler( - ProcessFinishedEvent.TYPE, - event -> { - Process process = runningProcesses.get(event.getProcessID()); - - if (process != null) { - view.processStopped(process); - } - }); - - eventBus.addHandler( - ProcessOutputClosedEvent.TYPE, - event -> { - Process process = runningProcesses.get(event.getPid()); - - if (process != null) { - view.removeProcess(process); - } - }); - } - - /** Updates view with all running processes. */ - private void updateView() { - view.clearList(); - runningProcesses.clear(); - - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime == null) { - return; - } - - for (MachineImpl machine : runtime.getMachines().values()) { - execAgentClient - .getProcesses(machine.getName(), false) - .onSuccess( - processes -> { - for (GetProcessesResponseDto p : processes) { - final Process process = - new ProcessImpl( - p.getName(), - p.getCommandLine(), - p.getPid(), - p.isAlive(), - machine.getName()); - runningProcesses.put(process.getPid(), process); - - view.addProcess(process); - } - }); - } - } - - /** - * Adds process to the view. - * - * @param pid PID of the process to add to the view - * @param machineName machine where process were run or currently running - */ - private void addProcessToList(int pid, String machineName) { - execAgentClient - .getProcess(machineName, pid) - .onSuccess( - processDto -> { - final Process process = - new ProcessImpl( - processDto.getName(), - processDto.getCommandLine(), - processDto.getPid(), - processDto.isAlive(), - machineName); - runningProcesses.put(process.getPid(), process); - - view.addProcess(process); - }); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public void onProcessChosen(Process process) { - eventBus.fireEvent(new ActivateProcessOutputEvent(process.getPid())); - } - - @Override - public void onReRunProcess(Process process) { - commandManager - .getCommand(process.getName()) - .ifPresent( - command -> - commandExecutorProvider.get().executeCommand(command, process.getMachineName())); - } - - @Override - public void onStopProcess(Process process) { - execAgentClient.killProcess(process.getMachineName(), process.getPid()); - } - - @Override - public void onCreateCommand() { - commandCreationGuide.guide(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListView.java deleted file mode 100644 index 9c1ae46412f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListView.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import org.eclipse.che.ide.api.mvp.View; - -/** View for {@link ProcessesListPresenter}. */ -public interface ProcessesListView extends View { - - /** Add process to the list. */ - void addProcess(Process process); - - /** Remove process from the list. */ - void removeProcess(Process process); - - /** Clear processes list. */ - void clearList(); - - /** Informs view that the specified {@code process} has been stopped. */ - void processStopped(Process process); - - /** Switches widget into loading mode. */ - void setLoadMode(); - - /** Sets new value of progress bar for loading mode. */ - void setLoadingProgress(int percents); - - /** Sets new text for loading mode. */ - void setLoadingMessage(String message); - - /** Switches widget into execution mode. */ - void setExecMode(); - - interface ActionDelegate { - - /** Called when process has been chosen. */ - void onProcessChosen(Process process); - - /** Called when rerunning process is requested. */ - void onReRunProcess(Process process); - - /** Called when stopping process is requested. */ - void onStopProcess(Process process); - - /** Called when new command creation is requested. */ - void onCreateCommand(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListViewImpl.java deleted file mode 100644 index cca7639f80a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/processes/ProcessesListViewImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.processes; - -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.Map; -import javax.inject.Inject; -import org.eclipse.che.ide.command.CommandResources; -import org.eclipse.che.ide.command.toolbar.ToolbarMessages; -import org.eclipse.che.ide.ui.dropdown.BaseListItem; -import org.eclipse.che.ide.ui.dropdown.DropdownList; -import org.eclipse.che.ide.ui.dropdown.StringItemRenderer; - -/** Implementation of {@link ProcessesListView} that displays processes in a dropdown list. */ -@Singleton -public class ProcessesListViewImpl implements ProcessesListView { - - private final Map> listItems; - private final Map renderers; - private final FlowPanel rootPanel; - private final DropdownList dropdownList; - private final CommandResources resources; - private final EmptyListWidget emptyListWidget; - private final ToolbarMessages messages; - private final CreateCommandItem createCommandItem; - private final CreateCommandItemRenderer createCommandItemRenderer; - - private ActionDelegate delegate; - - private final Label execLabel; - private final FlowPanel loadAnimation; - - private FlowPanel loadInfo; - private FlowPanel loadingLabel; - private FlowPanel loadingProgress; - - @Inject - public ProcessesListViewImpl( - CommandResources resources, EmptyListWidget emptyListWidget, ToolbarMessages messages) { - this.resources = resources; - this.emptyListWidget = emptyListWidget; - this.messages = messages; - - listItems = new HashMap<>(); - renderers = new HashMap<>(); - - execLabel = new Label("EXEC"); - execLabel.addStyleName(resources.commandToolbarCss().processesListExecLabel()); - - loadAnimation = getAnimationWidget(); - - dropdownList = new DropdownList(emptyListWidget, true); - dropdownList.setWidth("100%"); - dropdownList.ensureDebugId("dropdown-processes"); - dropdownList.setSelectionHandler( - item -> { - if (item instanceof CreateCommandItem) { - delegate.onCreateCommand(); - } else { - listItems - .entrySet() - .stream() - .filter(entry -> item.equals(entry.getValue())) - .forEach(entry -> delegate.onProcessChosen(entry.getKey())); - } - }); - - rootPanel = new FlowPanel(); - rootPanel.add(execLabel); - rootPanel.add(loadAnimation); - rootPanel.add(dropdownList); - - createCommandItem = new CreateCommandItem(); - createCommandItemRenderer = new CreateCommandItemRenderer(); - checkCreateCommandItem(); - - loadInfo = new FlowPanel(); - loadInfo.setStyleName(resources.commandToolbarCss().loaderPanel()); - rootPanel.add(loadInfo); - - loadingLabel = new FlowPanel(); - loadingLabel.setStyleName(resources.commandToolbarCss().loaderPanelLabel()); - loadInfo.add(loadingLabel); - - loadingProgress = new FlowPanel(); - loadingProgress.setStyleName(resources.commandToolbarCss().loaderPanelProgressBar()); - loadInfo.add(loadingProgress); - } - - /** - * Creates an animation widget containing three animated vertical bars. - * - * @return animation widget - */ - private FlowPanel getAnimationWidget() { - FlowPanel animation = new FlowPanel(); - animation.addStyleName(resources.commandToolbarCss().processesListLoader()); - - FlowPanel bar1 = new FlowPanel(); - bar1.addStyleName(resources.commandToolbarCss().processesListLoaderBar1()); - animation.add(bar1); - - FlowPanel bar2 = new FlowPanel(); - bar2.addStyleName(resources.commandToolbarCss().processesListLoaderBar2()); - animation.add(bar2); - - FlowPanel bar3 = new FlowPanel(); - bar3.addStyleName(resources.commandToolbarCss().processesListLoaderBar3()); - animation.add(bar3); - - return animation; - } - - @Override - public void setLoadMode() { - execLabel.getElement().getStyle().setDisplay(Style.Display.NONE); - dropdownList.getElement().getStyle().setDisplay(Style.Display.NONE); - - loadAnimation.getElement().getStyle().setDisplay(Style.Display.BLOCK); - loadInfo.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK); - } - - @Override - public void setExecMode() { - execLabel.getElement().getStyle().clearDisplay(); - dropdownList.getElement().getStyle().clearDisplay(); - - loadAnimation.getElement().getStyle().clearDisplay(); - loadInfo.getElement().getStyle().clearDisplay(); - } - - @Override - public void setLoadingProgress(int percents) { - loadingProgress.getElement().getStyle().setWidth(percents, Style.Unit.PCT); - } - - @Override - public void setLoadingMessage(String message) { - loadingLabel.getElement().setInnerHTML(message); - } - - /** - * Ensures that item for creating command added to the empty list or removed from non empty list. - */ - private void checkCreateCommandItem() { - if (listItems.isEmpty()) { - dropdownList.addItem(createCommandItem, createCommandItemRenderer); - } else { - dropdownList.removeItem(createCommandItem); - } - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Widget asWidget() { - return rootPanel; - } - - @Override - public void clearList() { - dropdownList.clear(); - - checkCreateCommandItem(); - } - - @Override - public void processStopped(Process process) { - final ProcessItemRenderer renderer = renderers.get(process); - - if (renderer != null) { - renderer.notifyProcessStopped(); - } - } - - @Override - public void addProcess(Process process) { - final BaseListItem listItem = new BaseListItem<>(process); - final ProcessItemRenderer renderer = - new ProcessItemRenderer( - listItem, p -> delegate.onStopProcess(p), p -> delegate.onReRunProcess(p)); - - listItems.put(process, listItem); - renderers.put(process, renderer); - - dropdownList.addItem(listItem, renderer); - - checkCreateCommandItem(); - } - - @Override - public void removeProcess(Process process) { - final BaseListItem listItem = listItems.get(process); - - if (listItem != null) { - listItems.remove(process); - renderers.remove(process); - - dropdownList.removeItem(listItem); - - checkCreateCommandItem(); - } - } - - private class CreateCommandItem extends BaseListItem { - CreateCommandItem() { - super(messages.guideItemLabel("new")); - } - } - - private class CreateCommandItemRenderer extends StringItemRenderer { - CreateCommandItemRenderer() { - super(createCommandItem); - } - - @Override - public Widget renderHeaderWidget() { - return emptyListWidget; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorPresenter.java deleted file mode 100644 index c3b3a682755..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorPresenter.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.selector; - -import static org.eclipse.che.ide.api.parts.PartStack.State.HIDDEN; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackStateChangedEvent; -import org.eclipse.che.ide.api.parts.PartStackType; -import org.eclipse.che.ide.api.parts.Perspective; -import org.eclipse.che.ide.api.parts.PerspectiveManager; - -/** Presenter to manage Panel selector widget and perspective layout. */ -@Singleton -public class PanelSelectorPresenter implements Presenter, PanelSelectorView.ActionDelegate { - - private PanelSelectorView view; - private PerspectiveManager perspectiveManager; - - @Inject - public PanelSelectorPresenter( - PanelSelectorView view, PerspectiveManager perspectiveManager, EventBus eventBus) { - this.view = view; - this.perspectiveManager = perspectiveManager; - - view.setDelegate(this); - - eventBus.addHandler( - PartStackStateChangedEvent.TYPE, - new PartStackStateChangedEvent.Handler() { - @Override - public void onPartStackStateChanged(PartStackStateChangedEvent event) { - updateButtonState(); - } - }); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public void onButtonClicked() { - view.showPopup(); - } - - @Override - public void onSelectorLeftClicked() { - showPanels(true, false, false); - } - - @Override - public void onSelectorLeftBottomClicked() { - showPanels(true, true, false); - } - - @Override - public void onSelectorFullEditorClicked() { - showPanels(false, false, false); - } - - @Override - public void onSelectorBottomClicked() { - showPanels(false, true, false); - } - - @Override - public void onSelectorRightClicked() { - showPanels(false, false, true); - } - - @Override - public void onSelectorLeftRightBottomClicked() { - showPanels(true, true, true); - } - - /** - * Sets new visibility for left, bottom and right panels. - * - * @param left left panel - * @param bottom bottom panel - * @param right right panel - */ - private void showPanels(boolean left, boolean bottom, boolean right) { - Perspective perspective = perspectiveManager.getActivePerspective(); - if (perspective == null) { - return; - } - - PartStack editorPartStack = perspective.getPartStack(PartStackType.EDITING); - editorPartStack.restore(); - - PartStack leftPartStack = perspective.getPartStack(PartStackType.NAVIGATION); - PartStack bottomPartStack = perspective.getPartStack(PartStackType.INFORMATION); - PartStack rightPartStack = perspective.getPartStack(PartStackType.TOOLING); - - if (left) { - if (HIDDEN == leftPartStack.getPartStackState()) { - leftPartStack.show(); - } else { - leftPartStack.restore(); - } - } else { - leftPartStack.hide(); - } - - if (bottom) { - if (HIDDEN == bottomPartStack.getPartStackState()) { - bottomPartStack.show(); - } else { - bottomPartStack.restore(); - } - } else { - bottomPartStack.hide(); - } - - if (right) { - if (HIDDEN == rightPartStack.getPartStackState()) { - rightPartStack.show(); - } else { - rightPartStack.restore(); - } - } else { - rightPartStack.hide(); - } - - updateButtonState(); - - // set focus to the active editor if it exists - editorPartStack.openPreviousActivePart(); - } - - /** Updates icon for panel selector button displaying the current state of panels. */ - private void updateButtonState() { - Perspective perspective = perspectiveManager.getActivePerspective(); - if (perspective == null) { - return; - } - - PartStack leftPartStack = perspective.getPartStack(PartStackType.NAVIGATION); - PartStack bottomPartStack = perspective.getPartStack(PartStackType.INFORMATION); - PartStack rightPartStack = perspective.getPartStack(PartStackType.TOOLING); - - if (leftPartStack == null || bottomPartStack == null || rightPartStack == null) { - return; - } - - if (HIDDEN != leftPartStack.getPartStackState() - && HIDDEN == bottomPartStack.getPartStackState() - && HIDDEN == rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.LEFT); - } else if (HIDDEN != leftPartStack.getPartStackState() - && HIDDEN != bottomPartStack.getPartStackState() - && HIDDEN == rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.LEFT_BOTTOM); - } else if (HIDDEN == leftPartStack.getPartStackState() - && HIDDEN == bottomPartStack.getPartStackState() - && HIDDEN == rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.FULL_EDITOR); - } else if (HIDDEN == leftPartStack.getPartStackState() - && HIDDEN != bottomPartStack.getPartStackState() - && HIDDEN == rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.BOTTOM); - } else if (HIDDEN == leftPartStack.getPartStackState() - && HIDDEN == bottomPartStack.getPartStackState() - && HIDDEN != rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.RIGHT); - } else if (HIDDEN != leftPartStack.getPartStackState() - && HIDDEN != bottomPartStack.getPartStackState() - && HIDDEN != rightPartStack.getPartStackState()) { - view.setState(PanelSelectorView.State.LEFT_RIGHT_BOTTOM); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorView.java deleted file mode 100644 index 1a1da2d9a1d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorView.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.selector; - -import org.eclipse.che.ide.api.mvp.View; - -/** Interface for panel selector menu button. */ -public interface PanelSelectorView extends View { - - /** State of the button. Icon on the menu button depends directly on the state. */ - enum State { - LEFT, - LEFT_BOTTOM, - FULL_EDITOR, - BOTTOM, - RIGHT, - LEFT_RIGHT_BOTTOM - } - - /** - * Sets new state for the button and updates the icon. - * - * @param state new state - */ - void setState(State state); - - /** Shows selector popup. */ - void showPopup(); - - /** Hides selector popup. */ - void hidePopup(); - - interface ActionDelegate { - - /** Handle clicking on selector button. */ - void onButtonClicked(); - - /** Selected button displaying left panel. */ - void onSelectorLeftClicked(); - - /** Selected button displaying left and bottom panels. */ - void onSelectorLeftBottomClicked(); - - /** Selected button displaying maximized editor. */ - void onSelectorFullEditorClicked(); - - /** Selected button displaying only bottom panel. */ - void onSelectorBottomClicked(); - - /** Selected button displaying only right panel. */ - void onSelectorRightClicked(); - - /** Selected button displaying left, bottom and right panels. */ - void onSelectorLeftRightBottomClicked(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.java deleted file mode 100644 index 3b749db00ea..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.toolbar.selector; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import elemental.dom.Element; -import elemental.dom.Node; -import elemental.events.Event; -import elemental.events.EventListener; -import elemental.events.EventRemover; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.util.dom.Elements; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Implementation for {PanelSelectorView}. */ -@Singleton -public class PanelSelectorViewImpl extends Composite implements PanelSelectorView { - - interface PanelSelectorViewImplUiBinder extends UiBinder {} - - private ActionDelegate delegate; - - private Resources resources; - - @UiField FlowPanel button; - - @UiField FlowPanel popup; - - @UiField FlowPanel selectorLeft; - - @UiField FlowPanel selectorLeftBottom; - - @UiField FlowPanel selectorFullEditor; - - @UiField FlowPanel selectorBottom; - - @UiField FlowPanel selectorRight; - - @UiField FlowPanel selectorLeftRightBottom; - - @UiField FlowPanel iconPanel; - - private EventRemover clickListenerRemover; - - @Inject - public PanelSelectorViewImpl(PanelSelectorViewImplUiBinder uiBinder, Resources resources) { - this.resources = resources; - initWidget(uiBinder.createAndBindUi(this)); - - button.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent clickEvent) { - delegate.onButtonClicked(); - } - }, - ClickEvent.getType()); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void setState(State state) { - switch (state) { - case LEFT: - setIcon(resources.panelSelectorLeft()); - break; - - case LEFT_BOTTOM: - setIcon(resources.panelSelectorLeftBottom()); - break; - - case FULL_EDITOR: - setIcon(resources.panelSelectorFullEditor()); - break; - - case BOTTOM: - setIcon(resources.panelSelectorBottom()); - break; - - case RIGHT: - setIcon(resources.panelSelectorRight()); - break; - - case LEFT_RIGHT_BOTTOM: - setIcon(resources.panelSelectorLeftRightBottom()); - break; - } - } - - private void setIcon(SVGResource resource) { - iconPanel.clear(); - SVGImage image = new SVGImage(resource); - iconPanel.add(image); - } - - @Override - public void showPopup() { - if ("block".equals(popup.getElement().getStyle().getProperty("display"))) { - hidePopup(); - return; - } - - popup.getElement().getStyle().setProperty("display", "block"); - clickListenerRemover = - Elements.getBody().addEventListener(Event.MOUSEDOWN, clickListener, true); - } - - private final EventListener clickListener = - new EventListener() { - @Override - public void handleEvent(Event evt) { - if (((Element) popup.getElement()).contains((Node) evt.getTarget())) { - - if (((Element) selectorLeft.getElement()).contains((Node) evt.getTarget())) { - delegate.onSelectorLeftClicked(); - } else if (((Element) selectorLeftBottom.getElement()) - .contains((Node) evt.getTarget())) { - delegate.onSelectorLeftBottomClicked(); - } else if (((Element) selectorFullEditor.getElement()) - .contains((Node) evt.getTarget())) { - delegate.onSelectorFullEditorClicked(); - } else if (((Element) selectorBottom.getElement()).contains((Node) evt.getTarget())) { - delegate.onSelectorBottomClicked(); - } else if (((Element) selectorRight.getElement()).contains((Node) evt.getTarget())) { - delegate.onSelectorRightClicked(); - } else if (((Element) selectorLeftRightBottom.getElement()) - .contains((Node) evt.getTarget())) { - delegate.onSelectorLeftRightBottomClicked(); - } else { - return; - } - - hidePopup(); - return; - } - - if (((Element) button.getElement()).contains((Node) evt.getTarget())) { - return; - } - - hidePopup(); - } - }; - - @Override - public void hidePopup() { - popup.getElement().getStyle().clearProperty("display"); - - if (clickListenerRemover != null) { - clickListenerRemover.remove(); - clickListenerRemover = null; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.ui.xml deleted file mode 100644 index c6d5c61017d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/toolbar/selector/PanelSelectorViewImpl.ui.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - .selector { - position: relative; - width: 43px; - height: 24px; - } - - .button { - position: absolute; - left: 0px; - top: 0px; - width: 43px; - height: 24px; - background: menuButtonBackground; - border: menuButtonBorder; - box-sizing: border-box; - overflow: hidden; - cursor: pointer; - } - - .button:hover { - background: hoveredMenuButtonBackground; - } - - .activeSelector { - position: absolute; - left: 5px; - top: 3px; - } - - .expansionImage { - position: absolute; - left: 28px; - top: 2px; - } - - .expansionImage svg { - width: 10px; - height: 7px; - fill: #e4e4e4; - } - - .popup { - display: none; - position: fixed; - right: 3px; - top: 30px; - width: 69px; - height: 36px; - overflow: hidden; - box-sizing: border-box; - border: 1px solid popupBorderColor; - background-color: popupBkgColor; - z-index: 9999; - padding-left: 2px; - padding-right: 2px; - padding-top: 1px; - padding-bottom: 1px; - box-shadow: 0px 2px 2px 0px popupShadowColor; - } - - .popup > div { - position: relative; - width: 21px; - height: 16px; - float: left; - overflow: hidden; - cursor: pointer; - } - - .popup > div > svg { - margin: 2px; - } - - .popup > div:hover svg, - .popup > div:hover svg rect, - .popup > div:hover svg path { - stroke: hoveredTabTextColor; - } - - .popup > div[selected] svg, - .popup > div[selected] svg rect, - .popup > div[selected] svg path { - stroke: activeTabIconColor; - } - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeMessages.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeMessages.java deleted file mode 100644 index aa6e0fd8c97..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeMessages.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n messages relate to command type. - * - * @author Artem Zatsarynnyi - */ -public interface CommandTypeMessages extends Messages { - - @Key("type.registry.message.already_registered") - String typeRegistryMessageAlreadyRegistered(String id); - - @Key("type.chooser.message.canceled") - String typeChooserMessageCanceled(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeRegistryImpl.java deleted file mode 100644 index 291a25aaad8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/CommandTypeRegistryImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Implementation of {@link CommandTypeRegistry}. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CommandTypeRegistryImpl implements CommandTypeRegistry { - - private final CommandTypeMessages messages; - private final Map commandTypes; - - @Inject - public CommandTypeRegistryImpl(CommandTypeMessages messages) { - this.messages = messages; - this.commandTypes = new HashMap<>(); - } - - @Inject(optional = true) - private void register(Set commandTypes) { - for (CommandType type : commandTypes) { - final String id = type.getId(); - - if (this.commandTypes.containsKey(id)) { - Log.warn(getClass(), messages.typeRegistryMessageAlreadyRegistered(id)); - } else { - this.commandTypes.put(id, type); - } - } - } - - @Override - public Optional getCommandTypeById(String id) { - return Optional.ofNullable(commandTypes.get(id)); - } - - @Override - public Set getCommandTypes() { - return new HashSet<>(commandTypes.values()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooser.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooser.java deleted file mode 100644 index 1752c619663..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooser.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.chooser; - -import static java.util.Comparator.comparing; - -import com.google.inject.Inject; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.api.promises.client.js.Executor; -import org.eclipse.che.api.promises.client.js.Executor.ExecutorBody; -import org.eclipse.che.api.promises.client.js.JsPromiseError; -import org.eclipse.che.api.promises.client.js.RejectFunction; -import org.eclipse.che.api.promises.client.js.ResolveFunction; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.command.CommandTypeRegistry; -import org.eclipse.che.ide.command.type.CommandTypeMessages; - -/** - * Provides a simple mechanism for the user to choose a {@link CommandType}. - * - * @author Artem Zatsarynnyi - */ -public class CommandTypeChooser implements CommandTypeChooserView.ActionDelegate { - - private final CommandTypeChooserView view; - private final CommandTypeRegistry commandTypeRegistry; - private final PromiseProvider promiseProvider; - private final CommandTypeMessages messages; - - private ResolveFunction resolveFunction; - private RejectFunction rejectFunction; - - @Inject - public CommandTypeChooser( - CommandTypeChooserView view, - CommandTypeRegistry commandTypeRegistry, - PromiseProvider promiseProvider, - CommandTypeMessages messages) { - this.view = view; - this.commandTypeRegistry = commandTypeRegistry; - this.promiseProvider = promiseProvider; - this.messages = messages; - - view.setDelegate(this); - } - - /** - * Pops up a command type chooser dialog at the position relative to the browser's client area. - * - * @param left the left position, in pixels - * @param top the top position, in pixels - * @return promise that will be resolved with a chosen {@link CommandType} or rejected in case - * command type selection has been cancelled - */ - public Promise show(int left, int top) { - final List commandTypes = new ArrayList<>(commandTypeRegistry.getCommandTypes()); - - if (commandTypes.size() == 1) { - return promiseProvider.resolve(commandTypes.get(0)); - } - - commandTypes.sort(comparing(CommandType::getDisplayName)); - - view.setCommandTypes(commandTypes); - - view.show(left, top); - - return promiseProvider.create( - Executor.create( - (ExecutorBody) - (resolve, reject) -> { - resolveFunction = resolve; - rejectFunction = reject; - })); - } - - @Override - public void onSelected(CommandType commandType) { - view.close(); - - resolveFunction.apply(commandType); - } - - @Override - public void onCanceled() { - rejectFunction.apply(JsPromiseError.create(messages.typeChooserMessageCanceled())); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserView.java deleted file mode 100644 index b09f3012894..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserView.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.chooser; - -import java.util.List; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.mvp.View; - -/** - * View for command type chooser. - * - * @author Artem Zatsarynnyi - */ -public interface CommandTypeChooserView extends View { - - /** - * Show the view at the position relative to the browser's client area. - * - * @param left the left position, in pixels - * @param top the top position, in pixels - */ - void show(int left, int top); - - /** Close the view. */ - void close(); - - /** Sets the command types to display in the view. */ - void setCommandTypes(List commandTypes); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when command type is selected. */ - void onSelected(CommandType commandType); - - /** - * Called when command type selection has been canceled. Note that view will be already closed. - */ - void onCanceled(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.java deleted file mode 100644 index f8f172a1d74..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.chooser; - -import static com.google.gwt.user.client.ui.PopupPanel.AnimationType.ROLL_DOWN; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.KeyCodes; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.ListBox; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.inject.Inject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.command.CommandResources; - -/** - * Implementation of {@link CommandTypeChooserView} which which pops up list of the command types. - * User can select command type with Enter key or cancel selection with Esc key. - * - * @author Artem Zatsarynnyi - */ -public class CommandTypeChooserViewImpl extends PopupPanel implements CommandTypeChooserView { - - private static final CommandTypeChooserViewImplUiBinder UI_BINDER = - GWT.create(CommandTypeChooserViewImplUiBinder.class); - - /** Map that contains all shown command types. */ - private final Map commandTypesById; - - @UiField ListBox typesList; - - private ActionDelegate delegate; - - @Inject - public CommandTypeChooserViewImpl(CommandResources resources) { - commandTypesById = new HashMap<>(); - - addStyleName(resources.commandTypeChooserCss().chooserPopup()); - - setWidget(UI_BINDER.createAndBindUi(this)); - - initView(); - addHandlers(); - } - - private void initView() { - setAutoHideEnabled(true); - setAnimationEnabled(true); - setAnimationType(ROLL_DOWN); - } - - private void addHandlers() { - addCloseHandler( - event -> { - if (event.isAutoClosed()) { - delegate.onCanceled(); - } - }); - - typesList.addDoubleClickHandler( - event -> { - final String selectedTypeId = typesList.getSelectedValue(); - - if (selectedTypeId != null) { - final CommandType selectedCommandType = commandTypesById.get(selectedTypeId); - - if (selectedCommandType != null) { - delegate.onSelected(selectedCommandType); - } - } - }); - - typesList.addKeyPressHandler( - event -> { - final int keyCode = event.getNativeEvent().getKeyCode(); - - if (KeyCodes.KEY_ENTER == keyCode || KeyCodes.KEY_MAC_ENTER == keyCode) { - final String selectedTypeId = typesList.getSelectedValue(); - - if (selectedTypeId != null) { - final CommandType selectedCommandType = commandTypesById.get(selectedTypeId); - - if (selectedCommandType != null) { - delegate.onSelected(selectedCommandType); - } - } - } - }); - - typesList.addKeyDownHandler( - event -> { - if (KeyCodes.KEY_ESCAPE == event.getNativeKeyCode()) { - hide(true); - } - }); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void show(int left, int top) { - setPopupPosition(left, top); - - super.show(); - - typesList.setFocus(true); - } - - @Override - public void close() { - hide(); - } - - @Override - public void setCommandTypes(List commandTypes) { - typesList.clear(); - commandTypesById.clear(); - - commandTypes.forEach( - commandType -> { - commandTypesById.put(commandType.getId(), commandType); - typesList.addItem(commandType.getDisplayName(), commandType.getId()); - }); - - typesList.setVisibleItemCount(commandTypes.size()); - typesList.setSelectedIndex(0); - } - - interface CommandTypeChooserViewImplUiBinder - extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.ui.xml deleted file mode 100644 index 0593ac163b1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/chooser/CommandTypeChooserViewImpl.ui.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - .list-box { - border: none; - } - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomCommandType.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomCommandType.java deleted file mode 100644 index 1d729ba27b6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomCommandType.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.custom; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.LinkedList; -import java.util.List; -import org.eclipse.che.ide.api.command.CommandPage; -import org.eclipse.che.ide.api.command.CommandType; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.eclipse.che.ide.machine.MachineResources; - -/** - * Arbitrary command type. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CustomCommandType implements CommandType { - - private static final String ID = "custom"; - private static final String COMMAND_TEMPLATE = "echo \"hello\""; - - private final List pages; - - @Inject - public CustomCommandType( - MachineResources resources, IconRegistry iconRegistry, CustomPagePresenter page) { - pages = new LinkedList<>(); - pages.add(page); - - iconRegistry.registerIcon(new Icon("command.type." + ID, resources.customCommandType())); - } - - @Override - public String getId() { - return ID; - } - - @Override - public String getDisplayName() { - return "Custom"; - } - - @Override - public String getDescription() { - return "Arbitrary command"; - } - - @Override - public List getPages() { - return pages; - } - - @Override - public String getCommandLineTemplate() { - return COMMAND_TEMPLATE; - } - - @Override - public String getPreviewUrlTemplate() { - return ""; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPagePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPagePresenter.java deleted file mode 100644 index aa01a5852f8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPagePresenter.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.custom; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.CommandPage; - -/** - * Page allows to edit arbitrary command. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class CustomPagePresenter implements CustomPageView.ActionDelegate, CommandPage { - - private final CustomPageView view; - - private CommandImpl editedCommand; - - // initial value of the 'command line' parameter - private String commandLineInitial; - - private DirtyStateListener listener; - - @Inject - public CustomPagePresenter(CustomPageView view) { - this.view = view; - - view.setDelegate(this); - } - - @Override - public void resetFrom(CommandImpl command) { - editedCommand = command; - commandLineInitial = command.getCommandLine(); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - - view.setCommandLine(editedCommand.getCommandLine()); - } - - @Override - public void onSave() { - commandLineInitial = editedCommand.getCommandLine(); - } - - @Override - public boolean isDirty() { - return !commandLineInitial.equals(editedCommand.getCommandLine()); - } - - @Override - public void setDirtyStateListener(DirtyStateListener listener) { - this.listener = listener; - } - - @Override - public void setFieldStateActionDelegate(FieldStateActionDelegate delegate) {} - - @Override - public void onCommandLineChanged() { - editedCommand.setCommandLine(view.getCommandLine()); - - listener.onDirtyStateChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageView.java deleted file mode 100644 index 1e1d09dbedb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageView.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.custom; - -import com.google.inject.ImplementedBy; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The view of {@link CustomPagePresenter}. - * - * @author Artem Zatsarynnyi - */ -@ImplementedBy(CustomPageViewImpl.class) -public interface CustomPageView extends View { - - /** Returns value of the 'Command line' field. */ - String getCommandLine(); - - /** Sets value of the 'Command line' field. */ - void setCommandLine(String commandLine); - - /** Action handler for the view actions/controls. */ - interface ActionDelegate { - - /** Called when value of the 'Command line' field has been changed. */ - void onCommandLineChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.java deleted file mode 100644 index f57d52f7c7b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.command.type.custom; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.TextArea; -import com.google.gwt.user.client.ui.Widget; - -/** - * The implementation of {@link CustomPageView}. - * - * @author Artem Zatsarynnyi - */ -public class CustomPageViewImpl implements CustomPageView { - - private static final CustomPageViewImplUiBinder UI_BINDER = - GWT.create(CustomPageViewImplUiBinder.class); - - private final FlowPanel rootElement; - - @UiField TextArea commandLine; - - private ActionDelegate delegate; - - public CustomPageViewImpl() { - rootElement = UI_BINDER.createAndBindUi(this); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Widget asWidget() { - return rootElement; - } - - @Override - public String getCommandLine() { - return commandLine.getValue(); - } - - @Override - public void setCommandLine(String commandLine) { - this.commandLine.setValue(commandLine); - } - - @UiHandler({"commandLine"}) - void onKeyUp(KeyUpEvent event) { - // commandLine value may not be updated immediately after keyUp - // therefore use the timer with zero delay - new Timer() { - @Override - public void run() { - delegate.onCommandLineChanged(); - } - }.schedule(0); - } - - interface CustomPageViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.ui.xml deleted file mode 100644 index ee8dc2d8e01..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/command/type/custom/CustomPageViewImpl.ui.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - .cmdField { - height: 100px; - resize: none; - margin-bottom: 15px; - } - - .commandLinePosition { - position: relative; - line-height: inherit; - } - - .spaceRight { - margin-right: 8px; - } - - .mainDoc { - margin: 0; - } - - .mainDoc > div { - margin-top: -2px; - } - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/AbstractOutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/AbstractOutputCustomizer.java deleted file mode 100644 index a1839230f71..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/AbstractOutputCustomizer.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Strings.nullToEmpty; - -import com.google.gwt.user.client.Timer; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.FunctionException; -import org.eclipse.che.api.promises.client.Promise; -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.editor.OpenEditorCallbackImpl; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resource.Path; - -/** - * Default customizer adds an anchor link to the lines that match a stack trace line pattern and - * installs a handler function for the link. The handler parses the stack trace line, searches for - * the candidate Java files to navigate to, opens the first file (of the found candidates) in editor - * and reveals it to the required line according to the stack trace line information - * - * @author Victor Rubezhny - */ -public abstract class AbstractOutputCustomizer implements OutputCustomizer { - - protected AppContext appContext; - protected EditorAgent editorAgent; - - public AbstractOutputCustomizer(AppContext appContext, EditorAgent editorAgent) { - this.appContext = appContext; - this.editorAgent = editorAgent; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#canCustomize(java.lang.String) - */ - @Override - public abstract boolean canCustomize(String text); - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#customize(java.lang.String) - */ - @Override - public abstract String customize(String text); - - /* - * Returns the list of workspace files filtered by a relative path - */ - protected Promise> collectChildren(Container root, Path relativeFilePath) { - return root.getTree(-1) - .then( - new Function>() { - @Override - public List apply(Resource[] children) throws FunctionException { - return Stream.of(children) - .filter( - child -> - child.isFile() - && endsWith(child.asFile().getLocation(), relativeFilePath)) - .map(Resource::asFile) - .collect(Collectors.toList()); - } - }); - } - - /* - * Checks if a path's last segments are equal to the provided relative path - */ - protected boolean endsWith(Path path, Path relativePath) { - checkNotNull(path); - checkNotNull(relativePath); - - if (path.segmentCount() < relativePath.segmentCount()) return false; - - for (int i = relativePath.segmentCount() - 1, j = path.segmentCount() - 1; i >= 0; i--, j--) { - if (!nullToEmpty(relativePath.segment(i)).equals(path.segment(j))) { - return false; - } - } - - return true; - } - - /** - * Finds a file by its path, opens it in editor and sets the text selection and reveals according - * to the specified line and column numbers - * - * @param file - * @param lineNumber - * @param columnNumber - */ - protected void openFileInEditorAndReveal( - AppContext appContext, - EditorAgent editorAgent, - Path file, - final int lineNumber, - final int columnNumber) { - appContext - .getWorkspaceRoot() - .getFile(file) - .then( - optional -> { - if (optional.isPresent()) { - editorAgent.openEditor( - optional.get(), - new OpenEditorCallbackImpl() { - @Override - public void onEditorOpened(EditorPartPresenter editor) { - Timer t = - new Timer() { - @Override - public void run() { - EditorPartPresenter editorPart = editorAgent.getActiveEditor(); - selectRange(editorPart, lineNumber, columnNumber); - } - }; - t.schedule(500); - } - - @Override - public void onEditorActivated(EditorPartPresenter editor) { - selectRange(editor, lineNumber, columnNumber); - } - }); - } - }); - } - - /** - * Selects and shows the specified line and column of text in editor - * - * @param editor - * @param line - * @param column - */ - protected void selectRange(EditorPartPresenter editor, int line, int column) { - line--; - column--; - if (line < 0) line = 0; - if (editor instanceof TextEditor) { - Document document = ((TextEditor) editor).getDocument(); - LinearRange selectionRange = document.getLinearRangeForLine(line); - if (column >= 0) { - selectionRange = - LinearRange.createWithStart(selectionRange.getStartOffset() + column).andLength(0); - } - document.setSelectedRange(selectionRange, true); - document.setCursorPosition(new TextPosition(line, column >= 0 ? column : 0)); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CPPOutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CPPOutputCustomizer.java deleted file mode 100644 index af029189851..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CPPOutputCustomizer.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.gwt.regexp.shared.RegExp.compile; - -import com.google.gwt.regexp.shared.RegExp; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.resource.Path; - -/** - * Output customizer adds an anchor link to the lines that match C/CPP compilation error or warning - * message and installs the handler functions for the links. The handler parses the C/CPP - * compilation error or warning message line, searches for a candidate C/CPP file to navigate to, - * opens the found file in editor and reveals it to the required line and column (if available) - * according to the line information - * - * @author Victor Rubezhny - */ -public class CPPOutputCustomizer extends AbstractOutputCustomizer { - - private static final RegExp COMPILATION_MESSAGE = - compile( - "(.+\\.(c|C|cc|CC|cpp|CPP|h|H|hpp|HPP):\\d+:\\d+: (error|fatal error|note|warning): .+)"); - private static final RegExp LINKER_MESSAGE = - compile("(.+\\.(c|C|cc|CC|cpp|CPP|h|H|hpp|HPP):\\d+: .+)"); - - /** - * Constructs C/CPP Output Customizer Object - * - * @param appContext - * @param editorAgent - */ - public CPPOutputCustomizer(AppContext appContext, EditorAgent editorAgent) { - super(appContext, editorAgent); - - exportCompilationMessageAnchorClickHandlerFunction(); - exportLinkerMessageAnchorClickHandlerFunction(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#canCustomize(java.lang.String) - */ - @Override - public boolean canCustomize(String text) { - return (COMPILATION_MESSAGE.test(text) || LINKER_MESSAGE.test(text)); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#customize(java.lang.String) - */ - @Override - public String customize(String text) { - if (COMPILATION_MESSAGE.test(text)) return customizeCompilationMessage(text); - - if (LINKER_MESSAGE.test(text)) return customizeLinkerMessage(text); - - return text; - } - - /* - * Customizes a compilation message line - */ - private String customizeCompilationMessage(String text) { - try { - int lineStart = text.indexOf(":") + ":".length(); - int lineEnd = text.indexOf(":", lineStart); - int columnStart = lineEnd + ":".length(); - int columnEnd = text.indexOf(":", columnStart); - String fileName = text.substring(0, text.indexOf(":")).trim(); - int lineNumber = Integer.valueOf(text.substring(lineStart, lineEnd).trim()); - int columnNumber = Integer.valueOf(text.substring(columnStart, columnEnd).trim()); - - String customText = - ""; - customText += text.substring(0, columnEnd); - customText += ""; - customText += text.substring(columnEnd); - text = customText; - } catch (IndexOutOfBoundsException ex) { - // ignore - } catch (NumberFormatException ex) { - // ignore - } - - return text; - } - - /* - * Customizes a linker message line - */ - private String customizeLinkerMessage(String text) { - try { - int lineStart = text.indexOf(":") + ":".length(), lineEnd = text.indexOf(":", lineStart); - String fileName = text.substring(0, text.indexOf(":")).trim(); - int lineNumber = Integer.valueOf(text.substring(lineStart, lineEnd).trim()); - - String customText = ""; - customText += text.substring(0, lineEnd); - customText += ""; - customText += text.substring(lineEnd); - text = customText; - } catch (IndexOutOfBoundsException ex) { - // ignore - } catch (NumberFormatException ex) { - // ignore - } - - return text; - } - - /** - * A callback that is to be called for a compilation message anchor - * - * @param fileName - * @param lineNumber - * @param columnNumber - */ - public void handleCompilationMessageAnchorClick( - String fileName, final int lineNumber, int columnNumber) { - if (fileName == null) { - return; - } - - collectChildren(appContext.getWorkspaceRoot(), Path.valueOf(fileName)) - .then( - files -> { - if (!files.isEmpty()) { - openFileInEditorAndReveal( - appContext, editorAgent, files.get(0).getLocation(), lineNumber, columnNumber); - } - }); - } - - /** - * A callback that is to be called for a linker message anchor - * - * @param fileName - * @param lineNumber - */ - public void handleLinkerMessageAnchorClick(String fileName, final int lineNumber) { - if (fileName == null) { - return; - } - - openFileInEditorAndReveal( - appContext, editorAgent, Path.valueOf(fileName).removeFirstSegments(1), lineNumber, 0); - } - - /** Sets up a C/CPP callback to be called for a compilation message anchor */ - public native void exportCompilationMessageAnchorClickHandlerFunction() /*-{ - var that = this; - $wnd.openCM = $entry(function(fileName,lineNumber,columnNumber) { - that.@org.eclipse.che.ide.console.CPPOutputCustomizer::handleCompilationMessageAnchorClick(*)(fileName,lineNumber,columnNumber); - }); - }-*/; - - /** Sets up a C/CPP callback to be called for a compilation message anchor */ - public native void exportLinkerMessageAnchorClickHandlerFunction() /*-{ - var that = this; - $wnd.openLM = $entry(function(fileName,lineNumber) { - that.@org.eclipse.che.ide.console.CPPOutputCustomizer::handleLinkerMessageAnchorClick(*)(fileName,lineNumber); - }); - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CSharpOutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CSharpOutputCustomizer.java deleted file mode 100644 index 14d9ab9524d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CSharpOutputCustomizer.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.gwt.regexp.shared.RegExp.compile; - -import com.google.gwt.regexp.shared.RegExp; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.resource.Path; - -/** - * Output customizer adds an anchor link to the lines that match a .NET C# compilation error or - * warning message and a stack trace line pattern and installs the handler functions for the links. - * The handler parses the stack trace line, searches for a candidate C# file to navigate to, opens - * the found file in editor and reveals it to the required line and column (if available) according - * to the line information - * - * @author Victor Rubezhny - */ -public class CSharpOutputCustomizer extends AbstractOutputCustomizer { - - private static final RegExp COMPILATION_ERROR_OR_WARNING = - compile("(.+\\.(cs|CS)\\(\\d+,\\d+\\): (error|warning) .+: .+ \\[.+\\])"); - private static final RegExp LINE_AT = compile("(\\s+at .+ in .+\\.(cs|CS):line \\d+)"); - - /** - * Constructs Compound Output Customizer Object - * - * @param appContext - * @param editorAgent - */ - public CSharpOutputCustomizer(AppContext appContext, EditorAgent editorAgent) { - super(appContext, editorAgent); - - exportCompilationMessageAnchorClickHandlerFunction(); - exportStacktraceLineAnchorClickHandlerFunction(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#canCustomize(java.lang.String) - */ - @Override - public boolean canCustomize(String text) { - return (COMPILATION_ERROR_OR_WARNING.exec(text) != null || LINE_AT.exec(text) != null); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#customize(java.lang.String) - */ - @Override - public String customize(String text) { - if (COMPILATION_ERROR_OR_WARNING.exec(text) != null) - return customizeCompilationErrorOrWarning(text); - - if (LINE_AT.exec(text) != null) return customizeStacktraceLine(text); - - return text; - } - - /* - * Customizes a Compilation Error/Warning line - */ - private String customizeCompilationErrorOrWarning(String text) { - try { - int end = text.indexOf("):"), - openBracket = text.lastIndexOf("(", end), - comma = text.lastIndexOf(",", end), - closeSBracket = text.lastIndexOf("]"), - openSBracket = text.lastIndexOf("[", closeSBracket); - String fileName = text.substring(0, openBracket).trim(); - String projectFileName = text.substring(openSBracket + "[".length(), closeSBracket).trim(); - int lineNumber = Integer.valueOf(text.substring(openBracket + "(".length(), comma).trim()); - int columnNumber = Integer.valueOf(text.substring(comma + ",".length(), end).trim()); - - String customText = - ""; - customText += text.substring(0, end + ")".length()); - customText += ""; - customText += text.substring(end + ")".length()); - text = customText; - } catch (IndexOutOfBoundsException ex) { - // ignore - } catch (NumberFormatException ex) { - // ignore - } - - return text; - } - - /* - * Customizes a Stacktrace line - */ - private String customizeStacktraceLine(String text) { - try { - int start = text.lastIndexOf(" in ") + " in ".length(), end = text.indexOf(":line ", start); - - String fileName = text.substring(start, end).trim(); - int lineNumber = Integer.valueOf(text.substring(end + ":line ".length()).trim()); - - String customText = text.substring(0, start); - customText += ""; - customText += text.substring(start); - customText += ""; - text = customText; - } catch (IndexOutOfBoundsException ex) { - // ignore - } catch (NumberFormatException ex) { - // ignore - } - - return text; - } - - /** - * A callback that is to be called for an anchor for C# Compilation Error/Warning Message - * - * @param fileName - * @param projectFile - * @param lineNumber - * @param columnNumber - */ - public void handleCompilationMessageAnchorClick( - String fileName, String projectFile, final int lineNumber, final int columnNumber) { - if (fileName == null || projectFile == null) { - return; - } - - openFileInEditorAndReveal( - appContext, - editorAgent, - Path.valueOf(projectFile).removeFirstSegments(1).parent().append(fileName), - lineNumber, - columnNumber); - } - - /** - * A callback that is to be called for an anchor for C# Runtime Exception Stacktrace line - * - * @param fileName - * @param lineNumber - */ - public void handleStacktraceLineAnchorClick(String fileName, int lineNumber) { - if (fileName == null) { - return; - } - - openFileInEditorAndReveal( - appContext, editorAgent, Path.valueOf(fileName).removeFirstSegments(1), lineNumber, 0); - } - - /** Sets up a java callback to be called for an anchor for C# Compilation Error/Warning Message */ - public native void exportCompilationMessageAnchorClickHandlerFunction() /*-{ - var that = this; - $wnd.openCSCM = $entry(function(fileName,projectFile,lineNumber,columnNumber) { - that.@org.eclipse.che.ide.console.CSharpOutputCustomizer::handleCompilationMessageAnchorClick(*)(fileName,projectFile,lineNumber,columnNumber); - }); - }-*/; - - /** Sets up a java callback to be called for an anchor for C# Runtime Exception Stacktrace line */ - public native void exportStacktraceLineAnchorClickHandlerFunction() /*-{ - var that = this; - $wnd.openCSSTL = $entry(function(fileName,lineNumber) { - that.@org.eclipse.che.ide.console.CSharpOutputCustomizer::handleStacktraceLineAnchorClick(*)(fileName,lineNumber); - }); - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandConsoleFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandConsoleFactory.java deleted file mode 100644 index 523f145ee72..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandConsoleFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.name.Named; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.outputconsole.OutputConsole; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Artem Zatsarynnyi */ -public interface CommandConsoleFactory { - - /** Create the instance of {@link CommandOutputConsole} for the given {@code command}. */ - @Named("command") - CommandOutputConsole create(CommandImpl command, String machineName); - - /** Create the instance of {@link DefaultOutputConsole} for the given title. */ - @Named("default") - OutputConsole create(String title); - - @Named("composite") - CompositeOutputConsole create(Widget widget, String title, SVGResource icon); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsole.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsole.java deleted file mode 100644 index b5776738373..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsole.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.ProcessSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.outputconsole.OutputConsole; - -/** Describes requirements for the console for command output. */ -public interface CommandOutputConsole extends OutputConsole { - - /** - * Get command that this output console is associated with - * - * @return corresponding command - */ - CommandImpl getCommand(); - - /** Returns PID of the associated process or 0 if none was associated. */ - int getPid(); - - /** Start listening to the output on the given WebSocket channel. */ - @Deprecated - void listenToOutput(String wsChannel); - - /** - * Get an output console related operations that should be performed when an standard error - * message received - * - * @return operation - */ - Consumer getStdErrConsumer(); - - /** - * Get an output console related operations that should be performed when an standard output - * message received - * - * @return operation - */ - Consumer getStdOutConsumer(); - - /** - * Get an output console related operations that should be performed when a process started event - * caught - * - * @return operation - */ - Consumer getProcessStartedConsumer(); - - /** - * Get an output console related operations that should be performed when a process died event - * caught - * - * @return operation - */ - Consumer getProcessDiedConsumer(); - - /** - * Get an output console related operations that should be performed when a subscription to a - * process is performed - * - * @return operation - */ - Consumer getProcessSubscribeConsumer(); - - /** - * Print raw string data inside the output console - * - * @param output output string - */ - void printOutput(String output); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsolePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsolePresenter.java deleted file mode 100644 index 1cb51148e02..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CommandOutputConsolePresenter.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.api.workspace.shared.Constants.COMMAND_PREVIEW_URL_ATTRIBUTE_NAME; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.ProcessSubscribeResponseDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessDiedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStartedEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdErrEventDto; -import org.eclipse.che.agent.exec.shared.dto.event.ProcessStdOutEventDto; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.CommandExecutor; -import org.eclipse.che.ide.api.command.CommandImpl; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.command.exec.ProcessFinishedEvent; -import org.eclipse.che.ide.api.command.exec.ProcessStartedEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.macro.MacroProcessor; -import org.eclipse.che.ide.machine.MachineResources; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Console for command output. - * - * @author Artem Zatsarynnyi - */ -public class CommandOutputConsolePresenter - implements CommandOutputConsole, OutputConsoleView.ActionDelegate { - - private final OutputConsoleView view; - private final MachineResources resources; - private final CommandImpl command; - private final EventBus eventBus; - private final String machineName; - private final CommandExecutor commandExecutor; - private final ExecAgentCommandManager execAgentCommandManager; - - private int pid; - private boolean finished; - - /** Wrap text or not */ - private boolean wrapText = false; - - /** Follow output when printing text */ - private boolean followOutput = true; - - private final List actionDelegates = new ArrayList<>(); - - private OutputCustomizer outputCustomizer = null; - - @Inject - public CommandOutputConsolePresenter( - final OutputConsoleView view, - MachineResources resources, - CommandExecutor commandExecutor, - MacroProcessor macroProcessor, - EventBus eventBus, - ExecAgentCommandManager execAgentCommandManager, - @Assisted CommandImpl command, - @Assisted String machineName, - AppContext appContext, - EditorAgent editorAgent) { - this.view = view; - this.resources = resources; - this.execAgentCommandManager = execAgentCommandManager; - this.command = command; - this.machineName = machineName; - this.eventBus = eventBus; - this.commandExecutor = commandExecutor; - - setCustomizer( - new CompoundOutputCustomizer( - new JavaOutputCustomizer(appContext, editorAgent), - new CSharpOutputCustomizer(appContext, editorAgent), - new CPPOutputCustomizer(appContext, editorAgent))); - - view.setDelegate(this); - - final String previewUrl = command.getAttributes().get(COMMAND_PREVIEW_URL_ATTRIBUTE_NAME); - if (!isNullOrEmpty(previewUrl)) { - macroProcessor - .expandMacros(previewUrl) - .then( - new Operation() { - @Override - public void apply(String arg) throws OperationException { - view.showPreviewUrl(arg); - } - }); - } else { - view.hidePreview(); - } - - view.showCommandLine(command.getCommandLine()); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public CommandImpl getCommand() { - return command; - } - - @Nullable - @Override - public int getPid() { - return pid; - } - - @Override - public String getTitle() { - return command.getName(); - } - - @Override - public SVGResource getTitleIcon() { - return resources.output(); - } - - @Override - public void listenToOutput(String wsChannel) {} - - @Override - public Consumer getStdErrConsumer() { - return event -> { - String text = event.getText(); - boolean carriageReturn = text.endsWith("\r"); - String color = "red"; - view.print(text, carriageReturn, color); - - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onConsoleOutput(CommandOutputConsolePresenter.this); - } - }; - } - - @Override - public Consumer getStdOutConsumer() { - return event -> { - String stdOutMessage = event.getText(); - boolean carriageReturn = stdOutMessage.endsWith("\r"); - view.print(stdOutMessage, carriageReturn); - - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onConsoleOutput(CommandOutputConsolePresenter.this); - } - }; - } - - @Override - public Consumer getProcessStartedConsumer() { - return event -> { - finished = false; - view.enableStopButton(true); - view.toggleScrollToEndButton(true); - - pid = event.getPid(); - - eventBus.fireEvent(new ProcessStartedEvent(pid, machineName)); - }; - } - - @Override - public Consumer getProcessDiedConsumer() { - return event -> { - finished = true; - view.enableStopButton(false); - view.toggleScrollToEndButton(false); - - eventBus.fireEvent(new ProcessFinishedEvent(pid, machineName)); - }; - } - - @Override - public Consumer getProcessSubscribeConsumer() { - return process -> pid = process.getPid(); - } - - @Override - public void printOutput(String output) { - view.print(output.replaceAll("\\[STDOUT\\] ", ""), false); - } - - @Override - public boolean isFinished() { - return finished; - } - - @Override - public void stop() { - execAgentCommandManager.killProcess(machineName, pid); - } - - @Override - public void close() { - actionDelegates.clear(); - } - - @Override - public void addActionDelegate(ActionDelegate actionDelegate) { - actionDelegates.add(actionDelegate); - } - - @Override - public void reRunProcessButtonClicked() { - if (isFinished()) { - commandExecutor.executeCommand(command, machineName); - } else { - execAgentCommandManager - .killProcess(machineName, pid) - .onSuccess(() -> commandExecutor.executeCommand(command, machineName)); - } - } - - @Override - public void stopProcessButtonClicked() { - stop(); - } - - @Override - public void clearOutputsButtonClicked() { - view.clearConsole(); - } - - @Override - public void downloadOutputsButtonClicked() { - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onDownloadOutput(this); - } - } - - @Override - public void wrapTextButtonClicked() { - wrapText = !wrapText; - view.wrapText(wrapText); - view.toggleWrapTextButton(wrapText); - } - - @Override - public void scrollToBottomButtonClicked() { - followOutput = !followOutput; - - view.toggleScrollToEndButton(followOutput); - view.enableAutoScroll(followOutput); - } - - @Override - public void onOutputScrolled(boolean bottomReached) { - followOutput = bottomReached; - view.toggleScrollToEndButton(bottomReached); - } - - /** - * Returns the console text. - * - * @return console text - */ - public String getText() { - return view.getText(); - } - - @Override - public OutputCustomizer getCustomizer() { - return outputCustomizer; - } - - /** Sets up the text output customizer */ - public void setCustomizer(OutputCustomizer customizer) { - this.outputCustomizer = customizer; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompositeOutputConsole.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompositeOutputConsole.java deleted file mode 100644 index 740c7342f49..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompositeOutputConsole.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.outputconsole.OutputConsole; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Console panel with provided user widget. - * - * @author Vlad Zhukovskyi - * @since 5.18.0 - */ -public class CompositeOutputConsole implements OutputConsole { - - private final Widget widget; - private final String title; - private final SVGResource icon; - - @Inject - public CompositeOutputConsole( - @Assisted Widget widget, @Assisted String title, @Assisted SVGResource icon) { - this.widget = widget; - this.title = title; - this.icon = icon; - } - - @Override - public String getTitle() { - return title; - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(() -> widget); - } - - @Override - public SVGResource getTitleIcon() { - return icon; - } - - @Override - public boolean isFinished() { - return true; - } - - @Override - public void stop() {} - - @Override - public void close() {} - - @Override - public void addActionDelegate(ActionDelegate actionDelegate) {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompoundOutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompoundOutputCustomizer.java deleted file mode 100644 index ccf3f232c4c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/CompoundOutputCustomizer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import java.util.Optional; -import java.util.stream.Stream; - -/** - * Compound customizer allows to combine several different customizers. A text provided will be - * treated as customize if at least one of nested customizers detects it as customizable - * - * @author Victor Rubezhny - */ -public class CompoundOutputCustomizer implements OutputCustomizer { - private OutputCustomizer[] customizers = null; - - /** - * Constructs the compound customizer object from a number of specified output customizers - * - * @param customizers - */ - public CompoundOutputCustomizer(OutputCustomizer... customizers) { - this.customizers = customizers; - } - - @Override - public boolean canCustomize(String text) { - return Stream.of(customizers).anyMatch(customizer -> customizer.canCustomize(text)); - } - - @Override - public String customize(String text) { - Optional optional = - Stream.of(customizers).filter(customizer -> customizer.canCustomize(text)).findFirst(); - return optional.isPresent() ? optional.get().customize(text) : text; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/ConsoleGinModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/ConsoleGinModule.java deleted file mode 100644 index 336687b3b82..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/ConsoleGinModule.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.inject.name.Names; -import org.eclipse.che.ide.api.outputconsole.OutputConsole; - -/** GIN module for configuring command consoles. */ -public class ConsoleGinModule extends AbstractGinModule { - @Override - protected void configure() { - bind(OutputConsoleView.class).to(OutputConsoleViewImpl.class); - install( - new GinFactoryModuleBuilder() - .implement( - CommandOutputConsole.class, - Names.named("command"), - CommandOutputConsolePresenter.class) - .implement(OutputConsole.class, Names.named("default"), DefaultOutputConsole.class) - .implement(OutputConsole.class, Names.named("composite"), CompositeOutputConsole.class) - .build(CommandConsoleFactory.class)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/DefaultOutputConsole.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/DefaultOutputConsole.java deleted file mode 100644 index 485e83bc579..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/DefaultOutputConsole.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.outputconsole.OutputConsole; -import org.eclipse.che.ide.machine.MachineResources; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Console panel for some text outputs. - * - * @author Valeriy Svydenko - */ -public class DefaultOutputConsole implements OutputConsole, OutputConsoleView.ActionDelegate { - - private final OutputConsoleView view; - private final MachineResources resources; - private String title; - - private final List actionDelegates = new ArrayList<>(); - - private boolean wrapText; - - /** Follow output when printing text */ - private boolean followOutput = true; - - private OutputCustomizer customizer = null; - - @Inject - public DefaultOutputConsole( - OutputConsoleView view, - MachineResources resources, - AppContext appContext, - EditorAgent editorAgent, - @Assisted String title) { - this.view = view; - this.title = title; - this.resources = resources; - this.view.enableAutoScroll(true); - - setCustomizer( - new CompoundOutputCustomizer( - new JavaOutputCustomizer(appContext, editorAgent), - new CSharpOutputCustomizer(appContext, editorAgent), - new CPPOutputCustomizer(appContext, editorAgent))); - - view.setDelegate(this); - - view.hideCommand(); - view.hidePreview(); - view.setReRunButtonVisible(false); - view.setStopButtonVisible(false); - } - - /** Enables auto scroll when output. */ - public void enableAutoScroll(boolean enable) { - view.enableAutoScroll(enable); - } - - /** - * Print text in the console. - * - * @param text text to be printed - */ - public void printText(String text) { - view.print(text, text.endsWith("\r")); - - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onConsoleOutput(this); - } - } - - /** - * Print colored text in the console. - * - * @param text text to be printed - * @param color color of the text or NULL - */ - public void printText(String text, String color) { - view.print(text, text.endsWith("\r"), color); - - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onConsoleOutput(this); - } - } - - /** - * Returns the console text. - * - * @return console text - */ - public String getText() { - return view.getText(); - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - /** {@inheritDoc} */ - @Override - public String getTitle() { - return title; - } - - @Override - public SVGResource getTitleIcon() { - return resources.output(); - } - - /** {@inheritDoc} */ - @Override - public boolean isFinished() { - return true; - } - - /** {@inheritDoc} */ - @Override - public void stop() {} - - @Override - public void close() { - actionDelegates.clear(); - } - - @Override - public void addActionDelegate(ActionDelegate actionDelegate) { - actionDelegates.add(actionDelegate); - } - - @Override - public void reRunProcessButtonClicked() {} - - @Override - public void stopProcessButtonClicked() {} - - @Override - public void clearOutputsButtonClicked() { - view.clearConsole(); - } - - @Override - public void downloadOutputsButtonClicked() { - for (ActionDelegate actionDelegate : actionDelegates) { - actionDelegate.onDownloadOutput(this); - } - } - - @Override - public void wrapTextButtonClicked() { - wrapText = !wrapText; - view.wrapText(wrapText); - view.toggleWrapTextButton(wrapText); - } - - @Override - public void scrollToBottomButtonClicked() { - followOutput = !followOutput; - - view.toggleScrollToEndButton(followOutput); - view.enableAutoScroll(followOutput); - } - - @Override - public void onOutputScrolled(boolean bottomReached) { - followOutput = bottomReached; - view.toggleScrollToEndButton(bottomReached); - } - - @Override - public OutputCustomizer getCustomizer() { - return customizer; - } - - /** Sets up the text output customizer */ - public void setCustomizer(OutputCustomizer customizer) { - this.customizer = customizer; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/JavaOutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/JavaOutputCustomizer.java deleted file mode 100644 index d2afa5b28f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/JavaOutputCustomizer.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.gwt.regexp.shared.RegExp.compile; - -import com.google.gwt.regexp.shared.MatchResult; -import com.google.gwt.regexp.shared.RegExp; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.resource.Path; - -/** - * Java customizer adds an anchor link to the lines that match a stack trace line pattern and - * installs a handler function for the link. The handler parses the stack trace line, searches for - * the candidate Java files to navigate to, opens the first file (of the found candidates) in editor - * and reveals it to the required line according to the stack trace line information - * - * @author Victor Rubezhny - */ -public class JavaOutputCustomizer extends AbstractOutputCustomizer { - - private static final RegExp LINE_AT = compile("(\\s+at .+\\(.+\\.java:\\d+\\))"); - - /** - * Constructs Java Output Customizer Object - * - * @param appContext - * @param editorAgent - */ - public JavaOutputCustomizer(AppContext appContext, EditorAgent editorAgent) { - super(appContext, editorAgent); - - exportAnchorClickHandlerFunction(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#canCustomize(java.lang.String) - */ - @Override - public boolean canCustomize(String text) { - return (LINE_AT.exec(text) != null); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.che.ide.extension.machine.client.outputspanel.console. - * OutputCustomizer#customize(java.lang.String) - */ - @Override - public String customize(String text) { - MatchResult matcher = LINE_AT.exec(text); - if (matcher != null) { - try { - int start = text.indexOf("at", 0) + "at".length(), - openBracket = text.indexOf("(", start), - column = text.indexOf(":", openBracket), - closingBracket = text.indexOf(")", column); - String qualifiedName = text.substring(start, openBracket).trim(); - String fileName = text.substring(openBracket + "(".length(), column).trim(); - int lineNumber = - Integer.valueOf(text.substring(column + ":".length(), closingBracket).trim()); - - String customText = text.substring(0, openBracket + "(".length()); - customText += - ""; - customText += text.substring(openBracket + "(".length(), closingBracket); - customText += ""; - customText += text.substring(closingBracket); - text = customText; - } catch (IndexOutOfBoundsException ex) { - // ignore - } catch (NumberFormatException ex) { - // ignore - } - } - - return text; - } - - /** - * A callback that is to be called for an anchor - * - * @param qualifiedName - * @param fileName - * @param lineNumber - */ - public void handleAnchorClick(String qualifiedName, String fileName, final int lineNumber) { - if (qualifiedName == null || fileName == null) { - return; - } - - String qualifiedClassName = - qualifiedName.lastIndexOf('.') != -1 - ? qualifiedName.substring(0, qualifiedName.lastIndexOf('.')) - : qualifiedName; - final String packageName = - qualifiedClassName.lastIndexOf('.') != -1 - ? qualifiedClassName.substring(0, qualifiedClassName.lastIndexOf('.')) - : ""; - - String relativeFilePath = - (packageName.isEmpty() ? "" : (packageName.replace(".", "/") + "/")) + fileName; - - collectChildren(appContext.getWorkspaceRoot(), Path.valueOf(relativeFilePath)) - .then( - files -> { - if (!files.isEmpty()) { - openFileInEditorAndReveal( - appContext, editorAgent, files.get(0).getLocation(), lineNumber, 0); - } - }); - } - - /* - * Sets up a java callback to be called for an anchor - */ - private native void exportAnchorClickHandlerFunction() /*-{ - var that = this; - $wnd.open = $entry(function(qualifiedName,fileName,lineNumber) { - that.@org.eclipse.che.ide.console.JavaOutputCustomizer::handleAnchorClick(*)(qualifiedName,fileName,lineNumber); - }); - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleView.java deleted file mode 100644 index 47ba405f166..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleView.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import org.eclipse.che.ide.api.mvp.View; - -/** - * View for output console. - * - * @author Artem Zatsarynnyi - */ -public interface OutputConsoleView extends View { - - /** - * Shows the command line to the console. - * - * @param commandLine command line - */ - void showCommandLine(String commandLine); - - /** - * Shows the command preview URL. - * - * @param previewUrl preview URL - */ - void showPreviewUrl(String previewUrl); - - /** - * Prints text. - * - * @param text text to print - * @param carriageReturn if {@code true} - next message should replace the current one, if {@code - * false} - next message will be printed in a new line - */ - void print(String text, boolean carriageReturn); - - /** - * Prints colored text. - * - * @param text text to print - * @param carriageReturn if {@code true} - next message should replace the current one, if {@code - * false} - next message will be printed in a new line - * @param color color of the text or NULL - */ - void print(String text, boolean carriageReturn, String color); - - /** - * Returns the console text. - * - * @return console text - */ - String getText(); - - /** Hides command title and command label. */ - void hideCommand(); - - /** Hides preview title and preview label. */ - void hidePreview(); - - /** - * Wraps text in the console. - * - * @param wrap set true to wrap the text - */ - void wrapText(boolean wrap); - - /** Enables auto scroll when output. */ - void enableAutoScroll(boolean enable); - - /** Clears the console. */ - void clearConsole(); - - /** - * Toggles `Wrap text` button. - * - * @param toggle use true to toggle the button - */ - void toggleWrapTextButton(boolean toggle); - - /** - * Toggles `Scroll to the end` button. - * - * @param toggle use true to toggle the button - */ - void toggleScrollToEndButton(boolean toggle); - - /** - * Sets visibility for Re-Run button. - * - * @param visible use true to show the button - */ - void setReRunButtonVisible(boolean visible); - - /** - * Sets visibility for Stop button. - * - * @param visible use true to show the button - */ - void setStopButtonVisible(boolean visible); - - /** - * Enables or disables Stop process button. - * - * @param enable new enabled state for the button - */ - void enableStopButton(boolean enable); - - /** Action handler for the view actions/controls. */ - interface ActionDelegate { - - /** Handle click on `Run process` button. */ - void reRunProcessButtonClicked(); - - /** Handle click on `Stop process` button. */ - void stopProcessButtonClicked(); - - /** Handle click on `Clear console` button. */ - void clearOutputsButtonClicked(); - - /** Handle click on `Download outputs` button. */ - void downloadOutputsButtonClicked(); - - /** Handle click on `Wrap text` button. */ - void wrapTextButtonClicked(); - - /** Handle click on `Scroll to end` button. */ - void scrollToBottomButtonClicked(); - - /** Handle scrolling the output. */ - void onOutputScrolled(boolean bottomReached); - - /** Returns the customizer for the console output */ - OutputCustomizer getCustomizer(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.java deleted file mode 100644 index 1824bfb7656..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -import static com.google.common.collect.Lists.newArrayList; -import static com.google.gwt.regexp.shared.RegExp.compile; -import static org.eclipse.che.ide.ui.menu.PositionController.HorizontalAlign.MIDDLE; -import static org.eclipse.che.ide.ui.menu.PositionController.VerticalAlign.BOTTOM; - -import com.google.common.base.Strings; -import com.google.gwt.core.client.GWT; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Node; -import com.google.gwt.dom.client.NodeList; -import com.google.gwt.dom.client.PreElement; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.ScrollEvent; -import com.google.gwt.event.dom.client.ScrollHandler; -import com.google.gwt.regexp.shared.MatchResult; -import com.google.gwt.regexp.shared.RegExp; -import com.google.gwt.safehtml.shared.SafeHtml; -import com.google.gwt.safehtml.shared.SafeHtmlUtils; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.Anchor; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.List; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.machine.MachineResources; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.util.Pair; -import org.vectomatic.dom.svg.ui.SVGImage; - -/** - * View representation of output console. - * - * @author Artem Zatsarynnyi - * @author Vitaliy Guliy - */ -public class OutputConsoleViewImpl extends Composite implements OutputConsoleView, ScrollHandler { - - private final List> output2Color = - newArrayList( - new Pair<>(compile("\\[\\s*(DOCKER)\\s*\\]"), "#4EABFF"), - new Pair<>(compile("\\[\\s*(ERROR)\\s*\\]"), "#FF2727"), - new Pair<>(compile("\\[\\s*(WARN)\\s*\\]"), "#F5A623"), - new Pair<>(compile("\\[\\s*(STDOUT)\\s*\\]"), "#8ED72B"), - new Pair<>(compile("\\[\\s*(STDERR)\\s*\\]"), "#FF4343")); - - interface OutputConsoleViewUiBinder extends UiBinder {} - - private static final OutputConsoleViewUiBinder UI_BINDER = - GWT.create(OutputConsoleViewUiBinder.class); - - private ActionDelegate delegate; - - @UiField protected DockLayoutPanel consolePanel; - - @UiField protected FlowPanel commandPanel; - - @UiField protected FlowPanel previewPanel; - - @UiField Label commandTitle; - - @UiField Label commandLabel; - - @UiField ScrollPanel scrollPanel; - - @UiField FlowPanel consoleLines; - - @UiField Anchor previewUrlLabel; - - @UiField protected FlowPanel reRunProcessButton; - - @UiField protected FlowPanel stopProcessButton; - - @UiField protected FlowPanel clearOutputsButton; - - @UiField protected FlowPanel downloadOutputsButton; - - @UiField FlowPanel wrapTextButton; - - @UiField FlowPanel scrollToBottomButton; - - /** If true - next printed line should replace the previous one. */ - private boolean carriageReturn; - - /** Follow the output. Scroll to the bottom automatically when true. */ - private boolean followOutput = true; - - /** Scroll to the bottom immediately when view become visible. */ - private boolean followScheduled = false; - - @Inject - public OutputConsoleViewImpl(MachineResources resources, CoreLocalizationConstant localization) { - initWidget(UI_BINDER.createAndBindUi(this)); - - reRunProcessButton.add(new SVGImage(resources.reRunIcon())); - stopProcessButton.add(new SVGImage(resources.stopIcon())); - clearOutputsButton.add(new SVGImage(resources.clearOutputsIcon())); - downloadOutputsButton.getElement().setInnerHTML(FontAwesome.DOWNLOAD); - - wrapTextButton.add(new SVGImage(resources.lineWrapIcon())); - scrollToBottomButton.add(new SVGImage(resources.scrollToBottomIcon())); - - scrollPanel.addDomHandler(this, ScrollEvent.getType()); - - reRunProcessButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (!reRunProcessButton.getElement().hasAttribute("disabled") && delegate != null) { - delegate.reRunProcessButtonClicked(); - } - } - }, - ClickEvent.getType()); - - stopProcessButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (!stopProcessButton.getElement().hasAttribute("disabled") && delegate != null) { - delegate.stopProcessButtonClicked(); - } - } - }, - ClickEvent.getType()); - - clearOutputsButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (!clearOutputsButton.getElement().hasAttribute("disabled") && delegate != null) { - delegate.clearOutputsButtonClicked(); - } - } - }, - ClickEvent.getType()); - - downloadOutputsButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (delegate != null) { - delegate.downloadOutputsButtonClicked(); - } - } - }, - ClickEvent.getType()); - - wrapTextButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent clickEvent) { - if (!wrapTextButton.getElement().hasAttribute("disabled") && delegate != null) { - delegate.wrapTextButtonClicked(); - } - } - }, - ClickEvent.getType()); - - scrollToBottomButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (!scrollToBottomButton.getElement().hasAttribute("disabled") && delegate != null) { - delegate.scrollToBottomButtonClicked(); - } - } - }, - ClickEvent.getType()); - - Tooltip.create( - (elemental.dom.Element) reRunProcessButton.getElement(), - BOTTOM, - MIDDLE, - localization.consolesReRunButtonTooltip()); - - Tooltip.create( - (elemental.dom.Element) stopProcessButton.getElement(), - BOTTOM, - MIDDLE, - localization.consolesStopButtonTooltip()); - - Tooltip.create( - (elemental.dom.Element) clearOutputsButton.getElement(), - BOTTOM, - MIDDLE, - localization.consolesClearOutputsButtonTooltip()); - - Tooltip.create( - (elemental.dom.Element) wrapTextButton.getElement(), - BOTTOM, - MIDDLE, - localization.consolesWrapTextButtonTooltip()); - - Tooltip.create( - (elemental.dom.Element) scrollToBottomButton.getElement(), - BOTTOM, - MIDDLE, - localization.consolesAutoScrollButtonTooltip()); - - toggleScrollToEndButton(followOutput); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void hideCommand() { - consolePanel.setWidgetHidden(commandPanel, true); - } - - @Override - public void hidePreview() { - consolePanel.setWidgetHidden(previewPanel, true); - } - - @Override - public void wrapText(boolean wrap) { - if (wrap) { - consoleLines.getElement().setAttribute("wrap", ""); - } else { - consoleLines.getElement().removeAttribute("wrap"); - } - } - - @Override - public void enableAutoScroll(boolean enable) { - followOutput = enable; - followOutput(); - } - - @Override - public void clearConsole() { - consoleLines.getElement().setInnerHTML(""); - } - - @Override - public void toggleWrapTextButton(boolean toggle) { - if (toggle) { - wrapTextButton.getElement().setAttribute("toggled", ""); - } else { - wrapTextButton.getElement().removeAttribute("toggled"); - } - } - - @Override - public void toggleScrollToEndButton(boolean toggle) { - if (toggle) { - scrollToBottomButton.getElement().setAttribute("toggled", ""); - } else { - scrollToBottomButton.getElement().removeAttribute("toggled"); - } - } - - @Override - public void setReRunButtonVisible(boolean visible) { - reRunProcessButton.setVisible(visible); - } - - @Override - public void setStopButtonVisible(boolean visible) { - stopProcessButton.setVisible(visible); - } - - @Override - public void enableStopButton(boolean enable) { - if (enable) { - stopProcessButton.getElement().removeAttribute("disabled"); - } else { - stopProcessButton.getElement().setAttribute("disabled", ""); - } - } - - @Override - public void showCommandLine(String commandLine) { - commandLabel.setText(commandLine); - Tooltip.create((elemental.dom.Element) commandLabel.getElement(), BOTTOM, MIDDLE, commandLine); - } - - @Override - public void showPreviewUrl(String previewUrl) { - if (Strings.isNullOrEmpty(previewUrl)) { - hidePreview(); - } else { - previewUrlLabel.setText(previewUrl); - previewUrlLabel.setHref(previewUrl); - Tooltip.create( - (elemental.dom.Element) previewUrlLabel.getElement(), BOTTOM, MIDDLE, previewUrl); - } - } - - @Override - public void print(String text, boolean carriageReturn) { - print(text, carriageReturn, null); - } - - @Override - public void print(final String text, boolean carriageReturn, String color) { - - if (consoleLines.getElement().getChildCount() > 500) { - consoleLines.getElement().getFirstChild().removeFromParent(); - } - - if (this.carriageReturn) { - Node lastChild = consoleLines.getElement().getLastChild(); - if (lastChild != null) { - lastChild.removeFromParent(); - } - } - - this.carriageReturn = carriageReturn; - - final SafeHtml colorOutput = - new SafeHtml() { - @Override - public String asString() { - - if (Strings.isNullOrEmpty(text)) { - return " "; - } - - String encoded = SafeHtmlUtils.htmlEscape(text); - if (delegate != null) { - if (delegate.getCustomizer() != null) { - if (delegate.getCustomizer().canCustomize(encoded)) { - encoded = delegate.getCustomizer().customize(encoded); - } - } - } - - for (final Pair pair : output2Color) { - final MatchResult matcher = pair.first.exec(encoded); - - if (matcher != null) { - return encoded.replaceAll( - matcher.getGroup(1), - "" - + matcher.getGroup(1) - + ""); - } - } - - return encoded; - } - }; - - PreElement pre = DOM.createElement("pre").cast(); - pre.setInnerSafeHtml(colorOutput); - if (color != null) { - pre.getStyle().setColor(color); - } - consoleLines.getElement().appendChild(pre); - - followOutput(); - } - - @Override - public String getText() { - String text = ""; - NodeList nodes = consoleLines.getElement().getChildNodes(); - - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.getItem(i); - Element element = node.cast(); - text += element.getInnerText() + "\r\n"; - } - - return text; - } - - @Override - public void onScroll(ScrollEvent event) { - // Do nothing if content height less scroll area height - if (scrollPanel.getElement().getScrollHeight() < scrollPanel.getElement().getOffsetHeight()) { - followOutput = true; - if (delegate != null) { - delegate.onOutputScrolled(followOutput); - } - return; - } - - // Follow output if scroll area is scrolled to the end - if (scrollPanel.getElement().getScrollTop() + scrollPanel.getElement().getOffsetHeight() - >= scrollPanel.getElement().getScrollHeight()) { - followOutput = true; - } else { - followOutput = false; - } - - if (delegate != null) { - delegate.onOutputScrolled(followOutput); - } - } - - /** Scrolls to the bottom if following the output is enabled. */ - private void followOutput() { - if (!followOutput) { - return; - } - - /** Scroll bottom immediately if view is visible */ - if (scrollPanel.getElement().getOffsetParent() != null) { - scrollPanel.scrollToBottom(); - scrollPanel.scrollToLeft(); - return; - } - - /** Otherwise, check the visibility periodically and scroll the view when it's visible */ - if (!followScheduled) { - followScheduled = true; - - Scheduler.get() - .scheduleFixedPeriod( - new Scheduler.RepeatingCommand() { - @Override - public boolean execute() { - if (!followOutput) { - followScheduled = false; - return false; - } - - if (scrollPanel.getElement().getOffsetParent() != null) { - scrollPanel.scrollToBottom(); - scrollPanel.scrollToLeft(); - followScheduled = false; - return false; - } - - return true; - } - }, - 500); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.ui.xml deleted file mode 100644 index bf9db4a7820..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputConsoleViewImpl.ui.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - /** - * Toolbar on the left with buttons. - */ - .toolbar { - overflow: hidden; - background-color: consolesToolbarBackground; - border-right: 1px solid colsolesToolbarBorderColor; - position: absolute; - overflow: hidden; - } - - .toolbarButton { - width: 14px; - height: 14px; - margin-left: 1px; - margin-top: 4px; - cursor: pointer; - font-size: 9px; - line-height: 17px; - font-family: "Droid Sans Mono", monospace; - text-align: center; - font-weight: normal; - overflow: hidden; - color: consolesToolbarButtonColor; - opacity: 0.8; - position: relative; - border: 1px solid transparent; - background-clip: content-box; - } - - .wrapTextButton { - position: absolute; - left: 0px; - bottom: 22px; - } - - .scrollToEndButton { - position: absolute; - left: 0px; - bottom: 4px; - } - - .toolbarButton > svg { - position: absolute; - left: 3px; - top: 3px; - } - - .toolbarButton:HOVER { - color: consolesToolbarHoveredButtonColor; - opacity: 1; - } - - .toolbarButton:ACTIVE { - color: white; - } - - .toolbarButton[toggled] { - opacity: 1; - background: consolesToolbarToggledButtonColor; - border: 1px solid consolesToolbarToggledButtonBorderColor; - } - - .toolbarButton[disabled], - .toolbarButton[disabled]:HOVER, - .toolbarButton[disabled]:ACTIVE { - opacity: 0.4; - color: consolesToolbarDisabledButtonColor; - background-color: transparent; - cursor: default; - } - - /** - * Header with command line and preview URL. - */ - .header { - background-color: editorPanelBackgroundColor; - -webkit-user-select: none; - user-select: none; - -moz-user-select: none; - line-height: 14px; - padding-left: 1px; - } - - .label { - width: 60px; - } - - a.link { - font-size: fontSize; - font-family: outputFontFamily; - color: outputLinkColor; - } - - .link:hover { - text-decoration: underline; - } - - a.value, - div.value { - white-space: nowrap; - text-overflow: ellipsis; - -webkit-user-select: text; - user-select: text; - -moz-user-select: text; - max-width: literal("calc(100% - 70px)"); - overflow: hidden; - } - - div.value { - color: successColor; - } - - .commandTitle { - font-family: outputFontFamily; - display: inline-block; - color: mainFontColor; - font-size: fontSize; - float: left; - margin: 0; - } - - /** - * Console output area. - */ - .consolePanel { - background-color: outputBackgroundColor; - position: absolute; - overflow: hidden; - } - - .console { - color: outputFontColor; - padding: 1px; - overflow: auto; - position: absolute!important; - left: 0px; - top: 0px; - right: 0px; - bottom: 0px; - - /* enable text selection*/ - -moz-user-select: text; - -webkit-user-select: text; - user-select: text; - } - - .console pre { - font-family: outputFontFamily; - font-size: consoleFontSize; - line-height: consoleLineHeight; - } - - .consoleLines { - width: 100%; - } - - .consoleLines > pre { - width: inherit; - padding: 0; - margin: 0; - } - - .consoleLines[wrap] > pre { - white-space: pre-wrap; - word-wrap: break-word; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputCustomizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputCustomizer.java deleted file mode 100644 index dc42c60bf75..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/OutputCustomizer.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2017 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.console; - -/** - * An interface to allow output text customizations - * - * @author Victor Rubezhny - */ -public interface OutputCustomizer { - /** Checks if the specified text can be/has to be customized */ - boolean canCustomize(String text); - - /** Returns the result of customization for the specified text */ - String customize(String text); -} 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 deleted file mode 100644 index 01e16a2b22a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/AppContextImpl.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.context; - -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Lists.newArrayList; -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.UPDATED; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.eclipse.che.api.core.model.factory.Factory; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.app.CurrentUser; -import org.eclipse.che.ide.api.app.StartUpAction; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.factory.model.FactoryImpl; -import org.eclipse.che.ide.api.project.type.ProjectTypesLoadedEvent; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.resources.ResourcePathComparator; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.api.selection.SelectionChangedEvent; -import org.eclipse.che.ide.api.selection.SelectionChangedHandler; -import org.eclipse.che.ide.api.workspace.WorkspaceReadyEvent; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.EnvironmentImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.api.workspace.model.VolumeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.resources.impl.ResourceManager; -import org.eclipse.che.ide.ui.smartTree.data.HasDataObject; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Implementation of {@link AppContext}. - * - * @author Vitaly Parfonov - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class AppContextImpl - implements AppContext, - SelectionChangedHandler, - ResourceChangedHandler, - WorkspaceStoppedEvent.Handler { - - private final List projectsInImport; - private final EventBus eventBus; - private final ResourceManager.ResourceManagerFactory resourceManagerFactory; - private final Provider editorAgentProvider; - private final Provider wsAgentServerUtilProvider; - - private final List rootProjects = newArrayList(); - private final List selectedResources = newArrayList(); - - /** - * List of actions with parameters which comes from startup URL. Can be processed after IDE - * initialization as usual after starting ws-agent. - */ - private final List startAppActions; - - private String applicationWebsocketId; - private CurrentUser currentUser; - private WorkspaceImpl workspace; - private FactoryImpl factory; - - private ResourceManager resourceManager; - private Map properties; - - @Inject - public AppContextImpl( - EventBus eventBus, - ResourceManager.ResourceManagerFactory resourceManagerFactory, - Provider editorAgentProvider, - Provider wsAgentServerUtilProvider) { - this.eventBus = eventBus; - this.resourceManagerFactory = resourceManagerFactory; - this.editorAgentProvider = editorAgentProvider; - this.wsAgentServerUtilProvider = wsAgentServerUtilProvider; - this.startAppActions = new ArrayList<>(); - - projectsInImport = new ArrayList<>(); - - eventBus.addHandler(ProjectTypesLoadedEvent.TYPE, e -> initResourceManager()); - - eventBus.addHandler(SelectionChangedEvent.TYPE, this); - eventBus.addHandler(ResourceChangedEvent.getType(), this); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this); - } - - private static native String getMasterApiPathFromIDEConfig() /*-{ - if ($wnd.IDE && $wnd.IDE.config) { - return $wnd.IDE.config.restContext; - } else { - return null; - } - }-*/; - - @Override - public WorkspaceImpl getWorkspace() { - return workspace; - } - - /** Sets the current workspace. */ - public void setWorkspace(WorkspaceImpl workspace) { - this.workspace = new WorkspaceImpl(workspace); - } - - @Override - public String getWorkspaceId() { - if (workspace == null) { - throw new IllegalArgumentException(getClass() + " Workspace can not be null."); - } - - return workspace.getId(); - } - - @Override - public CurrentUser getCurrentUser() { - if (currentUser == null) { - throw new IllegalStateException(getClass() + " Current Workspace can not be null."); - } - return currentUser; - } - - public void setCurrentUser(CurrentUser user) { - this.currentUser = user; - } - - @Override - public List getImportingProjects() { - return projectsInImport; - } - - @Override - public void addProjectToImporting(String pathToProject) { - projectsInImport.add(pathToProject); - } - - @Override - public void removeProjectFromImporting(String pathToProject) { - projectsInImport.remove(pathToProject); - } - - @Override - public List getStartAppActions() { - return startAppActions; - } - - public void setStartAppActions(List startAppActions) { - this.startAppActions.addAll(startAppActions); - } - - @Override - public FactoryImpl getFactory() { - return factory; - } - - public void setFactory(Factory factory) { - this.factory = new FactoryImpl(factory); - } - - private void initResourceManager() { - clearProjects(); - - resourceManager = resourceManagerFactory.newResourceManager(); - resourceManager - .getWorkspaceProjects() - .then( - projects -> { - rootProjects.clear(); - addAll(rootProjects, projects); - rootProjects.sort(ResourcePathComparator.getInstance()); - eventBus.fireEvent(new WorkspaceReadyEvent(projects)); - }) - .catchError( - error -> { - Log.error(AppContextImpl.class, error.getCause()); - }); - } - - /** {@inheritDoc} */ - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - final Resource resource = delta.getResource(); - - if (delta.getKind() == ADDED) { - if ((delta.getFlags() & (MOVED_FROM | MOVED_TO)) != 0) { - - 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) { - - for (Project rootProject : rootProjects) { - if (rootProject.getLocation().equals(resource.getLocation()) && resource.isProject()) { - rootProjects.set(rootProjects.indexOf(rootProject), resource.asProject()); - break; - } - } - - for (Resource selectedResource : selectedResources) { - if (selectedResource.getLocation().equals(resource.getLocation())) { - selectedResources.set(selectedResources.indexOf(selectedResource), resource); - break; - } - } - } - } - - @Override - public Path getProjectsRoot() { - - // default root (backward compatible solution) - Path projectsRoot = Path.valueOf("/projects"); - - if (workspace != null && workspace.getStatus().equals(WorkspaceStatus.RUNNING)) { - - String machineName = - wsAgentServerUtilProvider.get().getWsAgentServerMachine().get().getName(); - String activeEnv = workspace.getRuntime().getActiveEnv(); - - EnvironmentImpl environment = workspace.getConfig().getEnvironments().get(activeEnv); - VolumeImpl vol = null; - if (environment != null) { - vol = environment.getMachines().get(machineName).getVolume("projects"); - } - - // if voulme exists return its path, otherwise use backward compatible path (/projects) - if (vol != null) { - projectsRoot = Path.valueOf(vol.getPath()); - } - } - - Log.debug( - AppContextImpl.class, - "Project Root: " + projectsRoot + " workspace: " + workspace.getConfig().getName()); - - return projectsRoot; - } - - @Override - public void onSelectionChanged(SelectionChangedEvent event) { - final Selection selection = event.getSelection(); - if (selection instanceof Selection.NoSelectionProvided) { - return; - } - - List tempSelectedResources = newArrayList(); - - if (selection != null) { - for (Object o : selection.getAllElements()) { - if (o instanceof HasDataObject && ((HasDataObject) o).getData() instanceof Resource) { - tempSelectedResources.add((Resource) ((HasDataObject) o).getData()); - } else if (o instanceof Resource) { - tempSelectedResources.add((Resource) o); - } - } - } - - if (!tempSelectedResources.isEmpty()) { - selectedResources.clear(); - selectedResources.addAll(tempSelectedResources); - } - } - - @Override - public Project[] getProjects() { - return rootProjects.toArray(new Project[rootProjects.size()]); - } - - @Override - public Container getWorkspaceRoot() { - checkState(resourceManager != null, "Workspace configuration has not been received yet"); - - return resourceManager.getWorkspaceRoot(); - } - - @Override - public Resource getResource() { - return selectedResources.isEmpty() ? null : selectedResources.get(0); - } - - @Override - public Resource[] getResources() { - return selectedResources.toArray(new Resource[selectedResources.size()]); - } - - @Override - public Project getRootProject() { - if (rootProjects.isEmpty()) { - return null; - } - - if (selectedResources.isEmpty()) { - EditorAgent editorAgent = editorAgentProvider.get(); - if (editorAgent == null) { - return null; - } - - final EditorPartPresenter editor = editorAgent.getActiveEditor(); - if (editor == null) { - return null; - } - - final VirtualFile file = editor.getEditorInput().getFile(); - - if (file instanceof SyntheticNode) { - final Path projectPath = ((SyntheticNode) file).getProject(); - for (Project project : rootProjects) { - if (project.getLocation().equals(projectPath)) { - return project; - } - } - } - - return null; - } else { - Project root = null; - - 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 < selectedResources.size(); i++) { - if (!root.getLocation().isPrefixOf(selectedResources.get(i).getLocation())) { - return null; - } - } - - return root; - } - } - - @Override - public String getMasterApiEndpoint() { - return getMasterApiPathFromIDEConfig(); - } - - private void clearProjects() { - if (!rootProjects.isEmpty()) { - rootProjects.clear(); - } - } - - @Override - public String getWsAgentServerApiEndpoint() { - Optional server = wsAgentServerUtilProvider.get().getWsAgentHttpServer(); - - if (server.isPresent()) { - return server.get().getUrl(); - } - - throw new RuntimeException("wsagent server doesn't exist"); - } - - @Override - public Optional getApplicationId() { - return Optional.ofNullable(applicationWebsocketId); - } - - @Override - public void setApplicationWebsocketId(String id) { - this.applicationWebsocketId = id; - } - - @Override - public Map getProperties() { - if (properties == null) { - properties = new HashMap<>(); - } - return properties; - } - - @Override - public void onWorkspaceStopped(WorkspaceStoppedEvent event) { - clearProjects(); - resourceManager = null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/BrowserAddress.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/BrowserAddress.java deleted file mode 100644 index 1ff1c4c6642..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/BrowserAddress.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.context; - -import com.google.gwt.safehtml.shared.SimpleHtmlSanitizer; -import com.google.gwt.user.client.Window; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.ProductInfoDataProvider; - -/** - * Helps to update address and extract information from current address. - * - * @author Alexander Andrienko - * @author Sergii Leschenko - */ -@Singleton -public class BrowserAddress { - private static final int NAMESPACE_START_SEGMENT = 1; - - private final ProductInfoDataProvider productInfoDataProvider; - - @Inject - public BrowserAddress(ProductInfoDataProvider productInfoDataProvider) { - this.productInfoDataProvider = productInfoDataProvider; - } - - /** - * Updates browser's address along with tab title in accordance to current running workspace. - * - * @param namespace namespace of workspace - * @param workspaceName name of the current running workspace. Can be null or empty if workspace - * was stopped. - */ - public void setAddress(String namespace, String workspaceName) { - String browserUrl = Window.Location.getPath(); - int currentSlashIndex = 0; - int currentSlashNumber = 0; - while (currentSlashNumber < NAMESPACE_START_SEGMENT) { - currentSlashIndex = browserUrl.indexOf('/', currentSlashIndex); - currentSlashNumber++; - } - - String baseUrl = - browserUrl.substring(0, currentSlashIndex) + "/" + namespace + "/" + workspaceName; - - String title; - if (workspaceName == null || workspaceName.isEmpty()) { - title = productInfoDataProvider.getDocumentTitle(); - } else { - title = productInfoDataProvider.getDocumentTitle(workspaceName); - } - doSetAddress(baseUrl, title); - } - - /** Returns workspace name from current address or empty string when it is undefined. */ - public String getWorkspaceName() { - String workspaceKey = getWorkspaceKey(); - String[] split = workspaceKey.split("/", 2); - if (split.length != 2) { - return ""; - } - return workspaceKey.substring(workspaceKey.lastIndexOf("/") + 1); - } - - /** Returns workspace key from current address or empty string when it is undefined. */ - public String getWorkspaceKey() { - String browserUrl = Window.Location.getPath(); - - // TODO temporary to make it work with not "path obliged" URL - String wsParam = Window.Location.getParameter("ws"); - if (wsParam != null) return wsParam; - // - - String[] urlParts = browserUrl.split("/", NAMESPACE_START_SEGMENT + 1); - if (urlParts.length < NAMESPACE_START_SEGMENT) { - return ""; - } else { - return SimpleHtmlSanitizer.sanitizeHtml(urlParts[NAMESPACE_START_SEGMENT]).asString(); - } - } - - private native void doSetAddress(String url, String title) /*-{ - try { - var window = $wnd; - - if (!window["_history_relocation_id"]) { - window["_history_relocation_id"] = 0; - } - - window.top.document.title = title; - - window.history.pushState(window["_history_relocation_id"], window.top.document.title, url); - window["_history_relocation_id"]++; - } catch (e) { - console.log(e.message); - } - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/CurrentUserImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/CurrentUserImpl.java deleted file mode 100644 index 2dec440e470..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/context/CurrentUserImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.context; - -import java.util.Map; -import org.eclipse.che.ide.api.app.CurrentUser; - -/** Implementation of the {@link CurrentUser}. */ -public class CurrentUserImpl implements CurrentUser { - - private String id; - private Map preferences; - - public CurrentUserImpl() {} - - public CurrentUserImpl(String id, Map preferences) { - this.id = id; - this.preferences = preferences; - } - - @Override - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Map getPreferences() { - return preferences; - } - - public void setPreferences(Map preferences) { - this.preferences = preferences; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/AgentURLModifier.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/AgentURLModifier.java deleted file mode 100644 index 0dae26ef5e0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/AgentURLModifier.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.inject.Singleton; -import java.util.Optional; -import javax.inject.Inject; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; - -/** - * Inserts in each URL machine token. - * - * @author Anton Korneta - * @author Sergii Leshchenko - */ -@Singleton -public class AgentURLModifier { - - private final AppContext appContext; - - @Inject - public AgentURLModifier(AppContext appContext) { - this.appContext = appContext; - } - - /** - * Changes source url by adding of machine token. - * - * @param agentUrl any url to the agent - * @return modified url - */ - public String modify(String agentUrl) { - Optional machineToken = getMachineToken(); - return machineToken - .map(s -> agentUrl + (agentUrl.contains("?") ? '&' : '?') + "token=" + s) - .orElse(agentUrl); - } - - private Optional getMachineToken() { - WorkspaceImpl currentWorkspace = appContext.getWorkspace(); - if (currentWorkspace == null) { - return Optional.empty(); - } - - RuntimeImpl runtime = currentWorkspace.getRuntime(); - if (runtime == null) { - return Optional.empty(); - } - - String machineToken = runtime.getMachineToken(); - return Optional.of(machineToken); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/BrowserTabCloseHandler.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/BrowserTabCloseHandler.java deleted file mode 100644 index 8ea3aeeadd0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/BrowserTabCloseHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import static org.eclipse.che.ide.preferences.pages.general.IdeGeneralPreferencesPresenter.PREF_IDE_GENERAL_TAB_CLOSING; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.WindowActionEvent; -import org.eclipse.che.ide.api.WindowActionHandler; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.preferences.PreferencesManager; - -/** Process browser tab leave events. */ -public class BrowserTabCloseHandler implements WindowActionHandler { - - private final Provider editorAgentProvider; - private final PreferencesManager preferencesManager; - private final CoreLocalizationConstant localizationConstant; - - /** Is used to not to block programmatic close/reload of browser tab. */ - private boolean closeImmediately; - - @Inject - public BrowserTabCloseHandler( - EventBus eventBus, - Provider editorAgentProvider, - PreferencesManager preferencesManager, - CoreLocalizationConstant localizationConstant) { - this.editorAgentProvider = editorAgentProvider; - this.preferencesManager = preferencesManager; - this.localizationConstant = localizationConstant; - - closeImmediately = false; - eventBus.addHandler(WindowActionEvent.TYPE, this); - } - - /** - * If true given then no checks will be performed before IDE leave. - * - *

        Typically should be invoked before automatic page leave/reloading. - */ - public void setCloseImmediately(boolean closeImmediately) { - this.closeImmediately = closeImmediately; - } - - @Override - public void onWindowClosing(WindowActionEvent event) { - if (!closeImmediately) { - if (!isEditorsClean()) { - event.setMessage(localizationConstant.changesMayBeLost()); - } else if (Boolean.parseBoolean(preferencesManager.getValue(PREF_IDE_GENERAL_TAB_CLOSING))) { - event.setMessage(localizationConstant.closeTabConfirmation()); - } - } - } - - @Override - public void onWindowClosed(WindowActionEvent event) { - // do nothing - } - - /** - * Checks whether content of all opened files is saved. - * - * @return true if no unsaved changes, false otherwise - */ - private boolean isEditorsClean() { - return editorAgentProvider - .get() - .getOpenedEditors() - .stream() - .noneMatch(EditorPartPresenter::isDirty); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ClientServerEventModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ClientServerEventModule.java deleted file mode 100644 index 88b7f6db97f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ClientServerEventModule.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.filewatcher.ClientServerEventService; -import org.eclipse.che.ide.api.filewatcher.FileWatcherExcludesOperation; -import org.eclipse.che.ide.editor.ClientServerEventServiceImpl; -import org.eclipse.che.ide.editor.EditorFileStatusNotificationOperation; - -/** GIN module for configuring client server events. */ -public class ClientServerEventModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(FileOpenCloseEventListener.class).asEagerSingleton(); - bind(ClientServerEventService.class).to(ClientServerEventServiceImpl.class).in(Singleton.class); - - bind(EditorFileStatusNotificationOperation.class).asEagerSingleton(); - bind(FileWatcherExcludesOperation.class).asEagerSingleton(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/CoreGinModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/CoreGinModule.java deleted file mode 100644 index 1b66cda6e5f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/CoreGinModule.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.gwt.inject.client.multibindings.GinMapBinder; -import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.SimpleEventBus; -import elemental.json.Json; -import elemental.json.JsonFactory; -import org.eclipse.che.ide.QueryParameters; -import org.eclipse.che.ide.actions.ActionApiModule; -import org.eclipse.che.ide.api.ProductInfoDataProvider; -import org.eclipse.che.ide.api.ProductInfoDataProviderImpl; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.exec.ConnectedEventHandler; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.command.exec.ExecAgentEventManager; -import org.eclipse.che.ide.api.extension.ExtensionGinModule; -import org.eclipse.che.ide.api.extension.ExtensionRegistry; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.api.reference.FqnProvider; -import org.eclipse.che.ide.api.selection.SelectionAgent; -import org.eclipse.che.ide.api.ssh.SshServiceClient; -import org.eclipse.che.ide.api.vcs.VcsChangeMarkerRenderFactory; -import org.eclipse.che.ide.clipboard.ClipboardModule; -import org.eclipse.che.ide.command.CommandApiModule; -import org.eclipse.che.ide.command.execute.JsonRpcExecAgentCommandManager; -import org.eclipse.che.ide.command.execute.JsonRpcExecAgentEventManager; -import org.eclipse.che.ide.console.ConsoleGinModule; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.debug.DebugApiModule; -import org.eclipse.che.ide.dto.DtoModule; -import org.eclipse.che.ide.editor.EditorApiModule; -import org.eclipse.che.ide.editor.preferences.EditorPreferencesModule; -import org.eclipse.che.ide.factory.FactoryGinModule; -import org.eclipse.che.ide.filetypes.FileTypeApiModule; -import org.eclipse.che.ide.jsonrpc.JsonRpcModule; -import org.eclipse.che.ide.keybinding.KeyBindingManager; -import org.eclipse.che.ide.machine.MachineApiModule; -import org.eclipse.che.ide.macro.MacroApiModule; -import org.eclipse.che.ide.notification.NotificationApiModule; -import org.eclipse.che.ide.oauth.OAuthApiModule; -import org.eclipse.che.ide.part.PartApiModule; -import org.eclipse.che.ide.preferences.PreferencesApiModule; -import org.eclipse.che.ide.processes.ProcessesGinModule; -import org.eclipse.che.ide.processes.runtime.RuntimeInfoGinModule; -import org.eclipse.che.ide.project.ProjectApiModule; -import org.eclipse.che.ide.resources.ResourceApiModule; -import org.eclipse.che.ide.search.factory.FindResultNodeFactory; -import org.eclipse.che.ide.selection.SelectionAgentImpl; -import org.eclipse.che.ide.ssh.SshServiceClientImpl; -import org.eclipse.che.ide.statepersistance.PersistenceApiModule; -import org.eclipse.che.ide.terminal.TerminalFactory; -import org.eclipse.che.ide.terminal.TerminalInitializer; -import org.eclipse.che.ide.theme.ThemeApiModule; -import org.eclipse.che.ide.ui.dialogs.askcredentials.AskCredentialsDialog; -import org.eclipse.che.ide.ui.loaders.PopupLoaderFactory; -import org.eclipse.che.ide.ui.loaders.request.LoaderFactory; -import org.eclipse.che.ide.user.AskCredentialsDialogImpl; -import org.eclipse.che.ide.workspace.WorkspaceApiModule; -import org.eclipse.che.ide.workspace.WorkspacePresenter; -import org.eclipse.che.ide.workspace.events.WorkspaceEventsModule; -import org.eclipse.che.providers.DynaProvider; -import org.eclipse.che.providers.DynaProviderImpl; - -/** - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - */ -@ExtensionGinModule -public class CoreGinModule extends AbstractGinModule { - - @Override - protected void configure() { - install(new JsonRpcModule()); - install(new WebSocketModule()); - install(new ClientServerEventModule()); - - install(new DtoModule()); - - install(new ThemeApiModule()); - install(new UiModule()); - install(new ClipboardModule()); - - bind(AppContextImpl.class).asEagerSingleton(); - bind(QueryParameters.class).asEagerSingleton(); - - install(new EditorApiModule()); - install(new EditorPreferencesModule()); - install(new NotificationApiModule()); - install(new FileTypeApiModule()); - install(new ResourceApiModule()); - install(new ActionApiModule()); - install(new PartApiModule()); - install(new DebugApiModule()); - install(new PreferencesApiModule()); - install(new PersistenceApiModule()); - install(new MacroApiModule()); - install(new MachineApiModule()); - install(new CommandApiModule()); - install(new ConsoleGinModule()); - install(new ProcessesGinModule()); - install(new ProjectApiModule()); - install(new OAuthApiModule()); - install(new WorkspaceEventsModule()); - install(new WorkspaceApiModule()); - install(new FactoryGinModule()); - install(new RuntimeInfoGinModule()); - - // configure miscellaneous core components - bind(StandardComponentInitializer.class).in(Singleton.class); - - bind(TerminalInitializer.class).in(Singleton.class); - - bind(DynaProvider.class).to(DynaProviderImpl.class); - - GinMapBinder.newMapBinder(binder(), String.class, FqnProvider.class); - - GinMapBinder.newMapBinder(binder(), String.class, VcsChangeMarkerRenderFactory.class); - - bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class); - - install(new GinFactoryModuleBuilder().build(LoaderFactory.class)); - install(new GinFactoryModuleBuilder().build(PopupLoaderFactory.class)); - - bind(ExtensionRegistry.class).in(Singleton.class); - - bind(AppContext.class).to(AppContextImpl.class); - - install(new GinFactoryModuleBuilder().build(FindResultNodeFactory.class)); - install(new GinFactoryModuleBuilder().build(TerminalFactory.class)); - - // clients for the REST services - bind(SshServiceClient.class).to(SshServiceClientImpl.class).in(Singleton.class); - - // IDE agents - bind(SelectionAgent.class).to(SelectionAgentImpl.class).asEagerSingleton(); - bind(KeyBindingAgent.class).to(KeyBindingManager.class).in(Singleton.class); - bind(WorkspaceAgent.class).to(WorkspacePresenter.class).in(Singleton.class); - - // Exec agent - bind(ExecAgentCommandManager.class).to(JsonRpcExecAgentCommandManager.class); - bind(ExecAgentEventManager.class).to(JsonRpcExecAgentEventManager.class); - bind(ConnectedEventHandler.class).asEagerSingleton(); - - bind(AskCredentialsDialog.class).to(AskCredentialsDialogImpl.class); - bind(ProductInfoDataProvider.class).to(ProductInfoDataProviderImpl.class); - - bind(FreeDiskSpaceNotifier.class).asEagerSingleton(); - } - - @Provides - @Singleton - protected JsonFactory provideJsonFactory() { - return Json.instance(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FileOpenCloseEventListener.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FileOpenCloseEventListener.java deleted file mode 100644 index b94424e99d4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FileOpenCloseEventListener.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import java.util.List; -import java.util.Objects; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.events.FileEvent; -import org.eclipse.che.ide.api.filewatcher.ClientServerEventService; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.loging.Log; - -/** - * File open/close event listener aimed to wrap {@link FileEvent} into {@code FileTrackingEvent} - * which is consumed by {@link ClientServerEventService} and sent to server side for further - * processing. - * - * @author Dmitry Kuleshov - */ -@Singleton -public class FileOpenCloseEventListener { - - @Inject - public FileOpenCloseEventListener( - final Provider editorAgentProvider, - final EventBus eventBus, - final ClientServerEventService clientServerEventService) { - - Log.debug(getClass(), "Adding file event listener"); - eventBus.addHandler( - FileEvent.TYPE, - new FileEvent.FileEventHandler() { - @Override - public void onFileOperation(FileEvent event) { - VirtualFile file = event.getFile(); - if (!(file instanceof Resource)) { - return; - } - - Path path = file.getLocation(); - EditorAgent editorAgent = editorAgentProvider.get(); - - switch (event.getOperationType()) { - case OPEN: - { - processFileOpen(path); - break; - } - case CLOSE: - { - final EditorPartPresenter closingEditor = - event.getEditorTab().getRelativeEditorPart(); - final List openedEditors = editorAgent.getOpenedEditors(); - - processFileClose(closingEditor, openedEditors, path); - - break; - } - default: - } - } - - private void processFileOpen(Path path) { - clientServerEventService.sendFileTrackingStartEvent(path.toString()); - } - - private void processFileClose( - EditorPartPresenter closingEditor, - List openedEditors, - Path path) { - for (final EditorPartPresenter editor : openedEditors) { - final Path editorFilePath = editor.getEditorInput().getFile().getLocation(); - if (Objects.equals(path, editorFilePath) && closingEditor != editor) { - return; - } - } - - clientServerEventService.sendFileTrackingStopEvent(path.toString()); - } - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FontAwesomeInjector.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FontAwesomeInjector.java deleted file mode 100644 index 4b2a02cdda1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FontAwesomeInjector.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.LinkElement; -import com.google.inject.Singleton; - -/** - * Injects Font Awesome icons. - * - * @author Vitaliy Guliy - */ -@Singleton -public class FontAwesomeInjector { - - public FontAwesomeInjector() { - LinkElement link = Document.get().createLinkElement(); - link.setRel("stylesheet"); - link.setHref(GWT.getModuleBaseForStaticFiles() + "font-awesome-4.5.0/css/font-awesome.min.css"); - - Document.get().getHead().appendChild(link); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceNotifier.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceNotifier.java deleted file mode 100644 index 84c088e388d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceNotifier.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.WARNING; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Handler that receives requests by websocket channel to notify the user about low disk space. - * - * @author Vlad Zhukovskyi - * @since 6.9.0 - */ -@Singleton -public class FreeDiskSpaceNotifier { - private static final String JSON_RPC_METHOD_NAME = "workspace/lowDiskSpace"; - - private NotificationManager notificationManager; - private CoreLocalizationConstant constant; - private boolean notified = false; - - @Inject - public FreeDiskSpaceNotifier( - NotificationManager notificationManager, CoreLocalizationConstant constant) { - this.notificationManager = notificationManager; - this.constant = constant; - } - - @Inject - private void configureHandlers(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName(JSON_RPC_METHOD_NAME) - .noParams() - .noResult() - .withConsumer(this::showNotification); - } - - private void showNotification(String endpointId) { - if (notified) { - Log.info(getClass(), "Low disk space. User has already notified."); - return; - } - - notificationManager.notify( - constant.lowDiskSpace(), constant.lowDiskSpaceDescription(), WARNING, EMERGE_MODE); - notified = true; - } - - public boolean isNotified() { - return notified; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceStatusBarAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceStatusBarAction.java deleted file mode 100644 index 6d5e0567b70..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/FreeDiskSpaceStatusBarAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.action.CustomComponentAction; -import org.eclipse.che.ide.api.action.Presentation; - -/** - * Message that displays in status bar if user has not enough free disk space. - * - * @author Vlad Zhukovskyi - * @since 6.9.0 - */ -@Singleton -public class FreeDiskSpaceStatusBarAction extends BaseAction implements CustomComponentAction { - - private FreeDiskSpaceNotifier notifier; - private CoreLocalizationConstant constant; - private HorizontalPanel panel; - - @Inject - public FreeDiskSpaceStatusBarAction( - FreeDiskSpaceNotifier notifier, CoreLocalizationConstant constant) { - super(); - this.notifier = notifier; - this.constant = constant; - - panel = new HorizontalPanel(); - panel.ensureDebugId("statusBarFreeDiskSpacePanel"); - } - - @Override - public void actionPerformed(ActionEvent e) {} - - @Override - public void update(ActionEvent e) { - panel.clear(); - - if (notifier.isNotified()) { - Widget icon = new HTML(FontAwesome.EXCLAMATION_TRIANGLE); - icon.getElement().getStyle().setMarginRight(5., Style.Unit.PX); - panel.add(icon); - - Label headLabel = new Label(constant.lowDiskSpaceStatusBarMessage()); - headLabel.ensureDebugId("statusBarProjectFreeDiskSpaceNotification"); - Style headLabelStyle = headLabel.getElement().getStyle(); - headLabelStyle.setMarginRight(5., Style.Unit.PX); - panel.add(headLabel); - } - } - - @Override - public Widget createCustomComponent(Presentation presentation) { - return panel; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ServerSubscriptionBroadcaster.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ServerSubscriptionBroadcaster.java deleted file mode 100644 index f6e12a80e76..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/ServerSubscriptionBroadcaster.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import static org.eclipse.che.api.core.jsonrpc.commons.ClientSubscriptionHandler.CLIENT_SUBSCRIBE_METHOD_NAME; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; - -/** Broadcaster sends subscription event to the server when client has already started. */ -@Singleton -public class ServerSubscriptionBroadcaster { - private boolean isSubscribed = false; - - @Inject - private void subscribe(RequestTransmitter requestTransmitter) { - if (isSubscribed) { - return; - } - - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(CLIENT_SUBSCRIBE_METHOD_NAME) - .noParams() - .sendAndSkipResult(); - - isSubscribed = true; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java deleted file mode 100644 index 2e846e6c739..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/StandardComponentInitializer.java +++ /dev/null @@ -1,1050 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import static org.eclipse.che.ide.actions.EditorActions.CLOSE; -import static org.eclipse.che.ide.actions.EditorActions.CLOSE_ALL; -import static org.eclipse.che.ide.actions.EditorActions.CLOSE_ALL_EXCEPT_PINNED; -import static org.eclipse.che.ide.actions.EditorActions.CLOSE_OTHER; -import static org.eclipse.che.ide.actions.EditorActions.PIN_TAB; -import static org.eclipse.che.ide.actions.EditorActions.REOPEN_CLOSED; -import static org.eclipse.che.ide.actions.EditorActions.SPLIT_HORIZONTALLY; -import static org.eclipse.che.ide.actions.EditorActions.SPLIT_VERTICALLY; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_ASSISTANT; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_CENTER_TOOLBAR; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_COMMAND_EXPLORER_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_CONSOLES_TREE_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_EDIT; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_EDITOR_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_FILE_NEW; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_HELP; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_CONTEXT_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_MAIN_TOOLBAR; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_PART_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_PROFILE; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_PROJECT; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_RECENT_FILES; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_RIGHT_MAIN_MENU; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_RIGHT_STATUS_PANEL; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_RIGHT_TOOLBAR; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_TOOLBAR_CONTROLLER; -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_WORKSPACE; -import static org.eclipse.che.ide.api.action.IdeActions.TOOL_WINDOWS_GROUP; -import static org.eclipse.che.ide.api.constraints.Anchor.AFTER; -import static org.eclipse.che.ide.api.constraints.Constraints.FIRST; -import static org.eclipse.che.ide.api.constraints.Constraints.LAST; -import static org.eclipse.che.ide.part.editor.recent.RecentFileStore.RECENT_GROUP_ID; -import static org.eclipse.che.ide.projecttype.BlankProjectWizardRegistrar.BLANK_CATEGORY; -import static org.eclipse.che.ide.util.input.KeyCodeMap.ARROW_DOWN; -import static org.eclipse.che.ide.util.input.KeyCodeMap.ARROW_UP; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.Map; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.actions.AddToFileWatcherExcludesAction; -import org.eclipse.che.ide.actions.CloseActiveEditorAction; -import org.eclipse.che.ide.actions.CollapseAllAction; -import org.eclipse.che.ide.actions.CompleteAction; -import org.eclipse.che.ide.actions.ConvertFolderToProjectAction; -import org.eclipse.che.ide.actions.CreateProjectAction; -import org.eclipse.che.ide.actions.DeleteResourceAction; -import org.eclipse.che.ide.actions.DownloadProjectAction; -import org.eclipse.che.ide.actions.DownloadResourceAction; -import org.eclipse.che.ide.actions.DownloadWsAction; -import org.eclipse.che.ide.actions.EditFileAction; -import org.eclipse.che.ide.actions.ExpandEditorAction; -import org.eclipse.che.ide.actions.FormatterAction; -import org.eclipse.che.ide.actions.FullTextSearchAction; -import org.eclipse.che.ide.actions.GoIntoAction; -import org.eclipse.che.ide.actions.HotKeysListAction; -import org.eclipse.che.ide.actions.ImportProjectAction; -import org.eclipse.che.ide.actions.LinkWithEditorAction; -import org.eclipse.che.ide.actions.NavigateToFileAction; -import org.eclipse.che.ide.actions.NewXmlFileAction; -import org.eclipse.che.ide.actions.OpenFileAction; -import org.eclipse.che.ide.actions.ProjectConfigurationAction; -import org.eclipse.che.ide.actions.RedoAction; -import org.eclipse.che.ide.actions.RefreshPathAction; -import org.eclipse.che.ide.actions.RemoveFromFileWatcherExcludesAction; -import org.eclipse.che.ide.actions.RenameItemAction; -import org.eclipse.che.ide.actions.RunCommandAction; -import org.eclipse.che.ide.actions.SaveAction; -import org.eclipse.che.ide.actions.SaveAllAction; -import org.eclipse.che.ide.actions.ShowConsoleTreeAction; -import org.eclipse.che.ide.actions.ShowHiddenFilesAction; -import org.eclipse.che.ide.actions.ShowPreferencesAction; -import org.eclipse.che.ide.actions.ShowReferenceAction; -import org.eclipse.che.ide.actions.ShowToolbarAction; -import org.eclipse.che.ide.actions.SignatureHelpAction; -import org.eclipse.che.ide.actions.SoftWrapAction; -import org.eclipse.che.ide.actions.UndoAction; -import org.eclipse.che.ide.actions.UploadFileAction; -import org.eclipse.che.ide.actions.UploadFolderAction; -import org.eclipse.che.ide.actions.common.HidePartAction; -import org.eclipse.che.ide.actions.common.MaximizePartAction; -import org.eclipse.che.ide.actions.common.RestorePartAction; -import org.eclipse.che.ide.actions.find.FindActionAction; -import org.eclipse.che.ide.actions.switching.CommandsExplorerDisplayingModeAction; -import org.eclipse.che.ide.actions.switching.EditorDisplayingModeAction; -import org.eclipse.che.ide.actions.switching.EventLogsDisplayingModeAction; -import org.eclipse.che.ide.actions.switching.FindResultDisplayingModeAction; -import org.eclipse.che.ide.actions.switching.ProjectExplorerDisplayingModeAction; -import org.eclipse.che.ide.actions.switching.TerminalDisplayingModeAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorRegistry; -import org.eclipse.che.ide.api.editor.texteditor.EditorResources; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.keybinding.KeyBuilder; -import org.eclipse.che.ide.api.parts.Perspective; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.command.actions.MoveCommandAction; -import org.eclipse.che.ide.command.actions.RenameCommandAction; -import org.eclipse.che.ide.command.editor.CommandEditorProvider; -import org.eclipse.che.ide.command.palette.ShowCommandsPaletteAction; -import org.eclipse.che.ide.devmode.DevModeOffAction; -import org.eclipse.che.ide.devmode.DevModeSetUpAction; -import org.eclipse.che.ide.imageviewer.ImageViewerProvider; -import org.eclipse.che.ide.imageviewer.PreviewImageAction; -import org.eclipse.che.ide.machine.MachineResources; -import org.eclipse.che.ide.newresource.NewFileAction; -import org.eclipse.che.ide.newresource.NewFolderAction; -import org.eclipse.che.ide.part.editor.actions.CloseAction; -import org.eclipse.che.ide.part.editor.actions.CloseAllAction; -import org.eclipse.che.ide.part.editor.actions.CloseAllExceptPinnedAction; -import org.eclipse.che.ide.part.editor.actions.CloseOtherAction; -import org.eclipse.che.ide.part.editor.actions.PinEditorTabAction; -import org.eclipse.che.ide.part.editor.actions.ReopenClosedFileAction; -import org.eclipse.che.ide.part.editor.actions.SplitHorizontallyAction; -import org.eclipse.che.ide.part.editor.actions.SplitVerticallyAction; -import org.eclipse.che.ide.part.editor.actions.SwitchNextEditorAction; -import org.eclipse.che.ide.part.editor.actions.SwitchPreviousEditorAction; -import org.eclipse.che.ide.part.editor.recent.ClearRecentListAction; -import org.eclipse.che.ide.part.editor.recent.OpenRecentFilesAction; -import org.eclipse.che.ide.part.explorer.project.TreeResourceRevealer; -import org.eclipse.che.ide.part.explorer.project.synchronize.ProjectConfigSynchronized; -import org.eclipse.che.ide.processes.NewTerminalAction; -import org.eclipse.che.ide.processes.OpenInTerminalAction; -import org.eclipse.che.ide.processes.actions.CloseConsoleAction; -import org.eclipse.che.ide.processes.actions.DisplayMachineOutputAction; -import org.eclipse.che.ide.processes.actions.PreviewSSHAction; -import org.eclipse.che.ide.processes.actions.ReRunProcessAction; -import org.eclipse.che.ide.processes.actions.StopProcessAction; -import org.eclipse.che.ide.processes.loading.ShowWorkspaceStatusAction; -import org.eclipse.che.ide.processes.runtime.ShowRuntimeInfoAction; -import org.eclipse.che.ide.resources.action.CopyResourceAction; -import org.eclipse.che.ide.resources.action.CutResourceAction; -import org.eclipse.che.ide.resources.action.PasteResourceAction; -import org.eclipse.che.ide.resources.action.RevealResourceAction; -import org.eclipse.che.ide.terminal.TerminalInitializer; -import org.eclipse.che.ide.ui.loaders.request.MessageLoaderResources; -import org.eclipse.che.ide.ui.popup.PopupResources; -import org.eclipse.che.ide.ui.toolbar.MainToolbar; -import org.eclipse.che.ide.ui.toolbar.ToolbarPresenter; -import org.eclipse.che.ide.util.browser.UserAgent; -import org.eclipse.che.ide.util.input.KeyCodeMap; -import org.eclipse.che.ide.workspace.EphemeralStateStatusBarItem; -import org.eclipse.che.ide.workspace.StartWorkspaceAction; -import org.eclipse.che.ide.workspace.StopWorkspaceAction; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Initializer for standard components i.e. some basic menu commands (Save, Save As etc) - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -@Singleton -public class StandardComponentInitializer { - - public static final String NAVIGATE_TO_FILE = "navigateToFile"; - public static final String FULL_TEXT_SEARCH = "fullTextSearch"; - public static final String PREVIEW_IMAGE = "previewImage"; - public static final String FIND_ACTION = "findAction"; - public static final String FORMAT = "format"; - public static final String SAVE = "save"; - public static final String COPY = "copy"; - public static final String CUT = "cut"; - public static final String PASTE = "paste"; - public static final String UNDO = "undo"; - public static final String REDO = "redo"; - public static final String SWITCH_LEFT_TAB = "switchLeftTab"; - public static final String SWITCH_RIGHT_TAB = "switchRightTab"; - public static final String OPEN_RECENT_FILES = "openRecentFiles"; - public static final String DELETE_ITEM = "deleteItem"; - public static final String NEW_FILE = "newFile"; - public static final String CREATE_PROJECT = "createProject"; - public static final String IMPORT_PROJECT = "importProject"; - public static final String CLOSE_ACTIVE_EDITOR = "closeActiveEditor"; - public static final String SIGNATURE_HELP = "signatureHelp"; - public static final String SOFT_WRAP = "softWrap"; - public static final String RENAME = "renameResource"; - public static final String SHOW_REFERENCE = "showReference"; - public static final String SHOW_COMMANDS_PALETTE = "showCommandsPalette"; - public static final String NEW_TERMINAL = "newTerminal"; - public static final String OPEN_IN_TERMINAL = "openInTerminal"; - public static final String PROJECT_EXPLORER_DISPLAYING_MODE = "projectExplorerDisplayingMode"; - public static final String COMMAND_EXPLORER_DISPLAYING_MODE = "commandExplorerDisplayingMode"; - public static final String FIND_RESULT_DISPLAYING_MODE = "findResultDisplayingMode"; - public static final String EVENT_LOGS_DISPLAYING_MODE = "eventLogsDisplayingMode"; - public static final String EDITOR_DISPLAYING_MODE = "editorDisplayingMode"; - public static final String TERMINAL_DISPLAYING_MODE = "terminalDisplayingMode"; - public static final String REVEAL_RESOURCE = "revealResourceInProjectTree"; - public static final String COLLAPSE_ALL = "collapseAll"; - - public interface ParserResource extends ClientBundle { - @Source("org/eclipse/che/ide/blank.svg") - SVGResource samplesCategoryBlank(); - } - - @Inject private EditorRegistry editorRegistry; - - @Inject private FileTypeRegistry fileTypeRegistry; - - @Inject private Resources resources; - - @Inject private KeyBindingAgent keyBinding; - - @Inject private ActionManager actionManager; - - @Inject private SaveAction saveAction; - - @Inject private SaveAllAction saveAllAction; - - @Inject private ShowPreferencesAction showPreferencesAction; - - @Inject private PreviewImageAction previewImageAction; - - @Inject private FindActionAction findActionAction; - - @Inject private NavigateToFileAction navigateToFileAction; - - @Inject @MainToolbar private ToolbarPresenter toolbarPresenter; - - @Inject private CutResourceAction cutResourceAction; - - @Inject private CopyResourceAction copyResourceAction; - - @Inject private PasteResourceAction pasteResourceAction; - - @Inject private DeleteResourceAction deleteResourceAction; - - @Inject private RenameItemAction renameItemAction; - - @Inject private SplitVerticallyAction splitVerticallyAction; - - @Inject private SplitHorizontallyAction splitHorizontallyAction; - - @Inject private CloseAction closeAction; - - @Inject private CloseAllAction closeAllAction; - - @Inject private CloseOtherAction closeOtherAction; - - @Inject private CloseAllExceptPinnedAction closeAllExceptPinnedAction; - - @Inject private ReopenClosedFileAction reopenClosedFileAction; - - @Inject private PinEditorTabAction pinEditorTabAction; - - @Inject private GoIntoAction goIntoAction; - - @Inject private EditFileAction editFileAction; - - @Inject private OpenFileAction openFileAction; - - @Inject private ShowHiddenFilesAction showHiddenFilesAction; - - @Inject private FormatterAction formatterAction; - - @Inject private UndoAction undoAction; - - @Inject private RedoAction redoAction; - - @Inject private UploadFileAction uploadFileAction; - - @Inject private UploadFolderAction uploadFolderAction; - - @Inject private DownloadProjectAction downloadProjectAction; - - @Inject private DownloadWsAction downloadWsAction; - - @Inject private DownloadResourceAction downloadResourceAction; - - @Inject private ImportProjectAction importProjectAction; - - @Inject private CreateProjectAction createProjectAction; - - @Inject private ConvertFolderToProjectAction convertFolderToProjectAction; - - @Inject private FullTextSearchAction fullTextSearchAction; - - @Inject private NewFolderAction newFolderAction; - - @Inject private NewFileAction newFileAction; - - @Inject private NewXmlFileAction newXmlFileAction; - - @Inject private ImageViewerProvider imageViewerProvider; - - @Inject private ProjectConfigurationAction projectConfigurationAction; - - @Inject private ExpandEditorAction expandEditorAction; - - @Inject private CompleteAction completeAction; - - @Inject private SwitchPreviousEditorAction switchPreviousEditorAction; - - @Inject private SwitchNextEditorAction switchNextEditorAction; - - @Inject private HotKeysListAction hotKeysListAction; - - @Inject private OpenRecentFilesAction openRecentFilesAction; - - @Inject private ClearRecentListAction clearRecentFilesAction; - - @Inject private CloseActiveEditorAction closeActiveEditorAction; - - @Inject private MessageLoaderResources messageLoaderResources; - - @Inject private EditorResources editorResources; - - @Inject private PopupResources popupResources; - - @Inject private ShowReferenceAction showReferenceAction; - - @Inject private RevealResourceAction revealResourceAction; - - @Inject private RefreshPathAction refreshPathAction; - - @Inject private LinkWithEditorAction linkWithEditorAction; - - @Inject private ShowToolbarAction showToolbarAction; - - @Inject private SignatureHelpAction signatureHelpAction; - - @Inject private MaximizePartAction maximizePartAction; - - @Inject private HidePartAction hidePartAction; - - @Inject private RestorePartAction restorePartAction; - - @Inject private ShowCommandsPaletteAction showCommandsPaletteAction; - - @Inject private SoftWrapAction softWrapAction; - - @Inject private StartWorkspaceAction startWorkspaceAction; - - @Inject private StopWorkspaceAction stopWorkspaceAction; - - @Inject private ShowWorkspaceStatusAction showWorkspaceStatusAction; - - @Inject private ShowRuntimeInfoAction showRuntimeInfoAction; - - @Inject private RunCommandAction runCommandAction; - - @Inject private NewTerminalAction newTerminalAction; - - @Inject private ReRunProcessAction reRunProcessAction; - - @Inject private StopProcessAction stopProcessAction; - - @Inject private CloseConsoleAction closeConsoleAction; - - @Inject private DisplayMachineOutputAction displayMachineOutputAction; - - @Inject private PreviewSSHAction previewSSHAction; - - @Inject private ShowConsoleTreeAction showConsoleTreeAction; - - @Inject private AddToFileWatcherExcludesAction addToFileWatcherExcludesAction; - - @Inject private RemoveFromFileWatcherExcludesAction removeFromFileWatcherExcludesAction; - - @Inject private DevModeSetUpAction devModeSetUpAction; - - @Inject private DevModeOffAction devModeOffAction; - - @Inject private CollapseAllAction collapseAllAction; - - @Inject private PerspectiveManager perspectiveManager; - - @Inject private CommandsExplorerDisplayingModeAction commandsExplorerDisplayingModeAction; - - @Inject private ProjectExplorerDisplayingModeAction projectExplorerDisplayingModeAction; - - @Inject private EventLogsDisplayingModeAction eventLogsDisplayingModeAction; - - @Inject private FindResultDisplayingModeAction findResultDisplayingModeAction; - - @Inject private EditorDisplayingModeAction editorDisplayingModeAction; - - @Inject private TerminalDisplayingModeAction terminalDisplayingModeAction; - - @Inject private RenameCommandAction renameCommandAction; - - @Inject private MoveCommandAction moveCommandAction; - - @Inject private OpenInTerminalAction openInTerminalAction; - - @Inject private FreeDiskSpaceStatusBarAction freeDiskSpaceStatusBarAction; - - @Inject private EphemeralStateStatusBarItem ephemeralStateStatusBarItem; - - @Inject - @Named("XMLFileType") - private FileType xmlFile; - - @Inject - @Named("TXTFileType") - private FileType txtFile; - - @Inject - @Named("JsonFileType") - private FileType jsonFile; - - @Inject - @Named("MDFileType") - private FileType mdFile; - - @Inject - @Named("PNGFileType") - private FileType pngFile; - - @Inject - @Named("BMPFileType") - private FileType bmpFile; - - @Inject - @Named("GIFFileType") - private FileType gifFile; - - @Inject - @Named("ICOFileType") - private FileType iconFile; - - @Inject - @Named("SVGFileType") - private FileType svgFile; - - @Inject - @Named("JPEFileType") - private FileType jpeFile; - - @Inject - @Named("JPEGFileType") - private FileType jpegFile; - - @Inject - @Named("JPGFileType") - private FileType jpgFile; - - @Inject private CommandEditorProvider commandEditorProvider; - - @Inject - @Named("CommandFileType") - private FileType commandFileType; - - @Inject private ProjectConfigSynchronized projectConfigSynchronized; - - @Inject private TreeResourceRevealer treeResourceRevealer; // just to work with it - - @Inject private TerminalInitializer terminalInitializer; - - /** Instantiates {@link StandardComponentInitializer} an creates standard content. */ - @Inject - public StandardComponentInitializer( - IconRegistry iconRegistry, - MachineResources machineResources, - StandardComponentInitializer.ParserResource parserResource) { - iconRegistry.registerIcon( - new Icon(BLANK_CATEGORY + ".samples.category.icon", parserResource.samplesCategoryBlank())); - iconRegistry.registerIcon(new Icon("che.machine.icon", machineResources.devMachine())); - machineResources.getCss().ensureInjected(); - } - - public void initialize() { - messageLoaderResources.Css().ensureInjected(); - editorResources.editorCss().ensureInjected(); - popupResources.popupStyle().ensureInjected(); - - fileTypeRegistry.registerFileType(xmlFile); - - fileTypeRegistry.registerFileType(txtFile); - - fileTypeRegistry.registerFileType(jsonFile); - - fileTypeRegistry.registerFileType(mdFile); - - fileTypeRegistry.registerFileType(pngFile); - editorRegistry.registerDefaultEditor(pngFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(bmpFile); - editorRegistry.registerDefaultEditor(bmpFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(gifFile); - editorRegistry.registerDefaultEditor(gifFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(iconFile); - editorRegistry.registerDefaultEditor(iconFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(svgFile); - editorRegistry.registerDefaultEditor(svgFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(jpeFile); - editorRegistry.registerDefaultEditor(jpeFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(jpegFile); - editorRegistry.registerDefaultEditor(jpegFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(jpgFile); - editorRegistry.registerDefaultEditor(jpgFile, imageViewerProvider); - - fileTypeRegistry.registerFileType(commandFileType); - editorRegistry.registerDefaultEditor(commandFileType, commandEditorProvider); - - // Workspace (New Menu) - DefaultActionGroup workspaceGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_WORKSPACE); - - actionManager.registerAction(IMPORT_PROJECT, importProjectAction); - workspaceGroup.add(importProjectAction); - - actionManager.registerAction(CREATE_PROJECT, createProjectAction); - workspaceGroup.add(createProjectAction); - - actionManager.registerAction("downloadWsAsZipAction", downloadWsAction); - workspaceGroup.add(downloadWsAction); - - workspaceGroup.addSeparator(); - workspaceGroup.add(startWorkspaceAction); - workspaceGroup.add(stopWorkspaceAction); - workspaceGroup.add(showWorkspaceStatusAction); - - // Project (New Menu) - DefaultActionGroup projectGroup = (DefaultActionGroup) actionManager.getAction(GROUP_PROJECT); - - DefaultActionGroup newGroup = new DefaultActionGroup("New", true, actionManager); - newGroup.getTemplatePresentation().setDescription("Create..."); - newGroup - .getTemplatePresentation() - .setImageElement(new SVGImage(resources.newResource()).getElement()); - actionManager.registerAction(GROUP_FILE_NEW, newGroup); - projectGroup.add(newGroup); - - newGroup.addSeparator(); - - actionManager.registerAction(NEW_FILE, newFileAction); - newGroup.addAction(newFileAction, Constraints.FIRST); - - actionManager.registerAction("newFolder", newFolderAction); - newGroup.addAction(newFolderAction, new Constraints(AFTER, NEW_FILE)); - - newGroup.addSeparator(); - - actionManager.registerAction("newXmlFile", newXmlFileAction); - newXmlFileAction - .getTemplatePresentation() - .setImageElement(new SVGImage(xmlFile.getImage()).getElement()); - newGroup.addAction(newXmlFileAction); - - actionManager.registerAction("uploadFile", uploadFileAction); - projectGroup.add(uploadFileAction); - - actionManager.registerAction("uploadFolder", uploadFolderAction); - projectGroup.add(uploadFolderAction); - - actionManager.registerAction("convertFolderToProject", convertFolderToProjectAction); - projectGroup.add(convertFolderToProjectAction); - - actionManager.registerAction("downloadAsZipAction", downloadProjectAction); - projectGroup.add(downloadProjectAction); - - actionManager.registerAction("showHideHiddenFiles", showHiddenFilesAction); - projectGroup.add(showHiddenFilesAction); - - projectGroup.addSeparator(); - - actionManager.registerAction("projectConfiguration", projectConfigurationAction); - projectGroup.add(projectConfigurationAction); - - DefaultActionGroup saveGroup = new DefaultActionGroup(actionManager); - actionManager.registerAction("saveGroup", saveGroup); - actionManager.registerAction(SAVE, saveAction); - saveGroup.addSeparator(); - saveGroup.add(saveAction); - - // Edit (New Menu) - DefaultActionGroup editGroup = (DefaultActionGroup) actionManager.getAction(GROUP_EDIT); - DefaultActionGroup recentGroup = new DefaultActionGroup(RECENT_GROUP_ID, true, actionManager); - actionManager.registerAction(GROUP_RECENT_FILES, recentGroup); - actionManager.registerAction("clearRecentList", clearRecentFilesAction); - recentGroup.addSeparator(); - recentGroup.add(clearRecentFilesAction, LAST); - editGroup.add(recentGroup); - actionManager.registerAction(OPEN_RECENT_FILES, openRecentFilesAction); - editGroup.add(openRecentFilesAction); - - actionManager.registerAction(CLOSE_ACTIVE_EDITOR, closeActiveEditorAction); - editGroup.add(closeActiveEditorAction); - - actionManager.registerAction(FORMAT, formatterAction); - editGroup.add(formatterAction); - - editGroup.add(saveAction); - - actionManager.registerAction(UNDO, undoAction); - editGroup.add(undoAction); - - actionManager.registerAction(REDO, redoAction); - editGroup.add(redoAction); - - actionManager.registerAction(SOFT_WRAP, softWrapAction); - editGroup.add(softWrapAction); - - actionManager.registerAction(CUT, cutResourceAction); - editGroup.add(cutResourceAction); - - actionManager.registerAction(COPY, copyResourceAction); - editGroup.add(copyResourceAction); - - actionManager.registerAction(PASTE, pasteResourceAction); - editGroup.add(pasteResourceAction); - - actionManager.registerAction(RENAME, renameItemAction); - editGroup.add(renameItemAction); - - actionManager.registerAction(DELETE_ITEM, deleteResourceAction); - editGroup.add(deleteResourceAction); - - actionManager.registerAction(FULL_TEXT_SEARCH, fullTextSearchAction); - editGroup.add(fullTextSearchAction); - - editGroup.addSeparator(); - editGroup.add(switchPreviousEditorAction); - editGroup.add(switchNextEditorAction); - - // Assistant (New Menu) - DefaultActionGroup assistantGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_ASSISTANT); - - actionManager.registerAction(PREVIEW_IMAGE, previewImageAction); - assistantGroup.add(previewImageAction); - - actionManager.registerAction(FIND_ACTION, findActionAction); - assistantGroup.add(findActionAction); - - actionManager.registerAction("hotKeysList", hotKeysListAction); - assistantGroup.add(hotKeysListAction); - - assistantGroup.addSeparator(); - - // Switching of parts - DefaultActionGroup toolWindowsGroup = - new DefaultActionGroup("Tool Windows", true, actionManager); - actionManager.registerAction(TOOL_WINDOWS_GROUP, toolWindowsGroup); - - actionManager.registerAction( - PROJECT_EXPLORER_DISPLAYING_MODE, projectExplorerDisplayingModeAction); - actionManager.registerAction(FIND_RESULT_DISPLAYING_MODE, findResultDisplayingModeAction); - actionManager.registerAction(EVENT_LOGS_DISPLAYING_MODE, eventLogsDisplayingModeAction); - actionManager.registerAction( - COMMAND_EXPLORER_DISPLAYING_MODE, commandsExplorerDisplayingModeAction); - actionManager.registerAction(EDITOR_DISPLAYING_MODE, editorDisplayingModeAction); - actionManager.registerAction(TERMINAL_DISPLAYING_MODE, terminalDisplayingModeAction); - toolWindowsGroup.add(projectExplorerDisplayingModeAction, FIRST); - toolWindowsGroup.add( - eventLogsDisplayingModeAction, new Constraints(AFTER, PROJECT_EXPLORER_DISPLAYING_MODE)); - toolWindowsGroup.add( - findResultDisplayingModeAction, new Constraints(AFTER, EVENT_LOGS_DISPLAYING_MODE)); - toolWindowsGroup.add( - commandsExplorerDisplayingModeAction, new Constraints(AFTER, FIND_RESULT_DISPLAYING_MODE)); - toolWindowsGroup.add(editorDisplayingModeAction); - toolWindowsGroup.add(terminalDisplayingModeAction); - - assistantGroup.add(toolWindowsGroup); - assistantGroup.addSeparator(); - - actionManager.registerAction("callCompletion", completeAction); - assistantGroup.add(completeAction); - - actionManager.registerAction("downloadItemAction", downloadResourceAction); - actionManager.registerAction(NAVIGATE_TO_FILE, navigateToFileAction); - assistantGroup.add(navigateToFileAction); - - assistantGroup.addSeparator(); - actionManager.registerAction("devModeSetUpAction", devModeSetUpAction); - actionManager.registerAction("devModeOffAction", devModeOffAction); - assistantGroup.add(devModeSetUpAction); - assistantGroup.add(devModeOffAction); - - // Compose Profile menu - DefaultActionGroup profileGroup = (DefaultActionGroup) actionManager.getAction(GROUP_PROFILE); - actionManager.registerAction("showPreferences", showPreferencesAction); - - profileGroup.add(showPreferencesAction); - - // Compose Help menu - DefaultActionGroup helpGroup = (DefaultActionGroup) actionManager.getAction(GROUP_HELP); - helpGroup.addSeparator(); - - // Processes panel actions - actionManager.registerAction("startWorkspace", startWorkspaceAction); - actionManager.registerAction("stopWorkspace", stopWorkspaceAction); - actionManager.registerAction("showWorkspaceStatus", showWorkspaceStatusAction); - actionManager.registerAction("runCommand", runCommandAction); - actionManager.registerAction("newTerminal", newTerminalAction); - - // Compose main context menu - DefaultActionGroup resourceOperation = new DefaultActionGroup(actionManager); - actionManager.registerAction("resourceOperation", resourceOperation); - actionManager.registerAction("refreshPathAction", refreshPathAction); - actionManager.registerAction("linkWithEditor", linkWithEditorAction); - actionManager.registerAction("showToolbar", showToolbarAction); - - resourceOperation.addSeparator(); - resourceOperation.add(previewImageAction); - resourceOperation.add(showReferenceAction); - resourceOperation.add(goIntoAction); - resourceOperation.add(editFileAction); - - resourceOperation.add(saveAction); - resourceOperation.add(cutResourceAction); - resourceOperation.add(copyResourceAction); - resourceOperation.add(pasteResourceAction); - resourceOperation.add(renameItemAction); - resourceOperation.add(deleteResourceAction); - resourceOperation.addSeparator(); - resourceOperation.add(downloadResourceAction); - resourceOperation.add(refreshPathAction); - resourceOperation.add(linkWithEditorAction); - resourceOperation.add(collapseAllAction); - resourceOperation.addSeparator(); - resourceOperation.add(convertFolderToProjectAction); - resourceOperation.addSeparator(); - resourceOperation.addSeparator(); - resourceOperation.add(addToFileWatcherExcludesAction); - resourceOperation.add(removeFromFileWatcherExcludesAction); - resourceOperation.addSeparator(); - - DefaultActionGroup mainContextMenuGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_CONTEXT_MENU); - mainContextMenuGroup.add(newGroup, FIRST); - mainContextMenuGroup.addSeparator(); - mainContextMenuGroup.add(resourceOperation); - mainContextMenuGroup.add(openInTerminalAction); - actionManager.registerAction(OPEN_IN_TERMINAL, openInTerminalAction); - - DefaultActionGroup partMenuGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_PART_MENU); - partMenuGroup.add(maximizePartAction); - partMenuGroup.add(hidePartAction); - partMenuGroup.add(restorePartAction); - partMenuGroup.add(showConsoleTreeAction); - partMenuGroup.add(revealResourceAction); - partMenuGroup.add(collapseAllAction); - partMenuGroup.add(refreshPathAction); - partMenuGroup.add(linkWithEditorAction); - - DefaultActionGroup toolbarControllerGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_TOOLBAR_CONTROLLER); - toolbarControllerGroup.add(showToolbarAction); - - actionManager.registerAction("expandEditor", expandEditorAction); - DefaultActionGroup rightMenuGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_RIGHT_MAIN_MENU); - rightMenuGroup.add(expandEditorAction, FIRST); - - // Compose main toolbar - DefaultActionGroup changeResourceGroup = new DefaultActionGroup(actionManager); - actionManager.registerAction("changeResourceGroup", changeResourceGroup); - actionManager.registerAction("editFile", editFileAction); - actionManager.registerAction("goInto", goIntoAction); - actionManager.registerAction(SHOW_REFERENCE, showReferenceAction); - - actionManager.registerAction(REVEAL_RESOURCE, revealResourceAction); - actionManager.registerAction(COLLAPSE_ALL, collapseAllAction); - - actionManager.registerAction("openFile", openFileAction); - actionManager.registerAction(SWITCH_LEFT_TAB, switchPreviousEditorAction); - actionManager.registerAction(SWITCH_RIGHT_TAB, switchNextEditorAction); - - changeResourceGroup.add(cutResourceAction); - changeResourceGroup.add(copyResourceAction); - changeResourceGroup.add(pasteResourceAction); - changeResourceGroup.add(deleteResourceAction); - - DefaultActionGroup mainToolbarGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_TOOLBAR); - mainToolbarGroup.add(newGroup); - mainToolbarGroup.add(saveGroup); - mainToolbarGroup.add(changeResourceGroup); - toolbarPresenter.bindMainGroup(mainToolbarGroup); - - DefaultActionGroup centerToolbarGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_CENTER_TOOLBAR); - toolbarPresenter.bindCenterGroup(centerToolbarGroup); - - DefaultActionGroup rightToolbarGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_RIGHT_TOOLBAR); - toolbarPresenter.bindRightGroup(rightToolbarGroup); - - actionManager.registerAction("showServers", showRuntimeInfoAction); - - // Consoles tree context menu group - DefaultActionGroup consolesTreeContextMenu = - (DefaultActionGroup) actionManager.getAction(GROUP_CONSOLES_TREE_CONTEXT_MENU); - consolesTreeContextMenu.add(showRuntimeInfoAction); - consolesTreeContextMenu.add(newTerminalAction); - consolesTreeContextMenu.add(reRunProcessAction); - consolesTreeContextMenu.add(stopProcessAction); - consolesTreeContextMenu.add(closeConsoleAction); - - actionManager.registerAction("displayMachineOutput", displayMachineOutputAction); - consolesTreeContextMenu.add(displayMachineOutputAction); - - actionManager.registerAction("previewSSH", previewSSHAction); - consolesTreeContextMenu.add(previewSSHAction); - - // Editor context menu group - DefaultActionGroup editorTabContextMenu = - (DefaultActionGroup) actionManager.getAction(GROUP_EDITOR_TAB_CONTEXT_MENU); - editorTabContextMenu.add(closeAction); - actionManager.registerAction(CLOSE, closeAction); - editorTabContextMenu.add(closeAllAction); - actionManager.registerAction(CLOSE_ALL, closeAllAction); - editorTabContextMenu.add(closeOtherAction); - actionManager.registerAction(CLOSE_OTHER, closeOtherAction); - editorTabContextMenu.add(closeAllExceptPinnedAction); - actionManager.registerAction(CLOSE_ALL_EXCEPT_PINNED, closeAllExceptPinnedAction); - editorTabContextMenu.addSeparator(); - editorTabContextMenu.add(reopenClosedFileAction); - actionManager.registerAction(REOPEN_CLOSED, reopenClosedFileAction); - editorTabContextMenu.add(pinEditorTabAction); - actionManager.registerAction(PIN_TAB, pinEditorTabAction); - editorTabContextMenu.addSeparator(); - actionManager.registerAction(SPLIT_HORIZONTALLY, splitHorizontallyAction); - editorTabContextMenu.add(splitHorizontallyAction); - actionManager.registerAction(SPLIT_VERTICALLY, splitVerticallyAction); - editorTabContextMenu.add(splitVerticallyAction); - actionManager.registerAction(SIGNATURE_HELP, signatureHelpAction); - - actionManager.registerAction(SHOW_COMMANDS_PALETTE, showCommandsPaletteAction); - DefaultActionGroup runGroup = - (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_RUN); - runGroup.add(showCommandsPaletteAction); - runGroup.add(newTerminalAction, FIRST); - runGroup.addSeparator(); - - DefaultActionGroup editorContextMenuGroup = new DefaultActionGroup(actionManager); - actionManager.registerAction(GROUP_EDITOR_CONTEXT_MENU, editorContextMenuGroup); - - editorContextMenuGroup.add(saveAction); - editorContextMenuGroup.add(undoAction); - editorContextMenuGroup.add(redoAction); - editorContextMenuGroup.addSeparator(); - editorContextMenuGroup.add(formatterAction); - editorContextMenuGroup.add(softWrapAction); - - editorContextMenuGroup.addSeparator(); - editorContextMenuGroup.add(fullTextSearchAction); - editorContextMenuGroup.add(closeActiveEditorAction); - - editorContextMenuGroup.addSeparator(); - editorContextMenuGroup.add(revealResourceAction); - - DefaultActionGroup commandExplorerMenuGroup = new DefaultActionGroup(actionManager); - actionManager.registerAction(GROUP_COMMAND_EXPLORER_CONTEXT_MENU, commandExplorerMenuGroup); - - actionManager.registerAction("renameCommand", renameCommandAction); - commandExplorerMenuGroup.add(renameCommandAction); - actionManager.registerAction("moveCommand", moveCommandAction); - commandExplorerMenuGroup.add(moveCommandAction); - - DefaultActionGroup rightStatusPanelGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_RIGHT_STATUS_PANEL); - rightStatusPanelGroup.add(freeDiskSpaceStatusBarAction); - rightStatusPanelGroup.add(ephemeralStateStatusBarItem); - - // Define hot-keys - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().alt().charCode('n').build(), NAVIGATE_TO_FILE); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode('F').build(), FULL_TEXT_SEARCH); - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('A').build(), FIND_ACTION); - keyBinding.getGlobal().addKey(new KeyBuilder().alt().charCode('L').build(), FORMAT); - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('c').build(), COPY); - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('x').build(), CUT); - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('v').build(), PASTE); - keyBinding.getGlobal().addKey(new KeyBuilder().shift().charCode(KeyCodeMap.F6).build(), RENAME); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().shift().charCode(KeyCodeMap.F7).build(), SHOW_REFERENCE); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode(KeyCodeMap.ARROW_LEFT).build(), SWITCH_LEFT_TAB); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode(KeyCodeMap.ARROW_RIGHT).build(), SWITCH_RIGHT_TAB); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode('e').build(), OPEN_RECENT_FILES); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().charCode(KeyCodeMap.DELETE).build(), DELETE_ITEM); - keyBinding.getGlobal().addKey(new KeyBuilder().action().alt().charCode('w').build(), SOFT_WRAP); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode(KeyCodeMap.F12).build(), NEW_TERMINAL); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().shift().charCode(KeyCodeMap.F12).build(), OPEN_IN_TERMINAL); - - keyBinding.getGlobal().addKey(new KeyBuilder().alt().charCode('N').build(), NEW_FILE); - keyBinding.getGlobal().addKey(new KeyBuilder().alt().charCode('x').build(), CREATE_PROJECT); - keyBinding.getGlobal().addKey(new KeyBuilder().alt().charCode('A').build(), IMPORT_PROJECT); - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().shift().charCode(KeyCodeMap.F10).build(), SHOW_COMMANDS_PALETTE); - - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('s').build(), SAVE); - - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('z').build(), UNDO); - keyBinding.getGlobal().addKey(new KeyBuilder().action().charCode('y').build(), REDO); - - if (UserAgent.isMac()) { - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().control().charCode('1').build(), - PROJECT_EXPLORER_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().control().charCode('2').build(), - EVENT_LOGS_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().control().charCode('3').build(), - FIND_RESULT_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().control().charCode('4').build(), - COMMAND_EXPLORER_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode('E').build(), EDITOR_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode('T').build(), TERMINAL_DISPLAYING_MODE); - } else { - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().alt().charCode('1').build(), - PROJECT_EXPLORER_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().alt().charCode('2').build(), EVENT_LOGS_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().alt().charCode('3').build(), FIND_RESULT_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey( - new KeyBuilder().action().alt().charCode('4').build(), - COMMAND_EXPLORER_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode('E').build(), EDITOR_DISPLAYING_MODE); - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode('T').build(), TERMINAL_DISPLAYING_MODE); - } - - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode(ARROW_DOWN).build(), REVEAL_RESOURCE); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode(ARROW_UP).build(), COLLAPSE_ALL); - - if (UserAgent.isMac()) { - keyBinding - .getGlobal() - .addKey(new KeyBuilder().control().charCode('w').build(), CLOSE_ACTIVE_EDITOR); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().control().charCode('p').build(), SIGNATURE_HELP); - } else { - keyBinding - .getGlobal() - .addKey(new KeyBuilder().alt().charCode('w').build(), CLOSE_ACTIVE_EDITOR); - keyBinding - .getGlobal() - .addKey(new KeyBuilder().action().charCode('p').build(), SIGNATURE_HELP); - } - - final Map perspectives = perspectiveManager.getPerspectives(); - if (perspectives.size() - > 1) { // if registered perspectives will be more then 2 Main Menu -> Window - // will appears and contains all of them as sub-menu - final DefaultActionGroup windowMenu = new DefaultActionGroup("Window", true, actionManager); - actionManager.registerAction("Window", windowMenu); - final DefaultActionGroup mainMenu = - (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_MENU); - mainMenu.add(windowMenu); - for (Perspective perspective : perspectives.values()) { - final BaseAction action = - new BaseAction(perspective.getPerspectiveName()) { - @Override - public void actionPerformed(ActionEvent e) { - perspectiveManager.setPerspectiveId(perspective.getPerspectiveId()); - } - }; - actionManager.registerAction(perspective.getPerspectiveId(), action); - windowMenu.add(action); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/UiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/UiModule.java deleted file mode 100644 index 07d51501d5b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/UiModule.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.icon.IconRegistry; -import org.eclipse.che.ide.icon.DefaultIconsRegistrar; -import org.eclipse.che.ide.icon.IconRegistryImpl; -import org.eclipse.che.ide.menu.MainMenuView; -import org.eclipse.che.ide.menu.MainMenuViewImpl; -import org.eclipse.che.ide.menu.StatusPanelGroupView; -import org.eclipse.che.ide.menu.StatusPanelGroupViewImpl; -import org.eclipse.che.ide.part.WorkBenchControllerFactory; -import org.eclipse.che.ide.part.WorkBenchPartController; -import org.eclipse.che.ide.part.WorkBenchPartControllerImpl; -import org.eclipse.che.ide.ui.button.ConsoleButton; -import org.eclipse.che.ide.ui.button.ConsoleButtonFactory; -import org.eclipse.che.ide.ui.button.ConsoleButtonImpl; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.choice.ChoiceDialog; -import org.eclipse.che.ide.ui.dialogs.choice.ChoiceDialogFooter; -import org.eclipse.che.ide.ui.dialogs.choice.ChoiceDialogPresenter; -import org.eclipse.che.ide.ui.dialogs.choice.ChoiceDialogView; -import org.eclipse.che.ide.ui.dialogs.choice.ChoiceDialogViewImpl; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmDialog; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmDialogFooter; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmDialogPresenter; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmDialogView; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmDialogViewImpl; -import org.eclipse.che.ide.ui.dialogs.input.InputDialog; -import org.eclipse.che.ide.ui.dialogs.input.InputDialogFooter; -import org.eclipse.che.ide.ui.dialogs.input.InputDialogPresenter; -import org.eclipse.che.ide.ui.dialogs.input.InputDialogView; -import org.eclipse.che.ide.ui.dialogs.input.InputDialogViewImpl; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialog; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialogFooter; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialogPresenter; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialogView; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialogViewImpl; -import org.eclipse.che.ide.ui.multisplitpanel.SubPanel; -import org.eclipse.che.ide.ui.multisplitpanel.SubPanelFactory; -import org.eclipse.che.ide.ui.multisplitpanel.panel.SubPanelPresenter; -import org.eclipse.che.ide.ui.multisplitpanel.panel.SubPanelView; -import org.eclipse.che.ide.ui.multisplitpanel.panel.SubPanelViewFactory; -import org.eclipse.che.ide.ui.multisplitpanel.panel.SubPanelViewImpl; -import org.eclipse.che.ide.ui.multisplitpanel.tab.Tab; -import org.eclipse.che.ide.ui.multisplitpanel.tab.TabItemFactory; -import org.eclipse.che.ide.ui.multisplitpanel.tab.TabWidget; -import org.eclipse.che.ide.ui.toolbar.MainToolbar; -import org.eclipse.che.ide.ui.toolbar.ToolbarPresenter; -import org.eclipse.che.ide.ui.toolbar.ToolbarView; -import org.eclipse.che.ide.ui.toolbar.ToolbarViewImpl; -import org.eclipse.che.ide.workspace.WorkspaceView; -import org.eclipse.che.ide.workspace.WorkspaceViewImpl; - -/** - * GIN module for configuring UI components. - * - * @author Artem Zatsarynnyi - */ -public class UiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(IconRegistry.class).to(IconRegistryImpl.class).in(Singleton.class); - bind(DefaultIconsRegistrar.class).asEagerSingleton(); - bind(FontAwesomeInjector.class).asEagerSingleton(); - bind(BrowserTabCloseHandler.class).asEagerSingleton(); - - // core UI components - install( - new GinFactoryModuleBuilder() - .implement(WorkBenchPartController.class, WorkBenchPartControllerImpl.class) - .build(WorkBenchControllerFactory.class)); - - bind(WorkspaceView.class).to(WorkspaceViewImpl.class).in(Singleton.class); - bind(MainMenuView.class).to(MainMenuViewImpl.class).in(Singleton.class); - bind(ToolbarView.class).to(ToolbarViewImpl.class); - bind(ToolbarPresenter.class) - .annotatedWith(MainToolbar.class) - .to(ToolbarPresenter.class) - .in(Singleton.class); - - // dialog factory - bind(MessageDialogFooter.class); - bind(MessageDialogView.class).to(MessageDialogViewImpl.class); - bind(ConfirmDialogFooter.class); - bind(ConfirmDialogView.class).to(ConfirmDialogViewImpl.class); - bind(ChoiceDialogFooter.class); - bind(ChoiceDialogView.class).to(ChoiceDialogViewImpl.class); - bind(InputDialogFooter.class); - bind(InputDialogView.class).to(InputDialogViewImpl.class); - - install( - new GinFactoryModuleBuilder() - .implement(MessageDialog.class, MessageDialogPresenter.class) - .implement(ConfirmDialog.class, ConfirmDialogPresenter.class) - .implement(ChoiceDialog.class, ChoiceDialogPresenter.class) - .implement(InputDialog.class, InputDialogPresenter.class) - .build(DialogFactory.class)); - - // multi-split panel - install( - new GinFactoryModuleBuilder() - .implement(SubPanel.class, SubPanelPresenter.class) - .build(SubPanelFactory.class)); - install( - new GinFactoryModuleBuilder() - .implement(SubPanelView.class, SubPanelViewImpl.class) - .build(SubPanelViewFactory.class)); - install( - new GinFactoryModuleBuilder() - .implement(Tab.class, TabWidget.class) - .build(TabItemFactory.class)); - - // miscellaneous UI components - install( - new GinFactoryModuleBuilder() - .implement(ConsoleButton.class, ConsoleButtonImpl.class) - .build(ConsoleButtonFactory.class)); - - bind(StatusPanelGroupView.class).to(StatusPanelGroupViewImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/WebSocketModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/WebSocketModule.java deleted file mode 100644 index 44f3ff36280..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/core/WebSocketModule.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.core; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMessageReceiver; -import org.eclipse.che.api.core.websocket.commons.WebSocketMessageReceiver; -import org.eclipse.che.api.core.websocket.commons.WebSocketMessageTransmitter; -import org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint; -import org.eclipse.che.ide.websocket.impl.BasicWebSocketMessageTransmitter; -import org.eclipse.che.ide.websocket.impl.DelayableWebSocketConnection; -import org.eclipse.che.ide.websocket.impl.WebSocketConnection; -import org.eclipse.che.ide.websocket.impl.WebSocketEndpoint; -import org.eclipse.che.ide.websocket.impl.WebSocketFactory; - -/** - * GIN module for configuring WebSocket components. - * - * @author Artem Zatsarynnyi - */ -public class WebSocketModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(WebSocketEndpoint.class).to(BasicWebSocketEndpoint.class); - bind(WebSocketMessageTransmitter.class).to(BasicWebSocketMessageTransmitter.class); - bind(WebSocketMessageReceiver.class).to(JsonRpcMessageReceiver.class); - - install( - new GinFactoryModuleBuilder() - .implement(WebSocketConnection.class, DelayableWebSocketConnection.class) - .build(WebSocketFactory.class)); - } -} 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 deleted file mode 100644 index b8fe91f6594..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointManagerImpl.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.logging.Logger; -import java.util.stream.Collectors; -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.api.debug.shared.model.Location; -import org.eclipse.che.api.debug.shared.model.Variable; -import org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl; -import org.eclipse.che.api.debug.shared.model.impl.LocationImpl; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.debug.BreakpointManager; -import org.eclipse.che.ide.api.debug.BreakpointManagerObservable; -import org.eclipse.che.ide.api.debug.BreakpointManagerObserver; -import org.eclipse.che.ide.api.debug.BreakpointRenderer; -import org.eclipse.che.ide.api.debug.BreakpointRenderer.LineChangeAction; -import org.eclipse.che.ide.api.debug.BreakpointStorage; -import org.eclipse.che.ide.api.debug.HasBreakpointRenderer; -import org.eclipse.che.ide.api.debug.HasLocation; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorOpenedEvent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.resource.Path; - -/** - * Implementation of {@link BreakpointManager} for editor. - * - * @author Anatoliy Bazko - * @author Valeriy Svydenko - * @author Dmytro Nochevnov - */ -@Singleton -public class BreakpointManagerImpl - implements BreakpointManager, - LineChangeAction, - BreakpointManagerObservable, - DebuggerManagerObserver { - - private static final Logger LOG = Logger.getLogger(BreakpointManagerImpl.class.getName()); - - private final EditorAgent editorAgent; - private final DebuggerManager debuggerManager; - private final BreakpointStorage breakpointStorage; - private final List observers; - private final Set activeBreakpoints; - - private Location suspendedLocation; - - @Inject - public BreakpointManagerImpl( - EditorAgent editorAgent, - DebuggerManager debuggerManager, - EventBus eventBus, - BreakpointStorage breakpointStorage) { - this.editorAgent = editorAgent; - this.breakpointStorage = breakpointStorage; - this.debuggerManager = debuggerManager; - this.observers = new ArrayList<>(); - this.debuggerManager.addObserver(this); - this.activeBreakpoints = new HashSet<>(); - - registerEventHandlers(eventBus); - } - - @Override - public void changeBreakpointState(final int lineNumber) { - EditorPartPresenter editor = editorAgent.getActiveEditor(); - if (editor == null) { - return; - } - - final VirtualFile activeFile = editor.getEditorInput().getFile(); - Optional existedBreakpoint = - breakpointStorage.get(activeFile.getLocation().toString(), lineNumber + 1); - - if (existedBreakpoint.isPresent()) { - delete(existedBreakpoint.get()); - } else { - if (activeFile instanceof HasLocation) { - addBreakpoint( - activeFile, new BreakpointImpl(((HasLocation) activeFile).toLocation(lineNumber + 1))); - } else { - LOG.warning("Impossible to figure debug location for: " + activeFile.getLocation()); - return; - } - } - } - - @Override - public boolean isActive(Breakpoint breakpoint) { - return activeBreakpoints.contains(breakpoint); - } - - private void addBreakpoint(final VirtualFile file, final Breakpoint breakpoint) { - if (isLineEmpty(file, breakpoint.getLocation().getLineNumber())) { - return; - } - breakpointStorage.add(breakpoint); - - final BreakpointRenderer renderer = getBreakpointRendererForFile(file.getLocation().toString()); - - if (renderer != null) { - renderer.setBreakpointMark(breakpoint, false, BreakpointManagerImpl.this::onLineChange); - } - - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointAdded(breakpoint); - } - - Debugger debugger = debuggerManager.getActiveDebugger(); - if (debugger != null) { - debugger.addBreakpoint(breakpoint); - } - } - - /** Indicates if line of code to add breakpoint at is executable. */ - private boolean isLineEmpty(final VirtualFile activeFile, int lineNumber) { - EditorPartPresenter editor = getEditorForFile(activeFile.getLocation().toString()); - if (editor instanceof TextEditor) { - Document document = ((TextEditor) editor).getDocument(); - return document.getLineContent(lineNumber - 1).trim().isEmpty(); - } - - return false; - } - - @Override - public List getAll() { - return breakpointStorage.getAll(); - } - - private void setSuspendedLocation(Location location) { - deleteSuspendedLocation(); - suspendedLocation = location; - - EditorPartPresenter editor = getEditorForFile(location.getTarget()); - if (editor != null) { - VirtualFile activeFile = editor.getEditorInput().getFile(); - - BreakpointRenderer renderer = - getBreakpointRendererForFile(activeFile.getLocation().toString()); - if (renderer != null) { - renderer.setLineActive(location.getLineNumber() - 1, true); - } - } - } - - @Override - public void deleteAll() { - breakpointStorage - .getAll() - .forEach( - breakpoint -> { - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.removeBreakpointMark(breakpoint.getLocation().getLineNumber() - 1); - } - }); - - breakpointStorage.clear(); - activeBreakpoints.clear(); - - for (BreakpointManagerObserver observer : observers) { - observer.onAllBreakpointsDeleted(); - } - - Debugger debugger = debuggerManager.getActiveDebugger(); - if (debugger != null) { - debugger.deleteAllBreakpoints(); - } - } - - @Override - public void update(final Breakpoint breakpoint) { - breakpointStorage.update(breakpoint); - activeBreakpoints.remove(breakpoint); - - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.setBreakpointMark(breakpoint, false, BreakpointManagerImpl.this::onLineChange); - } - - Debugger debugger = debuggerManager.getActiveDebugger(); - if (debugger != null) { - debugger - .deleteBreakpoint(breakpoint) - .then( - success -> { - if (breakpoint.isEnabled()) { - debugger.addBreakpoint(breakpoint); - } - }); - } - - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointUpdated(breakpoint); - } - } - - @Override - public void delete(Breakpoint breakpoint) { - breakpointStorage.delete(breakpoint); - activeBreakpoints.remove(breakpoint); - - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.removeBreakpointMark(breakpoint.getLocation().getLineNumber() - 1); - } - - Debugger debugger = debuggerManager.getActiveDebugger(); - if (debugger != null) { - debugger.deleteBreakpoint(breakpoint); - } - - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointDeleted(breakpoint); - } - } - - private void deleteBreakpoints(String parentPath) { - List breakpoints2delete = - breakpointStorage - .getAll() - .stream() - .filter(breakpoint -> breakpoint.getLocation().getTarget().startsWith(parentPath)) - .collect(Collectors.toList()); - - for (Breakpoint breakpoint : breakpoints2delete) { - breakpointStorage.delete(breakpoint); - activeBreakpoints.remove(breakpoint); - - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.removeBreakpointMark(breakpoint.getLocation().getLineNumber() - 1); - } - - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointDeleted(breakpoint); - } - } - } - - private void deleteSuspendedLocation() { - if (suspendedLocation != null) { - BreakpointRenderer renderer = getBreakpointRendererForFile(suspendedLocation.getTarget()); - if (renderer != null) { - renderer.setLineActive(suspendedLocation.getLineNumber() - 1, false); - } - - suspendedLocation = null; - } - } - - @Nullable - private EditorPartPresenter getEditorForFile(String path) { - return editorAgent.getOpenedEditor(Path.valueOf(path)); - } - - @Nullable - private BreakpointRenderer getBreakpointRendererForFile(String path) { - final EditorPartPresenter editor = getEditorForFile(path); - if (editor != null) { - return getBreakpointRendererForEditor(editor); - } else { - return null; - } - } - - @Nullable - private BreakpointRenderer getBreakpointRendererForEditor(final EditorPartPresenter editor) { - if (editor instanceof HasBreakpointRenderer) { - final BreakpointRenderer renderer = ((HasBreakpointRenderer) editor).getBreakpointRenderer(); - if (renderer != null && renderer.isReady()) { - return renderer; - } - } - - return null; - } - - @Override - public void onLineChange( - final VirtualFile file, final int firstLine, final int linesAdded, final int linesRemoved) { - - final List fileBreakpoints = - breakpointStorage.getByPath(file.getLocation().toString()); - final int delta = linesAdded - linesRemoved; - - if (fileBreakpoints != null) { - LOG.fine("Change in file with breakpoints " + file.getLocation().toString()); - - final List toRemove = new ArrayList<>(); - final List toAdd = new ArrayList<>(); - - for (final Breakpoint breakpoint : fileBreakpoints) { - final int lineNumber = breakpoint.getLocation().getLineNumber() - 1; - - // line removed - if (firstLine <= lineNumber && lineNumber < firstLine + linesRemoved) { - toRemove.add(breakpoint); - continue; - } - - // line modified - if (firstLine <= lineNumber && lineNumber < firstLine + linesAdded) { - toRemove.add(breakpoint); - continue; - } - - // line shifted - if (lineNumber >= firstLine + Math.abs(delta)) { - Location currentLocation = breakpoint.getLocation(); - Location newLocation = - new LocationImpl( - currentLocation.getTarget(), - currentLocation.getLineNumber() + delta, - currentLocation.isExternalResource(), - currentLocation.getExternalResourceId(), - currentLocation.getResourceProjectPath(), - currentLocation.getMethod(), - currentLocation.getThreadId()); - - toRemove.add(breakpoint); - toAdd.add( - new BreakpointImpl( - newLocation, breakpoint.isEnabled(), breakpoint.getBreakpointConfiguration())); - } - } - - for (final Breakpoint breakpoint : toRemove) { - delete(breakpoint); - } - - for (final Breakpoint breakpoint : toAdd) { - addBreakpoint(file, breakpoint); - } - } - } - - /** Registers events handlers. */ - private void registerEventHandlers(EventBus eventBus) { - eventBus.addHandler( - EditorOpenedEvent.TYPE, - event -> onOpenEditor(event.getFile().getLocation().toString(), event.getEditor())); - - eventBus.addHandler( - ResourceChangedEvent.getType(), - event -> { - if (event.getDelta().getKind() == ResourceDelta.REMOVED) { - final Resource resource = event.getDelta().getResource(); - - Path path = resource.getLocation(); - if (resource.isFolder()) { - deleteBreakpoints(path.addTrailingSeparator().toString()); - } else if (resource.isFile()) { - deleteBreakpoints(path.toString()); - } - } - }); - } - - /** The new file has been opened in the editor. Method reads breakpoints. */ - private void onOpenEditor(String filePath, EditorPartPresenter editor) { - final BreakpointRenderer renderer = getBreakpointRendererForEditor(editor); - if (renderer != null) { - breakpointStorage - .getByPath(filePath) - .forEach( - breakpoint -> - renderer.setBreakpointMark( - breakpoint, - activeBreakpoints.contains(breakpoint), - BreakpointManagerImpl.this::onLineChange)); - - if (suspendedLocation != null && suspendedLocation.getTarget().equals(filePath)) { - renderer.setLineActive(suspendedLocation.getLineNumber() - 1, true); - } - } - } - - // Debugger events - - @Override - public void onActiveDebuggerChanged(@Nullable Debugger activeDebugger) {} - - @Override - public void onDebuggerAttached(DebuggerDescriptor debuggerDescriptor) {} - - @Override - public void onDebuggerDisconnected() { - breakpointStorage - .getAll() - .forEach( - breakpoint -> { - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.setBreakpointMark( - breakpoint, false, BreakpointManagerImpl.this::onLineChange); - } - }); - - deleteSuspendedLocation(); - - activeBreakpoints.clear(); - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointUpdated(null); - } - } - - @Override - public void onBreakpointAdded(Breakpoint breakpoint) {} - - @Override - public void onBreakpointActivated(String filePath, int lineNumber) { - breakpointStorage - .get(filePath, lineNumber) - .ifPresent( - breakpoint -> { - BreakpointRenderer renderer = - getBreakpointRendererForFile(breakpoint.getLocation().getTarget()); - if (renderer != null) { - renderer.setBreakpointMark( - breakpoint, true, BreakpointManagerImpl.this::onLineChange); - } - - activeBreakpoints.add(breakpoint); - for (BreakpointManagerObserver observer : observers) { - observer.onBreakpointUpdated(breakpoint); - } - }); - } - - @Override - public void onBreakpointDeleted(Breakpoint breakpoint) {} - - @Override - public void onAllBreakpointsDeleted() {} - - @Override - public void onPreStepInto() { - deleteSuspendedLocation(); - } - - @Override - public void onPreStepOut() { - deleteSuspendedLocation(); - } - - @Override - public void onPreStepOver() { - deleteSuspendedLocation(); - } - - @Override - public void onPreResume() { - deleteSuspendedLocation(); - } - - @Override - public void onBreakpointStopped(String filePath, Location location) { - setSuspendedLocation( - new LocationImpl(filePath, location.getLineNumber(), location.getResourceProjectPath())); - } - - @Override - public void onValueChanged(Variable variable, long threadId, int frameIndex) {} - - @Override - public void addObserver(BreakpointManagerObserver observer) { - observers.add(observer); - } - - @Override - public void removeObserver(BreakpointManagerObserver observer) { - observers.remove(observer); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointRendererImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointRendererImpl.java deleted file mode 100644 index 4beb379a2b2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointRendererImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.ide.api.editor.gutter.Gutters.BREAKPOINTS_GUTTER; - -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import elemental.dom.Element; -import elemental.html.DivElement; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.api.debug.shared.model.BreakpointConfiguration; -import org.eclipse.che.ide.api.debug.BreakpointRenderer; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.gutter.Gutter; -import org.eclipse.che.ide.api.editor.texteditor.EditorResources; -import org.eclipse.che.ide.api.editor.texteditor.LineStyler; -import org.eclipse.che.ide.util.dom.Elements; - -/** Renderer for breakpoint marks in gutter (on the left margin of the text). */ -public class BreakpointRendererImpl implements BreakpointRenderer { - - /** The resources for breakpoint display. */ - private final BreakpointResources breakpointResources; - - /** The resources for editor display. */ - private final EditorResources editorResources; - - /** The component responsible for gutter handling. */ - private final Gutter hasGutter; - - /** The component responsible for line style handling. */ - private final LineStyler lineStyler; - - /** The document. */ - private Document document; - - @AssistedInject - public BreakpointRendererImpl( - final BreakpointResources breakpointResources, - final EditorResources editorResources, - @Assisted final Gutter hasGutter, - @Assisted final LineStyler lineStyler, - @Assisted final Document document) { - this.breakpointResources = breakpointResources; - this.editorResources = editorResources; - this.hasGutter = hasGutter; - this.lineStyler = lineStyler; - this.document = document; - } - - @Override - public void addBreakpointMark(int lineNumber) { - addBreakpointMark(lineNumber, (file, firstLine, linesAdded, linesRemoved) -> {}); - } - - @Override - public void addBreakpointMark(int lineNumber, LineChangeAction action) { - if (hasGutter != null) { - - Element newElement = createDefaultBreakpointMark(false); - Element existedElement = hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER); - if (existedElement != null) { - hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, newElement); - } else { - hasGutter.addGutterItem( - lineNumber, - BREAKPOINTS_GUTTER, - newElement, - (fromLine, linesRemoved, linesAdded) -> - action.onLineChange(document.getFile(), fromLine, linesAdded, linesRemoved)); - } - } - } - - @Override - public void setBreakpointMark( - final Breakpoint breakpoint, final boolean active, final LineChangeAction action) { - - if (hasGutter != null) { - int lineNumber = breakpoint.getLocation().getLineNumber() - 1; - - Element newElement = createBreakpointMarks(breakpoint, active); - Element existedElement = hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER); - - if (existedElement != null) { - hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, newElement); - } else { - hasGutter.addGutterItem( - lineNumber, - BREAKPOINTS_GUTTER, - newElement, - (fromLine, linesRemoved, linesAdded) -> - action.onLineChange(document.getFile(), fromLine, linesAdded, linesRemoved)); - } - } - } - - @Override - public void removeBreakpointMark(final int lineNumber) { - if (hasGutter != null) { - this.hasGutter.removeGutterItem(lineNumber, BREAKPOINTS_GUTTER); - } - } - - @Override - public void clearBreakpointMarks() { - if (hasGutter != null) { - this.hasGutter.clearGutter(BREAKPOINTS_GUTTER); - } - } - - @Override - public void setBreakpointActive(int lineNumber, boolean active) { - if (hasGutter != null) { - Element newElement = createDefaultBreakpointMark(active); - Element existedElement = hasGutter.getGutterItem(lineNumber, BREAKPOINTS_GUTTER); - if (existedElement != null) { - hasGutter.setGutterItem(lineNumber, BREAKPOINTS_GUTTER, newElement); - } - } - } - - @Override - public void setLineActive(final int lineNumber, final boolean active) { - if (active && this.lineStyler != null) { - this.lineStyler.addLineStyles(lineNumber, this.editorResources.editorCss().debugLine()); - } else { - this.lineStyler.removeLineStyles(lineNumber, this.editorResources.editorCss().debugLine()); - } - } - - private Element createBreakpointMarks(Breakpoint breakpoint, boolean active) { - BreakpointResources.Css css = breakpointResources.getCss(); - - List styles = new ArrayList<>(); - styles.add(css.breakpoint()); - if (!breakpoint.isEnabled()) { - styles.add(css.disabled()); - } else if (active) { - styles.add(css.active()); - } else { - styles.add(css.inactive()); - } - - BreakpointConfiguration conf = breakpoint.getBreakpointConfiguration(); - boolean hasCondition = - conf != null - && ((conf.isConditionEnabled() && !isNullOrEmpty(conf.getCondition())) - || (conf.isHitCountEnabled() && conf.getHitCount() != 0)); - - if (hasCondition) { - styles.add(css.condition()); - } - - StringBuilder title = new StringBuilder(); - if (conf != null) { - if (conf.isConditionEnabled() && !isNullOrEmpty(conf.getCondition())) { - title.append("Condition: ").append(conf.getCondition()).append('\n'); - } - - if (conf.isHitCountEnabled() && conf.getHitCount() != 0) { - title.append("Hit count: ").append(conf.getHitCount()).append('\n'); - } - - if (conf.getSuspendPolicy() != null) { - title.append("Suspend: ").append(conf.getSuspendPolicy().toString().toLowerCase()); - } - } - - DivElement element = Elements.createDivElement(styles.stream().toArray(String[]::new)); - element.setTitle(title.toString()); - return element; - } - - private Element createDefaultBreakpointMark(boolean active) { - BreakpointResources.Css css = breakpointResources.getCss(); - return Elements.createDivElement(css.breakpoint(), active ? css.active() : css.inactive()); - } - - @Override - public boolean isReady() { - return this.hasGutter != null && this.lineStyler != null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointResources.java deleted file mode 100644 index 4cac3078762..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointResources.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; - -/** Resources interface for the breakpoints marks. */ -public interface BreakpointResources extends ClientBundle { - @Source({"breakpoint.css", "org/eclipse/che/ide/api/ui/style.css"}) - Css getCss(); - - /** The CssResource interface for the breakpoints */ - interface Css extends CssResource { - - /** Returns the CSS class name for active breakpoint mark */ - String active(); - - /** Returns the CSS class name for inactive breakpoint mark */ - String inactive(); - - /** Returns the CSS class name for condition breakpoint mark */ - String condition(); - - /** Returns the CSS class name for disabled breakpoint mark */ - String disabled(); - - String breakpoint(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointStorageImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointStorageImpl.java deleted file mode 100644 index 677b257d517..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/BreakpointStorageImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import static java.util.Collections.emptyList; -import static java.util.Collections.unmodifiableList; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; -import java.util.logging.Logger; -import java.util.stream.Collectors; -import org.eclipse.che.api.debug.shared.dto.BreakpointConfigurationDto; -import org.eclipse.che.api.debug.shared.dto.BreakpointDto; -import org.eclipse.che.api.debug.shared.dto.LocationDto; -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.api.debug.shared.model.BreakpointConfiguration; -import org.eclipse.che.api.debug.shared.model.Location; -import org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.debug.BreakpointStorage; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.util.storage.LocalStorage; -import org.eclipse.che.ide.util.storage.LocalStorageProvider; -import org.eclipse.che.ide.workspace.WorkspaceServiceClient; - -/** - * Breakpoints storage based on local storage. - * - * @author Anatolii Bazko - */ -@Singleton -public class BreakpointStorageImpl implements BreakpointStorage { - - private static final Logger LOG = Logger.getLogger(BreakpointStorageImpl.class.getName()); - private static final String LOCAL_STORAGE_BREAKPOINTS_KEY_PREFIX = "che-breakpoints-"; - - private final DtoFactory dtoFactory; - private final LocalStorage storage; - private final WorkspaceServiceClient workspaceServiceClient; - private final List breakpoints; - private final String storageKey; - - @Inject - public BreakpointStorageImpl( - AppContext appContext, - DtoFactory dtoFactory, - LocalStorageProvider localStorageProvider, - WorkspaceServiceClient workspaceServiceClient) { - - this.storageKey = LOCAL_STORAGE_BREAKPOINTS_KEY_PREFIX + appContext.getWorkspaceId(); - this.dtoFactory = dtoFactory; - this.storage = localStorageProvider.get(); - this.workspaceServiceClient = workspaceServiceClient; - this.breakpoints = new LinkedList<>(readAll()); - - if (storage == null) { - LOG.warning("Local storage is not supported. Breakpoints won't be preserved."); - } else { - clearOutdatedRecords(); - } - } - - @Override - public void addAll(final List breakpoints) { - this.breakpoints.addAll(breakpoints); - preserve(); - } - - @Override - public void add(final Breakpoint breakpoint) { - breakpoints.add(breakpoint); - preserve(); - } - - @Override - public void delete(final Breakpoint breakpoint) { - breakpoints.removeIf(b -> isSameBreakpointLocation(breakpoint, b)); - preserve(); - } - - @Override - public void deleteAll(final List breakpoints) { - for (Breakpoint breakpoint : breakpoints) { - breakpoints.removeIf(b -> isSameBreakpointLocation(breakpoint, b)); - } - - preserve(); - } - - @Override - public void update(Breakpoint breakpoint) { - breakpoints.removeIf(b -> isSameBreakpointLocation(breakpoint, b)); - breakpoints.add(breakpoint); - preserve(); - } - - private boolean isSameBreakpointLocation(Breakpoint b1, Breakpoint b2) { - return b2.getLocation().getLineNumber() == b1.getLocation().getLineNumber() - && b2.getLocation().getTarget().equals(b1.getLocation().getTarget()); - } - - @Override - public void clear() { - breakpoints.clear(); - preserve(); - } - - @Override - public List getAll() { - return unmodifiableList(breakpoints); - } - - @Override - public List getByPath(String filePath) { - return breakpoints - .stream() - .filter(b -> b.getLocation().getTarget().equals(filePath)) - .collect(Collectors.toList()); - } - - @Override - public Optional get(String filePath, int lineNumber) { - return breakpoints - .stream() - .filter( - b -> - b.getLocation().getLineNumber() == lineNumber - && b.getLocation().getTarget().equals(filePath)) - .findAny(); - } - - private void preserve() { - if (storage == null) { - return; - } - - List breakpoints2save = new LinkedList<>(); - for (Breakpoint breakpoint : breakpoints) { - breakpoints2save.add(toDto(breakpoint)); - } - - storage.setItem(storageKey, dtoFactory.toJson(breakpoints2save)); - } - - private List readAll() { - if (storage == null) { - return emptyList(); - } - - String json = storage.getItem(storageKey); - if (json == null) { - return emptyList(); - } - - return dtoFactory - .createListDtoFromJson(json, BreakpointDto.class) - .stream() - .map(BreakpointImpl::new) - .collect(Collectors.toList()); - } - - /** - * Remove all keys from the local storage that contain breakpoints for unexisted workspaces. - * - *

        Implementation doesn't handle workspace removal, so it is necessary to check if workspaces - * doesn't exist and remove local storage records if so. - */ - private void clearOutdatedRecords() { - for (int i = 0; i < storage.getLength(); i++) { - String key = storage.key(i); - if (key != null && key.startsWith(LOCAL_STORAGE_BREAKPOINTS_KEY_PREFIX)) { - String wsId = key.substring(LOCAL_STORAGE_BREAKPOINTS_KEY_PREFIX.length()); - - Promise workspace = workspaceServiceClient.getWorkspace(wsId); - workspace.catchError( - arg -> { - storage.removeItem(key); - }); - } - } - } - - private BreakpointDto toDto(Breakpoint breakpoint) { - BreakpointConfiguration breakpointConfiguration = breakpoint.getBreakpointConfiguration(); - BreakpointConfigurationDto breakpointConfigurationDto = - breakpointConfiguration == null - ? null - : dtoFactory - .createDto(BreakpointConfigurationDto.class) - .withSuspendPolicy(breakpointConfiguration.getSuspendPolicy()) - .withHitCount(breakpointConfiguration.getHitCount()) - .withCondition(breakpointConfiguration.getCondition()) - .withConditionEnabled(breakpointConfiguration.isConditionEnabled()) - .withHitCountEnabled(breakpointConfiguration.isHitCountEnabled()); - - Location location = breakpoint.getLocation(); - LocationDto locationDto = - dtoFactory - .createDto(LocationDto.class) - .withTarget(location.getTarget()) - .withLineNumber(location.getLineNumber()) - .withExternalResourceId(location.getExternalResourceId()) - .withExternalResource(location.isExternalResource()) - .withResourceProjectPath(location.getResourceProjectPath()); - - return dtoFactory - .createDto(BreakpointDto.class) - .withLocation(locationDto) - .withEnabled(breakpoint.isEnabled()) - .withBreakpointConfiguration(breakpointConfigurationDto); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebugApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebugApiModule.java deleted file mode 100644 index 1c14d3b7a50..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebugApiModule.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.debug.BreakpointManager; -import org.eclipse.che.ide.api.debug.BreakpointRenderer; -import org.eclipse.che.ide.api.debug.BreakpointRendererFactory; -import org.eclipse.che.ide.api.debug.BreakpointStorage; -import org.eclipse.che.ide.api.debug.DebuggerServiceClient; -import org.eclipse.che.ide.api.debug.DebuggerServiceClientImpl; - -/** - * GIN module for configuring Debug API components. - * - * @author Artem Zatsarynnyi - */ -public class DebugApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(DebuggerServiceClient.class).to(DebuggerServiceClientImpl.class).in(Singleton.class); - - install( - new GinFactoryModuleBuilder() - .implement(BreakpointRenderer.class, BreakpointRendererImpl.class) - .build(BreakpointRendererFactory.class)); - - bind(BreakpointStorage.class).to(BreakpointStorageImpl.class); - bind(BreakpointManager.class).to(BreakpointManagerImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/Debugger.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/Debugger.java deleted file mode 100644 index f5cab3aa3e5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/Debugger.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import java.util.List; -import java.util.Map; -import org.eclipse.che.api.debug.shared.dto.ThreadStateDto; -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.api.debug.shared.model.Location; -import org.eclipse.che.api.debug.shared.model.SimpleValue; -import org.eclipse.che.api.debug.shared.model.StackFrameDump; -import org.eclipse.che.api.debug.shared.model.ThreadState; -import org.eclipse.che.api.debug.shared.model.Variable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Client-side debugger. - * - * @author Andrey Plotnikov - * @author Anatoliy Bazko - */ -public interface Debugger extends DebuggerObservable { - - /** Returns debugger type */ - String getDebuggerType(); - - /** Creates breakpoint. */ - Breakpoint createBreakpoint(VirtualFile file, int lineNumber); - - /** - * Adds new breakpoint. - * - * @param breakpoint the breakpoint to add - */ - Promise addBreakpoint(Breakpoint breakpoint); - - /** - * Deletes the given breakpoint on server. - * - * @param breakpoint the breakpoint to delete - */ - Promise deleteBreakpoint(Breakpoint breakpoint); - - /** Deletes all breakpoints. */ - Promise deleteAllBreakpoints(); - - /** Returns breakpoints. */ - Promise> getAllBreakpoints(); - - /** - * Connects to server. - * - * @param connectionProperties the connection properties - */ - Promise connect(Map connectionProperties); - - /** - * Disconnects from process is being debugged. When debugger is disconnected it should invoke - * {@link DebuggerManager#setActiveDebugger(Debugger)} with {@code null}. - */ - void disconnect(); - - /** Does step into. */ - void stepInto(); - - /** Does step over. */ - void stepOver(); - - /** Does step out. */ - void stepOut(); - - /** Resumes application. */ - void resume(); - - /** Resumes application to specified location. */ - void runToLocation(Location location); - - /** Suspends application. */ - void suspend(); - - /** - * Evaluates the given expression inside a specific frame. - * - * @param expression the expression to evaluate - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise evaluate(String expression, long threadId, int frameIndex); - - /** - * Gets the value of the given variable inside a specific frame. - * - * @param variable the variable to get value from - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getValue(Variable variable, long threadId, int frameIndex); - - /** - * Gets a stack frame dump. - * - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getStackFrameDump(long threadId, int frameIndex); - - /** Gets thread dump. */ - Promise> getThreadDump(); - - /** - * Sets a new value in the variable inside a specific frame. - * - * @param variable the variable to update - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - void setValue(Variable variable, long threadId, int frameIndex); - - /** - * Gets a location of the resources for the given frame. - * - * @param threadId the unique thread id {@link ThreadState#getId()} - * @param frameIndex the frame index inside the thread - */ - Promise getStackFrameLocation(long threadId, int frameIndex); - - /** Indicates if connection is established with the server. */ - boolean isConnected(); - - /** Indicates if debugger is in suspended state. */ - boolean isSuspended(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerDescriptor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerDescriptor.java deleted file mode 100644 index 8cb19121549..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerDescriptor.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -/** - * Represents general information about debugger. - * - * @author Anatoliy Bazko - */ -public class DebuggerDescriptor { - - /** Info about debugger. Generally contains of name and version. */ - private String info; - - /** The address of the application is being debugged: host, port, pid etc. */ - private String address; - - public DebuggerDescriptor(String info, String address) { - this.info = info; - this.address = address; - } - - public String getInfo() { - return info; - } - - public String getAddress() { - return address; - } - - public void setInfo(String info) { - this.info = info; - } - - public void setAddress(String address) { - this.address = address; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - DebuggerDescriptor that = (DebuggerDescriptor) o; - - if (info != null ? !info.equals(that.info) : that.info != null) return false; - return address != null ? address.equals(that.address) : that.address == null; - } - - @Override - public int hashCode() { - int result = info != null ? info.hashCode() : 0; - result = 31 * result + (address != null ? address.hashCode() : 0); - return result; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManager.java deleted file mode 100644 index 961b181b593..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * The debugger provider. - * - * @author Andrey Plotnikov - * @author Anatoliy Bazko - */ -@Singleton -public class DebuggerManager implements DebuggerManagerObservable { - private Debugger activeDebugger; - private Map debuggers; - private List observers; - - @Inject - protected DebuggerManager() { - this.debuggers = new HashMap<>(); - this.observers = new ArrayList<>(); - } - - /** Register new debugger for the given id. */ - public void registeredDebugger(String id, Debugger debugger) { - debuggers.put(id, debugger); - } - - /** Gets {@link Debugger} for the given id. */ - @Nullable - public Debugger getDebugger(String id) { - return debuggers.get(id); - } - - /** - * Sets new active debugger. Resubscribe all {@link DebuggerObserver} to listen to events from new - * {@link Debugger} - * - * @param debugger debugger is being used - */ - public void setActiveDebugger(@Nullable Debugger debugger) { - if (activeDebugger != null) { - for (DebuggerManagerObserver observer : observers) { - activeDebugger.removeObserver(observer); - } - } - - activeDebugger = debugger; - - for (DebuggerManagerObserver observer : observers) { - if (activeDebugger != null) { - activeDebugger.addObserver(observer); - } - observer.onActiveDebuggerChanged(activeDebugger); - } - } - - /** @return {@link Debugger} is currently being used */ - @Nullable - public Debugger getActiveDebugger() { - return activeDebugger; - } - - @Override - public void addObserver(DebuggerManagerObserver observer) { - observers.add(observer); - } - - @Override - public void removeObserver(DebuggerManagerObserver observer) { - observers.remove(observer); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObservable.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObservable.java deleted file mode 100644 index 40431979a5b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObservable.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -/** @author Anatoliy Bazko */ -public interface DebuggerManagerObservable { - - /** Adds observer. */ - void addObserver(DebuggerManagerObserver observer); - - /** Removes observer. */ - void removeObserver(DebuggerManagerObserver observer); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObserver.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObserver.java deleted file mode 100644 index dfe2f2b8a3b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerManagerObserver.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import org.eclipse.che.commons.annotation.Nullable; - -/** @author Anatoliy Bazko */ -public interface DebuggerManagerObserver extends DebuggerObserver { - - /** Event happens when new active debugger is set. */ - void onActiveDebuggerChanged(@Nullable Debugger activeDebugger); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObservable.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObservable.java deleted file mode 100644 index 1266b1d7ad5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObservable.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -/** @author Anatoliy Bazko */ -public interface DebuggerObservable { - - /** Adds observer. */ - void addObserver(DebuggerObserver observer); - - /** Removes observer. */ - void removeObserver(DebuggerObserver observer); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObserver.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObserver.java deleted file mode 100644 index 0e50dfda37a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/debug/DebuggerObserver.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.debug; - -import org.eclipse.che.api.debug.shared.model.Breakpoint; -import org.eclipse.che.api.debug.shared.model.Location; -import org.eclipse.che.api.debug.shared.model.Variable; - -/** @author Anatoliy Bazko */ -public interface DebuggerObserver { - - /** Event happens when debugger client connected to the server. */ - void onDebuggerAttached(DebuggerDescriptor debuggerDescriptor); - - /** Event happens when debugger client disconnected from the server. */ - void onDebuggerDisconnected(); - - /** Event happens when breakpoint added. */ - void onBreakpointAdded(Breakpoint breakpoint); - - /** Event happens when breakpoint activated. */ - void onBreakpointActivated(String filePath, int lineNumber); - - /** Event happens when breakpoint deleted. */ - void onBreakpointDeleted(Breakpoint breakpoint); - - /** Event happens when all breakpoint deleted. */ - void onAllBreakpointsDeleted(); - - /** Event happens on step in. */ - void onPreStepInto(); - - /** Event happens on step out. */ - void onPreStepOut(); - - /** Event happens on step out. */ - void onPreStepOver(); - - /** Event happens when debugger resumed. */ - void onPreResume(); - - /** Event happens when debugger stopped at breakpoint. */ - void onBreakpointStopped(String filePath, Location location); - - /** Event happens when value changed. */ - void onValueChanged(Variable variable, long threadId, int frameIndex); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/BookmarkletParams.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/BookmarkletParams.java deleted file mode 100644 index 4940b211105..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/BookmarkletParams.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.devmode; - -import static jsinterop.annotations.JsPackage.GLOBAL; - -import javax.inject.Singleton; -import jsinterop.annotations.JsPackage; -import jsinterop.annotations.JsProperty; -import jsinterop.annotations.JsType; - -/** Helps to set-up the parameters for GWT Super DevMode. */ -@Singleton -class BookmarkletParams { - - /** Sets-up URL of the Code Server and GWT module name to recompile. */ - void setParams(String codeServerURL, String moduleName) { - Params params = new Params(); - params.setServerURL(codeServerURL); - params.setModuleName(moduleName); - - Window.setParams(params); - } - - @JsType(isNative = true, name = "window", namespace = JsPackage.GLOBAL) - private static class Window { - - @JsProperty(name = "__gwt_bookmarklet_params") - static native void setParams(Object message); - } - - @JsType(isNative = true, name = "Object", namespace = GLOBAL) - private static class Params { - - @JsProperty(name = "server_url") - native void setServerURL(String serverURL); - - @JsProperty(name = "module_name") - native void setModuleName(String moduleName); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeOffAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeOffAction.java deleted file mode 100644 index 3641acaff66..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeOffAction.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.devmode; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; - -@Singleton -public class DevModeOffAction extends BaseAction { - - private final GWTDevMode gwtDevMode; - - @Inject - public DevModeOffAction(CoreLocalizationConstant messages, GWTDevMode gwtDevMode) { - super(messages.gwtDevModeOffActionTitle()); - - this.gwtDevMode = gwtDevMode; - } - - @Override - public void actionPerformed(ActionEvent event) { - gwtDevMode.off(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeScriptInjector.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeScriptInjector.java deleted file mode 100644 index f46a83666f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeScriptInjector.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.devmode; - -import com.google.gwt.core.client.Callback; -import com.google.gwt.core.client.ScriptInjector; -import elemental.js.JsBrowser; -import javax.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.callback.CallbackPromiseHelper; - -/** Allows to inject JavaScript for enabling Super DevMode on a host page. */ -@Singleton -class DevModeScriptInjector { - - private static final String DEV_MODE_SCRIPT_NAME = "dev_mode_on.js"; - - private static Callback getScriptInjectionCallback( - Callback promiseCallback) { - - return new Callback() { - @Override - public void onSuccess(Void result) { - promiseCallback.onSuccess(result); - } - - @Override - public void onFailure(Exception reason) { - promiseCallback.onFailure(reason); - } - }; - } - - /** - * Injects the JS script, that communicates with a Code Server, into a host page. - * - * @param url host URL where script is located. Usually should be a Code Server URL - * @return promise that may be resolved if script has been injected successfully or rejected in - * case of any error while script injection - */ - Promise inject(String url) { - return CallbackPromiseHelper.createFromCallback( - promiseCallback -> - ScriptInjector.fromUrl(url + DEV_MODE_SCRIPT_NAME) - .setWindow(JsBrowser.getWindow()) - .setCallback(getScriptInjectionCallback(promiseCallback)) - .inject()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeSetUpAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeSetUpAction.java deleted file mode 100644 index ab178eeda77..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/DevModeSetUpAction.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.devmode; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.core.BrowserTabCloseHandler; - -@Singleton -public class DevModeSetUpAction extends BaseAction { - - private final GWTDevMode gwtDevMode; - private final BrowserTabCloseHandler browserTabCloseHandler; - - @Inject - public DevModeSetUpAction( - CoreLocalizationConstant messages, - GWTDevMode gwtDevMode, - BrowserTabCloseHandler browserTabCloseHandler) { - super(messages.gwtDevModeSetUpActionTitle()); - - this.gwtDevMode = gwtDevMode; - this.browserTabCloseHandler = browserTabCloseHandler; - } - - @Override - public void actionPerformed(ActionEvent event) { - browserTabCloseHandler.setCloseImmediately(true); - gwtDevMode.setUp(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/GWTDevMode.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/GWTDevMode.java deleted file mode 100644 index 6634db03a02..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/devmode/GWTDevMode.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.devmode; - -import static com.google.common.base.Strings.isNullOrEmpty; - -import elemental.client.Browser; -import elemental.html.Storage; -import elemental.html.Window; -import java.util.Optional; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.message.MessageDialog; - -/** - * Helps to set-up Super DevMode for the current IDE GWT app. - * - *

        It does not communicate with a GWT CodeServer directly in any way but relies on the {@code - * dev_mode_on.js} script functionality from the {@code gwt-dev} library. - */ -@Singleton -class GWTDevMode { - - public static final String LOCAL_CODE_SERVER_ADDRESS = "http://127.0.0.1:9876/"; - public static final String INT_CODE_SERVER_REF = "GWT-CodeServer"; - public static final String IDE_GWT_APP_SHORT_NAME = "_app"; - - private final WsAgentServerUtil wsAgentServerUtil; - private final DevModeScriptInjector devModeScriptInjector; - private final BookmarkletParams bookmarkletParams; - private final DialogFactory dialogFactory; - private final CoreLocalizationConstant messages; - - @Inject - GWTDevMode( - WsAgentServerUtil wsAgentServerUtil, - DevModeScriptInjector devModeScriptInjector, - BookmarkletParams bookmarkletParams, - DialogFactory dialogFactory, - CoreLocalizationConstant messages) { - this.wsAgentServerUtil = wsAgentServerUtil; - this.devModeScriptInjector = devModeScriptInjector; - this.bookmarkletParams = bookmarkletParams; - this.dialogFactory = dialogFactory; - this.messages = messages; - } - - /** - * Sets-up Super DevMode for the current IDE GWT app. Tries to use Code Server launched in a - * dev-machine or at a localhost depending on which one is launched. - */ - void setUp() { - String codeServerURL = getInternalCodeServerURL().orElse(LOCAL_CODE_SERVER_ADDRESS); - - setUpSuperDevModeWithUI(codeServerURL); - } - - /** Turn off Super DevMode for the current IDE GWT app. */ - void off() { - Window window = Browser.getWindow(); - Storage sessionStorage = window.getSessionStorage(); - - for (int i = 0; i < sessionStorage.getLength(); i++) { - String key = sessionStorage.key(i); - - if (key.equals("__gwtDevModeHook:" + IDE_GWT_APP_SHORT_NAME)) { - sessionStorage.removeItem(key); - break; - } - } - - window.getLocation().reload(); - } - - /** - * Returns a top-level URL of the GWT Code Server which is declared in the machine that contains - * the "wsagent" server. - * - * @return {@code Optional} with a top-level URL of the GWT Code Server or an empty {@code - * Optional} if none - */ - private Optional getInternalCodeServerURL() { - Optional wsAgentServerMachineOpt = wsAgentServerUtil.getWsAgentServerMachine(); - - if (wsAgentServerMachineOpt.isPresent()) { - MachineImpl wsAgentServerMachine = wsAgentServerMachineOpt.get(); - Optional codeServerOpt = - wsAgentServerMachine.getServerByName(INT_CODE_SERVER_REF); - - if (codeServerOpt.isPresent()) { - ServerImpl codeServer = codeServerOpt.get(); - String codeServerUrl = codeServer.getUrl(); - - if (!isNullOrEmpty(codeServerUrl)) { - return codeServerUrl.endsWith("/") - ? Optional.of(codeServerUrl) - : Optional.of(codeServerUrl + '/'); - } - } - } - - return Optional.empty(); - } - - /** - * Tries to set-up Super DevMode for the current IDE GWT app and shows an appropriate message to - * the user. - */ - private void setUpSuperDevModeWithUI(String codeServerURL) { - setUpSuperDevMode(codeServerURL) - .then(showSuccessMessage(codeServerURL)) - .catchError(handleStartRecompilationError(codeServerURL)); - } - - /** - * Tries to set-up Super DevMode for the current IDE GWT app. - * - * @param codeServerURL URL of the Code Server URL to use - * @return promise that may be resolved if Super DevMode has been set up successfully or rejected - * in case of any error while setting up Super DevMode - */ - private Promise setUpSuperDevMode(String codeServerURL) { - bookmarkletParams.setParams(codeServerURL, IDE_GWT_APP_SHORT_NAME); - - return devModeScriptInjector.inject(codeServerURL); - } - - private Operation showSuccessMessage(String codeServerURL) { - boolean isLocalhost = codeServerURL.equals(LOCAL_CODE_SERVER_ADDRESS); - - String message = - isLocalhost - ? messages.gwtRecompileDialogRecompilingMessage("localhost") - : messages.gwtRecompileDialogRecompilingMessage("dev-machine"); - - MessageDialog dialog = - dialogFactory.createMessageDialog(messages.gwtRecompileDialogTitle(), message, null); - - return aVoid -> dialog.show(); - } - - private Operation handleStartRecompilationError(String codeServerURL) { - boolean isLocalhost = codeServerURL.equals(LOCAL_CODE_SERVER_ADDRESS); - - return err -> { - if (!isLocalhost) { - setUpSuperDevModeWithUI(LOCAL_CODE_SERVER_ADDRESS); - } else { - dialogFactory - .createMessageDialog( - messages.gwtRecompileDialogTitle(), - messages.gwtRecompileDialogNoServerMessage(), - null) - .show(); - } - }; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/download/DownloadContainer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/download/DownloadContainer.java deleted file mode 100644 index 783daa29806..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/download/DownloadContainer.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.download; - -import com.google.gwt.user.client.ui.Frame; -import com.google.gwt.user.client.ui.RootLayoutPanel; -import com.google.inject.Inject; -import com.google.inject.Singleton; - -/** - * The purpose of this class is avoid opening a new window when downloading - * - * @author Roman Nikitenko - */ -@Singleton -public class DownloadContainer { - private static final String TARGET = "download-frame"; - - private Frame frame; - - @Inject - public DownloadContainer() { - frame = new Frame(); - frame.getElement().setAttribute("name", TARGET); - frame.setSize("0px", "0px"); - frame.setVisible(false); - frame.ensureDebugId(TARGET); - - RootLayoutPanel.get().add(frame); - } - - /** - * Sets the URL of the resource to be downloaded. - * - * @param url the resource's new URL - */ - public void setUrl(String url) { - frame.setUrl(url); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoModule.java deleted file mode 100644 index 2b54dbcab4e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoModule.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.dto; - -import com.google.gwt.inject.client.AbstractGinModule; - -/** GIN module for configuring DTO components. */ -public class DtoModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(DtoRegistrar.class).asEagerSingleton(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoRegistrar.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoRegistrar.java deleted file mode 100644 index 11a35ae34c6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/dto/DtoRegistrar.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.dto; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.client.DtoFactoryVisitorRegistry; - -/** Registers client DTO providers. */ -@Singleton -class DtoRegistrar { - - @Inject - DtoRegistrar(DtoFactory dtoFactory, DtoFactoryVisitorRegistry registry) { - registry - .getDtoFactoryVisitors() - .values() - .forEach(provider -> ((DtoFactoryVisitor) provider.get()).accept(dtoFactory)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ClientServerEventServiceImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ClientServerEventServiceImpl.java deleted file mode 100644 index ff0ba6a5d63..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ClientServerEventServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import static org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto.Type.MOVE; -import static org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto.Type.RESUME; -import static org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto.Type.START; -import static org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto.Type.STOP; -import static org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto.Type.SUSPEND; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.project.shared.dto.event.FileTrackingOperationDto; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.api.filewatcher.ClientServerEventService; -import org.eclipse.che.ide.dto.DtoFactory; - -/** @author Roman Nikitenko */ -@Singleton -public class ClientServerEventServiceImpl implements ClientServerEventService { - private static final String OUTCOMING_METHOD = "track:editor-file"; - - private final DtoFactory dtoFactory; - private final RequestTransmitter requestTransmitter; - private final PromiseProvider promises; - - @Inject - public ClientServerEventServiceImpl( - DtoFactory dtoFactory, RequestTransmitter requestTransmitter, PromiseProvider promises) { - this.dtoFactory = dtoFactory; - this.requestTransmitter = requestTransmitter; - this.promises = promises; - } - - @Override - public Promise sendFileTrackingStartEvent(String path) { - return transmit(path, "", START); - } - - @Override - public Promise sendFileTrackingStopEvent(String path) { - return transmit(path, "", STOP); - } - - @Override - public Promise sendFileTrackingSuspendEvent() { - return transmit("", "", SUSPEND); - } - - @Override - public Promise sendFileTrackingResumeEvent() { - return transmit("", "", RESUME); - } - - @Override - public Promise sendFileTrackingMoveEvent(String oldPath, String newPath) { - return transmit(oldPath, newPath, MOVE); - } - - private Promise transmit( - String path, String oldPath, FileTrackingOperationDto.Type type) { - final FileTrackingOperationDto dto = - dtoFactory - .createDto(FileTrackingOperationDto.class) - .withPath(path) - .withType(type) - .withOldPath(oldPath); - - return promises.create( - (AsyncCallback callback) -> - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(OUTCOMING_METHOD) - .paramsAsDto(dto) - .sendAndReceiveResultAsBoolean() - .onSuccess(callback::onSuccess) - .onFailure(error -> callback.onFailure(new Throwable(error.getMessage())))); - } -} 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 deleted file mode 100644 index 5ba96169c3c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java +++ /dev/null @@ -1,953 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Strings.isNullOrEmpty; -import static com.google.common.collect.Lists.newArrayList; -import static com.google.gwt.regexp.shared.RegExp.compile; -import static java.lang.Boolean.parseBoolean; -import static java.util.Collections.emptySet; -import static java.util.Collections.singleton; -import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toSet; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.WARNING; -import static org.eclipse.che.ide.api.parts.PartStackType.EDITING; -import static org.eclipse.che.ide.util.NameUtils.getFileExtension; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import com.google.web.bindery.event.shared.EventBus; -import elemental.json.Json; -import elemental.json.JsonArray; -import elemental.json.JsonObject; -import elemental.util.ArrayOf; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import javax.validation.constraints.NotNull; -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.PromiseProvider; -import org.eclipse.che.api.promises.client.callback.AsyncPromiseHelper; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.actions.LinkWithEditorAction; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.constraints.Direction; -import org.eclipse.che.ide.api.editor.AsyncEditorProvider; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.EditorOpenedEvent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorPartPresenter.EditorPartCloseHandler; -import org.eclipse.che.ide.api.editor.EditorProvider; -import org.eclipse.che.ide.api.editor.EditorRegistry; -import org.eclipse.che.ide.api.editor.OpenEditorCallbackImpl; -import org.eclipse.che.ide.api.editor.events.FileEvent; -import org.eclipse.che.ide.api.editor.texteditor.HasReadOnlyProperty; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.EditorMultiPartStack; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -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.selection.SelectionChangedEvent; -import org.eclipse.che.ide.api.selection.SelectionChangedHandler; -import org.eclipse.che.ide.api.statepersistance.StateComponent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerStoppedEvent; -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; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; -import org.eclipse.che.ide.ui.smartTree.data.HasDataObject; -import org.eclipse.che.ide.ui.window.event.WindowOpenedEvent; -import org.eclipse.che.ide.ui.window.event.WindowOpenedEvent.WindowOpenedHandler; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Default implementation of {@link EditorAgent}. - * - * @see EditorAgent - */ -@Singleton -public class EditorAgentImpl - implements EditorAgent, - EditorPartCloseHandler, - ActivePartChangedHandler, - SelectionChangedHandler, - StateComponent, - WorkspaceStoppedEvent.Handler, - WsAgentServerStoppedEvent.Handler, - WindowOpenedHandler { - - private final EventBus eventBus; - private final WorkspaceAgent workspaceAgent; - private final FileTypeRegistry fileTypeRegistry; - private final PreferencesManager preferencesManager; - private final EditorRegistry editorRegistry; - private final CoreLocalizationConstant coreLocalizationConstant; - private final EditorMultiPartStack editorMultiPartStack; - - private final List openedEditors; - private final Map> openingEditorsPathsToStacks; - private final Map openedEditorsToProviders; - private final EditorContentSynchronizer editorContentSynchronizer; - private final PromiseProvider promiseProvider; - private final ResourceProvider resourceProvider; - private final NotificationManager notificationManager; - private final FileType unknownFileType; - private List dirtyEditors; - private EditorPartPresenter activeEditor; - private PartPresenter activePart; - - @Inject - public EditorAgentImpl( - EventBus eventBus, - FileTypeRegistry fileTypeRegistry, - PreferencesManager preferencesManager, - EditorRegistry editorRegistry, - WorkspaceAgent workspaceAgent, - CoreLocalizationConstant coreLocalizationConstant, - EditorMultiPartStackPresenter editorMultiPartStack, - EditorContentSynchronizer editorContentSynchronizer, - PromiseProvider promiseProvider, - ResourceProvider resourceProvider, - NotificationManager notificationManager, - @Named("defaultFileType") FileType unknownFileType) { - this.eventBus = eventBus; - this.fileTypeRegistry = fileTypeRegistry; - this.preferencesManager = preferencesManager; - this.editorRegistry = editorRegistry; - this.workspaceAgent = workspaceAgent; - this.coreLocalizationConstant = coreLocalizationConstant; - this.editorMultiPartStack = editorMultiPartStack; - this.editorContentSynchronizer = editorContentSynchronizer; - this.promiseProvider = promiseProvider; - this.resourceProvider = resourceProvider; - this.notificationManager = notificationManager; - this.unknownFileType = unknownFileType; - this.openedEditors = newArrayList(); - this.openingEditorsPathsToStacks = new HashMap<>(); - this.openedEditorsToProviders = new HashMap<>(); - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - eventBus.addHandler(SelectionChangedEvent.TYPE, this); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, this); - eventBus.addHandler(WsAgentServerStoppedEvent.TYPE, this); - eventBus.addHandler(WindowOpenedEvent.TYPE, this); - } - - @Override - public void onClose(EditorPartPresenter editor) { - if (editor == null) { - return; - } - - final EditorPartStack editorPartStack = editorMultiPartStack.getPartStackByPart(editor); - if (editorPartStack == null) { - return; - } - - EditorTab editorTab = editorPartStack.getTabByPart(editor); - doCloseEditor(editorTab); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePart = event.getActivePart(); - if (!(event.getActivePart() instanceof EditorPartPresenter)) { - return; - } - activeEditor = (EditorPartPresenter) event.getActivePart(); - activeEditor.activate(); - final String isLinkedWithEditor = - preferencesManager.getValue(LinkWithEditorAction.LINK_WITH_EDITOR); - if (parseBoolean(isLinkedWithEditor)) { - final VirtualFile file = activeEditor.getEditorInput().getFile(); - eventBus.fireEvent(new RevealResourceEvent(file.getLocation(), true, false)); - } - } - - @Override - public void openEditor(@NotNull final VirtualFile file) { - openEditor(file, new OpenEditorCallbackImpl()); - } - - @Override - public void openEditor(@NotNull VirtualFile file, Constraints constraints) { - if (constraints == null) { - openEditor(file); - return; - } - - EditorPartStack relativeEditorPartStack = - editorMultiPartStack.getPartStackByTabId(constraints.relativeId); - if (relativeEditorPartStack == null) { - String errorMessage = - coreLocalizationConstant.canNotOpenFileInSplitMode(file.getLocation().toString()); - notificationManager.notify(errorMessage, FAIL, EMERGE_MODE); - Log.error(getClass(), errorMessage + ": relative part stack is not found"); - return; - } - - EditorPartStack editorPartStackConsumer = - editorMultiPartStack.split(relativeEditorPartStack, constraints, -1); - if (editorPartStackConsumer == null) { - String errorMessage = - coreLocalizationConstant.canNotOpenFileInSplitMode(file.getLocation().toString()); - notificationManager.notify(errorMessage, FAIL, EMERGE_MODE); - Log.error(getClass(), errorMessage + ": split part stack is not found"); - return; - } - - doOpen(file, editorPartStackConsumer, new OpenEditorCallbackImpl()); - } - - @Override - public void closeEditor(final EditorPartPresenter editor) { - if (editor == null) { - return; - } - - final EditorPartStack editorPartStack = editorMultiPartStack.getPartStackByPart(editor); - if (editorPartStack == null) { - return; - } - - editor.onClosing( - new AsyncCallback() { - @Override - public void onSuccess(Void result) { - EditorTab editorTab = editorPartStack.getTabByPart(editor); - doCloseEditor(editorTab); - } - - @Override - public void onFailure(Throwable caught) {} - }); - } - - private void doCloseEditor(EditorTab tab) { - checkArgument(tab != null, "Null editor tab occurred"); - - EditorPartPresenter editor = tab.getRelativeEditorPart(); - if (editor == null) { - return; - } - - openedEditors.remove(editor); - openedEditorsToProviders.remove(editor); - - editor.close(false); - - if (editor instanceof TextEditor) { - editorContentSynchronizer.unTrackEditor(editor); - } - - if (activeEditor != null && activeEditor == editor) { - activeEditor = null; - } - - eventBus.fireEvent(FileEvent.createFileClosedEvent(tab)); - } - - @Override - public void openEditor(@NotNull VirtualFile file, @NotNull OpenEditorCallback callback) { - Path path = file.getLocation(); - EditorPartStack activeEditorPartStack = editorMultiPartStack.getActivePartStack(); - if (activeEditorPartStack != null) { - PartPresenter openedPart = activeEditorPartStack.getPartByPath(path); - if (openedPart != null) { - editorMultiPartStack.setActivePart(openedPart); - callback.onEditorActivated((EditorPartPresenter) openedPart); - return; - } - - if (isFileOpening(path, activeEditorPartStack)) { - return; - } - } else { - activeEditorPartStack = editorMultiPartStack.createRootPartStack(); - } - - doOpen(file, activeEditorPartStack, callback); - } - - private void doOpen( - VirtualFile file, EditorPartStack editorPartStackConsumer, OpenEditorCallback callback) { - - addToOpeningFilesList(file.getLocation(), editorPartStackConsumer); - Set fileTypesByFile = getFileTypesByFile(file); - Optional registeredFileType = - fileTypesByFile - .stream() - .filter(fileType -> editorRegistry.getEditor(fileType) instanceof AsyncEditorProvider) - .findAny(); - if (registeredFileType.isPresent()) { - FileType fileType = registeredFileType.get(); - final EditorProvider editorProvider = editorRegistry.getEditor(fileType); - ((AsyncEditorProvider) editorProvider) - .createEditor(file) - .then( - editor -> { - initEditor( - file, callback, fileType, editor, editorPartStackConsumer, editorProvider); - }); - } else { - FileType fileType = fileTypesByFile.stream().findAny().orElse(unknownFileType); - final EditorProvider editorProvider = editorRegistry.getEditor(fileType); - final EditorPartPresenter editor = editorProvider.getEditor(); - initEditor(file, callback, fileType, editor, editorPartStackConsumer, editorProvider); - } - } - - private Set getFileTypesByFile(VirtualFile file) { - String name = file.getName(); - - if (isNullOrEmpty(name)) { - return emptySet(); - } - - Set typesByNamePattern = - fileTypeRegistry - .getFileTypes() - .stream() - .filter( - type -> - type.getNamePatterns() - .stream() - .anyMatch(namePattern -> compile(namePattern).test(name))) - .collect(toSet()); - - String fileExtension = getFileExtension(name); - if (isNullOrEmpty(fileExtension)) { - return typesByNamePattern; - } - - Set fileTypes = - typesByNamePattern - .stream() - .filter(type -> fileExtension.equals(type.getExtension())) - .collect(toSet()); - fileTypes = fileTypes.isEmpty() ? typesByNamePattern : fileTypes; - return fileTypes.isEmpty() - ? singleton(fileTypeRegistry.getFileTypeByExtension(fileExtension)) - : fileTypes; - } - - private void initEditor( - VirtualFile file, - OpenEditorCallback openEditorCallback, - FileType fileType, - EditorPartPresenter editor, - EditorPartStack editorPartStack, - EditorProvider editorProvider) { - OpenEditorCallback initializeCallback = - new OpenEditorCallbackImpl() { - @Override - public void onEditorOpened(EditorPartPresenter editor) { - editorPartStack.addPart(editor); - editorMultiPartStack.setActivePart(editor); - - openedEditors.add(editor); - removeFromOpeningFilesList(file.getLocation(), editorPartStack); - - openEditorCallback.onEditorOpened(editor); - - eventBus.fireEvent(new EditorOpenedEvent(file, editor)); - eventBus.fireEvent(FileEvent.createFileOpenedEvent(file)); - } - - @Override - public void onInitializationFailed() { - openEditorCallback.onInitializationFailed(); - - removeFromOpeningFilesList(file.getLocation(), editorPartStack); - - if (!openingEditorsPathsToStacks.containsKey(editorPartStack) - && editorPartStack.getParts().isEmpty()) { - editorMultiPartStack.removePartStack(editorPartStack); - } - } - }; - - editor.init(new EditorInputImpl(fileType, file), initializeCallback); - finalizeInit(file, editor, editorProvider); - } - - private void finalizeInit( - VirtualFile file, EditorPartPresenter editor, EditorProvider editorProvider) { - openedEditorsToProviders.put(editor, editorProvider.getId()); - - editor.addCloseHandler(this); - editor.addPropertyListener( - (source, propId) -> { - if (propId == EditorPartPresenter.PROP_INPUT) { - if (editor instanceof HasReadOnlyProperty) { - ((HasReadOnlyProperty) editor).setReadOnly(file.isReadOnly()); - } - - if (editor instanceof TextEditor) { - editorContentSynchronizer.trackEditor(editor); - } - } - }); - } - - private boolean isFileOpening(Path path, EditorPartStack editorPartStack) { - Set openingFiles = openingEditorsPathsToStacks.get(editorPartStack); - return openingFiles != null && openingFiles.contains(path); - } - - private void addToOpeningFilesList(Path path, EditorPartStack editorPartStack) { - if (editorPartStack == null) { - return; - } - - Set openingFiles = - openingEditorsPathsToStacks.computeIfAbsent(editorPartStack, k -> new HashSet<>()); - openingFiles.add(path); - } - - private void removeFromOpeningFilesList(Path path, EditorPartStack editorPartStack) { - if (editorPartStack == null || !openingEditorsPathsToStacks.containsKey(editorPartStack)) { - return; - } - - Set openingFiles = openingEditorsPathsToStacks.get(editorPartStack); - openingFiles.remove(path); - } - - @Override - public void activateEditor(@NotNull EditorPartPresenter editor) { - workspaceAgent.setActivePart(editor); - } - - @Override - public List getDirtyEditors() { - List dirtyEditors = new ArrayList<>(); - for (EditorPartPresenter partPresenter : openedEditors) { - if (partPresenter.isDirty()) { - dirtyEditors.add(partPresenter); - } - } - return dirtyEditors; - } - - @NotNull - @Override - public List getOpenedEditors() { - return newArrayList(openedEditors); - } - - @Override - public List getOpenedEditorsFor(EditorPartStack editorPartStack) { - List result = newArrayList(); - for (EditorPartPresenter editor : openedEditors) { - if (editorPartStack.containsPart(editor)) { - result.add(editor); - } - } - return result; - } - - @Nullable - @Override - public EditorPartPresenter getOpenedEditor(Path path) { - EditorPartStack editorPartStack = editorMultiPartStack.getPartStackByPart(activeEditor); - return editorPartStack == null - ? null - : (EditorPartPresenter) editorPartStack.getPartByPath(path); - } - - /** {@inheritDoc} */ - @Override - public void saveAll(final AsyncCallback callback) { - dirtyEditors = getDirtyEditors(); - if (dirtyEditors.isEmpty()) { - callback.onSuccess(null); - } else { - doSave(callback); - } - } - - private void doSave(final AsyncCallback callback) { - final EditorPartPresenter partPresenter = dirtyEditors.get(0); - partPresenter.doSave( - new AsyncCallback() { - @Override - public void onFailure(Throwable caught) { - callback.onFailure(caught); - } - - @Override - public void onSuccess(EditorInput result) { - dirtyEditors.remove(partPresenter); - if (dirtyEditors.isEmpty()) { - callback.onSuccess(null); - } else { - doSave(callback); - } - } - }); - } - - @Override - public EditorPartPresenter getActiveEditor() { - return activeEditor; - } - - @Override - public EditorPartPresenter getNextFor(EditorPartPresenter editorPart) { - return editorMultiPartStack.getNextFor(editorPart); - } - - @Override - public EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart) { - return editorMultiPartStack.getPreviousFor(editorPart); - } - - @Override - public JsonObject getState() { - JsonObject state = Json.createObject(); - - EditorMultiPartStackState stacks = null; - try { - stacks = editorMultiPartStack.getState(); - } catch (IllegalStateException ignore) { - } - if (stacks != null) { - state.put("FILES", storeEditors(stacks)); - } - EditorPartPresenter activeEditor = getActiveEditor(); - if (activeEditor != null) { - state.put("ACTIVE_EDITOR", activeEditor.getEditorInput().getFile().getLocation().toString()); - } - return state; - } - - private JsonObject storeEditors(EditorMultiPartStackState splitStacks) { - JsonObject result = Json.createObject(); - if (splitStacks.getEditorPartStack() != null) { - result.put("FILES", storeEditors(splitStacks.getEditorPartStack())); - } else { - result.put("DIRECTION", splitStacks.getDirection().toString()); - result.put("SPLIT_FIRST", storeEditors(splitStacks.getSplitFirst())); - result.put("SPLIT_SECOND", storeEditors(splitStacks.getSplitSecond())); - result.put("SIZE", splitStacks.getSize()); - } - return result; - } - - private JsonArray storeEditors(EditorPartStack partStack) { - JsonArray result = Json.createArray(); - int i = 0; - List parts = partStack.getParts(); - for (EditorPartPresenter part : parts) { - JsonObject file = Json.createObject(); - file.put("PATH", part.getEditorInput().getFile().getLocation().toString()); - file.put("EDITOR_PROVIDER", openedEditorsToProviders.get(part)); - if (part instanceof TextEditor) { - file.put("CURSOR_OFFSET", ((TextEditor) part).getCursorOffset()); - file.put("TOP_VISIBLE_LINE", ((TextEditor) part).getTopVisibleLine()); - } - if (partStack.getActivePart().equals(part)) { - file.put("ACTIVE", true); - } - result.set(i++, file); - } - return result; - } - - @Override - @SuppressWarnings("unchecked") - public Promise loadState(@NotNull final JsonObject state) { - if (state.hasKey("FILES")) { - JsonObject files = state.getObject("FILES"); - EditorPartStack editorPartStackConsumer = editorMultiPartStack.getActivePartStack(); - if (editorPartStackConsumer == null) { - editorPartStackConsumer = editorMultiPartStack.createRootPartStack(); - } - - final Map activeEditors = new HashMap<>(); - List> restore = restore(files, editorPartStackConsumer, activeEditors); - Promise> promise = - promiseProvider.all2(restore.toArray(new Promise[restore.size()])); - promise.then( - (Operation) - ignored -> { - String activeFile = ""; - if (state.hasKey("ACTIVE_EDITOR")) { - activeFile = state.getString("ACTIVE_EDITOR"); - } - EditorPartPresenter activeEditorPart = null; - for (Map.Entry entry : - activeEditors.entrySet()) { - entry.getValue().setActivePart(entry.getKey()); - if (activeFile.equals( - entry.getKey().getEditorInput().getFile().getLocation().toString())) { - activeEditorPart = entry.getKey(); - } - } - workspaceAgent.setActivePart(activeEditorPart); - }); - - return promise.thenPromise(ignored -> promiseProvider.resolve(null)); - } - - return promiseProvider.resolve(null); - } - - private List> restore( - JsonObject files, - EditorPartStack editorPartStack, - Map activeEditors) { - - if (files.hasKey("FILES")) { - // plain - JsonArray filesArray = files.getArray("FILES"); - List> promises = new ArrayList<>(); - for (int i = 0; i < filesArray.length(); i++) { - JsonObject file = filesArray.getObject(i); - Promise openFile = openFile(file, editorPartStack, activeEditors); - promises.add(openFile); - } - return promises; - } else { - // split - return restoreSplit(files, editorPartStack, activeEditors); - } - } - - private List> restoreSplit( - JsonObject files, - EditorPartStack editorPartStack, - Map activeEditors) { - JsonObject splitFirst = files.getObject("SPLIT_FIRST"); - String direction = files.getString("DIRECTION"); - double size = files.getNumber("SIZE"); - EditorPartStack split = - editorMultiPartStack.split( - editorPartStack, new Constraints(Direction.valueOf(direction), null), size); - List> restoreFirst = restore(splitFirst, editorPartStack, activeEditors); - JsonObject splitSecond = files.getObject("SPLIT_SECOND"); - List> restoreSecond = restore(splitSecond, split, activeEditors); - List> result = new ArrayList<>(); - result.addAll(restoreFirst); - result.addAll(restoreSecond); - return result; - } - - private Promise openFile( - final JsonObject file, - final EditorPartStack editorPartStack, - final Map activeEditors) { - return AsyncPromiseHelper.createFromAsyncRequest( - new AsyncPromiseHelper.RequestCall() { - @Override - public void makeCall(final AsyncCallback callback) { - String location = file.getString("PATH"); - Path path = Path.valueOf(location); - if (isFileOpening(path, editorPartStack)) { - callback.onSuccess(null); - return; - } - - addToOpeningFilesList(path, editorPartStack); - resourceProvider - .getResource(location) - .then( - new Operation>() { - @Override - public void apply(java.util.Optional optionalFile) - throws OperationException { - if (optionalFile.isPresent()) { - restoreCreateEditor( - optionalFile.get(), file, editorPartStack, callback, activeEditors); - } else { - removeFromOpeningFilesList(path, editorPartStack); - callback.onSuccess(null); - } - } - }) - .catchError( - error -> { - removeFromOpeningFilesList(path, editorPartStack); - callback.onSuccess(null); - }); - } - }); - } - - private void restoreCreateEditor( - final VirtualFile resourceFile, - JsonObject file, - final EditorPartStack editorPartStack, - final AsyncCallback openCallback, - final Map activeEditors) { - String providerId = file.getString("EDITOR_PROVIDER"); - final OpenEditorCallback callback; - if (file.hasKey("CURSOR_OFFSET") && file.hasKey("TOP_VISIBLE_LINE")) { - final int cursorOffset = (int) file.getNumber("CURSOR_OFFSET"); - final int topLine = (int) file.getNumber("TOP_VISIBLE_LINE"); - callback = new RestoreStateEditorCallBack(cursorOffset, topLine); - } else { - callback = new OpenEditorCallbackImpl(); - } - final boolean active = file.hasKey("ACTIVE") && file.getBoolean("ACTIVE"); - - Set fileTypesByFile = getFileTypesByFile(resourceFile); - Optional registeredFileType = - fileTypesByFile - .stream() - .filter(fileType -> editorRegistry.getEditor(fileType) instanceof AsyncEditorProvider) - .findAny(); - if (registeredFileType.isPresent()) { - FileType fileType = registeredFileType.get(); - final EditorProvider provider = editorRegistry.getEditor(fileType); - ((AsyncEditorProvider) provider) - .createEditor(resourceFile) - .then( - editor -> { - restoreInitEditor( - resourceFile, - callback, - fileTypeRegistry.getFileTypeByFile(resourceFile), - editor, - provider, - editorPartStack) - .then( - arg -> { - if (active) { - activeEditors.put(editor, editorPartStack); - } - openCallback.onSuccess(null); - }); - }); - } else { - FileType fileType = fileTypesByFile.stream().findAny().orElse(unknownFileType); - final EditorProvider provider = editorRegistry.getEditor(fileType); - EditorPartPresenter editor = provider.getEditor(); - restoreInitEditor( - resourceFile, - callback, - fileTypeRegistry.getFileTypeByFile(resourceFile), - editor, - provider, - editorPartStack) - .then( - arg -> { - if (active) { - activeEditors.put(editor, editorPartStack); - } - openCallback.onSuccess(null); - }); - } - } - - private Promise restoreInitEditor( - final VirtualFile file, - final OpenEditorCallback openEditorCallback, - FileType fileType, - final EditorPartPresenter editor, - EditorProvider editorProvider, - EditorPartStack editorPartStack) { - return AsyncPromiseHelper.createFromAsyncRequest( - (AsyncCallback promiseCallback) -> { - OpenEditorCallback initializeCallback = - new OpenEditorCallbackImpl() { - @Override - public void onEditorOpened(EditorPartPresenter editor) { - editorPartStack.addPart(editor); - - openedEditors.add(editor); - removeFromOpeningFilesList(file.getLocation(), editorPartStack); - - promiseCallback.onSuccess(null); - openEditorCallback.onEditorOpened(editor); - openEditorCallback.onEditorActivated(editor); - - eventBus.fireEvent(new EditorOpenedEvent(file, editor)); - eventBus.fireEvent(FileEvent.createFileOpenedEvent(file)); - } - - @Override - public void onInitializationFailed() { - promiseCallback.onFailure( - new Exception("Can not initialize editor for " + file.getLocation())); - openEditorCallback.onInitializationFailed(); - removeFromOpeningFilesList(file.getLocation(), editorPartStack); - - if (!openingEditorsPathsToStacks.containsKey(editorPartStack) - && editorPartStack.getParts().isEmpty()) { - editorMultiPartStack.removePartStack(editorPartStack); - } - } - }; - - editor.init(new EditorInputImpl(fileType, file), initializeCallback); - finalizeInit(file, editor, editorProvider); - }); - } - - @Override - public void onSelectionChanged(SelectionChangedEvent event) { - final String isLinkedWithEditor = - preferencesManager.getValue(LinkWithEditorAction.LINK_WITH_EDITOR); - if (!parseBoolean(isLinkedWithEditor)) { - return; - } - - final Selection selection = event.getSelection(); - if (selection instanceof Selection.NoSelectionProvided) { - return; - } - - Resource currentResource = null; - - if (selection == null - || selection.getHeadElement() == null - || selection.getAllElements().size() > 1) { - return; - } - - final Object headObject = selection.getHeadElement(); - - if (headObject instanceof HasDataObject) { - Object data = ((HasDataObject) headObject).getData(); - - if (data instanceof Resource) { - currentResource = (Resource) data; - } - } else if (headObject instanceof Resource) { - currentResource = (Resource) headObject; - } - - EditorPartStack activePartStack = editorMultiPartStack.getActivePartStack(); - if (currentResource == null || activePartStack == null || activeEditor == null) { - return; - } - - final Path locationOfActiveOpenedFile = activeEditor.getEditorInput().getFile().getLocation(); - final Path selectedResourceLocation = currentResource.getLocation(); - if (!(activePart instanceof ProjectExplorerPresenter) - && selectedResourceLocation.equals(locationOfActiveOpenedFile)) { - return; - } - - PartPresenter partPresenter = activePartStack.getPartByPath(selectedResourceLocation); - if (partPresenter != null) { - workspaceAgent.setActivePart(partPresenter, EDITING); - } - } - - @Override - public void onWorkspaceStopped(WorkspaceStoppedEvent event) { - for (EditorPartPresenter editor : getOpenedEditors()) { - closeEditor(editor); - } - } - - @Override - public void onWsAgentServerStopped(WsAgentServerStoppedEvent event) { - List editorsToReadOnlyMode = - getOpenedEditors() - .stream() - .filter( - editor -> - editor instanceof HasReadOnlyProperty - && !((HasReadOnlyProperty) editor).isReadOnly()) - .collect(toList()); - - if (editorsToReadOnlyMode.isEmpty()) { - return; - } - - notificationManager.notify( - "", coreLocalizationConstant.messageSwitchEditorsInReadOnlyMode(), WARNING, EMERGE_MODE); - - editorsToReadOnlyMode.forEach( - editor -> { - EditorTab editorTab = editorMultiPartStack.getTabByPart(editor); - if (editorTab != null) { - editorTab.setReadOnlyMark(true); - } - - ((HasReadOnlyProperty) editor).setReadOnly(true); - }); - } - - public void onWindowOpened(WindowOpenedEvent event) { - if (activeEditor == null || !(activeEditor instanceof TextEditor)) { - return; - } - ((TextEditor) activeEditor).getEditorWidget().hideTooltip(); - } - - private static class RestoreStateEditorCallBack extends OpenEditorCallbackImpl { - private final int cursorOffset; - private final int topLine; - - public RestoreStateEditorCallBack(int cursorOffset, int topLine) { - this.cursorOffset = cursorOffset; - this.topLine = topLine; - } - - @Override - public void onEditorOpened(EditorPartPresenter editor) { - if (editor instanceof TextEditor) { - TextEditor textEditor = (TextEditor) editor; - textEditor.getCursorModel().setCursorPosition(cursorOffset); - } - } - - @Override - public void onEditorActivated(EditorPartPresenter editor) { - if (editor instanceof TextEditor) { - Scheduler.get().scheduleDeferred(() -> ((TextEditor) editor).setTopLine(topLine)); - } - } - } - - @Override - public int getPriority() { - return MIN_PRIORITY; - } - - @Override - public String getId() { - return "editor"; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorApiModule.java deleted file mode 100644 index 846781c5961..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorApiModule.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.inject.Singleton; -import com.google.inject.name.Names; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorProvider; -import org.eclipse.che.ide.api.editor.EditorRegistry; -import org.eclipse.che.ide.api.editor.autosave.AutoSaveMode; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistant; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistantFactory; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistantImpl; -import org.eclipse.che.ide.api.editor.defaulteditor.DefaultTextEditorProvider; -import org.eclipse.che.ide.api.editor.document.DocumentStorage; -import org.eclipse.che.ide.api.editor.filetype.FileTypeIdentifier; -import org.eclipse.che.ide.api.editor.filetype.MultipleMethodFileIdentifier; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMap; -import org.eclipse.che.ide.api.editor.partition.DocumentPositionMapImpl; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistAssistant; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistantFactory; -import org.eclipse.che.ide.api.editor.reconciler.DefaultReconciler; -import org.eclipse.che.ide.api.editor.reconciler.Reconciler; -import org.eclipse.che.ide.api.editor.reconciler.ReconcilerFactory; -import org.eclipse.che.ide.api.editor.texteditor.TextEditorPartView; -import org.eclipse.che.ide.editor.autosave.AutoSaveModeImpl; -import org.eclipse.che.ide.editor.quickfix.QuickAssistAssistantImpl; -import org.eclipse.che.ide.editor.quickfix.QuickAssistWidgetFactory; -import org.eclipse.che.ide.editor.synchronization.EditorContentSynchronizer; -import org.eclipse.che.ide.editor.synchronization.EditorContentSynchronizerImpl; -import org.eclipse.che.ide.editor.synchronization.EditorGroupSynchronization; -import org.eclipse.che.ide.editor.synchronization.EditorGroupSynchronizationImpl; -import org.eclipse.che.ide.editor.synchronization.workingCopy.EditorWorkingCopySynchronizer; -import org.eclipse.che.ide.editor.synchronization.workingCopy.EditorWorkingCopySynchronizerImpl; -import org.eclipse.che.ide.editor.texteditor.TextEditorPartViewImpl; -import org.eclipse.che.ide.editor.texteditor.infopanel.InfoPanel; -import org.eclipse.che.ide.part.editor.AddEditorTabMenuFactory; -import org.eclipse.che.ide.part.editor.EditorPartStackView; -import org.eclipse.che.ide.part.editor.EditorTabContextMenuFactory; -import org.eclipse.che.ide.part.editor.recent.RecentFileActionFactory; -import org.eclipse.che.ide.part.editor.recent.RecentFileList; -import org.eclipse.che.ide.part.editor.recent.RecentFileStore; -import org.eclipse.che.ide.util.executor.UserActivityManager; - -/** - * GIN module for configuring Editor API components. - * - * @author Artem Zatsarynnyi - */ -public class EditorApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(EditorAgent.class).to(EditorAgentImpl.class).in(Singleton.class); - - bind(AutoSaveMode.class).to(AutoSaveModeImpl.class); - - bind(UserActivityManager.class).in(Singleton.class); - - bind(EditorRegistry.class).to(EditorRegistryImpl.class).in(Singleton.class); - - bind(EditorPartStackView.class); - - bind(EditorContentSynchronizer.class) - .to(EditorContentSynchronizerImpl.class) - .in(Singleton.class); - bind(EditorGroupSynchronization.class).to(EditorGroupSynchronizationImpl.class); - - // the text editor view - bind(TextEditorPartView.class).to(TextEditorPartViewImpl.class); - - // Bind the file type identifier - bind(FileTypeIdentifier.class).to(MultipleMethodFileIdentifier.class); - - // bind the document storage - bind(DocumentStorage.class); - - // bind the default editor - bind(EditorProvider.class) - .annotatedWith(Names.named("defaultEditor")) - .to(DefaultTextEditorProvider.class); - - // bind the info panel - bind(InfoPanel.class); - - // bind the document position model - bind(DocumentPositionMap.class).to(DocumentPositionMapImpl.class); - - // bind the reconciler - install( - new GinFactoryModuleBuilder() - .implement(Reconciler.class, DefaultReconciler.class) - .build(ReconcilerFactory.class)); - - // bind the code assistant and quick assistant - install( - new GinFactoryModuleBuilder() - .implement(CodeAssistant.class, CodeAssistantImpl.class) - .build(CodeAssistantFactory.class)); - install( - new GinFactoryModuleBuilder() - .implement(QuickAssistAssistant.class, QuickAssistAssistantImpl.class) - .build(QuickAssistantFactory.class)); - - // bind the quick assist widget factory - install(new GinFactoryModuleBuilder().build(QuickAssistWidgetFactory.class)); - - install(new GinFactoryModuleBuilder().build(EditorTabContextMenuFactory.class)); - install(new GinFactoryModuleBuilder().build(AddEditorTabMenuFactory.class)); - - install(new GinFactoryModuleBuilder().build(RecentFileActionFactory.class)); - bind(RecentFileList.class).to(RecentFileStore.class).in(Singleton.class); - - bind(EditorWorkingCopySynchronizer.class) - .to(EditorWorkingCopySynchronizerImpl.class) - .in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorFileStatusNotificationOperation.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorFileStatusNotificationOperation.java deleted file mode 100644 index 41e565ca4c3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorFileStatusNotificationOperation.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; - -import com.google.web.bindery.event.shared.EventBus; -import java.util.List; -import java.util.function.BiConsumer; -import javax.inject.Inject; -import javax.inject.Provider; -import javax.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -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.DeletedFilesController; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.events.FileContentUpdateEvent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Receives file status notifications from sever VFS file watchers for registered files. The list of - * registered files contains files opened in an editor. Notifications can be of only two types: file - * modified and file deleted. Each kind of notification invokes specified behaviour. - * - * @author Dmitry Kuleshov - */ -@Singleton -public class EditorFileStatusNotificationOperation - implements BiConsumer { - - private final EventBus eventBus; - private final DeletedFilesController deletedFilesController; - private final Provider editorAgentProvider; - private final AppContext appContext; - - private NotificationManager notificationManager; - - private boolean suspended = false; - - @Inject - public EditorFileStatusNotificationOperation( - EventBus eventBus, - DeletedFilesController deletedFilesController, - Provider editorAgentProvider, - AppContext appContext) { - this.eventBus = eventBus; - this.deletedFilesController = deletedFilesController; - this.editorAgentProvider = editorAgentProvider; - this.appContext = appContext; - } - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName("event:file-state-changed") - .paramsAsDto(FileStateUpdateDto.class) - .noResult() - .withBiConsumer(this); - } - - public void suspend() { - suspended = true; - } - - public void resume() { - suspended = false; - } - - public void inject(NotificationManager notificationManager) { - this.notificationManager = notificationManager; - } - - @Override - public void accept(String endpointId, FileStateUpdateDto params) { - if (suspended) { - return; - } - - final FileWatcherEventType status = params.getType(); - final String stringPath = params.getPath(); - final String name = stringPath.substring(stringPath.lastIndexOf("/") + 1); - - switch (status) { - case MODIFIED: - { - Log.debug(getClass(), "Received updated file event status: " + stringPath); - - eventBus.fireEvent(new FileContentUpdateEvent(stringPath, params.getHashCode())); - - break; - } - case DELETED: - { - Log.debug(getClass(), "Received removed file event status: " + stringPath); - - if (notificationManager != null && !deletedFilesController.remove(stringPath)) { - notificationManager.notify( - "External operation", "File '" + name + "' is removed", SUCCESS, NOT_EMERGE_MODE); - closeOpenedEditor(Path.valueOf(stringPath)); - } - - break; - } - default: - } - } - - 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/src/main/java/org/eclipse/che/ide/editor/EditorInputImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorInputImpl.java deleted file mode 100644 index 494350bfdf4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorInputImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** @author Vitaly Parfonov */ -final class EditorInputImpl implements EditorInput { - private VirtualFile file; - private FileType fileType; - - EditorInputImpl(FileType fileType, VirtualFile file) { - this.fileType = fileType; - this.file = file; - } - - @Override - public String getToolTipText() { - return null; - } - - @Override - public String getName() { - return file.getDisplayName(); - } - - @Override - public SVGResource getSVGResource() { - return fileType.getImage(); - } - - @Override - public VirtualFile getFile() { - return file; - } - - @Override - public void setFile(VirtualFile file) { - this.file = file; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorRegistryImpl.java deleted file mode 100644 index 4c79b850c67..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorRegistryImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import com.google.inject.Inject; -import com.google.inject.name.Named; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorProvider; -import org.eclipse.che.ide.api.editor.EditorRegistry; -import org.eclipse.che.ide.api.extension.SDK; -import org.eclipse.che.ide.api.filetypes.FileType; - -/** - * Registry for holding {@link EditorProvider} for specific {@link FileType}. - * - * @author Evgen Vidolob - */ -@SDK(title = "ide.api.editorRegistry") -public class EditorRegistryImpl implements EditorRegistry { - - private Map> registry; - private EditorProvider defaultProvider; - - @Inject - public EditorRegistryImpl( - @Named("defaultEditor") EditorProvider defaultProvider, - @Named("defaultFileType") FileType defaultFile) { - super(); - this.defaultProvider = defaultProvider; - registry = new HashMap<>(); - register(defaultFile, defaultProvider); - } - - /** {@inheritDoc} */ - @Override - public void register(@NotNull FileType fileType, @NotNull EditorProvider provider) { - if (!registry.containsKey(fileType)) { - registry.put(fileType, new ArrayList()); - } - registry.get(fileType).add(provider); - } - - @Override - public void registerDefaultEditor(@NotNull FileType fileType, @NotNull EditorProvider provider) { - // todo store default editor, add checks to ensure that default editor sets only one time - register(fileType, provider); - } - - @Override - public void unRegister(FileType fileType, EditorProvider provider) { - if (fileType != null && registry.containsKey(fileType)) { - registry.get(fileType).remove(provider); - } - } - - /** {@inheritDoc} */ - @Override - public EditorProvider getEditor(@NotNull FileType fileType) { - if (registry.containsKey(fileType) && !registry.get(fileType).isEmpty()) { - return registry.get(fileType).get(0); - } - return defaultProvider; - } - - @Override - public List getAllEditorsForFileType(@NotNull FileType fileType) { - List result = new ArrayList<>(); - if (registry.containsKey(fileType)) { - result.addAll(registry.get(fileType)); - } - return result; - } - - @Override - public EditorProvider findEditorProviderById(String id) { - for (List providers : registry.values()) { - for (EditorProvider provider : providers) { - if (provider.getId().equals(id)) { - return provider; - } - } - } - return defaultProvider; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ResourceProvider.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ResourceProvider.java deleted file mode 100644 index 64fcb9fcd5b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/ResourceProvider.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor; - -import static java.util.Optional.ofNullable; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Optional; -import org.eclipse.che.api.promises.client.Function; -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.resources.File; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.command.node.CommandFileNode; -import org.eclipse.che.ide.command.node.NodeFactory; - -/** - * Provides resource ({@link VirtualFile}) by it's path. Used internally by {@link EditorAgentImpl} - * for restoring opened editors. - */ -@Singleton -class ResourceProvider { - - private final AppContext appContext; - private final CommandManager commandManager; - private final NodeFactory nodeFactory; - private final PromiseProvider promiseProvider; - - @Inject - public ResourceProvider( - AppContext appContext, - CommandManager commandManager, - NodeFactory nodeFactory, - PromiseProvider promiseProvider) { - this.appContext = appContext; - this.commandManager = commandManager; - this.nodeFactory = nodeFactory; - this.promiseProvider = promiseProvider; - } - - Promise> getResource(String path) { - if (path.startsWith("commands/")) { - final String commandName = path.substring(path.lastIndexOf('/') + 1); - final Optional command = commandManager.getCommand(commandName); - - if (command.isPresent()) { - CommandFileNode node = nodeFactory.newCommandFileNode(command.get()); - return promiseProvider.resolve(Optional.of(node)); - } else { - return promiseProvider.reject(new Exception("Command " + commandName + " not found")); - } - } else { - return appContext - .getWorkspaceRoot() - .getFile(path) - .then( - (Function, Optional>) - arg -> ofNullable(arg.orNull())); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/autosave/AutoSaveModeImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/autosave/AutoSaveModeImpl.java deleted file mode 100644 index 5e266b0b6ff..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/autosave/AutoSaveModeImpl.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.autosave; - -import static org.eclipse.che.ide.api.editor.autosave.AutoSaveMode.Mode.ACTIVATED; -import static org.eclipse.che.ide.api.editor.autosave.AutoSaveMode.Mode.DEACTIVATED; -import static org.eclipse.che.ide.api.editor.autosave.AutoSaveMode.Mode.SUSPENDED; - -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import java.util.HashSet; -import org.eclipse.che.ide.api.editor.EditorOpenedEvent; -import org.eclipse.che.ide.api.editor.EditorOpenedEventHandler; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.autosave.AutoSaveMode; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.events.EditorSettingsChangedEvent; -import org.eclipse.che.ide.api.editor.events.EditorSettingsChangedEvent.EditorSettingsChangedHandler; -import org.eclipse.che.ide.api.editor.reconciler.DirtyRegion; -import org.eclipse.che.ide.api.editor.reconciler.DirtyRegionQueue; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.editor.preferences.EditorPreferencesManager; -import org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties; -import org.eclipse.che.ide.editor.synchronization.workingCopy.EditorWorkingCopySynchronizer; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Default implementation of {@link AutoSaveMode} which provides auto save function for editor - * content. - * - * @author Roman Nikitenko - */ -public class AutoSaveModeImpl - implements AutoSaveMode, - EditorSettingsChangedHandler, - ActivePartChangedHandler, - EditorOpenedEventHandler { - private static final int DELAY = 1000; - - private EventBus eventBus; - private EditorPreferencesManager editorPreferencesManager; - private EditorWorkingCopySynchronizer editorWorkingCopySynchronizer; - private DocumentHandle documentHandle; - private TextEditor editor; - private EditorPartPresenter activeEditor; - private DirtyRegionQueue dirtyRegionQueue; - private Mode mode; - - private HashSet handlerRegistrations = new HashSet<>(4); - - private boolean syncLock = false; - - private final Timer saveTimer = - new Timer() { - @Override - public void run() { - save(); - } - }; - - @Inject - public AutoSaveModeImpl( - EventBus eventBus, - EditorPreferencesManager editorPreferencesManager, - EditorWorkingCopySynchronizer editorWorkingCopySynchronizer) { - this.eventBus = eventBus; - this.editorPreferencesManager = editorPreferencesManager; - this.editorWorkingCopySynchronizer = editorWorkingCopySynchronizer; - - mode = ACTIVATED; // autosave is activated by default - - addHandlers(); - } - - @Override - public DocumentHandle getDocumentHandle() { - return documentHandle; - } - - @Override - public void setDocumentHandle(DocumentHandle documentHandle) { - this.documentHandle = documentHandle; - } - - @Override - public void install(TextEditor editor) { - this.editor = editor; - this.dirtyRegionQueue = new DirtyRegionQueue(); - updateAutoSaveState(); - } - - @Override - public void uninstall() { - saveTimer.cancel(); - handlerRegistrations.forEach(HandlerRegistration::removeHandler); - } - - @Override - public void suspend() { - mode = SUSPENDED; - } - - @Override - public void resume() { - updateAutoSaveState(); - } - - @Override - public boolean isActivated() { - return mode == ACTIVATED; - } - - @Override - public void onEditorSettingsChanged(EditorSettingsChangedEvent event) { - updateAutoSaveState(); - } - - private void updateAutoSaveState() { - Boolean autoSaveValue = - editorPreferencesManager.getBooleanValueFor(EditorProperties.ENABLE_AUTO_SAVE); - if (autoSaveValue == null) { - return; - } - - if (DEACTIVATED != mode && !autoSaveValue) { - mode = DEACTIVATED; - saveTimer.cancel(); - } else if (ACTIVATED != mode && autoSaveValue) { - mode = ACTIVATED; - - saveTimer.cancel(); - saveTimer.schedule(DELAY); - } - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - PartPresenter activePart = event.getActivePart(); - if (activePart instanceof EditorPartPresenter) { - activeEditor = (EditorPartPresenter) activePart; - } - } - - @Override - public void onEditorOpened(EditorOpenedEvent editorOpenedEvent) { - if (documentHandle != null && editor == editorOpenedEvent.getEditor()) { - HandlerRegistration documentChangeHandlerRegistration = - documentHandle.getDocEventBus().addHandler(DocumentChangedEvent.TYPE, this); - handlerRegistrations.add(documentChangeHandlerRegistration); - } - } - - @Override - public void onDocumentChanged(final DocumentChangedEvent event) { - if (documentHandle == null || !event.getDocument().isSameAs(documentHandle)) { - return; - } - - if (SUSPENDED == mode && editor != activeEditor) { - return; - } - - createDirtyRegion(event); - - saveTimer.cancel(); - saveTimer.schedule(DELAY); - } - - /** - * Creates a dirty region for a document event and adds it to the queue. - * - * @param event the document event for which to create a dirty region - */ - private void createDirtyRegion(final DocumentChangedEvent event) { - if (event.getRemoveCharCount() == 0 && event.getText() != null && !event.getText().isEmpty()) { - // Insert - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion( - event.getOffset(), event.getLength(), DirtyRegion.INSERT, event.getText())); - - } else if (event.getText() == null || event.getText().isEmpty()) { - // Remove - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion(event.getOffset(), event.getRemoveCharCount(), DirtyRegion.REMOVE, null)); - - } else { - // Replace (Remove + Insert) - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion(event.getOffset(), event.getRemoveCharCount(), DirtyRegion.REMOVE, null)); - dirtyRegionQueue.addDirtyRegion( - new DirtyRegion( - event.getOffset(), event.getLength(), DirtyRegion.INSERT, event.getText())); - } - } - - private void save() { - if (ACTIVATED == mode && editor.isDirty()) { - editor.doSave(); - } - - VirtualFile file = editor.getEditorInput().getFile(); - Project project = getProject(file); - if (project == null) { - return; - } - - String filePath = file.getLocation().toString(); - String projectPath = project.getPath(); - synchronizeWorkingCopy(filePath, projectPath); - } - - private void synchronizeWorkingCopy(String filePath, String projectPath) { - if (syncLock) { - return; - } - - syncLock = true; - - final DirtyRegion region = dirtyRegionQueue.removeNextDirtyRegion(); - if (region == null) { - syncLock = false; - return; - } - - editorWorkingCopySynchronizer - .synchronize(filePath, projectPath, region) - .onSuccess( - () -> { - syncLock = false; - synchronizeWorkingCopy(filePath, projectPath); - }) - .onFailure( - jsonRpcError -> { - syncLock = false; - Log.error(getClass(), jsonRpcError.getMessage()); - }); - } - - private Project getProject(VirtualFile file) { - if (file == null || !(file instanceof Resource)) { - return null; - } - - Project project = ((Resource) file).getProject(); - return (project != null && project.exists()) ? project : null; - } - - private void addHandlers() { - HandlerRegistration activePartChangedHandlerRegistration = - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - handlerRegistrations.add(activePartChangedHandlerRegistration); - - HandlerRegistration editorSettingsChangedHandlerRegistration = - eventBus.addHandler(EditorSettingsChangedEvent.TYPE, this); - handlerRegistrations.add(editorSettingsChangedHandlerRegistration); - - HandlerRegistration editorOpenedHandlerRegistration = - eventBus.addHandler(EditorOpenedEvent.TYPE, this); - handlerRegistrations.add(editorOpenedHandlerRegistration); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/codeassist/AdditionalInformationWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/codeassist/AdditionalInformationWidget.java deleted file mode 100644 index 701688ea5f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/codeassist/AdditionalInformationWidget.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.codeassist; - -import elemental.dom.Element; -import org.eclipse.che.ide.ui.popup.PopupResources; -import org.eclipse.che.ide.ui.popup.PopupWidget; - -public class AdditionalInformationWidget extends PopupWidget { - - public AdditionalInformationWidget(PopupResources popupResources) { - super(popupResources, "Proposals:"); - } - - @Override - public String getEmptyMessage() { - return "No information available"; - } - - @Override - public Element createItem(final Element itemModel) { - return itemModel; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/AbstractEditorMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/AbstractEditorMacro.java deleted file mode 100644 index d952d6fb31a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/AbstractEditorMacro.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.macro.Macro; - -/** - * Base macro provider which belongs to the current opened editor. Provides easy access to the - * opened virtual file to allow fetch necessary information to use in custom commands, preview urls, - * etc. - * - * @author Vlad Zhukovskyi - * @see EditorAgent - * @see Macro - * @see EditorCurrentFileNameMacro - * @see EditorCurrentFilePathMacro - * @see EditorCurrentFileRelativePathMacro - * @see EditorCurrentProjectNameMacro - * @see EditorCurrentProjectTypeMacro - * @since 4.7.0 - */ -@Beta -public abstract class AbstractEditorMacro implements Macro { - - private EditorAgent editorAgent; - - public AbstractEditorMacro(EditorAgent editorAgent) { - this.editorAgent = editorAgent; - } - - /** - * Returns the active editor or null if no active editor was found. - * - * @return active editor or {@code null} - */ - public EditorPartPresenter getActiveEditor() { - return editorAgent.getActiveEditor(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileBaseNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileBaseNameMacro.java deleted file mode 100644 index 6acbfd2c3e6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileBaseNameMacro.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Provider which is responsible for retrieving the file name without extension from the opened - * editor. - * - *

        Macro provided: ${editor.current.file.basename} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 5.6.0 - */ -@Beta -@Singleton -public class EditorCurrentFileBaseNameMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.file.basename}"; - - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentFileBaseNameMacro( - EditorAgent editorAgent, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentFileBaseNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - final VirtualFile virtualFile = editor.getEditorInput().getFile(); - - if (virtualFile instanceof File) { - return promises.resolve(((File) virtualFile).getNameWithoutExtension()); - } - - final String rawName = virtualFile.getName(); - - final int lastDotIndex = rawName.lastIndexOf('.'); - if (lastDotIndex == -1) { - return promises.resolve(rawName); - } - - return promises.resolve(rawName.substring(0, lastDotIndex)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileNameMacro.java deleted file mode 100644 index 99af93d4220..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileNameMacro.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Provider which is responsible for retrieving the file name from the opened editor. - * - *

        Macro provided: ${editor.current.file.name} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 4.7.0 - */ -@Beta -@Singleton -public class EditorCurrentFileNameMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.file.name}"; - - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentFileNameMacro( - EditorAgent editorAgent, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentFileNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - return promises.resolve(editor.getEditorInput().getFile().getName()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFilePathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFilePathMacro.java deleted file mode 100644 index 0fa49b97e4a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFilePathMacro.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -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.resource.Path; - -/** - * Provider which is responsible for retrieving the absolute file path from the opened editor. - * - *

        Macro provided: ${editor.current.file.path} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 4.7.0 - */ -@Beta -@Singleton -public class EditorCurrentFilePathMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.file.path}"; - - private PromiseProvider promises; - private AppContext appContext; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentFilePathMacro( - EditorAgent editorAgent, - PromiseProvider promises, - AppContext appContext, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.appContext = appContext; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentFilePathDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - final Path absolutePath = - appContext.getProjectsRoot().append(editor.getEditorInput().getFile().getLocation()); - - return promises.resolve(absolutePath.toString()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileRelativePathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileRelativePathMacro.java deleted file mode 100644 index f69abf727f2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentFileRelativePathMacro.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Provider which is responsible for retrieving the relative to the {@code /projects} folder file - * path from the opened editor. - * - *

        Macro provided: ${editor.current.file.relpath} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 4.7.0 - */ -@Beta -@Singleton -public class EditorCurrentFileRelativePathMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.file.relpath}"; - - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentFileRelativePathMacro( - EditorAgent editorAgent, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentFileRelpathDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - return promises.resolve(editor.getEditorInput().getFile().getLocation().toString()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectNameMacro.java deleted file mode 100644 index c08d57db048..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectNameMacro.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Provider which is responsible for retrieving the project name of the file from the opened editor. - * - *

        Macro provided: ${editor.current.project.name} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 4.7.0 - */ -@Beta -@Singleton -public class EditorCurrentProjectNameMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.project.name}"; - - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentProjectNameMacro( - EditorAgent editorAgent, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentProjectNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - final VirtualFile file = editor.getEditorInput().getFile(); - - if (file instanceof Resource) { - final Optional project = ((Resource) file).getRelatedProject(); - - if (!project.isPresent()) { - return promises.resolve(""); - } - - return promises.resolve(project.get().getName()); - } - - return promises.resolve(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectTypeMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectTypeMacro.java deleted file mode 100644 index c733f55670d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/macro/EditorCurrentProjectTypeMacro.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.macro; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Provider which is responsible for retrieving the project type of the file from the opened editor. - * - *

        Macro provided: ${editor.current.project.type} - * - * @see AbstractEditorMacro - * @see EditorAgent - * @since 4.7.0 - */ -@Beta -@Singleton -public class EditorCurrentProjectTypeMacro extends AbstractEditorMacro { - - public static final String KEY = "${editor.current.project.type}"; - - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public EditorCurrentProjectTypeMacro( - EditorAgent editorAgent, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - super(editorAgent); - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroEditorCurrentProjectTypeDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - final EditorPartPresenter editor = getActiveEditor(); - - if (editor == null) { - return promises.resolve(""); - } - - final VirtualFile file = editor.getEditorInput().getFile(); - - if (file instanceof Resource) { - final Optional project = ((Resource) file).getRelatedProject(); - - if (!project.isPresent()) { - return promises.resolve(""); - } - - return promises.resolve(project.get().getType()); - } - - return promises.resolve(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPrefLocalizationConstant.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPrefLocalizationConstant.java deleted file mode 100644 index 2b0e276d332..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPrefLocalizationConstant.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import com.google.gwt.i18n.client.Messages; - -/** - * I18n Constants for the preference window. - * - * @author "Mickaël Leduque" - */ -public interface EditorPrefLocalizationConstant extends Messages { - - @Key("editortype.title") - String editorTypeTitle(); - - @Key("editortype.category") - String editorTypeCategory(); - - @DefaultMessage("Keys") - String keysSectionLabel(); - - @DefaultMessage("Key Bindings") - String keybindingsLabel(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencePresenter.java deleted file mode 100644 index 32a64c33860..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencePresenter.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Set; -import org.eclipse.che.ide.api.preferences.AbstractPreferencePagePresenter; - -/** Preference page presenter for the editors. */ -@Singleton -public class EditorPreferencePresenter extends AbstractPreferencePagePresenter - implements EditorPreferenceSection.ParentPresenter { - - /** The editor preferences page view. */ - private final EditorPreferenceView view; - - private final Set editorPreferenceSections; - - @Inject - public EditorPreferencePresenter( - final EditorPreferenceView view, - final EditorPrefLocalizationConstant constant, - final Set editorPreferenceSections) { - super(constant.editorTypeTitle(), constant.editorTypeCategory()); - - this.view = view; - this.editorPreferenceSections = editorPreferenceSections; - - editorPreferenceSections.forEach(section -> section.setParent(this)); - } - - @Override - public boolean isDirty() { - return editorPreferenceSections.stream().anyMatch(EditorPreferenceSection::isDirty); - } - - @Override - public void go(final AcceptsOneWidget container) { - FlowPanel preferencesContainer = view.getEditorPreferencesContainer(); - editorPreferenceSections.forEach( - section -> { - SimplePanel sectionPanel = new SimplePanel(); - section.go(sectionPanel); - preferencesContainer.add(sectionPanel); - }); - container.setWidget(view); - } - - @Override - public void signalDirtyState() { - delegate.onDirtyChanged(); - } - - @Override - public void storeChanges() { - editorPreferenceSections - .stream() - .filter(EditorPreferenceSection::isDirty) - .forEach(EditorPreferenceSection::storeChanges); - } - - @Override - public void revertChanges() { - editorPreferenceSections.stream().forEach(EditorPreferenceSection::refresh); - signalDirtyState(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceSection.java deleted file mode 100644 index 9de89eb2259..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceSection.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import org.eclipse.che.ide.api.mvp.Presenter; - -/** Presenter for a section of the editor preferences page. */ -public interface EditorPreferenceSection extends Presenter { - - /** Tells if the content of the section has been changed. */ - boolean isDirty(); - - /** Sets the editor page presenter that owns the section. */ - void setParent(ParentPresenter parent); - - /** Stores changes to preferences. */ - void storeChanges(); - - /** Reads changes from preferences and updates the view. */ - void refresh(); - - /** Interface for the parent presenter that owns the section. */ - interface ParentPresenter { - /** Asks to trigger a dirty state action. */ - void signalDirtyState(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceView.java deleted file mode 100644 index 9691ac41bac..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceView.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; - -/** View interface for the preference page for the editor preferences. */ -public interface EditorPreferenceView extends IsWidget { - FlowPanel getEditorPreferencesContainer(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.java deleted file mode 100644 index dffe3fbf752..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.inject.Inject; - -/** Implementation of the {@link EditorPreferenceView}. */ -public class EditorPreferenceViewImpl extends Composite implements EditorPreferenceView { - - /** The UI binder instance. */ - private static final EditorPreferenceViewImplUiBinder UIBINDER = - GWT.create(EditorPreferenceViewImplUiBinder.class); - - @UiField FlowPanel editorPreferencesContainer; - - @Inject - public EditorPreferenceViewImpl() { - initWidget(UIBINDER.createAndBindUi(this)); - } - - @Override - public FlowPanel getEditorPreferencesContainer() { - return editorPreferencesContainer; - } - - /** UI binder interface for the {@link EditorPreferenceViewImpl} component. */ - interface EditorPreferenceViewImplUiBinder - extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.ui.xml deleted file mode 100644 index 3c6510de231..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferenceViewImpl.ui.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - .scrollPanel { - overflow-x: hidden !important; - } - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesManager.java deleted file mode 100644 index fcdf9dd064f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesManager.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_COMPLETE_COMMENTS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_ANGLE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_BRACES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_PARENTHESES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_QUOTATIONS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_SQUARE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.ENABLE_AUTO_SAVE; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.EXPAND_TAB; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ANNOTATION_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_CONTENT_ASSIST_AUTOMATICALLY; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_FOLDING_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_LINE_NUMBER_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OCCURRENCES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OVERVIEW_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_WHITESPACES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ZOOM_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SMART_INDENTATION; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SOFT_WRAP; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.TAB_SIZE; - -import com.google.gwt.json.client.JSONBoolean; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONParser; -import com.google.gwt.json.client.JSONValue; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties; - -/** - * The class contains methods to simplify the work with editor preferences. - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorPreferencesManager { - - /** The editor settings property name. */ - private static final String EDITOR_PREFERENCES_PROPERTY = "editorSettings"; - - private static final Map names = new HashMap<>(); - private static Map defaultPreferences; - - private final PreferencesManager preferencesManager; - - @Inject - public EditorPreferencesManager( - EditorLocalizationConstants locale, PreferencesManager preferencesManager) { - this.preferencesManager = preferencesManager; - - names.put(TAB_SIZE.toString(), locale.propertyTabSize()); - names.put(EXPAND_TAB.toString(), locale.propertyExpandTab()); - names.put(AUTO_PAIR_PARENTHESES.toString(), locale.propertyAutoPairParentheses()); - names.put(AUTO_PAIR_BRACES.toString(), locale.propertyAutoPairBraces()); - names.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), locale.propertyAutoPairSquareBrackets()); - names.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), locale.propertyAutoPairAngelBrackets()); - names.put(AUTO_PAIR_QUOTATIONS.toString(), locale.propertyAutoPairQuotations()); - names.put(AUTO_COMPLETE_COMMENTS.toString(), locale.propertyAutoCompleteComments()); - names.put(SMART_INDENTATION.toString(), locale.propertySmartIndentation()); - names.put(SHOW_WHITESPACES.toString(), locale.propertyShowWhitespaces()); - names.put(ENABLE_AUTO_SAVE.toString(), locale.propertyAutoSave()); - names.put(SOFT_WRAP.toString(), locale.propertySoftWrap()); - names.put(SHOW_ANNOTATION_RULER.toString(), locale.propertyShowAnnotationRuler()); - names.put(SHOW_LINE_NUMBER_RULER.toString(), locale.propertyShowLineNumberRuler()); - names.put(SHOW_FOLDING_RULER.toString(), locale.propertyShowFoldingRuler()); - names.put(SHOW_OVERVIEW_RULER.toString(), locale.propertyShowOverviewRuler()); - names.put(SHOW_ZOOM_RULER.toString(), locale.propertyShowZoomRuler()); - names.put(SHOW_OCCURRENCES.toString(), locale.propertyShowOccurrences()); - names.put( - SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(), - locale.propertyShowContentAssistAutomatically()); - - getDefaultEditorPreferences(); - } - - /** Returns default editor preferences */ - public static Map getDefaultEditorPreferences() { - if (defaultPreferences != null) { - return defaultPreferences; - } - defaultPreferences = new HashMap<>(); - - // TextViewOptions (tabs) - defaultPreferences.put(TAB_SIZE.toString(), new JSONNumber(4)); - defaultPreferences.put(EXPAND_TAB.toString(), JSONBoolean.getInstance(true)); - - // Edit - defaultPreferences.put(ENABLE_AUTO_SAVE.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SOFT_WRAP.toString(), JSONBoolean.getInstance(false)); - - // SourceCodeActions (typing) - defaultPreferences.put(AUTO_PAIR_PARENTHESES.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(AUTO_PAIR_BRACES.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(AUTO_PAIR_QUOTATIONS.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(AUTO_COMPLETE_COMMENTS.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SMART_INDENTATION.toString(), JSONBoolean.getInstance(true)); - - // white spaces - defaultPreferences.put(SHOW_WHITESPACES.toString(), JSONBoolean.getInstance(false)); - - // editor features (rulers) - defaultPreferences.put(SHOW_ANNOTATION_RULER.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SHOW_LINE_NUMBER_RULER.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SHOW_FOLDING_RULER.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SHOW_OVERVIEW_RULER.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put(SHOW_ZOOM_RULER.toString(), JSONBoolean.getInstance(true)); - - // language tools - defaultPreferences.put(SHOW_OCCURRENCES.toString(), JSONBoolean.getInstance(true)); - defaultPreferences.put( - SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(), JSONBoolean.getInstance(true)); - - return defaultPreferences; - } - - /** - * Returns property name using special id. Note: method can return {@code null} if name not found. - * - * @param propertyId id for which name will be returned - * @return name of the property - */ - @Nullable - public String getPropertyNameById(@NotNull String propertyId) { - return names.get(propertyId); - } - - public void storeEditorPreferences(Map editorPreferences) { - JSONObject jsonPreferences = new JSONObject(); - - editorPreferences - .keySet() - .forEach(property -> jsonPreferences.put(property, editorPreferences.get(property))); - - preferencesManager.setValue(EDITOR_PREFERENCES_PROPERTY, jsonPreferences.toString()); - } - - /** Returns saved preferences for editor if they exist or default preferences otherwise. */ - public Map getEditorPreferences() { - String jsonPreferences = preferencesManager.getValue(EDITOR_PREFERENCES_PROPERTY); - if (jsonPreferences == null) { - return defaultPreferences; - } - - Map savedPreferences = readPreferencesFromJson(jsonPreferences); - defaultPreferences - .keySet() - .stream() - .filter(property -> !savedPreferences.containsKey(property)) - .forEach(property -> savedPreferences.put(property, defaultPreferences.get(property))); - return savedPreferences; - } - - /** - * Returns saved editor preferences if they exist or default preferences otherwise for given set - * properties. - */ - public Map getEditorPreferencesFor(EnumSet filter) { - Map editorPreferences = getEditorPreferences(); - Map result = new HashMap<>(filter.size()); - - for (EditorProperties property : filter) { - String key = property.toString(); - if (editorPreferences.containsKey(key)) { - result.put(key, editorPreferences.get(key)); - } - } - return result; - } - - /** - * Returns all saved preferences for editor in json format if they exist or default preferences - * otherwise. - */ - public JSONObject getJsonEditorPreferences() { - JSONObject jsonPreferences = new JSONObject(); - Map editorPreferences = getEditorPreferences(); - - editorPreferences - .keySet() - .forEach(property -> jsonPreferences.put(property, editorPreferences.get(property))); - - return jsonPreferences; - } - - /** - * Returns saved editor preferences in json format if they exist or default preferences otherwise - * for given set properties. - */ - public JSONObject getJsonEditorPreferencesFor(EnumSet filter) { - JSONObject jsonPreferences = new JSONObject(); - Map editorPreferences = getEditorPreferences(); - - for (EditorProperties property : filter) { - String key = property.toString(); - if (editorPreferences.containsKey(key)) { - jsonPreferences.put(key, editorPreferences.get(key)); - } - } - return jsonPreferences; - } - - public JSONValue getJsonValueFor(EditorProperties property) { - return property != null ? getEditorPreferences().get(property.toString()) : null; - } - - public Integer getNumberValueFor(EditorProperties property) { - JSONValue jsonValue = getJsonValueFor(property); - if (jsonValue == null) { - return null; - } - - JSONNumber jsonNumber = jsonValue.isNumber(); - if (jsonNumber == null) { - return null; - } - - Double result = jsonNumber.doubleValue(); - return result.intValue(); - } - - public Boolean getBooleanValueFor(EditorProperties property) { - JSONValue jsonValue = getJsonValueFor(property); - if (jsonValue == null) { - return null; - } - - JSONBoolean jsonBoolean = jsonValue.isBoolean(); - if (jsonBoolean == null) { - return null; - } - return jsonBoolean.booleanValue(); - } - - private static Map readPreferencesFromJson(String jsonPreferences) { - Map result = new HashMap<>(); - JSONValue parsed = JSONParser.parseStrict(jsonPreferences); - - JSONObject jsonObj = parsed.isObject(); - if (jsonObj != null) { - jsonObj.keySet().forEach(key -> result.put(key, jsonObj.get(key))); - } - return result; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesModule.java deleted file mode 100644 index 2f41d6ebba7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/EditorPreferencesModule.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.gwt.inject.client.multibindings.GinMultibinder; -import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; -import org.eclipse.che.ide.editor.preferences.editorproperties.EditorPropertiesPresenter; -import org.eclipse.che.ide.editor.preferences.editorproperties.propertiessection.EditorPropertiesSectionPresenter; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.EditPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.EditorPreferenceSectionFactory; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.EditorPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.LanguageToolsPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.RulersPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.TabsPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.TypingPropertiesSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.WhiteSpacesPropertiesSection; -import org.eclipse.che.ide.editor.preferences.keymaps.KeyMapsPreferencePresenter; -import org.eclipse.che.ide.editor.preferences.keymaps.KeymapsPreferenceView; -import org.eclipse.che.ide.editor.preferences.keymaps.KeymapsPreferenceViewImpl; - -/** - * GIN module for configuring editor preferences. - * - * @author Artem Zatsarynnyi - */ -public class EditorPreferencesModule extends AbstractGinModule { - - @Override - protected void configure() { - GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class) - .addBinding() - .to(EditorPreferencePresenter.class); - - bind(EditorPreferenceView.class).to(EditorPreferenceViewImpl.class); - bind(KeymapsPreferenceView.class).to(KeymapsPreferenceViewImpl.class); - bind(KeyMapsPreferencePresenter.class); - - install( - new GinFactoryModuleBuilder() - .implement(EditorPreferenceSection.class, EditorPropertiesSectionPresenter.class) - .build(EditorPreferenceSectionFactory.class)); - - GinMultibinder editorPreferenceSectionsBinder = - GinMultibinder.newSetBinder(binder(), EditorPreferenceSection.class); - editorPreferenceSectionsBinder.addBinding().to(KeyMapsPreferencePresenter.class); - editorPreferenceSectionsBinder.addBinding().to(EditorPropertiesPresenter.class); - - GinMultibinder editorPropertiesSectionBinder = - GinMultibinder.newSetBinder(binder(), EditorPropertiesSection.class); - - editorPropertiesSectionBinder.addBinding().to(TabsPropertiesSection.class); - editorPropertiesSectionBinder.addBinding().to(EditPropertiesSection.class); - editorPropertiesSectionBinder.addBinding().to(LanguageToolsPropertiesSection.class); - editorPropertiesSectionBinder.addBinding().to(TypingPropertiesSection.class); - editorPropertiesSectionBinder.addBinding().to(WhiteSpacesPropertiesSection.class); - editorPropertiesSectionBinder.addBinding().to(RulersPropertiesSection.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorProperties.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorProperties.java deleted file mode 100644 index 60a8ce46bb8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorProperties.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties; - -import javax.validation.constraints.NotNull; - -/** - * The interface contains editor's constants. - * - * @author Roman Nikitenko - */ -public enum EditorProperties { - - // Tabs section - TAB_SIZE("tabSize"), - EXPAND_TAB("expandTab"), - - // Typing section - AUTO_PAIR_PARENTHESES("autoPairParentheses"), - AUTO_PAIR_BRACES("autoPairBraces"), - AUTO_PAIR_SQUARE_BRACKETS("autoPairSquareBrackets"), - AUTO_PAIR_ANGLE_BRACKETS("autoPairAngleBrackets"), - AUTO_PAIR_QUOTATIONS("autoPairQuotations"), - AUTO_COMPLETE_COMMENTS("autoCompleteComments"), - SMART_INDENTATION("smartIndentation"), - - // White spaces section - SHOW_WHITESPACES("showWhitespaces"), - - // Edit section - ENABLE_AUTO_SAVE("enableAutoSave"), - SOFT_WRAP("wordWrap"), - - // Rulers section - SHOW_ANNOTATION_RULER("annotationRuler"), - SHOW_LINE_NUMBER_RULER("lineNumberRuler"), - SHOW_FOLDING_RULER("foldingRuler"), - SHOW_OVERVIEW_RULER("overviewRuler"), - SHOW_ZOOM_RULER("zoomRuler"), - - // Language tools section - SHOW_OCCURRENCES("showOccurrences"), - SHOW_CONTENT_ASSIST_AUTOMATICALLY("contentAssistAutoTrigger"); - - private final String value; - - EditorProperties(@NotNull String value) { - this.value = value; - } - - /** Returns value which associated with enum */ - @NotNull - @Override - public String toString() { - return value; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesManager.java deleted file mode 100644 index ed482c14247..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesManager.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_COMPLETE_COMMENTS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_ANGLE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_BRACES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_PARENTHESES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_QUOTATIONS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_SQUARE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.EXPAND_TAB; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ANNOTATION_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_CONTENT_ASSIST_AUTOMATICALLY; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_FOLDING_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_LINE_NUMBER_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OCCURRENCES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OVERVIEW_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_WHITESPACES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ZOOM_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SMART_INDENTATION; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SOFT_WRAP; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.TAB_SIZE; - -import com.google.gwt.json.client.JSONBoolean; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONObject; -import com.google.gwt.json.client.JSONParser; -import com.google.gwt.json.client.JSONValue; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; -import org.eclipse.che.ide.api.preferences.PreferencesManager; - -/** - * The class contains methods to simplify the work with editor properties. - * - * @deprecated in favor of {@link org.eclipse.che.ide.editor.preferences.EditorPreferencesManager} - * @author Roman Nikitenko - */ -@Singleton -@Deprecated -public class EditorPropertiesManager { - - /** The editor settings property name. */ - private static final String EDITOR_SETTINGS_PROPERTY = "editorSettings"; - - private static final Map names = new HashMap<>(); - private static Map defaultProperties; - - private PreferencesManager preferencesManager; - - @Inject - public EditorPropertiesManager( - EditorLocalizationConstants locale, PreferencesManager preferencesManager) { - this.preferencesManager = preferencesManager; - - names.put(TAB_SIZE.toString(), locale.propertyTabSize()); - names.put(EXPAND_TAB.toString(), locale.propertyExpandTab()); - names.put(SOFT_WRAP.toString(), locale.propertySoftWrap()); - names.put(AUTO_PAIR_PARENTHESES.toString(), locale.propertyAutoPairParentheses()); - names.put(AUTO_PAIR_BRACES.toString(), locale.propertyAutoPairBraces()); - names.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), locale.propertyAutoPairSquareBrackets()); - names.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), locale.propertyAutoPairAngelBrackets()); - names.put(AUTO_PAIR_QUOTATIONS.toString(), locale.propertyAutoPairQuotations()); - names.put(AUTO_COMPLETE_COMMENTS.toString(), locale.propertyAutoCompleteComments()); - names.put(SMART_INDENTATION.toString(), locale.propertySmartIndentation()); - names.put(SHOW_WHITESPACES.toString(), locale.propertyShowWhitespaces()); - names.put(SHOW_ANNOTATION_RULER.toString(), locale.propertyShowAnnotationRuler()); - names.put(SHOW_LINE_NUMBER_RULER.toString(), locale.propertyShowLineNumberRuler()); - names.put(SHOW_FOLDING_RULER.toString(), locale.propertyShowFoldingRuler()); - names.put(SHOW_OVERVIEW_RULER.toString(), locale.propertyShowOverviewRuler()); - names.put(SHOW_ZOOM_RULER.toString(), locale.propertyShowZoomRuler()); - names.put(SHOW_OCCURRENCES.toString(), locale.propertyShowOccurrences()); - names.put( - SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(), - locale.propertyShowContentAssistAutomatically()); - } - - /** Returns default settings for editor */ - public static Map getDefaultEditorProperties() { - if (defaultProperties != null) { - return defaultProperties; - } - defaultProperties = new HashMap<>(); - - // TextViewOptions (tabs) - defaultProperties.put(TAB_SIZE.toString(), new JSONNumber(4)); - defaultProperties.put(EXPAND_TAB.toString(), JSONBoolean.getInstance(true)); - - // Soft wrap - defaultProperties.put(SOFT_WRAP.toString(), JSONBoolean.getInstance(false)); - - // SourceCodeActions (typing) - defaultProperties.put(AUTO_PAIR_PARENTHESES.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(AUTO_PAIR_BRACES.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(AUTO_PAIR_SQUARE_BRACKETS.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(AUTO_PAIR_ANGLE_BRACKETS.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(AUTO_PAIR_QUOTATIONS.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(AUTO_COMPLETE_COMMENTS.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(SMART_INDENTATION.toString(), JSONBoolean.getInstance(true)); - - // white spaces - defaultProperties.put(SHOW_WHITESPACES.toString(), JSONBoolean.getInstance(false)); - - // editor features (rulers) - defaultProperties.put(SHOW_ANNOTATION_RULER.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(SHOW_LINE_NUMBER_RULER.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(SHOW_FOLDING_RULER.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(SHOW_OVERVIEW_RULER.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put(SHOW_ZOOM_RULER.toString(), JSONBoolean.getInstance(true)); - - // language tools - defaultProperties.put(SHOW_OCCURRENCES.toString(), JSONBoolean.getInstance(true)); - defaultProperties.put( - SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString(), JSONBoolean.getInstance(true)); - - return defaultProperties; - } - - /** - * Returns property name using special id. Note: method can return {@code null} if name not found. - * - * @param propertyId id for which name will be returned - * @return name of the property - */ - @Nullable - public String getPropertyNameById(@NotNull String propertyId) { - return names.get(propertyId); - } - - public void storeEditorProperties(Map editorProperties) { - JSONObject jsonProperties = new JSONObject(); - for (String property : editorProperties.keySet()) { - jsonProperties.put(property, editorProperties.get(property)); - } - preferencesManager.setValue(EDITOR_SETTINGS_PROPERTY, jsonProperties.toString()); - } - - /** Returns saved settings for editor if they exist or default settings otherwise. */ - public Map getEditorProperties() { - String properties = preferencesManager.getValue(EDITOR_SETTINGS_PROPERTY); - if (properties == null) { - return getDefaultEditorProperties(); - } - return readPropertiesFromJson(properties); - } - - /** - * Returns saved settings for editor in json format if they exist or default settings otherwise. - */ - public JSONObject getJsonEditorProperties() { - JSONObject jsonProperties = new JSONObject(); - - Map editorProperties = getEditorProperties(); - for (String property : editorProperties.keySet()) { - jsonProperties.put(property, editorProperties.get(property)); - } - return jsonProperties; - } - - private static Map readPropertiesFromJson(String jsonProperties) { - Map result = new HashMap<>(); - JSONValue parsed = JSONParser.parseStrict(jsonProperties); - - JSONObject jsonObj = parsed.isObject(); - if (jsonObj != null) { - for (String key : jsonObj.keySet()) { - JSONValue jsonValue = jsonObj.get(key); - result.put(key, jsonValue); - } - } - return result; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesPresenter.java deleted file mode 100644 index bf2bfa6c268..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesPresenter.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Set; -import org.eclipse.che.ide.api.editor.events.EditorSettingsChangedEvent; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.editor.preferences.EditorPreferenceSection; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.EditorPreferenceSectionFactory; -import org.eclipse.che.ide.editor.preferences.editorproperties.sections.EditorPropertiesSection; - -/** - * Presenter to manage the editor sections in the 'Preferences' menu. - * - * @author Roman Nikitenko - */ -public class EditorPropertiesPresenter implements EditorPreferenceSection { - /** The preference page presenter. */ - private ParentPresenter parentPresenter; - - private Set sectionsSet = new HashSet<>(); - - private final EventBus eventBus; - private final EditorPropertiesView view; - private final Set sections; - private final EditorPreferenceSectionFactory editorPreferenceSectionFactory; - - @Inject - public EditorPropertiesPresenter( - final EditorPropertiesView view, - final EventBus eventBus, - final Set sections, - final EditorPreferenceSectionFactory editorPreferenceSectionFactory) { - this.view = view; - this.sections = sections; - this.editorPreferenceSectionFactory = editorPreferenceSectionFactory; - this.eventBus = eventBus; - - eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> init()); - } - - private void init() { - for (EditorPropertiesSection section : sections) { - EditorPreferenceSection editorPreferenceSection = - editorPreferenceSectionFactory.create(section.getSectionTitle(), section.getProperties()); - editorPreferenceSection.go(view.getEditorSectionsContainer()); - editorPreferenceSection.setParent(parentPresenter); - sectionsSet.add(editorPreferenceSection); - } - } - - @Override - public void storeChanges() { - for (EditorPreferenceSection section : sectionsSet) { - if (section.isDirty()) { - section.storeChanges(); - } - } - eventBus.fireEvent(new EditorSettingsChangedEvent()); - } - - @Override - public void refresh() { - for (EditorPreferenceSection section : sectionsSet) { - if (section.isDirty()) { - section.refresh(); - } - } - } - - @Override - public boolean isDirty() { - for (EditorPreferenceSection section : sectionsSet) { - if (section.isDirty()) { - return true; - } - } - return false; - } - - @Override - public void go(final AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public void setParent(final EditorPreferenceSection.ParentPresenter parent) { - this.parentPresenter = parent; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesView.java deleted file mode 100644 index 60437060d74..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesView.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.ImplementedBy; - -/** - * The class provides special panel to store editor's sections. - * - * @author Roman Nikitenko - */ -@ImplementedBy(EditorPropertiesViewImpl.class) -public interface EditorPropertiesView extends IsWidget { - AcceptsOneWidget getEditorSectionsContainer(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.java deleted file mode 100644 index 52a961590e5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; - -/** - * The class provides special panel to store editor's sections. - * - * @author Roman Nikitenko - */ -public class EditorPropertiesViewImpl extends Composite implements EditorPropertiesView { - - private static final EditorPropertiesSectionViewImplUiBinder UI_BINDER = - GWT.create(EditorPropertiesSectionViewImplUiBinder.class); - - @UiField FlowPanel sectionsPanel; - - public EditorPropertiesViewImpl() { - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public AcceptsOneWidget getEditorSectionsContainer() { - SimplePanel container = new SimplePanel(); - sectionsPanel.add(container); - return container; - } - - interface EditorPropertiesSectionViewImplUiBinder - extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.ui.xml deleted file mode 100644 index dd4b68526f8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/EditorPropertiesViewImpl.ui.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - @eval editorPreferenceCategoryBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPreferenceCategoryBackgroundColor(); - - .mainPanel { - margin-top: 22px; - } - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionPresenter.java deleted file mode 100644 index 8f30127db61..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionPresenter.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.propertiessection; - -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.editor.preferences.EditorPreferenceSection; -import org.eclipse.che.ide.editor.preferences.EditorPreferencesManager; - -/** - * Presenter for the editor properties section in the 'Preferences' menu. - * - * @author Roman Nikitenko - */ -public class EditorPropertiesSectionPresenter - implements EditorPreferenceSection, EditorPropertiesSectionView.ActionDelegate { - /** The preference page presenter. */ - private EditorPreferenceSection.ParentPresenter parentPresenter; - - private final EditorPropertiesSectionView view; - private final EditorPreferencesManager editorPreferencesManager; - private final List properties; - - @AssistedInject - public EditorPropertiesSectionPresenter( - @Assisted String title, - @Assisted List properties, - final EditorPropertiesSectionView view, - final EditorPreferencesManager editorPreferencesManager) { - this.view = view; - this.view.setSectionTitle(title); - this.view.setDelegate(this); - this.properties = properties; - this.editorPreferencesManager = editorPreferencesManager; - } - - @Override - public void storeChanges() { - Map editorPreferences = editorPreferencesManager.getEditorPreferences(); - editorPreferences - .keySet() - .forEach( - property -> { - JSONValue actualValue = view.getPropertyValueById(property); - if (actualValue != null) { - editorPreferences.put(property, actualValue); - } - }); - - editorPreferencesManager.storeEditorPreferences(editorPreferences); - } - - @Override - public void refresh() { - addProperties(); - } - - @Override - public boolean isDirty() { - Map editorPreferences = editorPreferencesManager.getEditorPreferences(); - return editorPreferences - .keySet() - .stream() - .anyMatch( - property -> { - JSONValue actualValue = view.getPropertyValueById(property); - return actualValue != null && !actualValue.equals(editorPreferences.get(property)); - }); - } - - @Override - public void go(final AcceptsOneWidget container) { - addProperties(); - container.setWidget(view); - } - - @Override - public void setParent(final ParentPresenter parent) { - this.parentPresenter = parent; - } - - @Override - public void onPropertyChanged() { - parentPresenter.signalDirtyState(); - } - - private void addProperties() { - Map editorPreferences = editorPreferencesManager.getEditorPreferences(); - - properties.forEach( - property -> { - JSONValue value = editorPreferences.get(property); - view.addProperty(property, value); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionView.java deleted file mode 100644 index 7f6e633e43c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionView.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.propertiessection; - -import com.google.gwt.json.client.JSONValue; -import com.google.inject.ImplementedBy; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The class provides special panel to store and control editor's properties section. - * - * @author Roman Nikitenko - */ -@ImplementedBy(EditorPropertiesSectionViewImpl.class) -public interface EditorPropertiesSectionView - extends View { - - /** Sets title of editor's properties section */ - void setSectionTitle(String title); - - /** Adds special property widget on special panel on view. */ - void addProperty(@NotNull String propertyId, JSONValue value); - - /** - * Returns property value from the property widget Note: the method returns {@code null} when - * property widget is not found or value is incorrect - */ - @Nullable - JSONValue getPropertyValueById(@NotNull String propertyId); - - interface ActionDelegate { - /** Performs some action when user change value of property. */ - void onPropertyChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.java deleted file mode 100644 index c9dd88c6e8c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.propertiessection; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.editor.preferences.EditorPreferencesManager; -import org.eclipse.che.ide.editor.preferences.editorproperties.property.EditorPropertyWidget; -import org.eclipse.che.ide.editor.preferences.editorproperties.property.EditorPropertyWidgetFactory; - -/** - * The class provides special panel to store and control editor's properties. - * - * @author Roman Nikitenko - */ -public class EditorPropertiesSectionViewImpl extends Composite - implements EditorPropertiesSectionView, EditorPropertyWidget.ActionDelegate { - - private static final EditorPropertiesSectionViewImplUiBinder UI_BINDER = - GWT.create(EditorPropertiesSectionViewImplUiBinder.class); - - @UiField FlowPanel propertiesPanel; - @UiField Label sectionTitle; - - private final EditorPropertyWidgetFactory editorPropertyWidgetFactory; - private final EditorPreferencesManager editorPreferencesManager; - private ActionDelegate delegate; - private Map properties = new HashMap<>(); - - @Inject - public EditorPropertiesSectionViewImpl( - EditorPropertyWidgetFactory editorPropertyWidgetFactory, - EditorPreferencesManager editorPreferencesManager) { - this.editorPropertyWidgetFactory = editorPropertyWidgetFactory; - this.editorPreferencesManager = editorPreferencesManager; - - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public void onPropertyChanged() { - delegate.onPropertyChanged(); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Nullable - @Override - public JSONValue getPropertyValueById(@NotNull String propertyId) { - EditorPropertyWidget propertyWidget = properties.get(propertyId); - if (propertyWidget != null) { - return propertyWidget.getValue(); - } - return null; - } - - @Override - public void setSectionTitle(String title) { - sectionTitle.setText(title); - propertiesPanel.ensureDebugId("editorPropertiesSection-" + title); // for selenium tests - } - - @Override - public void addProperty(@NotNull String propertyId, JSONValue value) { - EditorPropertyWidget propertyWidget = properties.get(propertyId); - if (propertyWidget != null) { - propertyWidget.setValue(value); - return; - } - - String propertyName = editorPreferencesManager.getPropertyNameById(propertyId); - if (propertyName == null) { - return; - } - - propertyWidget = editorPropertyWidgetFactory.create(propertyName, value); - propertyWidget.setDelegate(this); - - propertiesPanel.add(propertyWidget); - properties.put(propertyId, propertyWidget); - } - - interface EditorPropertiesSectionViewImplUiBinder - extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.ui.xml deleted file mode 100644 index c9ee1ed5ce3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/propertiessection/EditorPropertiesSectionViewImpl.ui.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - @eval editorPreferenceCategoryBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPreferenceCategoryBackgroundColor(); - - .titleSection { - background-color: editorPreferenceCategoryBackgroundColor; - line-height: 25px; - } - - .titleLabel { - margin-left: 5px; - margin-bottom: 8px; - } - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorBooleanPropertyWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorBooleanPropertyWidget.java deleted file mode 100644 index 84cefd0a3da..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorBooleanPropertyWidget.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.event.logical.shared.ValueChangeEvent; -import com.google.gwt.event.logical.shared.ValueChangeHandler; -import com.google.gwt.json.client.JSONBoolean; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.ui.CheckBox; - -/** - * The class provides methods to create and control property's widget which contains name and - * boolean value of property. - * - * @author Roman Nikitenko - */ -public class EditorBooleanPropertyWidget extends EditorPropertyBaseWidget - implements ValueChangeHandler { - CheckBox propertyValueBox; - - public EditorBooleanPropertyWidget(String name, boolean value) { - propertyName.setText(name); - - propertyValueBox = new CheckBox(); - propertyValueBox.setValue(value); - propertyValueBox.addValueChangeHandler(this); - valuePanel.add(propertyValueBox); - } - - @Override - public JSONValue getValue() { - return JSONBoolean.getInstance(propertyValueBox.getValue()); - } - - @Override - public void setValue(JSONValue value) { - if (value != null && value.isBoolean() != null) { - propertyValueBox.setValue(value.isBoolean().booleanValue()); - } - } - - @Override - public void onValueChange(ValueChangeEvent event) { - delegate.onPropertyChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorNumberPropertyWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorNumberPropertyWidget.java deleted file mode 100644 index 04c195b1773..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorNumberPropertyWidget.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.event.dom.client.KeyUpHandler; -import com.google.gwt.json.client.JSONNumber; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.ui.TextBox; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * The class provides methods to create and control property's widget which contains name and - * numerical value of property. - * - * @author Roman Nikitenko - */ -public class EditorNumberPropertyWidget extends EditorPropertyBaseWidget implements KeyUpHandler { - TextBox propertyValueBox; - - public EditorNumberPropertyWidget(String name, int value) { - propertyName.setText(name); - - propertyValueBox = new TextBox(); - propertyValueBox.setVisibleLength(3); - propertyValueBox.setValue(String.valueOf(value)); - propertyValueBox.addKeyUpHandler(this); - - valuePanel.add(propertyValueBox); - } - - @Nullable - @Override - public JSONValue getValue() { - if (isPropertyValueCorrect()) { - return new JSONNumber(new Double(propertyValueBox.getValue())); - } - return null; - } - - @Override - public void setValue(JSONValue value) { - propertyValueBox.setValue(value.toString()); - } - - /** Returns {@code true} if the value is correct and {@code false} - otherwise. */ - private boolean isPropertyValueCorrect() { - try { - String value = propertyValueBox.getValue(); - Integer.parseInt(value); - return true; - } catch (NumberFormatException e) { - return false; - } - } - - @Override - public void onKeyUp(KeyUpEvent event) { - delegate.onPropertyChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.java deleted file mode 100644 index d19e15c2f43..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import javax.validation.constraints.NotNull; - -/** - * The base widget to create property's widget which contains label for name of property and panel - * for value box. - * - * @author Roman Nikitenko - */ -abstract class EditorPropertyBaseWidget extends Composite implements EditorPropertyWidget { - private static final PropertyWidgetImplUiBinder UI_BINDER = - GWT.create(PropertyWidgetImplUiBinder.class); - - @UiField Label propertyName; - @UiField FlowPanel valuePanel; - - ActionDelegate delegate; - - public EditorPropertyBaseWidget() { - initWidget(UI_BINDER.createAndBindUi(this)); - } - - @Override - public void setDelegate(@NotNull ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public JSONValue getValue() { - return null; - } - - @Override - public void setValue(JSONValue value) { - // do nothing - } - - interface PropertyWidgetImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.ui.xml deleted file mode 100644 index dd50743e745..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyBaseWidget.ui.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - @external .gwt-TextBox; - @eval categoriesListItemTextColor org.eclipse.che.ide.api.theme.Style.theme.categoriesListItemTextColor(); - - .main { - width: 100%; - display: inline-block; - line-height: 22px; - margin-left: 10px; - } - - .titlePanel { - white-space: nowrap; - overflow: hidden; - float: left; - text-overflow: ellipsis; - } - - .title { - float: left; - cursor: default; - color: categoriesListItemTextColor; - margin-bottom: 0; - line-height: 20px; - } - - .valuePanel { - float: right; - padding-right: 10px; - } - - .valuePanel > .gwt-TextBox { - text-align: right; - min-height: 19px; - margin: 1px 5px 1px 0; - } - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidget.java deleted file mode 100644 index dc96e1d561f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidget.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.json.client.JSONValue; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.mvp.View; - -/** - * The interface provides methods to control property's widget which contains name and value of - * property. - * - * @author Roman Nikitenko - */ -public interface EditorPropertyWidget extends View { - - /** - * Returns property value from the property widget Note: the method returns {@code null} when - * value is incorrect - */ - @Nullable - JSONValue getValue(); - - /** Sets the given value */ - void setValue(JSONValue value); - - interface ActionDelegate { - /** Performs some action when user change value of property. */ - void onPropertyChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidgetFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidgetFactory.java deleted file mode 100644 index 4d7e4bf0f78..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorPropertyWidgetFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.json.client.JSONValue; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; - -/** - * The factory which creates instances of {@link EditorPropertyWidget}. - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorPropertyWidgetFactory { - - /** - * Creates one of implementations of {@link EditorPropertyWidget}. - * - * @return an instance of {@link EditorPropertyWidget} - */ - public EditorPropertyWidget create(@NotNull String propertyName, @NotNull JSONValue value) { - if (value.isBoolean() != null) { - return new EditorBooleanPropertyWidget(propertyName, value.isBoolean().booleanValue()); - } - - if (value.isNumber() != null) { - Double doubleValue = value.isNumber().doubleValue(); - return new EditorNumberPropertyWidget(propertyName, doubleValue.intValue()); - } - return new EditorStringPropertyWidget(propertyName, value.toString()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorStringPropertyWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorStringPropertyWidget.java deleted file mode 100644 index 0605633c8ff..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/property/EditorStringPropertyWidget.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.property; - -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.event.dom.client.KeyUpHandler; -import com.google.gwt.json.client.JSONString; -import com.google.gwt.json.client.JSONValue; -import com.google.gwt.user.client.ui.TextBox; -import org.eclipse.che.commons.annotation.Nullable; - -/** - * The class provides methods to create and control property's widget which contains name and string - * value of property. - * - * @author Roman Nikitenko - */ -public class EditorStringPropertyWidget extends EditorPropertyBaseWidget implements KeyUpHandler { - TextBox propertyValueBox; - - public EditorStringPropertyWidget(String name, String value) { - propertyName.setText(name); - - propertyValueBox = new TextBox(); - propertyValueBox.setVisibleLength(5); - propertyValueBox.setValue(value); - propertyValueBox.addKeyUpHandler(this); - - valuePanel.add(propertyValueBox); - } - - @Nullable - @Override - public JSONValue getValue() { - String value = propertyValueBox.getValue(); - if (!value.isEmpty()) { - return new JSONString(value); - } - return null; - } - - @Override - public void setValue(JSONValue value) { - propertyValueBox.setValue(value.toString()); - } - - @Override - public void onKeyUp(KeyUpEvent event) { - delegate.onPropertyChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditPropertiesSection.java deleted file mode 100644 index 4c14994fb1c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditPropertiesSection.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.ENABLE_AUTO_SAVE; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SOFT_WRAP; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** Provides a set of 'Editing' properties. */ -@Singleton -public class EditPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public EditPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = Arrays.asList(ENABLE_AUTO_SAVE.toString(), SOFT_WRAP.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.tabsEditSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPreferenceSectionFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPreferenceSectionFactory.java deleted file mode 100644 index 26bdb613901..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPreferenceSectionFactory.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import java.util.List; -import org.eclipse.che.ide.editor.preferences.EditorPreferenceSection; - -/** - * The factory which creates instances of {@link EditorPropertiesSection}. - * - * @author Roman Nikitenko - */ -public interface EditorPreferenceSectionFactory { - - /** - * Creates one of implementations of {@link EditorPropertiesSection}. - * - * @param title title of editor's properties section - * @param propertiesIds IDs of properties which will be added to the section - * @return an instance of {@link EditorPropertiesSection} - */ - EditorPreferenceSection create(String title, List propertiesIds); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPropertiesSection.java deleted file mode 100644 index 3bb48e802c2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/EditorPropertiesSection.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import java.util.List; - -/** - * The interface provides methods to get info about editor's properties section. - * - * @author Roman Nikitenko - */ -public interface EditorPropertiesSection { - - /** Returns IDs of properties which the section contains */ - public List getProperties(); - - /** Returns the title of editor's properties section */ - public String getSectionTitle(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/LanguageToolsPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/LanguageToolsPropertiesSection.java deleted file mode 100644 index 73b49d8467a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/LanguageToolsPropertiesSection.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_CONTENT_ASSIST_AUTOMATICALLY; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OCCURRENCES; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** - * The class provides info about 'Language tolls' editor's section. - * - * @author Roman Nikitenko - */ -@Singleton -public class LanguageToolsPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public LanguageToolsPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = - Arrays.asList(SHOW_OCCURRENCES.toString(), SHOW_CONTENT_ASSIST_AUTOMATICALLY.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.languageToolsPropertiesSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/RulersPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/RulersPropertiesSection.java deleted file mode 100644 index 806cdc88acb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/RulersPropertiesSection.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ANNOTATION_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_FOLDING_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_LINE_NUMBER_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_OVERVIEW_RULER; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_ZOOM_RULER; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** - * The class provides info about 'Rulers' editor's section. - * - * @author Roman Nikitenko - */ -@Singleton -public class RulersPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public RulersPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = - Arrays.asList( - SHOW_ANNOTATION_RULER.toString(), - SHOW_LINE_NUMBER_RULER.toString(), - SHOW_FOLDING_RULER.toString(), - SHOW_OVERVIEW_RULER.toString(), - SHOW_ZOOM_RULER.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.rulersPropertiesSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TabsPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TabsPropertiesSection.java deleted file mode 100644 index b12c209241f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TabsPropertiesSection.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.EXPAND_TAB; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.TAB_SIZE; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** - * The class provides info about 'Tabs' editor's section. - * - * @author Roman Nikitenko - */ -@Singleton -public class TabsPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public TabsPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = Arrays.asList(TAB_SIZE.toString(), EXPAND_TAB.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.tabsPropertiesSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TypingPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TypingPropertiesSection.java deleted file mode 100644 index 045f047bfb7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/TypingPropertiesSection.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_COMPLETE_COMMENTS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_ANGLE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_BRACES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_PARENTHESES; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_QUOTATIONS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.AUTO_PAIR_SQUARE_BRACKETS; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SMART_INDENTATION; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** - * The class provides info about 'Typing' editor's section. - * - * @author Roman Nikitenko - */ -@Singleton -public class TypingPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public TypingPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = - Arrays.asList( - AUTO_PAIR_PARENTHESES.toString(), - AUTO_PAIR_BRACES.toString(), - AUTO_PAIR_SQUARE_BRACKETS.toString(), - AUTO_PAIR_ANGLE_BRACKETS.toString(), - AUTO_PAIR_QUOTATIONS.toString(), - AUTO_COMPLETE_COMMENTS.toString(), - SMART_INDENTATION.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.typingPropertiesSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/WhiteSpacesPropertiesSection.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/WhiteSpacesPropertiesSection.java deleted file mode 100644 index 4cd1ca4d56d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/editorproperties/sections/WhiteSpacesPropertiesSection.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.editorproperties.sections; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.editor.preferences.editorproperties.EditorProperties.SHOW_WHITESPACES; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.api.editor.EditorLocalizationConstants; - -/** - * The class provides info about 'White spaces' editor's section. - * - * @author Roman Nikitenko - */ -@Singleton -public class WhiteSpacesPropertiesSection implements EditorPropertiesSection { - private final List properties; - private final EditorLocalizationConstants locale; - - @Inject - public WhiteSpacesPropertiesSection(EditorLocalizationConstants locale) { - this.locale = locale; - properties = singletonList(SHOW_WHITESPACES.toString()); - } - - @Override - public List getProperties() { - return properties; - } - - @Override - public String getSectionTitle() { - return locale.whiteSpacesPropertiesSection(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeyMapsPreferencePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeyMapsPreferencePresenter.java deleted file mode 100644 index 10ceb755b99..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeyMapsPreferencePresenter.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.keymaps; - -import com.google.gwt.json.client.JSONString; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.api.editor.keymap.KeymapChangeEvent; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.editor.preferences.EditorPreferenceSection; - -/** Presenter for the keymap preference selection section. */ -public class KeyMapsPreferencePresenter - implements EditorPreferenceSection, KeymapsPreferenceView.ActionDelegate { - - /** The editor preference main property name. */ - public static final String KEYMAP_PREF_KEY = "keymap"; - - private final KeymapsPreferenceView view; - private final EventBus eventBus; - private final PreferencesManager preferencesManager; - - /** Has any of the keymap preferences been changed ? */ - private boolean dirty = false; - - /** The preference page presenter. */ - private ParentPresenter parentPresenter; - - private Keymap selectedKeymap; - - @Inject - public KeyMapsPreferencePresenter( - final KeymapsPreferenceView view, - final EventBus eventBus, - final PreferencesManager preferencesManager) { - this.view = view; - this.eventBus = eventBus; - this.preferencesManager = preferencesManager; - - this.view.setDelegate(this); - } - - @Override - public void storeChanges() { - JSONString jsonString = new JSONString(selectedKeymap.getKey()); - preferencesManager.setValue(KEYMAP_PREF_KEY, jsonString.stringValue()); - - eventBus.fireEvent(new KeymapChangeEvent(selectedKeymap.getKey())); - - dirty = false; - } - - @Override - public void refresh() { - readPreference(); - } - - protected void readPreference() { - final String keymapKey = preferencesManager.getValue(KEYMAP_PREF_KEY); - Keymap keymap = null; - if (keymapKey != null) { - keymap = Keymap.fromKey(keymapKey); - } else { - for (Keymap km : Keymap.getInstances()) { - if (km.getKey().contains("default")) { - keymap = km; - break; - } - } - } - view.setKeyBindings(Keymap.getInstances(), keymap); - } - - @Override - public boolean isDirty() { - return dirty; - } - - @Override - public void go(final AcceptsOneWidget container) { - readPreference(); - container.setWidget(view); - } - - @Override - public void setParent(final ParentPresenter parent) { - this.parentPresenter = parent; - } - - @Override - public void onKeyBindingSelected(Keymap keymap) { - selectedKeymap = keymap; - - dirty = true; - parentPresenter.signalDirtyState(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceView.java deleted file mode 100644 index ffde452d8e8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceView.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.keymaps; - -import java.util.List; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.api.mvp.View; - -/** View interface for the preference page for the editor keymap selection. */ -public interface KeymapsPreferenceView extends View { - - void setKeyBindings(List availableKeyBindings, Keymap currentKeyBinding); - - /** Action delegate for the keymap preference view. */ - interface ActionDelegate { - - /** - * Action triggered when an keymap is selected. - * - * @param keymap the new keymap - */ - void onKeyBindingSelected(Keymap keymap); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.java deleted file mode 100644 index 2a9caebbdcf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.preferences.keymaps; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ChangeEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.inject.Inject; -import java.util.List; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.editor.preferences.EditorPrefLocalizationConstant; -import org.eclipse.che.ide.ui.listbox.CustomListBox; - -/** Implementation of the {@link KeymapsPreferenceView}. */ -public class KeymapsPreferenceViewImpl extends Composite implements KeymapsPreferenceView { - - /** UI binder interface for the {@link KeymapsPreferenceViewImpl} component. */ - interface KeymapsPreferenceViewImplUiBinder - extends UiBinder {} - - /** The UI binder instance. */ - private static final KeymapsPreferenceViewImplUiBinder UIBINDER = - GWT.create(KeymapsPreferenceViewImplUiBinder.class); - - private ActionDelegate delegate; - - @UiField(provided = true) - EditorPrefLocalizationConstant constants; - - @UiField CustomListBox keyBindingSelection; - - @Inject - public KeymapsPreferenceViewImpl(final EditorPrefLocalizationConstant constants) { - this.constants = constants; - - initWidget(UIBINDER.createAndBindUi(this)); - } - - @Override - public void setDelegate(final ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void setKeyBindings(List availableKeyBindings, Keymap currentKeyBinding) { - keyBindingSelection.clear(); - - for (Keymap keymap : availableKeyBindings) { - keyBindingSelection.addItem(keymap.getDisplay(), keymap.getKey()); - if (currentKeyBinding != null && keymap.getKey().equals(currentKeyBinding.getKey())) { - keyBindingSelection.setSelectedIndex(availableKeyBindings.indexOf(keymap)); - } - } - } - - @UiHandler("keyBindingSelection") - void handleSelectionChanged(ChangeEvent event) { - final String value = keyBindingSelection.getValue(keyBindingSelection.getSelectedIndex()); - delegate.onKeyBindingSelected(Keymap.fromKey(value)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.ui.xml deleted file mode 100644 index 9f7f3300f0d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/preferences/keymaps/KeymapsPreferenceViewImpl.ui.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - @eval editorPreferenceCategoryBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPreferenceCategoryBackgroundColor(); - - .label { - position: absolute; - color: categoriesListItemTextColor; - margin-left: 10px; - line-height: 25px; - } - - .mainSection { - margin-bottom: 40px; - } - - .titleSection { - background-color: editorPreferenceCategoryBackgroundColor; - line-height: 25px; - } - - .sectionLabel { - margin-left: 5px; - } - - .selection { - float: right; - margin-right: 5px; - } - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistAssistantImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistAssistantImpl.java deleted file mode 100644 index 32e175139b0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistAssistantImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.quickfix; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import elemental.dom.Element; -import elemental.html.ClientRect; -import java.util.List; -import org.eclipse.che.ide.api.editor.codeassist.CodeAssistCallback; -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistAssistant; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistInvocationContext; -import org.eclipse.che.ide.api.editor.quickfix.QuickAssistProcessor; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** Implementation for {@link QuickAssistAssistant}. */ -public class QuickAssistAssistantImpl implements QuickAssistAssistant { - - private final TextEditor textEditor; - - @Inject private QuickAssistWidgetFactory widgetFactory; - - /** The quick assist processor. */ - private QuickAssistProcessor quickAssistProcessor; - - @AssistedInject - public QuickAssistAssistantImpl(@Assisted final TextEditor textEditor) { - this.textEditor = textEditor; - } - - @Override - public void showPossibleQuickAssists(final int line, final Element anchorElement) { - final ClientRect anchorRect = anchorElement.getBoundingClientRect(); - showPossibleQuickAssists(line, anchorRect.getRight(), anchorRect.getBottom()); - } - - @Override - public void showPossibleQuickAssists(final int offset, final float coordX, final float coordY) { - computeQuickAssist( - offset, - new CodeAssistCallback() { - @Override - public void proposalComputed(final List proposals) { - final QuickAssistWidget widget = widgetFactory.createWidget(textEditor); - for (final CompletionProposal proposal : proposals) { - widget.addItem(proposal); - } - widget.show(coordX, coordY); - } - }); - } - - @Override - public void computeQuickAssist(final int offset, final CodeAssistCallback callback) { - if (this.quickAssistProcessor != null) { - final QuickAssistInvocationContext context = - new QuickAssistInvocationContext(offset, this.textEditor); - this.quickAssistProcessor.computeQuickAssistProposals(context, callback); - } - } - - @Override - public void setQuickAssistProcessor(final QuickAssistProcessor processor) { - this.quickAssistProcessor = processor; - } - - @Override - public QuickAssistProcessor getQuickAssistProcessor() { - return this.quickAssistProcessor; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidget.java deleted file mode 100644 index 36dc8cf43b3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidget.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.quickfix; - -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import elemental.dom.Element; -import elemental.dom.Node; -import elemental.events.CustomEvent; -import elemental.events.Event; -import elemental.events.EventListener; -import elemental.html.SpanElement; -import org.eclipse.che.ide.api.editor.codeassist.Completion; -import org.eclipse.che.ide.api.editor.codeassist.CompletionProposal; -import org.eclipse.che.ide.api.editor.text.LinearRange; -import org.eclipse.che.ide.api.editor.texteditor.HandlesUndoRedo; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.editor.texteditor.UndoableEditor; -import org.eclipse.che.ide.ui.popup.PopupResources; -import org.eclipse.che.ide.ui.popup.PopupWidget; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.loging.Log; - -/** Widget for quick assist display. */ -public class QuickAssistWidget extends PopupWidget { - - /** Custom event type. */ - private static final String CUSTOM_EVT_TYPE_VALIDATE = "itemvalidate"; - - /** The related editor. */ - private final TextEditor textEditor; - - @AssistedInject - public QuickAssistWidget( - final PopupResources popupResources, @Assisted final TextEditor textEditor) { - super(popupResources, "Proposals:"); - this.textEditor = textEditor; - } - - public Element createItem(final CompletionProposal proposal) { - final Element element = Elements.createLiElement(popupResources.popupStyle().item()); - - final Element icon = Elements.createDivElement(popupResources.popupStyle().icon()); - if (proposal.getIcon() != null && proposal.getIcon().getSVGImage() != null) { - icon.appendChild((Node) proposal.getIcon().getSVGImage().getElement()); - } else if (proposal.getIcon() != null && proposal.getIcon().getImage() != null) { - icon.appendChild((Node) proposal.getIcon().getImage().getElement()); - } - element.appendChild(icon); - - final SpanElement label = Elements.createSpanElement(popupResources.popupStyle().label()); - label.setInnerHTML(proposal.getDisplayString()); - element.appendChild(label); - - final EventListener validateListener = - new EventListener() { - @Override - public void handleEvent(final Event evt) { - proposal.getCompletion( - new CompletionProposal.CompletionCallback() { - @Override - public void onCompletion(final Completion completion) { - HandlesUndoRedo undoRedo = null; - if (textEditor instanceof UndoableEditor) { - UndoableEditor undoableEditor = - (UndoableEditor) QuickAssistWidget.this.textEditor; - undoRedo = undoableEditor.getUndoRedo(); - } - try { - if (undoRedo != null) { - undoRedo.beginCompoundChange(); - } - completion.apply(textEditor.getDocument()); - final LinearRange selection = - completion.getSelection(textEditor.getDocument()); - if (selection != null) { - textEditor.getDocument().setSelectedRange(selection, true); - } - } catch (final Exception e) { - Log.error(getClass(), e); - } finally { - if (undoRedo != null) { - undoRedo.endCompoundChange(); - } - } - } - }); - hide(); - } - }; - - element.addEventListener(Event.DBLCLICK, validateListener, false); - element.addEventListener(CUSTOM_EVT_TYPE_VALIDATE, validateListener, false); - - return element; - } - - @Override - public String getEmptyMessage() { - return "No proposals"; - } - - @Override - public void validateItem(final Element validatedItem) { - validatedItem.dispatchEvent(createValidateEvent(CUSTOM_EVT_TYPE_VALIDATE)); - super.validateItem(validatedItem); - } - - /* Overriden to give the popup the focus for keyboard control */ - @Override - public boolean needsFocus() { - return true; - } - - private native CustomEvent createValidateEvent(String eventType) /*-{ - return new CustomEvent(eventType); - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidgetFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidgetFactory.java deleted file mode 100644 index 2f665a225da..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/quickfix/QuickAssistWidgetFactory.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.quickfix; - -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; - -/** Factory for {@link QuickAssistWidget} instances. */ -public interface QuickAssistWidgetFactory { - - /** - * Create a {@link QuickAssistWidget}. - * - * @param editor the editor - * @return the new widget - */ - QuickAssistWidget createWidget(TextEditor editor); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizer.java deleted file mode 100644 index c28b54ab0e5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization; - -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.resource.Path; - -/** - * The synchronizer of content for opened files with the same {@link Path}. Used to sync the content - * of opened files in different {@link EditorPartStack}s. - * - * @author Roman Nikitenko - */ -public interface EditorContentSynchronizer { - /** - * Begins to track given editor to sync its content. - * - * @param editor editor to sync content - */ - void trackEditor(EditorPartPresenter editor); - - /** - * Stops to track changes of content for given editor. - * - * @param editor editor to stop tracking - */ - void unTrackEditor(EditorPartPresenter editor); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizerImpl.java deleted file mode 100644 index d39c7c07ea2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorContentSynchronizerImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization; - -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 com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorWithAutoSave; -import org.eclipse.che.ide.api.editor.events.EditorDirtyStateChangedEvent; -import org.eclipse.che.ide.api.editor.events.EditorDirtyStateChangedHandler; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.resource.Path; - -/** - * The default implementation of {@link EditorContentSynchronizer}. The synchronizer of content for - * opened files with the same {@link Path}. Used to sync the content of opened files in different - * {@link EditorPartStack}s. Note: this implementation disables autosave feature for implementations - * of {@link EditorWithAutoSave} with the same {@link Path} except active editor. - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorContentSynchronizerImpl - implements EditorContentSynchronizer, - ActivePartChangedHandler, - ResourceChangedHandler, - EditorDirtyStateChangedHandler { - final Map editorGroups; - final Provider editorGroupSyncProvider; - - @Inject - public EditorContentSynchronizerImpl( - EventBus eventBus, Provider editorGroupSyncProvider) { - this.editorGroupSyncProvider = editorGroupSyncProvider; - this.editorGroups = new HashMap<>(); - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - eventBus.addHandler(ResourceChangedEvent.getType(), this); - eventBus.addHandler(EditorDirtyStateChangedEvent.TYPE, this); - } - - /** - * Begins to track given editor to sync its content with opened files with the same {@link Path}. - * - * @param editor editor to sync content - */ - @Override - public void trackEditor(EditorPartPresenter editor) { - Path path = editor.getEditorInput().getFile().getLocation(); - if (editorGroups.containsKey(path)) { - editorGroups.get(path).addEditor(editor); - } else { - EditorGroupSynchronization group = editorGroupSyncProvider.get(); - editorGroups.put(path, group); - group.addEditor(editor); - } - } - - /** - * Stops to track given editor. - * - * @param editor editor to stop tracking - */ - @Override - public void unTrackEditor(EditorPartPresenter editor) { - Path path = editor.getEditorInput().getFile().getLocation(); - EditorGroupSynchronization group = editorGroups.get(path); - if (group == null) { - return; - } - group.removeEditor(editor); - - if (group.getSynchronizedEditors().isEmpty()) { - group.unInstall(); - editorGroups.remove(path); - } - } - - @Override - public void onEditorDirtyStateChanged(EditorDirtyStateChangedEvent event) { - EditorPartPresenter changedEditor = event.getEditor(); - if (changedEditor == null || changedEditor.isDirty()) { - // we sync 'dirty' state of editors only for case when content of an active editor IS SAVED - return; - } - - Path changedEditorPath = changedEditor.getEditorInput().getFile().getLocation(); - if (editorGroups.containsKey(changedEditorPath)) { - editorGroups.get(changedEditorPath).onEditorDirtyStateChanged(changedEditor); - } - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - PartPresenter activePart = event.getActivePart(); - if (!(activePart instanceof EditorPartPresenter)) { - return; - } - - EditorPartPresenter activeEditor = (EditorPartPresenter) activePart; - Path path = activeEditor.getEditorInput().getFile().getLocation(); - if (editorGroups.containsKey(path)) { - editorGroups.get(path).onActiveEditorChanged(activeEditor); - } - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - if (delta.getKind() != ADDED || (delta.getFlags() & (MOVED_FROM | MOVED_TO)) == 0) { - return; - } - - final Path fromPath = delta.getFromPath(); - final Path toPath = delta.getToPath(); - - if (delta.getResource().isFile()) { - onFileChanged(fromPath, toPath); - } else { - onFolderChanged(fromPath, toPath); - } - } - - private void onFileChanged(Path fromPath, Path toPath) { - final EditorGroupSynchronization group = editorGroups.remove(fromPath); - if (group != null) { - editorGroups.put(toPath, group); - } - } - - private void onFolderChanged(Path fromPath, Path toPath) { - final Map newGroups = new HashMap<>(editorGroups.size()); - final Iterator> iterator = - editorGroups.entrySet().iterator(); - while (iterator.hasNext()) { - final Map.Entry entry = iterator.next(); - final Path groupPath = entry.getKey(); - final EditorGroupSynchronization group = entry.getValue(); - - if (fromPath.isPrefixOf(groupPath)) { - final Path relPath = groupPath.removeFirstSegments(fromPath.segmentCount()); - final Path newPath = toPath.append(relPath); - - newGroups.put(newPath, group); - iterator.remove(); - } - } - - editorGroups.putAll(newGroups); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronization.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronization.java deleted file mode 100644 index b9446015cf5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronization.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization; - -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.events.FileContentUpdateEvent; -import org.eclipse.che.ide.resource.Path; - -/** - * Contains list of opened files with the same {@link Path} and listens to {@link - * DocumentChangedEvent} and {@link FileContentUpdateEvent} to provide the synchronization of the - * content for them. - * - * @author Roman Nikitenko - */ -public interface EditorGroupSynchronization { - - /** - * Adds given editor in the group to sync its content. - * - * @param editor editor to sync content - */ - void addEditor(EditorPartPresenter editor); - - /** - * Removes given editor from the group and stops to track changes of content for this one. - * - * @param editor editor to remove from group - */ - void removeEditor(EditorPartPresenter editor); - - /** Notify group that active editor is changed */ - void onActiveEditorChanged(@NotNull EditorPartPresenter activeEditor); - - /** Notify group that editor dirty state is changed */ - void onEditorDirtyStateChanged(@NotNull EditorPartPresenter changedEditor); - - /** Removes all editors from the group and stops to track changes of content for them. */ - void unInstall(); - - /** Returns all editors for given group. */ - Set getSynchronizedEditors(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronizationImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronizationImpl.java deleted file mode 100644 index 77aa664c31b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/EditorGroupSynchronizationImpl.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; - -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorWithAutoSave; -import org.eclipse.che.ide.api.editor.document.Document; -import org.eclipse.che.ide.api.editor.document.DocumentHandle; -import org.eclipse.che.ide.api.editor.document.DocumentStorage; -import org.eclipse.che.ide.api.editor.events.DocumentChangedEvent; -import org.eclipse.che.ide.api.editor.events.DocumentChangedHandler; -import org.eclipse.che.ide.api.editor.events.FileContentUpdateEvent; -import org.eclipse.che.ide.api.editor.events.FileContentUpdateHandler; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.editor.texteditor.UndoableEditor; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.VirtualFile; - -public class EditorGroupSynchronizationImpl - implements EditorGroupSynchronization, DocumentChangedHandler, FileContentUpdateHandler { - private final DocumentStorage documentStorage; - private final NotificationManager notificationManager; - private final HandlerRegistration fileContentUpdateHandlerRegistration; - private final Map synchronizedEditors = new HashMap<>(); - - private EditorPartPresenter groupLeaderEditor; - - @Inject - EditorGroupSynchronizationImpl( - EventBus eventBus, DocumentStorage documentStorage, NotificationManager notificationManager) { - this.documentStorage = documentStorage; - this.notificationManager = notificationManager; - fileContentUpdateHandlerRegistration = eventBus.addHandler(FileContentUpdateEvent.TYPE, this); - } - - @Override - public void addEditor(EditorPartPresenter editor) { - DocumentHandle documentHandle = getDocumentHandleFor(editor); - if (documentHandle == null) { - return; - } - - if (synchronizedEditors.isEmpty()) { - HandlerRegistration handlerRegistration = - documentHandle.getDocEventBus().addHandler(DocumentChangedEvent.TYPE, this); - synchronizedEditors.put(editor, handlerRegistration); - return; - } - - EditorPartPresenter groupMember = synchronizedEditors.keySet().iterator().next(); - if ((groupMember instanceof EditorWithAutoSave) - && !((EditorWithAutoSave) groupMember).isAutoSaveEnabled()) { - // group can contains unsaved content - we need update content for the editor - Document editorDocument = documentHandle.getDocument(); - Document groupMemberDocument = getDocumentHandleFor(groupMember).getDocument(); - - String oldContent = editorDocument.getContents(); - String groupMemberContent = groupMemberDocument.getContents(); - - editorDocument.replace(0, oldContent.length(), groupMemberContent); - } - - HandlerRegistration handlerRegistration = - documentHandle.getDocEventBus().addHandler(DocumentChangedEvent.TYPE, this); - synchronizedEditors.put(editor, handlerRegistration); - } - - @Override - public void onActiveEditorChanged(@NotNull EditorPartPresenter activeEditor) { - groupLeaderEditor = activeEditor; - resolveAutoSave(); - } - - @Override - public void onEditorDirtyStateChanged(EditorPartPresenter changedEditor) { - boolean hasEditorsToSync = synchronizedEditors.keySet().size() > 1; - if (!hasEditorsToSync || groupLeaderEditor == null || groupLeaderEditor != changedEditor) { - // we sync 'dirty' state of editors when content of an ACTIVE editor is saved - return; - } - - synchronizedEditors - .keySet() - .forEach( - editor -> { - if (editor != groupLeaderEditor && editor instanceof TextEditor) { - ((TextEditor) editor).getEditorWidget().markClean(); - ((TextEditor) editor).updateDirtyState(false); - } - }); - } - - @Override - public void removeEditor(EditorPartPresenter editor) { - HandlerRegistration handlerRegistration = synchronizedEditors.remove(editor); - if (handlerRegistration != null) { - handlerRegistration.removeHandler(); - } - - if (groupLeaderEditor == editor) { - groupLeaderEditor = null; - } - } - - @Override - public void unInstall() { - synchronizedEditors.values().forEach(HandlerRegistration::removeHandler); - - if (fileContentUpdateHandlerRegistration != null) { - fileContentUpdateHandlerRegistration.removeHandler(); - } - groupLeaderEditor = null; - } - - @Override - public Set getSynchronizedEditors() { - return synchronizedEditors.keySet(); - } - - @Override - public void onDocumentChanged(DocumentChangedEvent event) { - DocumentHandle activeEditorDocumentHandle = getDocumentHandleFor(groupLeaderEditor); - if (activeEditorDocumentHandle == null - || !event.getDocument().isSameAs(activeEditorDocumentHandle)) { - return; - } - - for (EditorPartPresenter editor : synchronizedEditors.keySet()) { - if (editor == groupLeaderEditor) { - continue; - } - - DocumentHandle documentHandle = getDocumentHandleFor(editor); - if (documentHandle != null) { - documentHandle - .getDocument() - .replace(event.getOffset(), event.getRemoveCharCount(), event.getText()); - } - } - } - - @Override - public void onFileContentUpdate(FileContentUpdateEvent event) { - if (synchronizedEditors.keySet().isEmpty()) { - return; - } - - if (groupLeaderEditor == null) { - groupLeaderEditor = synchronizedEditors.keySet().iterator().next(); - resolveAutoSave(); - } - - final VirtualFile virtualFile = groupLeaderEditor.getEditorInput().getFile(); - if (!event.getFilePath().equals(virtualFile.getLocation().toString())) { - return; - } - - if (!(virtualFile instanceof File)) { - updateContent(virtualFile, false); - return; - } - - File file = (File) virtualFile; - - String eventModificationStamp = event.getModificationStamp(); - String currentModificationStamp = file.getModificationStamp(); - if (isNullOrEmpty(currentModificationStamp) || isNullOrEmpty(eventModificationStamp)) { - updateContent(virtualFile, false); - return; - } - - if (!Objects.equals(eventModificationStamp, currentModificationStamp)) { - updateContent(virtualFile, true); - } - } - - private void updateContent(VirtualFile virtualFile, boolean externalOperation) { - final DocumentHandle documentHandle = getDocumentHandleFor(groupLeaderEditor); - if (documentHandle == null) { - return; - } - - documentStorage.getDocument( - virtualFile, - new DocumentStorage.DocumentCallback() { - - @Override - public void onDocumentReceived(String newContent) { - Document document = documentHandle.getDocument(); - - String oldContent = document.getContents(); - if (Objects.equals(newContent, oldContent)) { - return; - } - - if (groupLeaderEditor instanceof UndoableEditor) { - ((UndoableEditor) groupLeaderEditor).getUndoRedo().beginCompoundChange(); - } - - TextPosition cursorPosition = document.getCursorPosition(); - replaceContent(document, newContent, oldContent, cursorPosition); - - if (groupLeaderEditor instanceof UndoableEditor) { - ((UndoableEditor) groupLeaderEditor).getUndoRedo().endCompoundChange(); - } - - if (externalOperation) { - notificationManager.notify( - "External operation", - "File '" + virtualFile.getName() + "' is updated", - SUCCESS, - NOT_EMERGE_MODE); - } - } - - @Override - public void onDocumentLoadFailure(final Throwable caught) { - notificationManager.notify( - "", - "Can not to update content for the file " + virtualFile.getDisplayName(), - FAIL, - EMERGE_MODE); - } - }); - } - - private void replaceContent( - Document document, String newContent, String oldContent, TextPosition cursorPosition) { - document.replace(0, oldContent.length(), newContent); - document.setCursorPosition(cursorPosition); - } - - @Nullable - private DocumentHandle getDocumentHandleFor(EditorPartPresenter editor) { - if (editor == null || !(editor instanceof TextEditor)) { - return null; - } - return ((TextEditor) editor).getDocument().getDocumentHandle(); - } - - private void resolveAutoSave() { - synchronizedEditors.keySet().forEach(this::resolveAutoSaveFor); - } - - private void resolveAutoSaveFor(EditorPartPresenter editor) { - if (!(editor instanceof EditorWithAutoSave)) { - return; - } - - EditorWithAutoSave editorWithAutoSave = (EditorWithAutoSave) editor; - if (editorWithAutoSave == groupLeaderEditor) { - editorWithAutoSave.enableAutoSave(); - return; - } - - editorWithAutoSave.disableAutoSave(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizer.java deleted file mode 100644 index 7b67990b03c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizer.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization.workingCopy; - -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; -import org.eclipse.che.ide.api.editor.reconciler.DirtyRegion; - -/** - * The synchronizer of content for opened files with working copies on server side. - * - * @author Roman Nikitenko - */ -public interface EditorWorkingCopySynchronizer { - /** - * Sends the text change of editor content to sync its working copy on server side. - * - * @param filePath path to the file which content is needed to sync - * @param projectPath the path to the project which contains the file to sync - * @param dirtyRegion describes a document range which has been changed - */ - JsonRpcPromise synchronize(String filePath, String projectPath, DirtyRegion dirtyRegion); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizerImpl.java deleted file mode 100644 index 127aae19580..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/synchronization/workingCopy/EditorWorkingCopySynchronizerImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.synchronization.workingCopy; - -import static org.eclipse.che.api.project.shared.dto.EditorChangesDto.Type.INSERT; -import static org.eclipse.che.api.project.shared.dto.EditorChangesDto.Type.REMOVE; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.project.shared.dto.EditorChangesDto; -import org.eclipse.che.api.project.shared.dto.EditorChangesDto.Type; -import org.eclipse.che.api.project.shared.dto.ServerError; -import org.eclipse.che.ide.api.editor.reconciler.DirtyRegion; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Default implementation of {@link EditorWorkingCopySynchronizer} which provides synchronization - * working copy on server side. - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorWorkingCopySynchronizerImpl implements EditorWorkingCopySynchronizer { - private static final String WORKING_COPY_ERROR_METHOD = "track:editor-working-copy-error"; - private static final String EDITOR_CONTENT_CHANGES_METHOD = "track:editor-content-changes"; - - private DtoFactory dtoFactory; - private RequestTransmitter requestTransmitter; - - @Inject - public EditorWorkingCopySynchronizerImpl( - DtoFactory dtoFactory, RequestTransmitter requestTransmitter) { - this.dtoFactory = dtoFactory; - this.requestTransmitter = requestTransmitter; - } - - @Inject - public void configureHandler(RequestHandlerConfigurator configurator) { - configurator - .newConfiguration() - .methodName(WORKING_COPY_ERROR_METHOD) - .paramsAsDto(ServerError.class) - .noResult() - .withConsumer(this::onError); - } - - public JsonRpcPromise synchronize( - String filePath, String projectPath, DirtyRegion dirtyRegion) { - Type type = dirtyRegion.getType().equals(DirtyRegion.INSERT) ? INSERT : REMOVE; - EditorChangesDto changes = - dtoFactory - .createDto(EditorChangesDto.class) - .withType(type) - .withProjectPath(projectPath) - .withFileLocation(filePath) - .withOffset(dirtyRegion.getOffset()) - .withText(dirtyRegion.getText()); - - int length = dirtyRegion.getLength(); - if (DirtyRegion.REMOVE.equals(dirtyRegion.getType())) { - changes.withRemovedCharCount(length); - } else { - changes.withLength(length); - } - - return requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(EDITOR_CONTENT_CHANGES_METHOD) - .paramsAsDto(changes) - .sendAndReceiveResultAsBoolean(); - } - - private void onError(ServerError error) { - Log.error(getClass(), error.getMessage()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.java deleted file mode 100644 index a25576af37e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.texteditor; - -import com.google.gwt.core.shared.GWT; -import com.google.gwt.event.dom.client.BlurEvent; -import com.google.gwt.event.dom.client.BlurHandler; -import com.google.gwt.event.dom.client.FocusEvent; -import com.google.gwt.event.dom.client.FocusHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.HTMLPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import elemental.dom.Element; -import org.eclipse.che.ide.api.editor.codeassist.AdditionalInfoCallback; -import org.eclipse.che.ide.api.editor.codeassist.CompletionsSource; -import org.eclipse.che.ide.api.editor.events.CursorActivityEvent; -import org.eclipse.che.ide.api.editor.events.CursorActivityHandler; -import org.eclipse.che.ide.api.editor.keymap.Keymap; -import org.eclipse.che.ide.api.editor.text.TextPosition; -import org.eclipse.che.ide.api.editor.texteditor.EditorWidget; -import org.eclipse.che.ide.api.editor.texteditor.TextEditorPartView; -import org.eclipse.che.ide.editor.codeassist.AdditionalInformationWidget; -import org.eclipse.che.ide.editor.texteditor.infopanel.InfoPanel; -import org.eclipse.che.ide.ui.popup.PopupResources; - -/** - * Implementation of the View part of the editors. - * - * @author "Mickaël Leduque" - */ -public class TextEditorPartViewImpl extends Composite implements TextEditorPartView { - - /** The UI binder for the component. */ - private static final EditorViewUiBinder uibinder = GWT.create(EditorViewUiBinder.class); - - /** The info panel bar for the editor. */ - @UiField(provided = true) - InfoPanel infoPanel; - - /** The container for the real editor widget. */ - @UiField SimplePanel editorPanel; - - /** The view delegate. */ - private Delegate delegate; - - /** The resources for the additional infos popup. */ - private PopupResources popupResources; - - @Inject - public TextEditorPartViewImpl(final InfoPanel infoPanel) { - this.infoPanel = infoPanel; - - final HTMLPanel panel = uibinder.createAndBindUi(this); - initWidget(panel); - } - - @Override - public void onResize() { - getDelegate().onResize(); - } - - @Override - public void showCompletionProposals( - final EditorWidget editorWidget, final CompletionsSource source) { - editorWidget.showCompletionProposals( - source, - new AdditionalInfoCallback() { - - @Override - public Element onAdditionalInfoNeeded( - final float pixelX, final float pixelY, final Element infoWidget) { - final AdditionalInformationWidget popup = - new AdditionalInformationWidget(popupResources); - popup.addItem(infoWidget); - popup.show(pixelX, pixelY); - return popup.asElement(); - } - }); - } - - @Override - public void showCompletionProposals(final EditorWidget editorWidget) { - editorWidget.showCompletionProposals(); - } - - @Override - public void setDelegate(final Delegate delegate) { - this.delegate = delegate; - } - - protected Delegate getDelegate() { - return this.delegate; - } - - /** - * Sets the additional infos popup resource. - * - * @param popupResources the resource - */ - @Inject - public void setPopupResource(final PopupResources popupResources) { - this.popupResources = popupResources; - } - - @Override - public void setEditorWidget(final EditorWidget editorWidget) { - if (this.editorPanel.getWidget() != null) { - throw new RuntimeException("Editor already set"); - } - this.editorPanel.setWidget(editorWidget); - - editorWidget.addCursorActivityHandler( - new CursorActivityHandler() { - @Override - public void onCursorActivity(final CursorActivityEvent event) { - delegate.editorCursorPositionChanged(); - } - }); - editorWidget.addBlurHandler( - new BlurHandler() { - @Override - public void onBlur(final BlurEvent event) { - delegate.editorLostFocus(); - } - }); - editorWidget.addFocusHandler( - new FocusHandler() { - @Override - public void onFocus(final FocusEvent event) { - delegate.editorGotFocus(); - } - }); - } - - @Override - public void showPlaceHolder(final Widget placeHolder) { - this.editorPanel.setWidget(placeHolder); - } - - @Override - public void setInfoPanelVisible(boolean visible) { - infoPanel.setVisible(visible); - } - - @Override - public void initInfoPanel( - final String mode, final Keymap keymap, final int lineCount, final int tabSize) { - this.infoPanel.createDefaultState(mode, lineCount, tabSize); - } - - @Override - public void updateInfoPanelPosition(final TextPosition position) { - this.infoPanel.updateCursorPosition(position); - } - - @Override - public void updateInfoPanelUnfocused(final int lineCount) {} - - @Override - public NotificationRemover addNotification(final com.google.gwt.dom.client.Element element) { - getElement().insertFirst(element); - return new NotificationRemover() { - @Override - public void remove() { - element.removeFromParent(); - } - }; - } - - /** - * UI binder interface for this component. - * - * @author "Mickaël Leduque" - */ - interface EditorViewUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.ui.xml deleted file mode 100644 index dcc9fe2d98b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/TextEditorPartViewImpl.ui.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - .editorZone-layout { - display: flex; - display: -webkit-flex; - - flex-flow: column; - -webkit-flex-flow: column; - - justify-content: flex-start; - -webkit-justify-content: flex-start; - - align-items: stretch; - -webkit-align-items: stretch; - } - .editorZone-editor { - flex-grow: 1; - -webkit-flex-grow: 1; - flex-shrink: 1; - -webkit-flex-shrink: 1; - - display: -webkit-flex; - display: flex; - } - .editorZone-infopanel { - flex-grow: 0; /* don't allow growth if there is space available */ - -webkit-flex-grow: 0; - flex-shrink: 0; /* don't allow to shrink if there is not enough space */ - -webkit-flex-shrink: 0; - } - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.java deleted file mode 100644 index a6d241443b1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.editor.texteditor.infopanel; - -import com.google.gwt.core.shared.GWT; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTMLPanel; -import com.google.inject.Inject; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.editor.text.TextPosition; - -/** - * The presenter for the editor info panel.
        - * Info panel shows the following things: cursor position, number of lines, tab settings and file - * type. - * - * @author "Mickaël Leduque" - * @author Vitaliy Guliy - */ -public class InfoPanel extends Composite { - - /** A set with file type descriptions. */ - private static Map fileTypes = new HashMap(); - - static { - fileTypes.put("application/xml", "XML"); - fileTypes.put("text/html", "HTML"); - fileTypes.put("application/x-jsp", "JSP"); - fileTypes.put("application/javascript", "JavaScript"); - fileTypes.put("text/css", "CSS"); - fileTypes.put("text/x-java-source", "Java"); - fileTypes.put("text/x-less", "Less"); - } - - /** - * UI binder interface for this component. - * - * @author "Mickaël Leduque" - */ - interface InfoPanelUiBinder extends UiBinder {} - - /** The UI binder instance. */ - private static final InfoPanelUiBinder UIBINDER = GWT.create(InfoPanelUiBinder.class); - - @UiField HTMLPanel cursorPosition; - - @UiField HTMLPanel fileType; - - @UiField HTMLPanel encoding; - - @Inject - public InfoPanel() { - initWidget(UIBINDER.createAndBindUi(this)); - } - - /** - * Creates an initial state, before actual data is available. - * - * @param fileContentDescription the file type - * @param numberOfLines the file number of lines - * @param tabSize the space-equivalent width of a tabulation character - */ - public void createDefaultState( - final String fileContentDescription, final int numberOfLines, final int tabSize) { - setFileType(fileContentDescription); - } - - /** - * Update the line and char display to show a position in the text. - * - * @param position the position in the text - */ - public void updateCursorPosition(final TextPosition position) { - if (position != null) { - cursorPosition - .getElement() - .setInnerText("" + (position.getLine() + 1) + ":" + (position.getCharacter() + 1)); - } else { - cursorPosition.getElement().setInnerText(""); - } - } - - /** - * Changes the displayed value of the file type. - * - * @param type the new value - */ - private void setFileType(final String type) { - String displayName = fileTypes.get(type); - if (displayName != null) { - fileType.getElement().setInnerHTML(displayName); - } else { - fileType.getElement().setInnerHTML(type); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.ui.xml deleted file mode 100644 index f90742f5785..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/texteditor/infopanel/InfoPanel.ui.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - .infoPanel { - height: 18px; - background-color: editorInfoBackgroundColor; - border-top: 1px solid tabBorderColor; - } - - .cursorPosition { - float: left; - margin-left: 15px; - } - - .fileType { - float: right; - margin-right: 15px; - } - - .encoding { - float: right; - margin-right: 20px; - } - - .cursorPosition, - .fileType, - .encoding { - font-family: "Open Sans", sans-serif; - font-size: 9pt; - color: editorInfoTextColor; - height: 18px; - line-height: 18px; - } - - - - - - - UTF-8 - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryExtension.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryExtension.java deleted file mode 100644 index 8d6c3fcf7aa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryExtension.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory; - -import static org.eclipse.che.ide.api.action.IdeActions.GROUP_WORKSPACE; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.extension.Extension; -import org.eclipse.che.ide.factory.accept.AcceptFactoryHandler; -import org.eclipse.che.ide.factory.action.CreateFactoryAction; -import org.eclipse.che.ide.factory.welcome.OpenWelcomePageAction; - -/** @author Vladyslav Zhukovskii */ -@Singleton -@Extension(title = "Factory", version = "3.0.0") -public class FactoryExtension { - - @Inject - public FactoryExtension( - AcceptFactoryHandler acceptFactoryHandler, - ActionManager actionManager, - FactoryResources resources, - CreateFactoryAction configureFactoryAction, - OpenWelcomePageAction openWelcomePageAction) { - acceptFactoryHandler.process(); - - resources.factoryCSS().ensureInjected(); - - DefaultActionGroup workspaceGroup = - (DefaultActionGroup) actionManager.getAction(GROUP_WORKSPACE); - - actionManager.registerAction("openWelcomePage", openWelcomePageAction); - actionManager.registerAction("configureFactoryAction", configureFactoryAction); - - workspaceGroup.add(configureFactoryAction); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryGinModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryGinModule.java deleted file mode 100644 index d42d5127659..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryGinModule.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory; - -import com.google.gwt.inject.client.AbstractGinModule; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.factory.FactoryServiceClient; -import org.eclipse.che.ide.factory.welcome.GreetingPartView; -import org.eclipse.che.ide.factory.welcome.GreetingPartViewImpl; - -/** @author Vladyslav Zhukovskii */ -public class FactoryGinModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(JsIntervalSetter.class).asEagerSingleton(); - bind(GreetingPartView.class).to(GreetingPartViewImpl.class).in(Singleton.class); - bind(FactoryServiceClient.class).to(FactoryServiceClientImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryResources.java deleted file mode 100644 index 84287be0a37..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryResources.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import org.eclipse.che.ide.ui.Styles; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Factory extension resources (css styles, images). - * - * @author Ann Shumilova - * @author Anton Korneta - */ -public interface FactoryResources extends ClientBundle { - interface FactoryCSS extends CssResource, Styles { - String label(); - - String createFactoryButton(); - - String labelErrorPosition(); - } - - interface Style extends CssResource { - String launchIcon(); - - String configureIcon(); - } - - @Source({ - "Factory.css", - "org/eclipse/che/ide/api/ui/style.css", - "org/eclipse/che/ide/ui/Styles.css" - }) - FactoryCSS factoryCSS(); - - @Source("export-config.svg") - SVGResource exportConfig(); - - @Source("import-config.svg") - SVGResource importConfig(); - - @Source("execute.svg") - SVGResource execute(); - - @Source("cog-icon.svg") - SVGResource configure(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryServiceClientImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryServiceClientImpl.java deleted file mode 100644 index 65941f6c3bd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/FactoryServiceClientImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory; - -import static org.eclipse.che.ide.MimeType.APPLICATION_JSON; -import static org.eclipse.che.ide.json.JsonHelper.toJson; -import static org.eclipse.che.ide.rest.HTTPHeader.ACCEPT; - -import com.google.common.base.Joiner; -import com.google.gwt.http.client.RequestBuilder; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.factory.shared.dto.FactoryDto; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.MimeType; -import org.eclipse.che.ide.api.factory.FactoryServiceClient; -import org.eclipse.che.ide.rest.AsyncRequestCallback; -import org.eclipse.che.ide.rest.AsyncRequestFactory; -import org.eclipse.che.ide.rest.DtoUnmarshallerFactory; -import org.eclipse.che.ide.rest.HTTPHeader; -import org.eclipse.che.ide.ui.loaders.request.LoaderFactory; -import org.eclipse.che.ide.util.Pair; - -/** - * Implementation of {@link FactoryServiceClient} service. - * - * @author Vladyslav Zhukovskii - */ -@Singleton -public class FactoryServiceClientImpl implements FactoryServiceClient { - public static final String API_FACTORY_BASE_URL = "/api/factory/"; - - private final AsyncRequestFactory asyncRequestFactory; - private final DtoUnmarshallerFactory unmarshallerFactory; - private final LoaderFactory loaderFactory; - - @Inject - public FactoryServiceClientImpl( - AsyncRequestFactory asyncRequestFactory, - DtoUnmarshallerFactory unmarshallerFactory, - LoaderFactory loaderFactory) { - this.asyncRequestFactory = asyncRequestFactory; - this.unmarshallerFactory = unmarshallerFactory; - this.loaderFactory = loaderFactory; - } - - /** - * Get valid JSON factory object based on input factory ID - * - * @param factoryId factory ID to retrieve - * @param validate indicates whether or not factory should be validated by accept validator - * @return Factory through a Promise - */ - @Override - public Promise getFactory(@NotNull String factoryId, boolean validate) { - StringBuilder url = new StringBuilder(API_FACTORY_BASE_URL).append(factoryId); - if (validate) { - url.append("?").append("validate=true"); - } - return asyncRequestFactory - .createGetRequest(url.toString()) - .header(HTTPHeader.ACCEPT, MimeType.APPLICATION_JSON) - .send(unmarshallerFactory.newUnmarshaller(FactoryDto.class)); - } - - /** {@inheritDoc} */ - @Override - public void getFactoryJson( - String workspaceId, String path, AsyncRequestCallback callback) { - final StringBuilder url = - new StringBuilder(API_FACTORY_BASE_URL + "workspace/").append(workspaceId); - if (path != null) { - url.append("?path=").append(path); - } - asyncRequestFactory - .createGetRequest(url.toString()) - .header(HTTPHeader.ACCEPT, MimeType.APPLICATION_JSON) - .loader(loaderFactory.newLoader("Getting info about factory...")) - .send(callback); - } - - @Override - public Promise getFactoryJson(String workspaceId, String path) { - String url = API_FACTORY_BASE_URL + "workspace/" + workspaceId; - if (path != null) { - url += path; - } - - return asyncRequestFactory - .createGetRequest(url) - .header(HTTPHeader.ACCEPT, MimeType.APPLICATION_JSON) - .loader(loaderFactory.newLoader("Getting info about factory...")) - .send(unmarshallerFactory.newUnmarshaller(FactoryDto.class)); - } - - @Override - public Promise saveFactory(@NotNull FactoryDto factory) { - return asyncRequestFactory - .createPostRequest(API_FACTORY_BASE_URL, factory) - .header(HTTPHeader.ACCEPT, MimeType.APPLICATION_JSON) - .header(HTTPHeader.CONTENT_TYPE, MimeType.APPLICATION_JSON) - .loader(loaderFactory.newLoader("Creating factory...")) - .send(unmarshallerFactory.newUnmarshaller(FactoryDto.class)); - } - - @Override - public Promise> findFactory( - @Nullable Integer skipCount, - @Nullable Integer maxItems, - @Nullable List> params) { - final List> allParams = new LinkedList<>(); - if (params != null) { - allParams.addAll(params); - } - if (maxItems != null) { - allParams.add(Pair.of("maxItems", maxItems.toString())); - } - if (skipCount != null) { - allParams.add(Pair.of("skipCount", skipCount.toString())); - } - return asyncRequestFactory - .createGetRequest(API_FACTORY_BASE_URL + "find" + queryString(allParams)) - .header(HTTPHeader.ACCEPT, MimeType.APPLICATION_JSON) - .header(HTTPHeader.CONTENT_TYPE, MimeType.APPLICATION_JSON) - .loader(loaderFactory.newLoader("Searching factory...")) - .send(unmarshallerFactory.newListUnmarshaller(FactoryDto.class)); - } - - @Override - public Promise updateFactory(String id, FactoryDto factory) { - return asyncRequestFactory - .createRequest(RequestBuilder.PUT, API_FACTORY_BASE_URL + id, factory, false) - .header(HTTPHeader.CONTENT_TYPE, MimeType.APPLICATION_JSON) - .loader(loaderFactory.newLoader("Updating factory...")) - .send(unmarshallerFactory.newUnmarshaller(FactoryDto.class)); - } - - /** - * Resolve factory object based on user parameters - * - * @param factoryParameters map containing factory data parameters provided through URL - * @param validate indicates whether or not factory should be validated by accept validator - * @return Factory through a Promise - */ - @Override - public Promise resolveFactory( - @NotNull final Map factoryParameters, boolean validate) { - - // Init string with JAX-RS path - StringBuilder url = new StringBuilder(API_FACTORY_BASE_URL + "resolver"); - - // If validation, needs to add the flag - if (validate) { - url.append("?validate=true"); - } - return asyncRequestFactory - .createPostRequest(url.toString(), toJson(factoryParameters)) - .header(ACCEPT, APPLICATION_JSON) - .send(unmarshallerFactory.newUnmarshaller(FactoryDto.class)); - } - - /** - * Forms the query string from collection of query params - * - * @param pairs an iterable collection of query params - * @return query string - */ - private static String queryString(Collection> pairs) { - if (pairs.isEmpty()) { - return ""; - } - final Joiner joiner = Joiner.on("&"); - final List params = new LinkedList<>(); - for (Pair pair : pairs) { - params.add(pair.first + '=' + pair.second); - } - return '?' + joiner.join(params); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/JsIntervalSetter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/JsIntervalSetter.java deleted file mode 100644 index 3727c1d781e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/JsIntervalSetter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory; - -import com.google.inject.Singleton; - -/** - * When user changes browser tab and IDE executes into inactive tab, browser set code execution - * interval to improve performance. For example Chrome and Firefox set 1000ms interval. The method - * override global setInterval function and set custom value (100ms) of interval. This solution fix - * issue when we need execute some code into inactive tab permanently, for example launch factory. - */ -@Singleton -class JsIntervalSetter { - - JsIntervalSetter() { - setCustomInterval(); - } - - private native void setCustomInterval() /*-{ - var customInterval = 10; - var setInterval = function () { - clearInterval(interval); - customInterval *= 10; - }; - - var interval = setInterval(setInterval, customInterval); - }-*/; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/accept/AcceptFactoryHandler.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/accept/AcceptFactoryHandler.java deleted file mode 100644 index ec8f2378434..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/accept/AcceptFactoryHandler.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.accept; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.inject.Inject; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.factory.FactoryAcceptedEvent; -import org.eclipse.che.ide.api.factory.model.ActionImpl; -import org.eclipse.che.ide.api.factory.model.FactoryImpl; -import org.eclipse.che.ide.api.factory.model.IdeImpl; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.api.workspace.WorkspaceReadyEvent; -import org.eclipse.che.ide.factory.utils.FactoryProjectImporter; - -/** - * @author Sergii Leschenko - * @author Anton Korneta - */ -@Singleton -public class AcceptFactoryHandler { - private final CoreLocalizationConstant localizationConstant; - private final FactoryProjectImporter factoryProjectImporter; - private final EventBus eventBus; - private final AppContext appContext; - private final ActionManager actionManager; - private final NotificationManager notificationManager; - - private StatusNotification notification; - private boolean isImportingStarted; - - @Inject - public AcceptFactoryHandler( - CoreLocalizationConstant localizationConstant, - FactoryProjectImporter factoryProjectImporter, - EventBus eventBus, - AppContext appContext, - ActionManager actionManager, - NotificationManager notificationManager) { - this.factoryProjectImporter = factoryProjectImporter; - this.localizationConstant = localizationConstant; - this.eventBus = eventBus; - this.appContext = appContext; - this.actionManager = actionManager; - this.notificationManager = notificationManager; - } - - /** Accepts factory if it is present in context of application */ - public void process() { - final FactoryImpl factory; - if ((factory = appContext.getFactory()) == null) { - return; - } - - eventBus.addHandler( - WorkspaceReadyEvent.getType(), - e -> { - if (isImportingStarted) { - return; - } - - isImportingStarted = true; - - notification = - notificationManager.notify( - localizationConstant.cloningSource(), - StatusNotification.Status.PROGRESS, - NOT_EMERGE_MODE); - performOnAppLoadedActions(factory); - startImporting(factory); - }); - } - - private void startImporting(final FactoryImpl factory) { - factoryProjectImporter.startImporting( - factory, - new AsyncCallback() { - @Override - public void onSuccess(Void result) { - notification.setStatus(StatusNotification.Status.SUCCESS); - notification.setContent(localizationConstant.cloningSource()); - performOnProjectsLoadedActions(factory); - } - - @Override - public void onFailure(Throwable throwable) { - notification.setStatus(StatusNotification.Status.FAIL); - notification.setContent(throwable.getMessage()); - } - }); - } - - private void performOnAppLoadedActions(final FactoryImpl factory) { - final IdeImpl ide = factory.getIde(); - if (ide == null || ide.getOnAppLoaded() == null) { - return; - } - for (ActionImpl action : ide.getOnAppLoaded().getActions()) { - actionManager.performAction(action.getId(), action.getProperties()); - } - } - - private void performOnProjectsLoadedActions(final FactoryImpl factory) { - final IdeImpl ide = factory.getIde(); - if (ide == null || ide.getOnProjectsLoaded() == null) { - eventBus.fireEvent(new FactoryAcceptedEvent(factory)); - return; - } - for (ActionImpl action : ide.getOnProjectsLoaded().getActions()) { - actionManager.performAction(action.getId(), action.getProperties()); - } - eventBus.fireEvent(new FactoryAcceptedEvent(factory)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/action/CreateFactoryAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/action/CreateFactoryAction.java deleted file mode 100644 index d3ab5d1f6d4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/action/CreateFactoryAction.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.action; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Collections; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.factory.configure.CreateFactoryPresenter; - -/** @author Anton Korneta */ -@Singleton -public class CreateFactoryAction extends AbstractPerspectiveAction { - - private final CreateFactoryPresenter presenter; - - @Inject - public CreateFactoryAction( - CreateFactoryPresenter presenter, CoreLocalizationConstant localizationConstant) { - super( - Collections.singletonList("Project Perspective"), - localizationConstant.createFactoryActionTitle()); - this.presenter = presenter; - } - - @Override - public void actionPerformed(ActionEvent e) { - presenter.showDialog(); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryPresenter.java deleted file mode 100644 index 95c387799e8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryPresenter.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.configure; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Collections; -import java.util.List; -import org.eclipse.che.api.core.rest.shared.dto.Link; -import org.eclipse.che.api.factory.shared.dto.FactoryDto; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.factory.FactoryServiceClient; -import org.eclipse.che.ide.util.Pair; - -/** @author Anton Korneta */ -@Singleton -public class CreateFactoryPresenter implements CreateFactoryView.ActionDelegate { - public static final String CONFIGURE_LINK = "/dashboard/#/factory/"; - - private final CreateFactoryView view; - private final AppContext appContext; - private final FactoryServiceClient factoryService; - private final CoreLocalizationConstant localizationConstant; - - @Inject - public CreateFactoryPresenter( - CreateFactoryView view, - AppContext appContext, - FactoryServiceClient factoryService, - CoreLocalizationConstant localizationConstant) { - this.view = view; - this.appContext = appContext; - this.factoryService = factoryService; - this.localizationConstant = localizationConstant; - view.setDelegate(this); - } - - public void showDialog() { - view.showDialog(); - } - - @Override - public void onCreateClicked() { - final String factoryName = view.getFactoryName(); - factoryService - .getFactoryJson(appContext.getWorkspace().getId(), null) - .then( - new Operation() { - @Override - public void apply(final FactoryDto factory) throws OperationException { - factoryService - .findFactory( - null, null, Collections.singletonList(Pair.of("name", factoryName))) - .then(saveFactory(factory, factoryName)) - .catchError(logError()); - } - }) - .catchError(logError()); - } - - @Override - public void onFactoryNameChanged(String factoryName) { - view.enableCreateFactoryButton(isValidFactoryName(factoryName)); - } - - @Override - public void onCancelClicked() { - view.close(); - } - - private Operation> saveFactory( - final FactoryDto factory, final String factoryName) { - return new Operation>() { - @Override - public void apply(List factories) throws OperationException { - if (!factories.isEmpty()) { - view.showFactoryNameError(localizationConstant.createFactoryAlreadyExist(), null); - } else { - factoryService - .saveFactory(factory.withName(factoryName)) - .then( - new Operation() { - @Override - public void apply(FactoryDto factory) throws OperationException { - final Link link = factory.getLink("accept-named"); - if (link != null) { - view.setAcceptFactoryLink(link.getHref()); - } - view.setConfigureFactoryLink(CONFIGURE_LINK + factory.getId() + "/configure"); - } - }) - .catchError(logError()); - } - } - }; - } - - private Operation logError() { - return err -> - view.showFactoryNameError( - localizationConstant.createFactoryFromCurrentWorkspaceFailed(), err.getMessage()); - } - - private boolean isValidFactoryName(String name) { - if (name.length() == 0 || name.length() >= 125) { - return false; - } - view.hideFactoryNameError(); - return true; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryView.java deleted file mode 100644 index 835509258ae..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryView.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.configure; - -import com.google.inject.ImplementedBy; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.mvp.View; - -/** - * Representation of create factory popup. - * - * @author Anton Korneta - */ -@ImplementedBy(CreateFactoryViewImpl.class) -public interface CreateFactoryView extends View { - - interface ActionDelegate { - - /** Performs any actions appropriate in response to the user having pressed the Create button */ - void onCreateClicked(); - - /** - * Performs any actions appropriate in response to the user having type into Factory name input - */ - void onFactoryNameChanged(String factoryName); - - /** - * Performs any actions appropriate in response to the user having pressed the Cancel button. - */ - void onCancelClicked(); - } - - /** Preforms closing create factory popup */ - void close(); - - /** Preforms showing create factory popup */ - void showDialog(); - - /** Gets factory name from input */ - String getFactoryName(); - - /** Set accept factory link */ - void setAcceptFactoryLink(@NotNull String acceptLink); - - /** Set accept factory link */ - void setConfigureFactoryLink(@NotNull String configureLink); - - /** Set enable create factory button */ - void enableCreateFactoryButton(boolean enabled); - - /** Shows error if factory name invalid */ - void showFactoryNameError(@NotNull String labelMessage, @Nullable String tooltipMessage); - - /** Hide error of factory name is valid */ - void hideFactoryNameError(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.java deleted file mode 100644 index b12d8d60514..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.configure; - -import static com.google.gwt.dom.client.Style.Unit; - -import com.google.common.base.Strings; -import com.google.gwt.event.dom.client.KeyCodes; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.regexp.shared.RegExp; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Anchor; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.factory.FactoryResources; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.menu.PositionController; -import org.eclipse.che.ide.ui.window.Window; -import org.eclipse.che.ide.ui.zeroclipboard.ClipboardButtonBuilder; - -/** @author Anton Korneta */ -@Singleton -public class CreateFactoryViewImpl extends Window implements CreateFactoryView { - private static final RegExp FACTORY_NAME_PATTERN = RegExp.compile("[^A-Za-z0-9_-]"); - - interface FactoryViewImplUiBinder extends UiBinder {} - - private final FactoryResources factoryResources; - - private ActionDelegate delegate; - - @UiField FactoryResources.Style style; - @UiField TextBox factoryName; - @UiField TextBox factoryLink; - @UiField Label factoryNameLabel; - @UiField Label factoryLinkLabel; - @UiField Label factoryNameErrorLabel; - @UiField Button createFactoryButton; - @UiField FlowPanel upperPanel; - @UiField FlowPanel lowerPanel; - @UiField FlowPanel createFactoryPanel; - @UiField Anchor launch; - @UiField Anchor configure; - - private Tooltip labelsErrorTooltip; - - @Inject - protected CreateFactoryViewImpl( - FactoryViewImplUiBinder uiBinder, - CoreLocalizationConstant locale, - FactoryResources factoryResources, - ClipboardButtonBuilder buttonBuilder) { - this.factoryResources = factoryResources; - setTitle(locale.createFactoryTitle()); - Widget widget = uiBinder.createAndBindUi(this); - widget.getElement().getStyle().setPadding(0, Unit.PX); - setWidget(widget); - factoryNameLabel.setText(locale.createFactoryName()); - factoryLinkLabel.setText(locale.createFactoryLink()); - configure.getElement().insertFirst(factoryResources.configure().getSvg().getElement()); - launch.getElement().insertFirst(factoryResources.execute().getSvg().getElement()); - launch.addStyleName(style.launchIcon()); - configure.addStyleName(style.configureIcon()); - createFactoryButton.setEnabled(false); - addFooterButton( - locale.createFactoryButtonClose(), - "projectReadOnlyGitUrl-btnClose", - event -> delegate.onCancelClicked()); - createFactoryButton.addClickHandler(clickEvent -> delegate.onCreateClicked()); - buttonBuilder.withResourceWidget(factoryLink).build(); - factoryLink.setReadOnly(true); - final Tooltip launchFactoryTooltip = - Tooltip.create( - (elemental.dom.Element) launch.getElement(), - PositionController.VerticalAlign.TOP, - PositionController.HorizontalAlign.MIDDLE, - locale.createFactoryLaunchTooltip()); - launchFactoryTooltip.setShowDelayDisabled(false); - - final Tooltip configureFactoryTooltip = - Tooltip.create( - (elemental.dom.Element) configure.getElement(), - PositionController.VerticalAlign.TOP, - PositionController.HorizontalAlign.MIDDLE, - locale.createFactoryConfigureTooltip()); - configureFactoryTooltip.setShowDelayDisabled(false); - factoryName.getElement().setAttribute("placeholder", "new-factory-name"); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void showDialog() { - clear(); - this.show(); - } - - @Override - public String getFactoryName() { - return factoryName.getText(); - } - - @Override - public void setAcceptFactoryLink(String acceptLink) { - factoryLink.setText(acceptLink); - launch.getElement().setAttribute("target", "_blank"); - launch.setHref(acceptLink); - } - - @Override - public void setConfigureFactoryLink(String configureLink) { - configure.getElement().setAttribute("target", "_blank"); - configure.setHref(configureLink); - } - - @Override - public void enableCreateFactoryButton(boolean enabled) { - createFactoryButton.setEnabled(enabled); - } - - @Override - public void showFactoryNameError(@NotNull String labelMessage, @Nullable String tooltipMessage) { - factoryName.addStyleName(factoryResources.factoryCSS().inputError()); - factoryNameErrorLabel.setText(labelMessage); - if (labelsErrorTooltip != null) { - labelsErrorTooltip.destroy(); - } - - if (!Strings.isNullOrEmpty(tooltipMessage)) { - labelsErrorTooltip = - Tooltip.create( - (elemental.dom.Element) factoryNameErrorLabel.getElement(), - PositionController.VerticalAlign.TOP, - PositionController.HorizontalAlign.MIDDLE, - tooltipMessage); - labelsErrorTooltip.setShowDelayDisabled(false); - } - } - - @Override - public void hideFactoryNameError() { - factoryName.removeStyleName(factoryResources.factoryCSS().inputError()); - factoryNameErrorLabel.setText(""); - } - - @Override - public void close() { - this.hide(); - } - - @UiHandler({"factoryName"}) - public void onProjectNameChanged(KeyUpEvent event) { - if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER && createFactoryButton.isEnabled()) { - delegate.onCreateClicked(); - } else { - String name = factoryName.getValue(); - if (!Strings.isNullOrEmpty(name) && FACTORY_NAME_PATTERN.test(name)) { - name = name.replaceAll("[^A-Za-z0-9_]", "-"); - factoryName.setValue(name); - } - delegate.onFactoryNameChanged(name); - } - } - - private void clear() { - launch.getElement().removeAttribute("href"); - configure.getElement().removeAttribute("href"); - createFactoryButton.setEnabled(false); - factoryName.removeStyleName(factoryResources.factoryCSS().inputError()); - factoryNameErrorLabel.setText(""); - factoryName.setText(""); - factoryLink.setText(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.ui.xml deleted file mode 100644 index a766c084054..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/configure/CreateFactoryViewImpl.ui.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - @eval tabBorderColor org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); - - .border { - border-bottom: 1px solid tabBorderColor; - } - - .topPanel { - padding: 16px 16px 22px 16px; - } - - .lowerPanel { - padding: 16px; - } - - .centerAlign { - display: flex; - align-items: center; - } - - .iconContainer { - padding-left: 15px; - display: flex; - justify-content: space-around; - width: 20%; - } - - .launchIcon svg { - width: 18px; - height: 18px; - fill: #9B9B9B; - } - - .launchIcon:hover svg { - fill: rgba(0, 182, 142, 0.91); - cursor: pointer; - } - - .configureIcon svg { - margin-top: 1px; - width: 17px; - height: 17px; - fill: #9B9B9B; - } - - .configureIcon:hover svg { - fill: #E0E0E0; - cursor: pointer; - } - - .input { - width: literal("calc(100% - 95px)"); - } - - .inputContainer { - width: literal("calc(100% - 80px)"); - } - .inputReadOnly { - float: left; - width: literal("calc(100% - 32px)"); - } - .inputReadOnly + div { - margin: 0; - } - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/utils/FactoryProjectImporter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/utils/FactoryProjectImporter.java deleted file mode 100644 index 2a2a7ab6d63..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/utils/FactoryProjectImporter.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.utils; - -import static com.google.common.base.MoreObjects.firstNonNull; -import static org.eclipse.che.api.core.ErrorCodes.FAILED_CHECKOUT; -import static org.eclipse.che.api.core.ErrorCodes.FAILED_CHECKOUT_WITH_START_POINT; -import static org.eclipse.che.api.core.ErrorCodes.UNABLE_GET_PRIVATE_SSH_KEY; -import static org.eclipse.che.api.core.ErrorCodes.UNAUTHORIZED_GIT_OPERATION; -import static org.eclipse.che.api.core.ErrorCodes.UNAUTHORIZED_SVN_OPERATION; -import static org.eclipse.che.api.git.shared.ProviderInfo.AUTHENTICATE_URL; -import static org.eclipse.che.api.git.shared.ProviderInfo.PROVIDER_NAME; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.FLOAT_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.PROGRESS; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import java.util.ArrayList; -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 javax.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.model.workspace.config.SourceStorage; -import org.eclipse.che.api.git.shared.event.GitCheckoutEvent; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.FunctionException; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.auth.Credentials; -import org.eclipse.che.ide.api.factory.model.FactoryImpl; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.api.oauth.OAuth2Authenticator; -import org.eclipse.che.ide.api.oauth.OAuth2AuthenticatorRegistry; -import org.eclipse.che.ide.api.oauth.OAuth2AuthenticatorUrlProvider; -import org.eclipse.che.ide.api.project.MutableProjectConfig; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.workspace.model.ProjectConfigImpl; -import org.eclipse.che.ide.projectimport.AbstractImporter; -import org.eclipse.che.ide.projectimport.wizard.ImportProjectNotificationSubscriberFactory; -import org.eclipse.che.ide.projectimport.wizard.ProjectImportOutputJsonRpcNotifier; -import org.eclipse.che.ide.projectimport.wizard.ProjectNotificationSubscriber; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.askcredentials.AskCredentialsDialog; -import org.eclipse.che.ide.util.ExceptionUtils; -import org.eclipse.che.ide.util.StringUtils; -import org.eclipse.che.security.oauth.OAuthStatus; - -/** - * @author Sergii Leschenko - * @author Valeriy Svydenko - * @author Anton Korneta - */ -@Singleton -public class FactoryProjectImporter extends AbstractImporter { - private final AskCredentialsDialog askCredentialsDialog; - private final CoreLocalizationConstant locale; - private final NotificationManager notificationManager; - private final String restContext; - private final DialogFactory dialogFactory; - private final OAuth2AuthenticatorRegistry oAuth2AuthenticatorRegistry; - private final RequestTransmitter requestTransmitter; - private final ProjectImportOutputJsonRpcNotifier subscriber; - - private final Map checkoutContextRegistry = new HashMap<>(); - - private FactoryImpl factory; - private AsyncCallback callback; - - @Inject - public FactoryProjectImporter( - AppContext appContext, - NotificationManager notificationManager, - AskCredentialsDialog askCredentialsDialog, - CoreLocalizationConstant locale, - ImportProjectNotificationSubscriberFactory subscriberFactory, - DialogFactory dialogFactory, - OAuth2AuthenticatorRegistry oAuth2AuthenticatorRegistry, - RequestTransmitter requestTransmitter, - ProjectImportOutputJsonRpcNotifier subscriber) { - super(appContext, subscriberFactory); - this.notificationManager = notificationManager; - this.askCredentialsDialog = askCredentialsDialog; - this.locale = locale; - this.restContext = appContext.getMasterApiEndpoint(); - this.dialogFactory = dialogFactory; - this.oAuth2AuthenticatorRegistry = oAuth2AuthenticatorRegistry; - this.requestTransmitter = requestTransmitter; - this.subscriber = subscriber; - } - - @Inject - private void configure(RequestHandlerConfigurator requestHandlerConfigurator) { - requestHandlerConfigurator - .newConfiguration() - .methodName("git/checkoutOutput") - .paramsAsDto(GitCheckoutEvent.class) - .noResult() - .withConsumer(this::consumeGitCheckoutEvent); - } - - private void consumeGitCheckoutEvent(GitCheckoutEvent event) { - CheckoutContext context = - checkoutContextRegistry.get(event.getWorkspaceId() + event.getProjectName()); - if (context == null) { - return; - } - - String projectName = context.projectName; - String reference = event.isCheckoutOnly() ? event.getBranchRef() : context.startPoint; - String repository = context.repository; - String branch = context.branch; - - String title = locale.clonedSource(projectName); - String content = locale.clonedSourceWithCheckout(projectName, repository, reference, branch); - - notificationManager.notify(title, content, SUCCESS, FLOAT_MODE); - } - - public void startImporting(FactoryImpl factory, AsyncCallback callback) { - this.callback = callback; - this.factory = factory; - importProjects(); - } - - /** Import source projects */ - private void importProjects() { - final Project[] projects = appContext.getProjects(); - - Set projectNames = new HashSet<>(); - String createPolicy = factory.getPolicies() != null ? factory.getPolicies().getCreate() : null; - for (Project project : projects) { - if (project.getSource() == null || project.getSource().getLocation() == null) { - continue; - } - - if (project.exists()) { - // to prevent warning when reusing same workspace - if (!("perUser".equals(createPolicy) || "perAccount".equals(createPolicy))) { - notificationManager.notify( - "Import", locale.projectAlreadyImported(project.getName()), FAIL, FLOAT_MODE); - } - continue; - } - - projectNames.add(project.getName()); - } - importProjects(projectNames); - } - - /** - * Import source projects and if it's already exist in workspace then show warning notification - * - * @param projectsToImport set of project names that already exist in workspace and will be - * imported on file system - */ - private void importProjects(Set projectsToImport) { - final List> promises = new ArrayList<>(); - for (final ProjectConfigImpl projectConfig : factory.getWorkspace().getProjects()) { - if (projectsToImport.contains(projectConfig.getName())) { - promises.add( - startImport(Path.valueOf(projectConfig.getPath()), projectConfig.getSource()) - .thenPromise( - new Function>() { - @Override - public Promise apply(Project project) throws FunctionException { - return project.update().withBody(projectConfig).send(); - } - })); - } - } - - Promises.all(promises.toArray(new Promise[promises.size()])) - .then( - arg -> { - callback.onSuccess(null); - }) - .catchError( - promiseError -> { - // If it is unable to import any number of projects then factory import status will be - // success anyway - callback.onSuccess(null); - }); - } - - @Override - protected Promise importProject( - @NotNull final Path pathToProject, @NotNull final SourceStorage sourceStorage) { - return doImport(pathToProject, sourceStorage); - } - - private Promise doImport( - @NotNull final Path pathToProject, @NotNull final SourceStorage sourceStorage) { - final String projectName = pathToProject.lastSegment(); - final StatusNotification notification = - notificationManager.notify(locale.cloningSource(projectName), null, PROGRESS, FLOAT_MODE); - subscriber.subscribe(projectName, notification); - String location = sourceStorage.getLocation(); - // it's needed for extract repository name from repository url e.g - // https://github.com/codenvy/che-core.git - // lastIndexOf('/') + 1 for not to capture slash and length - 4 for trim .git - final String repository = location.substring(location.lastIndexOf('/') + 1).replace(".git", ""); - final Map parameters = - firstNonNull(sourceStorage.getParameters(), Collections.emptyMap()); - final String branch = parameters.get("branch"); - final String startPoint = parameters.get("startPoint"); - - subscribe(projectName, repository, branch, startPoint); - - MutableProjectConfig importConfig = new MutableProjectConfig(); - importConfig.setPath(pathToProject.toString()); - importConfig.setSource(sourceStorage); - - return appContext - .getWorkspaceRoot() - .importProject() - .withBody(importConfig) - .send() - .then( - new Function() { - @Override - public Project apply(Project project) throws FunctionException { - subscriber.onSuccess(); - unsubscribe(projectName); - - notification.setContent(locale.clonedSource(projectName)); - notification.setStatus(SUCCESS); - - return project; - } - }) - .catchErrorPromise( - new Function>() { - @Override - public Promise apply(PromiseError err) throws FunctionException { - final int errorCode = ExceptionUtils.getErrorCode(err.getCause()); - unsubscribe(projectName); - switch (errorCode) { - case UNAUTHORIZED_GIT_OPERATION: - subscriber.onFailure(err.getMessage()); - - final Map attributes = - ExceptionUtils.getAttributes(err.getCause()); - final String providerName = attributes.get(PROVIDER_NAME); - final String authenticateUrl = attributes.get(AUTHENTICATE_URL); - final boolean authenticated = - Boolean.parseBoolean(attributes.get("authenticated")); - if (!StringUtils.isNullOrEmpty(providerName) - && !StringUtils.isNullOrEmpty(authenticateUrl)) { - if (!authenticated) { - return tryAuthenticateAndRepeatImport( - providerName, - authenticateUrl, - pathToProject, - sourceStorage, - subscriber); - } else { - dialogFactory - .createMessageDialog( - locale.cloningSourceSshKeyUploadFailedTitle(), - locale.cloningSourcesSshKeyUploadFailedText(), - null) - .show(); - } - } else { - dialogFactory - .createMessageDialog( - locale.oauthFailedToGetAuthenticatorTitle(), - locale.oauthFailedToGetAuthenticatorText(), - null) - .show(); - } - - break; - case UNAUTHORIZED_SVN_OPERATION: - subscriber.onFailure(err.getMessage()); - return recallSubversionImportWithCredentials(pathToProject, sourceStorage); - case UNABLE_GET_PRIVATE_SSH_KEY: - subscriber.onFailure(locale.acceptSshNotFoundText()); - break; - case FAILED_CHECKOUT: - subscriber.onFailure( - locale.cloningSourceWithCheckoutFailed(branch, repository)); - notification.setTitle(locale.cloningSourceFailedTitle(projectName)); - break; - case FAILED_CHECKOUT_WITH_START_POINT: - subscriber.onFailure(locale.cloningSourceCheckoutFailed(branch, startPoint)); - notification.setTitle(locale.cloningSourceFailedTitle(projectName)); - break; - default: - subscriber.onFailure(err.getMessage()); - notification.setTitle(locale.cloningSourceFailedTitle(projectName)); - notification.setStatus(FAIL); - } - - return Promises.resolve(null); - } - }); - } - - private void subscribe(String projectName, String repository, String branch, String startPoint) { - String key = appContext.getWorkspaceId() + projectName; - - checkoutContextRegistry.put( - key, new CheckoutContext(projectName, repository, branch, startPoint)); - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName("git/checkoutOutput/subscribe") - .paramsAsString(key) - .sendAndSkipResult(); - } - - private void unsubscribe(String projectName) { - String key = appContext.getWorkspaceId() + projectName; - - checkoutContextRegistry.remove(key); - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName("git/checkoutOutput/unsubscribe") - .paramsAsString(key) - .sendAndSkipResult(); - } - - private Promise tryAuthenticateAndRepeatImport( - @NotNull final String providerName, - @NotNull final String authenticateUrl, - @NotNull final Path pathToProject, - @NotNull final SourceStorage sourceStorage, - @NotNull final ProjectNotificationSubscriber subscriber) { - OAuth2Authenticator authenticator = oAuth2AuthenticatorRegistry.getAuthenticator(providerName); - if (authenticator == null) { - authenticator = oAuth2AuthenticatorRegistry.getAuthenticator("default"); - } - return authenticator - .authenticate(OAuth2AuthenticatorUrlProvider.get(restContext, authenticateUrl)) - .thenPromise( - new Function>() { - @Override - public Promise apply(OAuthStatus result) throws FunctionException { - if (!result.equals(OAuthStatus.NOT_PERFORMED)) { - return doImport(pathToProject, sourceStorage); - } else { - subscriber.onFailure("Authentication cancelled"); - callback.onSuccess(null); - } - - return Promises.resolve(null); - } - }) - .catchError( - caught -> { - callback.onFailure(new Exception(caught.getMessage())); - }); - } - - private Promise recallSubversionImportWithCredentials( - final Path path, final SourceStorage sourceStorage) { - return askCredentialsDialog - .askCredentials() - .thenPromise( - new Function>() { - @Override - public Promise apply(Credentials credentials) throws FunctionException { - sourceStorage.getParameters().put("username", credentials.getUsername()); - sourceStorage.getParameters().put("password", credentials.getPassword()); - return doImport(path, sourceStorage); - } - }) - .catchError( - error -> { - callback.onFailure(error.getCause()); - }); - } - - private class CheckoutContext { - private final String projectName; - private final String repository; - private final String branch; - private final String startPoint; - - private CheckoutContext( - String projectName, String repository, String branch, String startPoint) { - this.projectName = projectName; - this.repository = repository; - this.branch = branch; - this.startPoint = startPoint; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartPresenter.java deleted file mode 100644 index 4e46814a0e7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartPresenter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.welcome; - -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.PartStackType; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.api.parts.base.BasePresenter; - -/** - * @author Vitaliy Guliy - * @author Sergii Leschenko - */ -@Singleton -public class GreetingPartPresenter extends BasePresenter - implements GreetingPartView.ActionDelegate { - private static final String DEFAULT_TITLE = "Greeting"; - - private final WorkspaceAgent workspaceAgent; - private final GreetingPartView view; - - private String title = DEFAULT_TITLE; - - @Inject - public GreetingPartPresenter(GreetingPartView view, WorkspaceAgent workspaceAgent) { - this.view = view; - this.workspaceAgent = workspaceAgent; - - view.setDelegate(this); - } - - @NotNull - @Override - public String getTitle() { - return title != null ? title : DEFAULT_TITLE; - } - - @Nullable - @Override - public String getTitleToolTip() { - return "Greeting the user"; - } - - @Override - public int getSize() { - return 320; - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - public void showGreeting(Map parameters) { - showGreeting( - parameters.get("greetingTitle"), - parameters.get("greetingContentUrl"), - parameters.get("greetingNotification")); - } - - private void hideGreeting() { - workspaceAgent.removePart(this); - } - - /** Opens Greeting part and displays the URL in Frame. */ - private void showGreeting( - @NotNull String title, String greetingContentURL, final String notification) { - this.title = title; - workspaceAgent.openPart(this, PartStackType.TOOLING, Constraints.FIRST); - new Timer() { - @Override - public void run() { - workspaceAgent.setActivePart(GreetingPartPresenter.this); - } - }.schedule(3000); - - view.setTitle(title); - view.showGreeting(greetingContentURL); - - if (notification != null) { - new Timer() { - @Override - public void run() { - new TooltipHint(notification); - } - }.schedule(1000); - } - } - - @Override - public View getView() { - return view; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartView.java deleted file mode 100644 index 3ffa2f0e27d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartView.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.welcome; - -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.base.BaseActionDelegate; - -/** @author Vitaliy Guliy */ -public interface GreetingPartView extends View { - - interface ActionDelegate extends BaseActionDelegate {} - - /** - * Set title of greeting part. - * - * @param title title that need to be set - */ - void setTitle(String title); - - /** - * Sets new URL of greeting page. - * - * @param url - */ - void showGreeting(String url); - - void setVisible(boolean visible); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartViewImpl.java deleted file mode 100644 index a714640e02e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/GreetingPartViewImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.welcome; - -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.ui.Frame; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.parts.base.BaseView; - -/** @author Vitaliy Guliy */ -@Singleton -public class GreetingPartViewImpl extends BaseView - implements GreetingPartView { - - private Frame frame; - - public GreetingPartViewImpl() { - frame = new Frame(); - frame.setWidth("100%"); - frame.setHeight("100%"); - frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE); - frame.getElement().getStyle().setVisibility(Style.Visibility.HIDDEN); - - frame.getElement().setAttribute("id", "greetingFrame"); - frame.getElement().setAttribute("tabindex", "0"); - - setContentWidget(frame); - - frame.addLoadHandler( - event -> frame.getElement().getStyle().setVisibility(Style.Visibility.VISIBLE)); - - handleFrameEvents(frame.getElement()); - } - - /** - * Adds handlers to the greeting frame and window to catch mouse clicking on the frame. - * - * @param frame native frame object - */ - private native void handleFrameEvents(final JavaScriptObject frame) /*-{ - var instance = this; - frame["hovered"] = false; - - frame.addEventListener('mouseover', function (e) { - frame["hovered"] = true; - }, false); - - frame.addEventListener('mouseout', function (e) { - frame["hovered"] = false; - }, false); - - $wnd.addEventListener('blur', function (e) { - if (frame["hovered"] == true) { - instance.@org.eclipse.che.ide.factory.welcome.GreetingPartViewImpl::activatePart()(); - } - }, false); - }-*/; - - @Override - public void showGreeting(String url) { - frame.getElement().getStyle().setVisibility(Style.Visibility.HIDDEN); - - if (url == null || url.trim().isEmpty()) { - frame.setUrl("about:blank"); - } else { - frame.setUrl(url); - } - } - - /** Ensures the view is activated when clicking the mouse. */ - private void activatePart() { - if (!isFocused()) { - setFocus(true); - if (delegate != null) { - delegate.onActivate(); - } - } - } - - @Override - protected void focusView() { - frame.getElement().focus(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/OpenWelcomePageAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/OpenWelcomePageAction.java deleted file mode 100644 index 0ae20ba750f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/OpenWelcomePageAction.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.welcome; - -import javax.inject.Inject; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.util.loging.Log; - -/** @author Sergii Leschenko */ -public class OpenWelcomePageAction extends BaseAction { - private final GreetingPartPresenter greetingPart; - - @Inject - public OpenWelcomePageAction(GreetingPartPresenter greetingPart) { - this.greetingPart = greetingPart; - } - - @Override - public void actionPerformed(ActionEvent e) { - if (e.getParameters() == null) { - Log.error(getClass(), "Can't show welcome page without parameters"); - return; - } - - greetingPart.showGreeting(e.getParameters()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.java deleted file mode 100644 index 02881440070..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.factory.welcome; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.dom.client.TableCellElement; -import com.google.gwt.safehtml.shared.SafeHtmlUtils; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.RootPanel; -import com.google.gwt.user.client.ui.UIObject; - -/** @author Vitaliy Guliy */ -public class TooltipHint extends UIObject { - - private static TooltipHintUiBinder uiBinder = GWT.create(TooltipHintUiBinder.class); - - interface TooltipHintUiBinder extends UiBinder {} - - @UiField TableCellElement messageElement; - - @UiField DivElement closeButton; - - private int opacity = 0; - - private int top = 1; - private int delta = 3; - - public TooltipHint(String text) { - setElement(uiBinder.createAndBindUi(this)); - messageElement.setInnerHTML(SafeHtmlUtils.htmlEscape(text)); - - DOM.sinkEvents((com.google.gwt.dom.client.Element) closeButton.cast(), Event.ONCLICK); - DOM.setEventListener((com.google.gwt.dom.client.Element) closeButton.cast(), event -> close()); - - getElement().getStyle().setProperty("opacity", "0"); - getElement().getStyle().setTop(top, Unit.PX); - RootPanel.get().getElement().appendChild(getElement()); - - getElement().getStyle().setZIndex(Integer.MAX_VALUE); - - new Timer() { - @Override - public void run() { - opacity += 1; - top += delta; - getElement().getStyle().setTop(top, Unit.PX); - - if (opacity >= 10) { - getElement().getStyle().setProperty("opacity", "1"); - cancel(); - } else { - getElement().getStyle().setProperty("opacity", "0." + opacity); - } - } - }.scheduleRepeating(50); - } - - private void close() { - opacity = 10; - - // Hide animation - new Timer() { - @Override - public void run() { - opacity--; - if (opacity <= 0) { - cancel(); - getElement().getParentElement().removeChild(getElement()); - } else { - getElement().getStyle().setProperty("opacity", "0." + opacity); - } - } - }.scheduleRepeating(50); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.ui.xml deleted file mode 100644 index 67836ee8f59..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/factory/welcome/TooltipHint.ui.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - .tooltip-table { - position: relative; - top: 32px; - - margin-left: auto; - margin-right: auto; - - min-width: 500px; - max-width: 1200px; - - min-height: 37px; - /*min-height: 27px;*/ - - /*color: #AE7508;*/ - background-color: #444; - border-color: #FBCD75; - - /*color: #AE7508;*/ - /*background-color: #fdeb8f;*/ - /*border-color: #FBCD75;*/ - - border-width: 1px; - border-style: solid; - border-radius: 5px 5px 5px 5px; - - /*-webkit-box-shadow: 0 5px 10px 5px #313131;*/ - /*-moz-box-shadow: 0 5px 10px 5px #313131;*/ - /*box-shadow: 0 5px 10px 5px #313131;*/ - - -webkit-box-shadow: 0 5px 10px 5px #3A3A3A; - -moz-box-shadow: 0 5px 10px 5px #3A3A3A; - box-shadow: 0 5px 10px 5px #3A3A3A; - - } - - .tooltip-table-message { - background: transparent; - - /*color: #ae7508;*/ - color: #D8BE8B; - - font-family: Verdana, Bitstream Vera Sans, sans-serif; - font-size: 11px; - font-weight: normal; - font-style: normal; - line-height: 20px; - text-align: center; - vertical-align: middle; - padding-left: 10px; - padding-right: 15px; - text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1); - } - - .tooltip-table-button { - width: 23px; - text-align: center; - vertical-align: middle; - } - - .tooltip-close-button { - width: 13px; - height: 13px; - background-color: transparent; - cursor: pointer; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAhElEQVR42mNgoASc2WDy//xWh//Y5K7s8fp/+3gsqtyZ9Sb/t/YwgDG6xiu7PeFyKBpBCmESyBqRNYDwld1eqLahazwwjx1NgydWp2NoJKgBBtBtAPHxakD3A67AwakB3UYMjZihBPEDrlAFA1D44/I0skZQAkCxDaQRVyiBNGJoIBUAAC8TyL/BsskoAAAAAElFTkSuQmCC); - } - - .tooltip-close-button:HOVER { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAg0lEQVR42mNgoAQca9D7f7LV6j82uXM9Lv+vTg9HlTtWr/d/fQwDGKNrPNftDJdD0QhSCJNA1oisAYTPdbug2oaucVceI5oGZ6xOx9BIUAMMoNsA4uPVgO4HXIGDUwO6jRgaMUMJ4gdcoQoGoPDH5WlkjaAEgGIbSCOuUAJpxNBAKgAAAt+20WyQC0UAAAAASUVORK5CYII=); - } - - .tooltip-close-button:ACTIVE { - opacity: 0.5; - } - - - - - - - - -
        -
        -
        - -
        diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeApiModule.java deleted file mode 100644 index 155d537bb7d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeApiModule.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.filetypes; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; - -/** - * GIN module for configuring File Type API components. - * - * @author Evgen Vidolob - */ -public class FileTypeApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(FileTypeRegistry.class).to(FileTypeRegistryImpl.class).in(Singleton.class); - } - - @Provides - @Singleton - @Named("defaultFileType") - protected FileType provideDefaultFileType(Resources resources) { - return new FileType(resources.defaultFile(), null); - } - - @Provides - @Singleton - @Named("XMLFileType") - protected FileType provideXMLFile(Resources resources) { - return new FileType(resources.xmlFile(), "xml"); - } - - @Provides - @Singleton - @Named("TXTFileType") - protected FileType provideTXTFile(Resources resources) { - return new FileType(resources.defaultFile(), "txt"); - } - - @Provides - @Singleton - @Named("JsonFileType") - protected FileType provideJsonFile(Resources resources) { - return new FileType(resources.jsonFile(), "json"); - } - - @Provides - @Singleton - @Named("MDFileType") - protected FileType provideMDFile(Resources resources) { - return new FileType(resources.mdFile(), "md"); - } - - @Provides - @Singleton - @Named("PNGFileType") - protected FileType providePNGFile(Resources resources) { - return new FileType(resources.defaultImage(), "png"); - } - - @Provides - @Singleton - @Named("BMPFileType") - protected FileType provideBMPFile(Resources resources) { - return new FileType(resources.defaultImage(), "bmp"); - } - - @Provides - @Singleton - @Named("GIFFileType") - protected FileType provideGIFFile(Resources resources) { - return new FileType(resources.defaultImage(), "gif"); - } - - @Provides - @Singleton - @Named("ICOFileType") - protected FileType provideICOFile(Resources resources) { - return new FileType(resources.defaultImage(), "ico"); - } - - @Provides - @Singleton - @Named("SVGFileType") - protected FileType provideSVGFile(Resources resources) { - return new FileType(resources.defaultImage(), "svg"); - } - - @Provides - @Singleton - @Named("JPEFileType") - protected FileType provideJPEFile(Resources resources) { - return new FileType(resources.defaultImage(), "jpe"); - } - - @Provides - @Singleton - @Named("JPEGFileType") - protected FileType provideJPEGFile(Resources resources) { - return new FileType(resources.defaultImage(), "jpeg"); - } - - @Provides - @Singleton - @Named("JPGFileType") - protected FileType provideJPGFile(Resources resources) { - return new FileType(resources.defaultImage(), "jpg"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeProviderImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeProviderImpl.java deleted file mode 100644 index 574670ef521..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeProviderImpl.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.filetypes; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.stream.Collectors.toSet; - -import com.google.gwt.regexp.shared.RegExp; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.Optional; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry.FileTypeProvider; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Implementation of {@link FileTypeProvider} - * - * @author Roman Nikitenko - */ -@Singleton -public class FileTypeProviderImpl implements FileTypeProvider { - private Resources resources; - private FileTypeRegistry fileTypeRegistry; - private FileType unknownFileType; - - @Inject - public FileTypeProviderImpl( - Resources resources, - FileTypeRegistry fileTypeRegistry, - @Named("defaultFileType") FileType unknownFileType) { - this.resources = resources; - this.fileTypeRegistry = fileTypeRegistry; - this.unknownFileType = unknownFileType; - } - - public FileType get( - @Nullable SVGResource image, @NotNull String extension, @Nullable String namePattern) { - if (isNullOrEmpty(namePattern)) { - return getByExtension(image, extension); - } - - checkArgument(!isNullOrEmpty(extension), "Can not register File Type without extension"); - - Optional fileTypeOptional = - fileTypeRegistry - .getFileTypes() - .stream() - .filter(candidate -> extension.equals(candidate.getExtension())) - .filter(candidate -> canBeMergedByNamePattern(namePattern, candidate)) - .findAny(); - - FileType fileType = - fileTypeOptional.orElseGet(() -> registerNewFileType(image, extension, null)); - - fileType.addNamePattern(namePattern); - - return fileType; - } - - public FileType getByExtension(@Nullable SVGResource image, @NotNull String extension) { - checkArgument(!isNullOrEmpty(extension), "Can not register File Type without extension"); - - FileType duplicate = fileTypeRegistry.getFileTypeByExtension(extension); - if (duplicate != unknownFileType) { - return duplicate; - } - - return registerNewFileType(image, extension, null); - } - - public Set getByNamePattern(@Nullable SVGResource image, @NotNull String namePattern) { - checkArgument(!isNullOrEmpty(namePattern), "Can not register File Type without name pattern"); - - Set result = - fileTypeRegistry - .getFileTypes() - .stream() - .filter(candidate -> canBeMergedByNamePattern(namePattern, candidate)) - .peek(candidate -> candidate.addNamePattern(namePattern)) - .collect(toSet()); - - if (result.isEmpty()) { - result.add(registerNewFileType(image, null, namePattern)); - } - - return result; - } - - private FileType registerNewFileType(SVGResource image, String extension, String namePattern) { - FileType newFileType = - new FileType(image == null ? resources.defaultImage() : image, extension, namePattern); - - fileTypeRegistry.registerFileType(newFileType); - - return newFileType; - } - - private boolean canBeMergedByNamePattern(String namePattern, FileType fileTypeCandidate) { - String extensionCandidate = fileTypeCandidate.getExtension(); - if (!isNullOrEmpty(extensionCandidate) - && RegExp.compile(namePattern).test('.' + extensionCandidate)) { - return true; - } - - return fileTypeCandidate - .getNamePatterns() - .stream() - .anyMatch( - patternCandidate -> - namePattern.equals(patternCandidate) - || RegExp.quote(namePattern).equals(patternCandidate)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeRegistryImpl.java deleted file mode 100644 index 9262363dbf8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/filetypes/FileTypeRegistryImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.filetypes; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.stream.Collectors.toSet; -import static org.eclipse.che.ide.util.NameUtils.getFileExtension; - -import com.google.gwt.regexp.shared.RegExp; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Implementation of {@link FileTypeRegistry} - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class FileTypeRegistryImpl implements FileTypeRegistry { - private final FileType unknownFileType; - private final Set fileTypes = new HashSet<>(); - - @Inject - public FileTypeRegistryImpl(@Named("defaultFileType") FileType unknownFileType) { - this.unknownFileType = unknownFileType; - } - - @Override - public void registerFileType(FileType candidate) { - if (candidate == null) { - throw new IllegalArgumentException("Can not register Illegal File Type"); - } - - String extension = candidate.getExtension(); - FileType duplicate = getFileTypeByExtension(extension); - if (duplicate != unknownFileType && duplicate != candidate) { - throw new IllegalStateException( - "File Type with extension " + extension + " is already registered"); - } - - fileTypes.add(candidate); - } - - @Override - public List getRegisteredFileTypes() { - return new ArrayList<>(fileTypes); - } - - @Override - public Set getFileTypes() { - return new HashSet<>(fileTypes); - } - - @Override - public FileType getFileTypeByFile(VirtualFile file) { - String fileName = file.getName(); - String fileExtension = getFileExtension(fileName); - - FileType fileType = getFileTypeByFileName(fileName); - if (fileType == unknownFileType) { - fileType = getFileTypeByExtension(fileExtension); - } - return fileType != null ? fileType : unknownFileType; - } - - @Override - public FileType getFileTypeByExtension(String extension) { - if (isNullOrEmpty(extension)) { - return unknownFileType; - } - - Set typesByExtension = - fileTypes.stream().filter(type -> extension.equals(type.getExtension())).collect(toSet()); - if (typesByExtension.isEmpty()) { - return unknownFileType; - } - - String nameToTest = '.' + extension; - Optional fileType = - typesByExtension - .stream() - .filter(type -> doesFileNameMatchType(nameToTest, type)) - .findFirst(); - if (fileType.isPresent()) { - return fileType.get(); - } - - fileType = - typesByExtension.stream().filter(type -> type.getNamePatterns().isEmpty()).findFirst(); - return fileType.orElseGet(() -> typesByExtension.iterator().next()); - } - - @Override - public FileType getFileTypeByFileName(String name) { - if (isNullOrEmpty(name)) { - return unknownFileType; - } - - Set typesByNamePattern = - fileTypes.stream().filter(type -> doesFileNameMatchType(name, type)).collect(toSet()); - - if (typesByNamePattern.isEmpty()) { - return unknownFileType; - } - - if (typesByNamePattern.size() == 1) { - return typesByNamePattern.iterator().next(); - } - - String fileExtension = getFileExtension(name); - if (isNullOrEmpty(fileExtension)) { - return typesByNamePattern.iterator().next(); - } - - Optional fileType = - typesByNamePattern - .stream() - .filter(type -> fileExtension.equals(type.getExtension())) - .findFirst(); - return fileType.orElseGet(() -> typesByNamePattern.iterator().next()); - } - - private boolean doesFileNameMatchType(String nameToTest, FileType fileType) { - return fileType - .getNamePatterns() - .stream() - .anyMatch( - namePattern -> { - RegExp regExp = RegExp.compile(namePattern); - return regExp.test(nameToTest); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/HotKeyResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/HotKeyResources.java deleted file mode 100644 index eae02c51420..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/HotKeyResources.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.hotkeys; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.resources.client.DataResource; - -/** - * Resources for KeyBindings widget - * - * @author Alexander Andrienko - * @author Arnaud Kervern - */ -public interface HotKeyResources extends ClientBundle { - - @Source({"HotKeysCss.css", "org/eclipse/che/ide/api/ui/style.css"}) - HotKeyCss css(); - - interface HotKeyCss extends CssResource { - String item(); - - String floatRight(); - - String hotKey(); - - String emptyBorder(); - - String blackBorder(); - - String filter(); - - String categories(); - - String description(); - - String isGlobal(); - - /** Returns the CSS class name for scheme selection text label in 'Key Bindings' form. */ - String selectionLabel(); - - /** Returns the CSS class name for scheme selection list box in 'Key Bindings' form. */ - String selectionListBox(); - - /** Returns the CSS class name for scheme selection panel in 'Key Bindings' form. */ - String selectionPanel(); - } - - @DataResource.MimeType("image/svg+xml") - @Source("find-icon.svg") - DataResource findIcon(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogPresenter.java deleted file mode 100644 index 2726165d868..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogPresenter.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.hotkeys.dialog; - -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Node; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.hotkeys.HasHotKeyItems; -import org.eclipse.che.ide.api.editor.hotkeys.HotKeyItem; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.keybinding.Scheme; -import org.eclipse.che.ide.collections.js.JsoArray; -import org.eclipse.che.ide.util.StringUtils; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; -import org.eclipse.che.ide.util.input.KeyMapUtil; - -/** - * The class provides displaying list hotKeys for IDE and editor - * - * @author Alexander Andrienko - * @author Artem Zatsarynnyi - * @author Arnaud Kervern - */ -@Singleton -public class HotKeysDialogPresenter implements HotKeysDialogView.ActionDelegate { - - private static final String EDITOR_KEYBINDINGS = "Editor"; - private static final String IDE_KEYBINDINGS = "IDE"; - - private final HotKeysDialogView view; - private final KeyBindingAgent keyBindingAgent; - private final ActionManager actionManager; - private final EditorAgent editorAgent; - private final Resources resources; - - private List ideHotKey; - private List editorHotKeys; - private String selectedSchemeId; - - private Map> categories; - - @Inject - public HotKeysDialogPresenter( - HotKeysDialogView view, - KeyBindingAgent keyBindingAgent, - ActionManager actionManager, - EditorAgent editorAgent, - Resources resources) { - this.view = view; - this.keyBindingAgent = keyBindingAgent; - this.actionManager = actionManager; - this.editorAgent = editorAgent; - this.resources = resources; - - categories = new HashMap<>(); - view.setDelegate(this); - } - - @Override - public void showHotKeys() { - showHotKeys(keyBindingAgent.getActive().getSchemeId()); - } - - public void showHotKeys(String scheme) { - selectedSchemeId = keyBindingAgent.getScheme(scheme).getSchemeId(); - - ideHotKey = getIDEHotKey(); - editorHotKeys = getEditorHotKey(); - - categories.clear(); - if (!ideHotKey.isEmpty()) { - categories.put(IDE_KEYBINDINGS, ideHotKey); - } - if (!editorHotKeys.isEmpty()) { - categories.put(EDITOR_KEYBINDINGS, editorHotKeys); - } - - view.setData(categories); - view.setSchemes(selectedSchemeId, keyBindingAgent.getSchemes()); - view.renderKeybindings(); - view.showDialog(); - } - - private List getIDEHotKey() { - List ideHotKeys = new ArrayList<>(); - Scheme scheme = keyBindingAgent.getScheme(selectedSchemeId); - - for (String actionId : actionManager.getActionIds("")) { - boolean isGlobal = false; - CharCodeWithModifiers activeCharCodeWithModifiers = scheme.getKeyBinding(actionId); - if (activeCharCodeWithModifiers == null) { - activeCharCodeWithModifiers = keyBindingAgent.getKeyBinding(actionId); - isGlobal = true; - } - if (activeCharCodeWithModifiers != null) { - String hotKey = KeyMapUtil.getShortcutText(activeCharCodeWithModifiers); - String description = - actionManager.getAction(actionId).getTemplatePresentation().getDescription(); - if (description != null && !description.isEmpty()) { - ideHotKeys.add(new HotKeyItem(description, hotKey, isGlobal)); - } - } - } - - return ideHotKeys; - } - - private List getEditorHotKey() { - EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - if (activeEditor instanceof HasHotKeyItems) { - return ((HasHotKeyItems) activeEditor).getHotKeys(); - } - return Collections.emptyList(); - } - - @Override - public void onSaveClicked() { - keyBindingAgent.setActive(selectedSchemeId); - view.hideDialog(); - } - - @Override - public void onCloseClicked() { - view.hideDialog(); - } - - @Override - public void onPrintClicked() { - final JsoArray nodesArray = JsoArray.create(); - for (Map.Entry> entry : categories.entrySet()) { - nodesArray.add(wrapCategory(entry.getKey())); - for (HotKeyItem hotKeyItem : entry.getValue()) { - if (hotKeyItem.getActionDescription() != null) { - nodesArray.add( - wrapHotKey( - hotKeyItem.getHotKey(), - hotKeyItem.getActionDescription(), - hotKeyItem.isGlobal())); - } - } - } - - openWindowForPrinting(resources.printTemplate().getText(), nodesArray); - } - - private static Element wrapCategory(String text) { - final DivElement div = Document.get().createDivElement(); - div.setClassName("divCategory"); - div.setInnerText(text); - return div; - } - - private static Element wrapHotKey(String hotKey, String description, boolean global) { - final DivElement containerDiv = Document.get().createDivElement(); - final DivElement hotKeyDiv = Document.get().createDivElement(); - final DivElement descriptionDiv = Document.get().createDivElement(); - - hotKeyDiv.setInnerText(hotKey); - descriptionDiv.setInnerText(description); - - containerDiv.setClassName("divRow"); - hotKeyDiv.setClassName("divCell"); - hotKeyDiv.addClassName("hotKey"); - descriptionDiv.setClassName("divCell"); - descriptionDiv.addClassName("description"); - - containerDiv.appendChild(hotKeyDiv); - containerDiv.appendChild(descriptionDiv); - - return containerDiv; - } - - private static native void openWindowForPrinting(String htmlTemplate, JsoArray nodes) /*-{ - var printWindow = window.open("about:blank", "", "width=650,height=800"); - printWindow.document.write(htmlTemplate); - var container = printWindow.document.getElementById("key-bindings-container"); - for (var node in nodes) { - container.appendChild(nodes[node]); - } - printWindow.document.close(); // necessary for IE >= 10 - printWindow.focus(); // necessary for IE >= 10 - printWindow.print(); - printWindow.close(); - }-*/; - - @Override - public void onFilterValueChanged(String filteredText) { - categories.clear(); - - List ideFilteredHotKey = filterCategory(ideHotKey, filteredText); - if (!ideFilteredHotKey.isEmpty()) { - categories.put(IDE_KEYBINDINGS, ideFilteredHotKey); - } - - List editorFilteredHotKeys = filterCategory(editorHotKeys, filteredText); - if (!editorFilteredHotKeys.isEmpty()) { - categories.put(EDITOR_KEYBINDINGS, editorFilteredHotKeys); - } - - view.setData(categories); - view.renderKeybindings(); - } - - @Override - public void onSchemeSelectionChanged() { - showHotKeys(view.getSelectedScheme()); - } - - private List filterCategory(List hotKeyItems, String expectedText) { - List result = new ArrayList<>(); - for (HotKeyItem hotKeyItem : hotKeyItems) { - String description = hotKeyItem.getActionDescription(); - String keyBindings = hotKeyItem.getHotKey(); - boolean isFound = - description != null - && (StringUtils.containsIgnoreCase(description, expectedText) - || StringUtils.containsIgnoreCase(keyBindings, expectedText)); - if (isFound) { - result.add(hotKeyItem); - } - } - return result; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogView.java deleted file mode 100644 index 5dd9d479585..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogView.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.hotkeys.dialog; - -import com.google.inject.ImplementedBy; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.editor.hotkeys.HotKeyItem; -import org.eclipse.che.ide.api.keybinding.Scheme; -import org.eclipse.che.ide.api.mvp.View; - -/** - * This representation of widget that provides an ability to show hotKeys list for IDE and editor. - * - * @author Alexander Andrienko - * @author Artem Zatsarynnyi - * @author @author Arnaud Kervern - */ -@ImplementedBy(HotKeysDialogViewImpl.class) -public interface HotKeysDialogView extends View { - - /** Reset filter input and Show dialog. */ - void showDialog(); - - /** Clear and Render keybinding combination. */ - void renderKeybindings(); - - /** Hide dialog. */ - void hideDialog(); - - /** - * Set keybindings map for displaying. - * - * @param data map which binds categories keybindings and their keybindings - */ - void setData(Map> data); - - void setSchemes(String select, List schemes); - - /** Value of selected scheme in the ListBox field */ - String getSelectedScheme(); - - interface ActionDelegate { - - /** Show list hotKeys. */ - void showHotKeys(); - - /** Perform some action in response to user's clicking 'Save' button. */ - void onSaveClicked(); - - /** Perform some action in response to user's clicking 'Close' button. */ - void onCloseClicked(); - - /** Will be called when 'Print' button clicked. */ - void onPrintClicked(); - - /** - * Filter keybindings by filtered text in the description and keybindings. - * - * @param filteredText text for filter keybindings - */ - void onFilterValueChanged(String filteredText); - - /** Perform some action in response to scheme selection change */ - void onSchemeSelectionChanged(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.java deleted file mode 100644 index be091719eea..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.hotkeys.dialog; - -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.SpanElement; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.hotkeys.HotKeyItem; -import org.eclipse.che.ide.api.keybinding.Scheme; -import org.eclipse.che.ide.hotkeys.HotKeyResources; -import org.eclipse.che.ide.ui.list.CategoriesList; -import org.eclipse.che.ide.ui.list.Category; -import org.eclipse.che.ide.ui.list.CategoryRenderer; -import org.eclipse.che.ide.ui.listbox.CustomListBox; -import org.eclipse.che.ide.ui.window.Window; - -/** - * Implementation {@link HotKeysDialogView} - * - * @author Alexander Andrienko - * @author Artem Zatsarynnyi - * @author @author Arnaud Kervern - */ -@Singleton -public class HotKeysDialogViewImpl extends Window implements HotKeysDialogView { - - interface KeyMapViewImplUiBinder extends UiBinder {} - - private final HotKeyResources hotKeyResources; - - private final Category.CategoryEventDelegate keyBindingsEventDelegate = - (listItemBase, hotKeyItem) -> {}; - - private final CategoryRenderer keyBindingsRenderer = - new CategoryRenderer() { - @Override - public void renderElement(Element element, HotKeyItem hotKeyItem) { - element.setInnerText(hotKeyItem.getActionDescription()); - element.addClassName(hotKeyResources.css().description()); - if (hotKeyItem.isGlobal()) { - element.addClassName(hotKeyResources.css().isGlobal()); - } - - DivElement hotKeyElem = Document.get().createDivElement(); - hotKeyElem.setInnerText(hotKeyItem.getHotKey()); - hotKeyElem.addClassName(hotKeyResources.css().hotKey()); - hotKeyElem.addClassName(hotKeyResources.css().floatRight()); - - element.appendChild(hotKeyElem); - } - - @Override - public SpanElement renderCategory(Category category) { - SpanElement spanElement = Document.get().createSpanElement(); - spanElement.setInnerText(category.getTitle()); - return spanElement; - } - }; - - private CategoriesList list; - private List> categoriesList; - private ActionDelegate delegate; - private String filteredValue; - - Button saveButton; - - Button closeButton; - - Button printButton; - - @UiField FlowPanel category; - - @UiField TextBox filterInput; - - @UiField CustomListBox selectionListBox; - - @UiField FlowPanel selectionPanel; - - @Inject - public HotKeysDialogViewImpl( - KeyMapViewImplUiBinder uiBinder, - CoreLocalizationConstant locale, - org.eclipse.che.ide.Resources res, - HotKeyResources hotKeyResources) { - hotKeyResources.css().ensureInjected(); - - this.hotKeyResources = hotKeyResources; - - this.setTitle(locale.keyBindingsDialogTitle()); - this.setWidget(uiBinder.createAndBindUi(this)); - - saveButton = - addFooterButton( - locale.save(), "keybindings-saveButton-btn", event -> delegate.onSaveClicked(), true); - - closeButton = - addFooterButton( - locale.close(), "keybindings-closeButton-btn", event -> delegate.onCloseClicked()); - - printButton = - addFooterButton( - locale.print(), "keybindings-printButton-btn", event -> delegate.onPrintClicked()); - - list = new CategoriesList(res); - categoriesList = new ArrayList<>(); - category.add(list); - filterInput.getElement().setAttribute("placeholder", "Search"); - selectionListBox.addChangeHandler(changeEvent -> delegate.onSchemeSelectionChanged()); - - // Override DockLayoutPanel Overflow to correctly display ListBox - selectionPanel.getElement().getParentElement().getStyle().setOverflow(Style.Overflow.VISIBLE); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void showDialog() { - show(); - } - - @Override - public void hideDialog() { - hide(); - } - - @Override - protected void onHide() { - resetFilter(); - } - - @Override - public void renderKeybindings() { - list.clear(); - list.render(categoriesList, true); - } - - @Override - public void setData(Map> data) { - categoriesList.clear(); - for (Map.Entry> elem : data.entrySet()) { - categoriesList.add( - new Category<>( - elem.getKey(), keyBindingsRenderer, elem.getValue(), keyBindingsEventDelegate)); - } - } - - @Override - public String getSelectedScheme() { - return selectionListBox.getValue(); - } - - @Override - public void setSchemes(String select, List schemes) { - selectionListBox.clear(); - for (Scheme s : schemes) { - selectionListBox.addItem(s.getDescription(), s.getSchemeId()); - if (s.getSchemeId().equals(select)) { - // TODO Might be a better way to select item - selectionListBox.setSelectedIndex(selectionListBox.getItemCount() - 1); - } - } - } - - @UiHandler("filterInput") - public void onKeyUp(KeyUpEvent keyUpEvent) { - String value = filterInput.getText(); - if (!filterInput.getText().equals(filteredValue)) { - filteredValue = value; - delegate.onFilterValueChanged(value); - } - } - - private void resetFilter() { - filterInput.setText(""); - filterInput.setFocus(true); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.ui.xml deleted file mode 100644 index bfed51fc82c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/hotkeys/dialog/HotKeysDialogViewImpl.ui.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - Scheme: - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/DefaultIconsRegistrar.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/DefaultIconsRegistrar.java deleted file mode 100644 index ce1648365bc..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/DefaultIconsRegistrar.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.icon; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; - -/** @author Evgen Vidolob */ -@Singleton -public class DefaultIconsRegistrar { - - @Inject - public DefaultIconsRegistrar(IconRegistry iconRegistry, Resources resources) { - iconRegistry.registerIcon( - new Icon( - "default.projecttype.small.icon", "default/project.png", resources.defaultProject())); - - iconRegistry.registerIcon( - new Icon("default.folder.small.icon", "default/folder.png", resources.defaultFolder())); - - iconRegistry.registerIcon( - new Icon("default.file.small.icon", "default/file.png", resources.defaultFile())); - - iconRegistry.registerIcon(new Icon("default", "default/default.jpg", resources.defaultIcon())); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/IconRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/IconRegistryImpl.java deleted file mode 100644 index 962040eefee..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/icon/IconRegistryImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.icon; - -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.ide.api.icon.Icon; -import org.eclipse.che.ide.api.icon.IconRegistry; - -/** - * Implementation of {@link IconRegistry}. - * - * @author Vitaly Parfonov - * @author Artem Zatsarynnyi - */ -public class IconRegistryImpl implements IconRegistry { - - private Map icons = new HashMap<>(); - - @Override - public void registerIcon(Icon icon) { - icons.put(icon.getId(), icon); - } - - @Override - public Icon getIcon(String id) { - Icon icon = icons.get(id); - if (icon == null) { - final String prefix = id.split("\\.")[0]; - final String defaultIconId = id.replaceFirst(prefix, "default"); - icon = icons.get(defaultIconId); - if (icon == null) { - icon = getGenericIcon(); - } - } - return icon; - } - - @Override - public Icon getIconIfExist(String id) { - return icons.get(id); - } - - @Override - public Icon getGenericIcon() { - return icons.get("default"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewer.java deleted file mode 100644 index 9b3952e2129..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewer.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.imageviewer; - -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.HasHorizontalAlignment; -import com.google.gwt.user.client.ui.HasVerticalAlignment; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.editor.AbstractEditorPresenter; -import org.eclipse.che.ide.api.editor.EditorAgent.OpenEditorCallback; -import org.eclipse.che.ide.api.editor.EditorInput; -import org.eclipse.che.ide.api.editor.events.FileEvent; -import org.eclipse.che.ide.api.editor.events.FileEvent.FileEventHandler; -import org.eclipse.che.ide.api.parts.WorkspaceAgent; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.dialogs.CancelCallback; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmCallback; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Is used for displaying images in editor area. - * - * @author Ann Shumilova - */ -public class ImageViewer extends AbstractEditorPresenter implements FileEventHandler { - - private ImageViewerResources resources; - private CoreLocalizationConstant constant; - private DialogFactory dialogFactory; - private WorkspaceAgent workspaceAgent; - private AgentURLModifier urlModifier; - private ScrollPanel editorView; - - @Inject - public ImageViewer( - ImageViewerResources resources, - CoreLocalizationConstant constant, - DialogFactory dialogFactory, - EventBus eventBus, - WorkspaceAgent workspaceAgent, - AgentURLModifier urlModifier) { - this.resources = resources; - this.constant = constant; - this.dialogFactory = dialogFactory; - this.workspaceAgent = workspaceAgent; - this.urlModifier = urlModifier; - - resources.imageViewerCss().ensureInjected(); - - eventBus.addHandler(FileEvent.TYPE, this); - } - - /** {@inheritDoc} */ - @Override - public void doSave() {} - - @Override - public void doSave(AsyncCallback callback) {} - - /** {@inheritDoc} */ - @Override - public void doSaveAs() {} - - /** {@inheritDoc} */ - @Override - public void activate() {} - - /** {@inheritDoc} */ - @NotNull - @Override - public String getTitle() { - return input.getName(); - } - - /** {@inheritDoc} */ - @Override - public SVGResource getTitleImage() { - return input.getSVGResource(); - } - - /** {@inheritDoc} */ - @Override - public String getTitleToolTip() { - return null; - } - - /** {@inheritDoc} */ - @Override - public void onClose(@NotNull final AsyncCallback callback) { - if (isDirty()) { - dialogFactory - .createConfirmDialog( - constant.askWindowCloseTitle(), - constant.messagesSaveChanges(getEditorInput().getName()), - new ConfirmCallback() { - @Override - public void accepted() { - doSave(); - handleClose(); - callback.onSuccess(null); - } - }, - new CancelCallback() { - @Override - public void cancelled() { - handleClose(); - callback.onSuccess(null); - } - }) - .show(); - } else { - handleClose(); - callback.onSuccess(null); - } - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - VerticalPanel panel = new VerticalPanel(); - panel.setSize("100%", "100%"); - panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); - panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); - panel.add(getImage()); - editorView = new ScrollPanel(panel); - editorView.getElement().getFirstChildElement().getStyle().setHeight(100, Unit.PCT); - container.setWidget(editorView); - } - - /** - * Image to display file with image type. - * - * @return {@link Image} - */ - private Image getImage() { - String contentLink = urlModifier.modify(input.getFile().getContentUrl()); - Image image = (contentLink != null) ? new Image(contentLink) : new Image(); - image.setStyleName(resources.imageViewerCss().imageViewer()); - return image; - } - - /** {@inheritDoc} */ - @Override - protected void initializeEditor(OpenEditorCallback callback) { - callback.onEditorOpened(this); - } - - /** {@inheritDoc} */ - @Override - public void close(final boolean save) { - // nothing to do - } - - /** {@inheritDoc} */ - @Override - public IsWidget getView() { - return editorView; - } - - /** {@inheritDoc} */ - @Override - public void onFileOperation(FileEvent event) { - if (event.getOperationType() != FileEvent.FileOperation.CLOSE) { - return; - } - - final Path eventFilePath = event.getFile().getLocation(); - final Path filePath = input.getFile().getLocation(); - if (filePath.equals(eventFilePath)) { - workspaceAgent.removePart(this); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerProvider.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerProvider.java deleted file mode 100644 index b7d7d7257b7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerProvider.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.imageviewer; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorProvider; - -/** - * Provider for image editor(only displaying images). - * - * @author Ann Shumilova - */ -public class ImageViewerProvider implements EditorProvider { - private Provider editorProvider; - - @Inject - public ImageViewerProvider(Provider editorProvider) { - super(); - this.editorProvider = editorProvider; - } - - @Override - public String getId() { - return "codenvyImageViewer"; - } - - @Override - public String getDescription() { - return "Codenvy Image Viewer"; - } - - @Override - public EditorPartPresenter getEditor() { - return editorProvider.get(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerResources.java deleted file mode 100644 index d6b4d6c4da9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/ImageViewerResources.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.imageviewer; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.resources.client.ImageResource; - -/** Resources for the image viewer. */ -public interface ImageViewerResources extends ClientBundle { - - @Source({"imageViewer.css", "org/eclipse/che/ide/api/ui/style.css"}) - Css imageViewerCss(); - - /** Image viewer backgroupd image. */ - @Source("image-viewer-bg.png") - ImageResource imageViewerBackground(); - - /** CssResource for the image viewer. */ - public interface Css extends CssResource { - /** The style for the image viewer. */ - String imageViewer(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/PreviewImageAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/PreviewImageAction.java deleted file mode 100644 index 4901662340e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/imageviewer/PreviewImageAction.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.imageviewer; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.filetypes.FileType; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.util.browser.BrowserUtils; - -/** - * Action for previewing images in dedicated window. - * - * @author Vitaliy Guliy - */ -@Singleton -public class PreviewImageAction extends AbstractPerspectiveAction { - - private final AgentURLModifier agentURLModifier; - private final AppContext appContext; - - private final List extensions = new ArrayList<>(); - - @Inject - public PreviewImageAction( - AgentURLModifier agentURLModifier, - AppContext appContext, - CoreLocalizationConstant constant, - @Named("PNGFileType") FileType pngFile, - @Named("BMPFileType") FileType bmpFile, - @Named("GIFFileType") FileType gifFile, - @Named("ICOFileType") FileType iconFile, - @Named("SVGFileType") FileType svgFile, - @Named("JPEFileType") FileType jpeFile, - @Named("JPEGFileType") FileType jpegFile, - @Named("JPGFileType") FileType jpgFile) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - constant.actionPreviewImageTitle(), - constant.actionPreviewImageDescription()); - this.agentURLModifier = agentURLModifier; - this.appContext = appContext; - - extensions.add(pngFile.getExtension()); - extensions.add(bmpFile.getExtension()); - extensions.add(gifFile.getExtension()); - extensions.add(iconFile.getExtension()); - extensions.add(svgFile.getExtension()); - extensions.add(jpeFile.getExtension()); - extensions.add(jpegFile.getExtension()); - extensions.add(jpgFile.getExtension()); - } - - @Override - public void updateInPerspective(ActionEvent e) { - final Resource[] resources = appContext.getResources(); - if (resources != null && resources.length == 1) { - final Resource selectedResource = resources[0]; - if (Resource.FILE == selectedResource.getResourceType()) { - final String fileExtension = ((File) selectedResource).getExtension(); - e.getPresentation().setEnabledAndVisible(extensions.contains(fileExtension)); - return; - } - } - - e.getPresentation().setEnabledAndVisible(false); - } - - @Override - public void actionPerformed(ActionEvent e) { - final Resource selectedResource = appContext.getResource(); - if (Resource.FILE == selectedResource.getResourceType()) { - final String contentUrl = ((File) selectedResource).getContentUrl(); - BrowserUtils.openInNewTab(agentURLModifier.modify(contentUrl)); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/ExecAgentJsonRpcInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/ExecAgentJsonRpcInitializer.java deleted file mode 100644 index 9bec0b19a0b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/ExecAgentJsonRpcInitializer.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.jsonrpc; - -import static java.util.Collections.singletonMap; -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_EXEC_AGENT_WEBSOCKET_REFERENCE; - -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.Optional; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.event.ExecAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.event.ExecAgentServerStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.util.loging.Log; - -/** Initializes JSON-RPC connection to the ws-agent server. */ -@Singleton -public class ExecAgentJsonRpcInitializer { - - private final AppContext appContext; - private final JsonRpcInitializer initializer; - private final AgentURLModifier agentURLModifier; - - @Inject - public ExecAgentJsonRpcInitializer( - JsonRpcInitializer initializer, - AppContext appContext, - EventBus eventBus, - AgentURLModifier agentURLModifier) { - this.appContext = appContext; - this.initializer = initializer; - this.agentURLModifier = agentURLModifier; - - eventBus.addHandler( - ExecAgentServerRunningEvent.TYPE, - event -> initializeJsonRpcService(event.getMachineName())); - eventBus.addHandler( - ExecAgentServerStoppedEvent.TYPE, event -> initializer.terminate(event.getMachineName())); - - // in case workspace is already running - eventBus.addHandler( - BasicIDEInitializedEvent.TYPE, - event -> { - final WorkspaceImpl workspace = appContext.getWorkspace(); - - if (workspace.getStatus() == RUNNING) { - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime != null) { - runtime - .getMachines() - .values() - .stream() - .map(MachineImpl::getName) - .forEach(this::initializeJsonRpcService); - } - } - }); - } - - private void initializeJsonRpcService(String machineName) { - Log.debug(ExecAgentJsonRpcInitializer.class, "Web socket agent started event caught."); - - try { - internalInitialize(machineName); - } catch (Exception e) { - Log.debug(ExecAgentJsonRpcInitializer.class, "Failed, will try one more time."); - - new Timer() { - @Override - public void run() { - internalInitialize(machineName); - } - }.schedule(1_000); - } - } - - private void internalInitialize(String machineName) { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime == null) { - return; // workspace is stopped - } - - runtime - .getMachineByName(machineName) - .ifPresent( - machine -> { - Optional execAgentServer = - machine.getServerByName(SERVER_EXEC_AGENT_WEBSOCKET_REFERENCE); - - execAgentServer.ifPresent( - server -> - initializer.initialize( - machine.getName(), - singletonMap("url", agentURLModifier.modify(server.getUrl())))); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcModule.java deleted file mode 100644 index 3a444de4f39..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/JsonRpcModule.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.jsonrpc; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcComposer; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMarshaller; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcQualifier; -import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcUnmarshaller; -import org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerConfigurator; -import org.eclipse.che.api.core.jsonrpc.commons.RequestProcessor; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.jsonrpc.commons.TimeoutActionRunner; -import org.eclipse.che.ide.core.ServerSubscriptionBroadcaster; - -/** GIN module for configuring JSON-RPC protocol implementation components. */ -public class JsonRpcModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(WsMasterJsonRpcInitializer.class).asEagerSingleton(); - bind(WsAgentJsonRpcInitializer.class).asEagerSingleton(); - bind(ExecAgentJsonRpcInitializer.class).asEagerSingleton(); - - bind(JsonRpcInitializer.class).to(WebSocketJsonRpcInitializer.class); - - install(new GinFactoryModuleBuilder().build(RequestHandlerConfigurator.class)); - install(new GinFactoryModuleBuilder().build(RequestTransmitter.class)); - - bind(JsonRpcMarshaller.class).to(ElementalJsonRpcMarshaller.class); - bind(JsonRpcUnmarshaller.class).to(ElementalJsonRpcUnmarshaller.class); - bind(JsonRpcComposer.class).to(ElementalJsonRpcComposer.class); - bind(JsonRpcQualifier.class).to(ElementalJsonRpcQualifier.class); - - bind(RequestProcessor.class).to(ClientSideRequestProcessor.class); - bind(TimeoutActionRunner.class).to(ClientSideTimeoutActionRunner.class); - - bind(ServerSubscriptionBroadcaster.class).asEagerSingleton(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsAgentJsonRpcInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsAgentJsonRpcInitializer.java deleted file mode 100644 index 1b3561567f1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsAgentJsonRpcInitializer.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.jsonrpc; - -import static java.util.Collections.emptySet; -import static java.util.Collections.singletonMap; -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; - -import com.google.gwt.user.client.Timer; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.Optional; -import javax.inject.Singleton; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.core.AgentURLModifier; -import org.eclipse.che.ide.util.loging.Log; - -/** Initializes JSON-RPC connection to the ws-agent server. */ -@Singleton -public class WsAgentJsonRpcInitializer { - - private final AppContext appContext; - private final JsonRpcInitializer initializer; - private final AgentURLModifier agentURLModifier; - private final WsAgentServerUtil wsAgentServerUtil; - - @Inject - public WsAgentJsonRpcInitializer( - JsonRpcInitializer initializer, - AppContext appContext, - EventBus eventBus, - AgentURLModifier agentURLModifier, - WsAgentServerUtil wsAgentServerUtil) { - this.appContext = appContext; - this.initializer = initializer; - this.agentURLModifier = agentURLModifier; - this.wsAgentServerUtil = wsAgentServerUtil; - - eventBus.addHandler(WsAgentServerRunningEvent.TYPE, event -> initializeJsonRpcService()); - eventBus.addHandler( - WsAgentServerStoppedEvent.TYPE, - event -> initializer.terminate(WS_AGENT_JSON_RPC_ENDPOINT_ID)); - - // in case ws-agent is already running - eventBus.addHandler( - BasicIDEInitializedEvent.TYPE, - event -> { - if (appContext.getWorkspace().getStatus() == RUNNING) { - initializeJsonRpcService(); - } - }); - } - - private void initializeJsonRpcService() { - Log.debug(WsAgentJsonRpcInitializer.class, "Web socket agent started event caught."); - - try { - internalInitialize(); - } catch (Exception e) { - Log.debug(WsAgentJsonRpcInitializer.class, "Failed, will try one more time."); - - new Timer() { - @Override - public void run() { - internalInitialize(); - } - }.schedule(1_000); - } - } - - private void internalInitialize() { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime == null) { - return; // workspace is stopped - } - - wsAgentServerUtil - .getWsAgentWebSocketServer() - .ifPresent( - server -> { - String wsAgentWebSocketUrl = agentURLModifier.modify(server.getUrl()); - String separator = wsAgentWebSocketUrl.contains("?") ? "&" : "?"; - Optional applicationWebSocketId = appContext.getApplicationId(); - String queryParams = - applicationWebSocketId.map(id -> separator + "clientId=" + id).orElse(""); - - initializer.initialize( - WS_AGENT_JSON_RPC_ENDPOINT_ID, - singletonMap("url", wsAgentWebSocketUrl + queryParams), - emptySet()); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsMasterJsonRpcInitializer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsMasterJsonRpcInitializer.java deleted file mode 100644 index f9703f9e576..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/jsonrpc/WsMasterJsonRpcInitializer.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.jsonrpc; - -import static com.google.common.base.MoreObjects.firstNonNull; -import static java.util.Collections.singletonMap; -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.STOPPED; -import static org.eclipse.che.api.core.model.workspace.runtime.ServerStatus.RUNNING; -import static org.eclipse.che.api.workspace.shared.Constants.ERROR_MESSAGE_ATTRIBUTE_NAME; -import static org.eclipse.che.api.workspace.shared.Constants.INSTALLER_LOG_METHOD; -import static org.eclipse.che.api.workspace.shared.Constants.INSTALLER_STATUS_CHANGED_METHOD; -import static org.eclipse.che.api.workspace.shared.Constants.LINK_REL_ENVIRONMENT_STATUS_CHANNEL; -import static org.eclipse.che.api.workspace.shared.Constants.MACHINE_STATUS_CHANGED_METHOD; -import static org.eclipse.che.api.workspace.shared.Constants.RUNTIME_LOG_METHOD; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_EXEC_AGENT_HTTP_REFERENCE; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_STATUS_CHANGED_METHOD; -import static org.eclipse.che.api.workspace.shared.Constants.SERVER_TERMINAL_REFERENCE; -import static org.eclipse.che.api.workspace.shared.Constants.WORKSPACE_STATUS_CHANGED_METHOD; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_MASTER_JSON_RPC_ENDPOINT_ID; - -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import javax.inject.Singleton; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.jsonrpc.SubscriptionManagerClient; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.event.ExecAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.event.ServerRunningEvent; -import org.eclipse.che.ide.api.workspace.event.TerminalAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStartingEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.event.WsAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.ServerImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.context.AppContextImpl; -import org.eclipse.che.ide.workspace.WorkspaceServiceClient; -import org.eclipse.che.security.oauth.SecurityTokenProvider; - -/** Initializes JSON-RPC connection to the workspace master. */ -@Singleton -public class WsMasterJsonRpcInitializer { - - private final JsonRpcInitializer initializer; - private final RequestTransmitter requestTransmitter; - private final AppContext appContext; - private final EventBus eventBus; - private final SubscriptionManagerClient subscriptionManagerClient; - private final WorkspaceServiceClient workspaceServiceClient; - private final SecurityTokenProvider securityTokenProvider; - private final WsAgentServerUtil wsAgentServerUtil; - - private boolean initialized = false; - - @Inject - public WsMasterJsonRpcInitializer( - JsonRpcInitializer initializer, - RequestTransmitter requestTransmitter, - AppContext appContext, - EventBus eventBus, - SubscriptionManagerClient subscriptionManagerClient, - WorkspaceServiceClient workspaceServiceClient, - SecurityTokenProvider securityTokenProvider, - WsAgentServerUtil wsAgentServerUtil) { - this.initializer = initializer; - this.requestTransmitter = requestTransmitter; - this.appContext = appContext; - this.eventBus = eventBus; - this.subscriptionManagerClient = subscriptionManagerClient; - this.workspaceServiceClient = workspaceServiceClient; - this.securityTokenProvider = securityTokenProvider; - this.wsAgentServerUtil = wsAgentServerUtil; - - eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> initialize()); - eventBus.addHandler(WorkspaceStartingEvent.TYPE, e -> initialize()); - } - - private void initialize() { - if (initialized) { - return; - } - - securityTokenProvider - .getSecurityToken() - .then( - token -> { - WorkspaceImpl workspace = appContext.getWorkspace(); - String url = workspace.getLinks().get(LINK_REL_ENVIRONMENT_STATUS_CHANNEL); - - if (workspace.getStatus() == STOPPED || url == null) { - return; - } - - char separator = url.contains("?") ? '&' : '?'; - Optional appWebSocketId = appContext.getApplicationId(); - String queryParams = - separator - + "token=" - + token - + appWebSocketId.map(id -> "&clientId=" + id).orElse(""); - String wsMasterEndpointURL = url + queryParams; - - Map initProperties = singletonMap("url", wsMasterEndpointURL); - - Set initActions = new HashSet<>(); - initActions.add(this::subscribeToEvents); - - if (!appWebSocketId.isPresent()) { - initActions.add(this::processWsId); - } - - initActions.add(this::checkStatuses); - - initializer.initialize(WS_MASTER_JSON_RPC_ENDPOINT_ID, initProperties, initActions); - - initialized = true; - }); - } - - private void processWsId() { - requestTransmitter - .newRequest() - .endpointId(WS_MASTER_JSON_RPC_ENDPOINT_ID) - .methodName("websocketIdService/getId") - .noParams() - .sendAndReceiveResultAsString() - .onSuccess(appContext::setApplicationWebsocketId); - } - - private void terminate() { - initializer.terminate(WS_MASTER_JSON_RPC_ENDPOINT_ID); - } - - private void subscribeToEvents() { - Map scope = singletonMap("workspaceId", appContext.getWorkspaceId()); - - subscriptionManagerClient.subscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, WORKSPACE_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.subscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, MACHINE_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.subscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, SERVER_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.subscribe(WS_MASTER_JSON_RPC_ENDPOINT_ID, RUNTIME_LOG_METHOD, scope); - subscriptionManagerClient.subscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, INSTALLER_LOG_METHOD, scope); - subscriptionManagerClient.subscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, INSTALLER_STATUS_CHANGED_METHOD, scope); - } - - private void unsubscribeFromEvents() { - Map scope = singletonMap("workspaceId", appContext.getWorkspaceId()); - - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, WORKSPACE_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, MACHINE_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, SERVER_STATUS_CHANGED_METHOD, scope); - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, RUNTIME_LOG_METHOD, scope); - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, INSTALLER_LOG_METHOD, scope); - subscriptionManagerClient.unSubscribe( - WS_MASTER_JSON_RPC_ENDPOINT_ID, INSTALLER_STATUS_CHANGED_METHOD, scope); - } - - /** - * Workspace may be running "immediately" (~500 msec) on some infrastructures. And IDE may - * subscribe to statuses really late. So need to check whether we missed any status event. - */ - private void checkStatuses() { - workspaceServiceClient - .getWorkspace(appContext.getWorkspaceId()) - .then( - workspace -> { - WorkspaceImpl workspacePrev = appContext.getWorkspace(); - - // Update workspace model in AppContext before firing an event. - // Because AppContext always must return an actual workspace model. - ((AppContextImpl) appContext).setWorkspace(workspace); - - if (workspace.getStatus() != workspacePrev.getStatus()) { - if (workspace.getStatus() == WorkspaceStatus.STOPPED) { - String cause = workspace.getAttributes().get(ERROR_MESSAGE_ATTRIBUTE_NAME); - eventBus.fireEvent( - new WorkspaceStoppedEvent(true, firstNonNull(cause, "Reason is unknown."))); - return; - } else if (workspace.getStatus() == WorkspaceStatus.RUNNING) { - eventBus.fireEvent(new WorkspaceRunningEvent()); - } - } - - for (MachineImpl machine : workspace.getRuntime().getMachines().values()) { - for (ServerImpl server : machine.getServers().values()) { - Optional machinePrev = - workspacePrev.getRuntime().getMachineByName(machine.getName()); - if (machinePrev.isPresent()) { - Optional serverPrev = - machinePrev.get().getServerByName(server.getName()); - if (serverPrev.isPresent()) { - if (server.getStatus() != serverPrev.get().getStatus()) { - checkServerStatus(server, machine); - } - } - } - } - } - }); - } - - private void checkServerStatus(ServerImpl server, MachineImpl machine) { - if (server.getStatus() == RUNNING) { - eventBus.fireEvent(new ServerRunningEvent(server.getName(), machine.getName())); - - String wsAgentHttpServerRef = wsAgentServerUtil.getWsAgentHttpServerReference(); - // fire events for the often used servers - if (wsAgentHttpServerRef.equals(server.getName())) { - eventBus.fireEvent(new WsAgentServerRunningEvent(machine.getName())); - } else if (SERVER_TERMINAL_REFERENCE.equals(server.getName())) { - eventBus.fireEvent(new TerminalAgentServerRunningEvent(machine.getName())); - } else if (SERVER_EXEC_AGENT_HTTP_REFERENCE.equals(server.getName())) { - eventBus.fireEvent(new ExecAgentServerRunningEvent(machine.getName())); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/keybinding/KeyBindingManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/keybinding/KeyBindingManager.java deleted file mode 100644 index a706c28cf84..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/keybinding/KeyBindingManager.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.keybinding; - -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.dom.client.AreaElement; -import com.google.gwt.dom.client.InputElement; -import com.google.inject.Inject; -import elemental.dom.Element; -import elemental.events.Event; -import elemental.events.EventListener; -import elemental.events.KeyboardEvent; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.keybinding.Scheme; -import org.eclipse.che.ide.api.keybinding.SchemeImpl; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.util.browser.UserAgent; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.input.CharCodeWithModifiers; -import org.eclipse.che.ide.util.input.SignalEvent; -import org.eclipse.che.ide.util.input.SignalEventUtils; - -/** - * Implementation of the {@link KeyBindingAgent}. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Arnaud Kervern - */ -public class KeyBindingManager implements KeyBindingAgent { - - public static final String SCHEME_ECLIPSE_ID = "ide.ui.keyBinding.eclipse"; - public static final String SCHEME_GLOBAL_ID = "ide.ui.keyBinding.global"; - - private final PresentationFactory presentationFactory; - - private final Map schemes = new HashMap<>(); - - private String activeScheme; - private ActionManager actionManager; - private boolean disabled; - - @Inject - public KeyBindingManager(ActionManager actionManager) { - this.actionManager = actionManager; - - addScheme(new SchemeImpl(SCHEME_GLOBAL_ID, "Global")); - addScheme(new SchemeImpl(SCHEME_ECLIPSE_ID, "Eclipse Scheme")); - - // TODO check user settings - activeScheme = SCHEME_GLOBAL_ID; - - presentationFactory = new PresentationFactory(); - - // Attach the listeners. - final Element documentElement = Elements.getDocument().getDocumentElement(); - EventListener downListener = - new EventListener() { - @Override - public void handleEvent(Event event) { - - if (disabled) { - return; - } - - SignalEvent signalEvent = SignalEventUtils.create(event, false); - if (signalEvent == null) { - return; - } - - /* - Temporary solution to prevent calling actions if focus is in input element. - The problem in that, some actions, may be bound to Ctrl+C/X/V/Z or Delete so - We should allow browser to process event natively instead of calling actions. - Need to be reworked in nearest future. */ - final JavaScriptObject jso = (JavaScriptObject) event.getTarget(); - if (InputElement.is(jso) || AreaElement.is(jso)) { - return; - } - - // handle event in active scheme - int digest = CharCodeWithModifiers.computeKeyDigest(signalEvent); - preventDefaultBrowserAction((KeyboardEvent) event, digest); - - List actionIds = getActive().getActionIds(digest); - - if (!actionIds.isEmpty()) { - runActions(actionIds, event); - } - // else handle event in global scheme - else if (!(actionIds = getGlobal().getActionIds(digest)).isEmpty()) { - runActions(actionIds, event); - } - - // default, lets this event handle other part of the IDE - } - }; - if (UserAgent.isFirefox()) { - // firefox fires keypress events - documentElement.addEventListener(Event.KEYPRESS, downListener, true); - } else { - // webkit fires keydown events - documentElement.addEventListener(Event.KEYDOWN, downListener, true); - } - } - - private void preventDefaultBrowserAction(KeyboardEvent keyboardEvent, int digest) { - // prevent browser default action on Ctrl + S - if (digest == 65651) { - keyboardEvent.preventDefault(); - } - } - - /** - * Finds and runs an action cancelling original key event - * - * @param actionIds list containing action ids - * @param keyEvent original key event - */ - private void runActions(List actionIds, Event keyEvent) { - for (String actionId : actionIds) { - Action action = actionManager.getAction(actionId); - if (action == null) { - continue; - } - ActionEvent e = new ActionEvent(presentationFactory.getPresentation(action), actionManager); - action.update(e); - - if (e.getPresentation().isEnabled()) { - /** Stop handling the key event */ - keyEvent.preventDefault(); - keyEvent.stopPropagation(); - - /** Perform the action */ - action.actionPerformed(e); - } - } - } - - /** {@inheritDoc} */ - @Override - public Scheme getGlobal() { - return getScheme(SCHEME_GLOBAL_ID); - } - - /** {@inheritDoc} */ - @Override - public Scheme getEclipse() { - return getScheme(SCHEME_ECLIPSE_ID); - } - - /** {@inheritDoc} */ - @Override - public Scheme getActive() { - return getScheme(activeScheme); - } - - public void setActive(String scheme) { - if (schemes.containsKey(scheme)) { - activeScheme = scheme; - } else { - // Fallback on global scheme - activeScheme = SCHEME_GLOBAL_ID; - } - } - - /** {@inheritDoc} */ - @Override - public void addScheme(Scheme scheme) { - schemes.put(scheme.getSchemeId(), scheme); - } - - /** {@inheritDoc} */ - @Override - public List getSchemes() { - return new ArrayList<>(this.schemes.values()); - } - - /** {@inheritDoc} */ - @Override - public Scheme getScheme(String id) { - if (schemes.containsKey(id)) { - return schemes.get(id); - } - return null; - } - - /** {@inheritDoc} */ - @Nullable - @Override - public CharCodeWithModifiers getKeyBinding(@NotNull String actionId) { - CharCodeWithModifiers keyBinding = getActive().getKeyBinding(actionId); - if (keyBinding != null) return keyBinding; - else { - return getGlobal().getKeyBinding(actionId); - } - } - - @Override - public void disable() { - disabled = true; - } - - @Override - public void enable() { - disabled = false; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineApiModule.java deleted file mode 100644 index 34f87af234f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineApiModule.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.inject.Singleton; -import com.google.inject.name.Names; -import org.eclipse.che.api.workspace.shared.Constants; -import org.eclipse.che.ide.machine.chooser.MachineChooserView; -import org.eclipse.che.ide.machine.chooser.MachineChooserViewImpl; -import org.eclipse.che.requirejs.ModuleHolder; - -/** GIN module for configuring Machine API related components. */ -public class MachineApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(ProcessesOutputRestorer.class).asEagerSingleton(); - bind(MachineFailNotifier.class).asEagerSingleton(); - - bind(MachineChooserView.class).to(MachineChooserViewImpl.class); - bind(ModuleHolder.class).in(Singleton.class); - bindConstant() - .annotatedWith(Names.named("machine.extension.api_port")) - .to(Constants.WS_AGENT_PORT); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineFailNotifier.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineFailNotifier.java deleted file mode 100644 index 1cf9600525f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineFailNotifier.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.workspace.event.MachineFailedEvent; - -/** Notifies about failing of any machine. */ -@Singleton -class MachineFailNotifier { - - @Inject - MachineFailNotifier( - EventBus eventBus, Provider notificationManagerProvider) { - eventBus.addHandler( - MachineFailedEvent.TYPE, - event -> { - if (!isNullOrEmpty(event.getError())) { - notificationManagerProvider.get().notify(event.getError(), FAIL, EMERGE_MODE); - } - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineResources.java deleted file mode 100644 index 1718cb9dbc4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/MachineResources.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Interface for machine resources */ -public interface MachineResources extends ClientBundle { - @Source({"machine.css", "org/eclipse/che/ide/api/ui/style.css"}) - MachineResources.Css getCss(); - - /** Returns the icon for clear console button. */ - @Source("console/clear-logs.svg") - SVGResource clear(); - - /** Returns the new icon for devmachine. */ - @Source("cube.svg") - SVGResource devMachine(); - - @Source("process/output-icon.svg") - SVGResource output(); - - @Source("process/terminal-icon.svg") - SVGResource terminal(); - - @Source("process/terminal-tree-icon.svg") - SVGResource terminalTreeIcon(); - - @Source("process/add-terminal.svg") - SVGResource addTerminalIcon(); - - @Source("process/re-run.svg") - SVGResource reRunIcon(); - - @Source("process/stop.svg") - SVGResource stopIcon(); - - @Source("process/clear-outputs.svg") - SVGResource clearOutputsIcon(); - - @Source("process/scroll-to-bottom.svg") - SVGResource scrollToBottomIcon(); - - @Source("process/line-wrap.svg") - SVGResource lineWrapIcon(); - - @Source("edit-commands.svg") - SVGResource editCommands(); - - /** Returns the icon for 'Custom' command type. */ - @Source("custom-command-type.svg") - SVGResource customCommandType(); - - @Source("project-perspective.svg") - SVGResource projectPerspective(); - - @Source("remote.svg") - SVGResource remote(); - - /** CssResource for the image viewer. */ - interface Css extends CssResource { - String processTree(); - - String processTreeNode(); - - String commandTreeNode(); - - String machineStatus(); - - String machineStatusRunning(); - - String machineStatusPausedLeft(); - - String machineStatusPausedRight(); - - String machineName(); - - String processName(); - - String processIconPanel(); - - String processIcon(); - - String processBadge(); - - String badgeVisible(); - - String newTerminalButton(); - - String sshButton(); - - String processNavigation(); - - String machineMonitors(); - - /** Returns the CSS class name for close button of process in 'Consoles' panel. */ - String processesPanelCloseButtonForProcess(); - - /** Returns the CSS class name for stop button of process in 'Consoles' panel. */ - String processesPanelStopButtonForProcess(); - - String hideStopButton(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/ProcessesOutputRestorer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/ProcessesOutputRestorer.java deleted file mode 100644 index aa4709e8013..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/ProcessesOutputRestorer.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine; - -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.function.Consumer; -import org.eclipse.che.agent.exec.shared.dto.DtoWithPid; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.command.exec.ExecAgentCommandManager; -import org.eclipse.che.ide.api.workspace.event.ExecAgentServerRunningEvent; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; -import org.eclipse.che.ide.processes.panel.EnvironmentOutputEvent; - -/** Restores outputs of running processes on loading IDE. */ -@Singleton -public class ProcessesOutputRestorer { - - private EventBus eventBus; - private ExecAgentCommandManager execAgentCommandManager; - - @Inject - public ProcessesOutputRestorer( - EventBus eventBus, AppContext appContext, ExecAgentCommandManager execAgentCommandManager) { - this.eventBus = eventBus; - this.execAgentCommandManager = execAgentCommandManager; - - eventBus.addHandler( - ExecAgentServerRunningEvent.TYPE, event -> restoreLogs(event.getMachineName())); - - // in case workspace is already running - eventBus.addHandler( - BasicIDEInitializedEvent.TYPE, - event -> { - final WorkspaceImpl workspace = appContext.getWorkspace(); - - if (workspace.getStatus() == RUNNING) { - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime != null) { - runtime.getMachines().values().forEach(m -> restoreLogs(m.getName())); - } - } - }); - } - - private void restoreLogs(String machineName) { - execAgentCommandManager - .getProcesses(machineName, false) - .onSuccess( - processes -> { - Consumer pidConsumer = - pid -> - execAgentCommandManager - .getProcessLogs(machineName, pid, null, null, 50, 0) - .onSuccess( - logs -> - logs.forEach( - log -> { - final String fixedLog = - log.getText().replaceAll("\\[STDOUT\\] ", ""); - - eventBus.fireEvent( - new EnvironmentOutputEvent(fixedLog, machineName)); - })); - - processes - .stream() - .filter(it -> "CheWsAgent".equals(it.getName())) - .map(DtoWithPid::getPid) - .forEach(pidConsumer); - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooser.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooser.java deleted file mode 100644 index 7e35dec6b69..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooser.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine.chooser; - -import com.google.inject.Inject; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.core.model.workspace.runtime.Machine; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.api.promises.client.js.Executor; -import org.eclipse.che.api.promises.client.js.Executor.ExecutorBody; -import org.eclipse.che.api.promises.client.js.JsPromiseError; -import org.eclipse.che.api.promises.client.js.RejectFunction; -import org.eclipse.che.api.promises.client.js.ResolveFunction; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.api.workspace.model.RuntimeImpl; -import org.eclipse.che.ide.api.workspace.model.WorkspaceImpl; - -/** Provides a simple mechanism for the user to choose a {@link Machine}. */ -public class MachineChooser implements MachineChooserView.ActionDelegate { - - private final MachineChooserView view; - private final AppContext appContext; - private final PromiseProvider promiseProvider; - - private ResolveFunction resolveFunction; - private RejectFunction rejectFunction; - - @Inject - public MachineChooser( - MachineChooserView view, AppContext appContext, PromiseProvider promiseProvider) { - this.view = view; - this.appContext = appContext; - this.promiseProvider = promiseProvider; - - view.setDelegate(this); - } - - /** - * Pops up a dialog for choosing a machine. - * - *

        Note: if there is only one machine running in the workspace then returned promise - * will be resolved with that machine without asking user. - * - * @return promise that will be resolved with a chosen {@link MachineImpl} or rejected in case - * machine selection has been cancelled. - */ - public Promise show() { - final WorkspaceImpl workspace = appContext.getWorkspace(); - final RuntimeImpl runtime = workspace.getRuntime(); - - if (runtime != null) { - final List machines = new ArrayList<>(runtime.getMachines().values()); - - if (machines.size() == 1) { - return promiseProvider.resolve(machines.get(0)); - } - - view.setMachines(machines); - } - - view.show(); - - return promiseProvider.create( - Executor.create( - (ExecutorBody) - (resolve, reject) -> { - resolveFunction = resolve; - rejectFunction = reject; - })); - } - - @Override - public void onMachineSelected(MachineImpl machine) { - view.close(); - - resolveFunction.apply(machine); - } - - @Override - public void onCanceled() { - rejectFunction.apply(JsPromiseError.create("Machine selection has been canceled")); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserView.java deleted file mode 100644 index d03dccf50f8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserView.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine.chooser; - -import java.util.List; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** - * Contract for the view of the machine chooser. - * - * @author Artem Zatsarynnyi - */ -public interface MachineChooserView extends View { - - /** Show the view. */ - void show(); - - /** Close the view. */ - void close(); - - /** Sets the machines to display in the view. */ - void setMachines(List machines); - - /** The action delegate for this view. */ - interface ActionDelegate { - - /** Called when machine is selected. */ - void onMachineSelected(MachineImpl machine); - - /** Called when machine selection has been canceled. Note that view will be already closed. */ - void onCanceled(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.java deleted file mode 100644 index 319b9152360..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.machine.chooser; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.KeyCodes; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.ListBox; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.inject.Inject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** - * Implementation of {@link MachineChooserView} which pops up list of the machines. User can select - * machine with Enter key or cancel selection with Esc key. - * - * @author Artem Zatsarynnyi - */ -public class MachineChooserViewImpl extends PopupPanel implements MachineChooserView { - - private static final MachineChooserViewImplUiBinder UI_BINDER = - GWT.create(MachineChooserViewImplUiBinder.class); - - /** Map that contains all shown machines. */ - private final Map machinesById; - - @UiField ListBox machinesList; - - private ActionDelegate delegate; - - @Inject - public MachineChooserViewImpl() { - machinesById = new HashMap<>(); - - setWidget(UI_BINDER.createAndBindUi(this)); - - initView(); - addHandlers(); - } - - private void initView() { - setAutoHideEnabled(true); - setAnimationEnabled(true); - setAnimationType(AnimationType.ROLL_DOWN); - } - - private void addHandlers() { - addCloseHandler( - event -> { - if (event.isAutoClosed()) { - delegate.onCanceled(); - } - }); - - machinesList.addDoubleClickHandler( - event -> { - final String selectedMachineId = machinesList.getSelectedValue(); - - if (selectedMachineId != null) { - final MachineImpl selectedMachine = machinesById.get(selectedMachineId); - - if (selectedMachine != null) { - delegate.onMachineSelected(selectedMachine); - } - } - }); - - machinesList.addKeyPressHandler( - event -> { - final int keyCode = event.getNativeEvent().getKeyCode(); - - if (KeyCodes.KEY_ENTER == keyCode || KeyCodes.KEY_MAC_ENTER == keyCode) { - final String selectedMachineId = machinesList.getSelectedValue(); - - if (selectedMachineId != null) { - final MachineImpl selectedMachine = machinesById.get(selectedMachineId); - - if (selectedMachine != null) { - delegate.onMachineSelected(selectedMachine); - } - } - } - }); - - machinesList.addKeyDownHandler( - event -> { - if (KeyCodes.KEY_ESCAPE == event.getNativeKeyCode()) { - hide(true); - } - }); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void show() { - super.show(); - - center(); - machinesList.setFocus(true); - } - - @Override - public void close() { - hide(); - } - - @Override - public void setMachines(List machines) { - machinesList.clear(); - machinesById.clear(); - - machines.forEach( - machine -> { - machinesById.put(machine.getName(), machine); - machinesList.addItem(machine.getName()); - }); - - machinesList.setVisibleItemCount(machines.size()); - machinesList.setSelectedIndex(0); - } - - interface MachineChooserViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.ui.xml deleted file mode 100644 index d2d32b9e74d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/machine/chooser/MachineChooserViewImpl.ui.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectEldestParentPathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectEldestParentPathMacro.java deleted file mode 100644 index ed61504726c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectEldestParentPathMacro.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resource.Path; - -/** - * Provides current project's parent path. Path means full absolute path to project's parent on the - * FS, e.g. /projects/project_name - */ -@Singleton -public class CurrentProjectEldestParentPathMacro implements Macro { - - private static final String KEY = "${current.project.eldest.parent.path}"; - - private final AppContext appContext; - private final PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public CurrentProjectEldestParentPathMacro( - AppContext appContext, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.appContext = appContext; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - @NotNull - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroCurrentProjectEldestParentPathDescription(); - } - - @NotNull - @Override - public Promise expand() { - String value = ""; - - Resource[] resources = appContext.getResources(); - - if (resources != null && resources.length == 1) { - Project project = appContext.getResource().getProject(); - - if (project != null) { - Path location = project.getLocation(); - String eldestParent = location.segment(0); - if (eldestParent != null) { - value = appContext.getProjectsRoot().append(eldestParent).toString(); - } - } - } - - return promises.resolve(value); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectPathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectPathMacro.java deleted file mode 100644 index 3143247b542..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectPathMacro.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Provides current project's path. Path means full absolute path to project on the FS, e.g. - * /projects/project_name - * - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class CurrentProjectPathMacro implements Macro { - - private static final String KEY = "${current.project.path}"; - - private final AppContext appContext; - private final PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public CurrentProjectPathMacro( - AppContext appContext, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.appContext = appContext; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - @NotNull - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroCurrentProjectPathDescription(); - } - - @NotNull - @Override - public Promise expand() { - String value = ""; - - Resource[] resources = appContext.getResources(); - - if (resources != null && resources.length == 1) { - Optional project = appContext.getResource().getRelatedProject(); - - if (project.isPresent()) { - value = appContext.getProjectsRoot().append(project.get().getLocation()).toString(); - } - } - - return promises.resolve(value); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectRelativePathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectRelativePathMacro.java deleted file mode 100644 index 8c8c7e7c731..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/CurrentProjectRelativePathMacro.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Resource; - -/** - * Provides relative path to specific project. Path to project resolves from current workspace root. - * e.g. /project_name. - * - *

        Need for IDEX-3924 as intermediate solution. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class CurrentProjectRelativePathMacro implements Macro { - - private static final String KEY = "${current.project.relpath}"; - - private final PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - private AppContext appContext; - - @Inject - public CurrentProjectRelativePathMacro( - AppContext appContext, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.appContext = appContext; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroCurrentProjectRelpathDescription(); - } - - @Override - public Promise expand() { - final Resource[] resources = appContext.getResources(); - - if (resources != null && resources.length == 1) { - return promises.resolve(resources[0].getLocation().toString()); - } - - return promises.resolve(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/DevMachineHostNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/DevMachineHostNameMacro.java deleted file mode 100644 index 3c643050811..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/DevMachineHostNameMacro.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Optional; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; - -/** - * Provides dev-machine's host name. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class DevMachineHostNameMacro implements Macro { - - private static final String KEY = "${machine.dev.hostname}"; - - private final CoreLocalizationConstant localizationConstants; - private final WsAgentServerUtil wsAgentServerUtil; - - @Inject - public DevMachineHostNameMacro( - CoreLocalizationConstant localizationConstants, WsAgentServerUtil wsAgentServerUtil) { - this.localizationConstants = localizationConstants; - this.wsAgentServerUtil = wsAgentServerUtil; - } - - @NotNull - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroMachineDevHostnameDescription(); - } - - @NotNull - @Override - public Promise expand() { - String value = ""; - - Optional devMachine = wsAgentServerUtil.getWsAgentServerMachine(); - - if (devMachine.isPresent()) { - String hostName = devMachine.get().getAttributes().get("config.hostname"); - - if (hostName != null) { - value = hostName; - } - } - - return Promises.resolve(value); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroApiModule.java deleted file mode 100644 index 3121037e5aa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroApiModule.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.multibindings.GinMultibinder; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroProcessor; -import org.eclipse.che.ide.api.macro.MacroRegistry; -import org.eclipse.che.ide.editor.macro.EditorCurrentFileBaseNameMacro; -import org.eclipse.che.ide.editor.macro.EditorCurrentFileNameMacro; -import org.eclipse.che.ide.editor.macro.EditorCurrentFilePathMacro; -import org.eclipse.che.ide.editor.macro.EditorCurrentFileRelativePathMacro; -import org.eclipse.che.ide.editor.macro.EditorCurrentProjectNameMacro; -import org.eclipse.che.ide.editor.macro.EditorCurrentProjectTypeMacro; -import org.eclipse.che.ide.macro.chooser.MacroChooserView; -import org.eclipse.che.ide.macro.chooser.MacroChooserViewImpl; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentFileBaseNameMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentFileNameMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentFileParentPathMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentFilePathMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentFileRelativePathMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentProjectNameMacro; -import org.eclipse.che.ide.part.explorer.project.macro.ExplorerCurrentProjectTypeMacro; - -/** - * GIN module for configuring Macro API components. - * - * @author Artem Zatsarynnyi - */ -public class MacroApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(MacroRegistry.class).to(MacroRegistryImpl.class).in(Singleton.class); - - bind(MacroProcessor.class).to(MacroProcessorImpl.class).in(Singleton.class); - - GinMultibinder macrosBinder = GinMultibinder.newSetBinder(binder(), Macro.class); - macrosBinder.addBinding().to(EditorCurrentFileNameMacro.class); - macrosBinder.addBinding().to(EditorCurrentFileBaseNameMacro.class); - macrosBinder.addBinding().to(EditorCurrentFilePathMacro.class); - macrosBinder.addBinding().to(EditorCurrentFileRelativePathMacro.class); - macrosBinder.addBinding().to(EditorCurrentProjectNameMacro.class); - macrosBinder.addBinding().to(EditorCurrentProjectTypeMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentFileNameMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentFileBaseNameMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentFilePathMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentFileParentPathMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentFileRelativePathMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentProjectNameMacro.class); - macrosBinder.addBinding().to(ExplorerCurrentProjectTypeMacro.class); - macrosBinder.addBinding().to(WorkspaceNameMacro.class); - macrosBinder.addBinding().to(WorkspaceNamespaceMacro.class); - macrosBinder.addBinding().to(DevMachineHostNameMacro.class); - macrosBinder.addBinding().to(CurrentProjectPathMacro.class); - macrosBinder.addBinding().to(CurrentProjectEldestParentPathMacro.class); - macrosBinder.addBinding().to(CurrentProjectRelativePathMacro.class); - - bind(ServerAddressMacroRegistrar.class).asEagerSingleton(); - - bind(MacroChooserView.class).to(MacroChooserViewImpl.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroProcessorImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroProcessorImpl.java deleted file mode 100644 index 2c446a33bfb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroProcessorImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.inject.Inject; -import java.util.Iterator; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.FunctionException; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroProcessor; -import org.eclipse.che.ide.api.macro.MacroRegistry; - -/** - * Implementation of {@link MacroProcessor}. - * - * @author Artem Zatsarynnyi - * @see Macro - */ -public class MacroProcessorImpl implements MacroProcessor { - - private final MacroRegistry macroRegistry; - - @Inject - public MacroProcessorImpl(MacroRegistry macroRegistry) { - this.macroRegistry = macroRegistry; - } - - @Override - public Promise expandMacros(String text) { - Promise promise = Promises.resolve(null); - StringContainer stringContainer = new StringContainer(text); - return expandMacros(promise, stringContainer, macroRegistry.getMacros().iterator()); - } - - private Promise expandMacros( - Promise promise, StringContainer stringContainer, Iterator iterator) { - if (!iterator.hasNext()) { - return promise; - } - - Macro macro = iterator.next(); - Promise derivedPromise = promise.thenPromise(expandMacro(stringContainer, macro)); - - return expandMacros(derivedPromise, stringContainer, iterator); - } - - private Function> expandMacro( - final StringContainer stringContainer, final Macro macro) { - return new Function>() { - @Override - public Promise apply(String arg) throws FunctionException { - return macro - .expand() - .thenPromise( - new Function>() { - @Override - public Promise apply(String arg) throws FunctionException { - stringContainer.setCommandLine( - stringContainer.getCommandLine().replace(macro.getName(), arg)); - return Promises.resolve(stringContainer.getCommandLine()); - } - }); - } - }; - } - - private static class StringContainer { - String commandLine; - - StringContainer(String commandLine) { - this.commandLine = commandLine; - } - - String getCommandLine() { - return commandLine; - } - - void setCommandLine(String commandLine) { - this.commandLine = commandLine; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroRegistryImpl.java deleted file mode 100644 index 21d9ea5964f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/MacroRegistryImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroRegistry; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Implementation for {@link MacroRegistry}. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class MacroRegistryImpl implements MacroRegistry { - - private final Map macros; - - public MacroRegistryImpl() { - this.macros = new HashMap<>(); - } - - @Inject(optional = true) - public void register(Set macros) { - for (Macro macro : macros) { - final String name = macro.getName(); - if (this.macros.containsKey(name)) { - Log.warn(MacroRegistryImpl.class, "Command macro '" + name + "' is already registered."); - } else { - this.macros.put(name, macro); - } - } - } - - @Override - public void unregister(Macro macro) { - macros.remove(macro.getName()); - } - - @Override - public Macro getMacro(String name) { - return macros.get(name); - } - - @Override - public List getMacros() { - return new ArrayList<>(macros.values()); - } - - @Override - public Set getNames() { - return macros.keySet(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/ServerAddressMacroRegistrar.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/ServerAddressMacroRegistrar.java deleted file mode 100644 index e17a0361fda..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/ServerAddressMacroRegistrar.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.eclipse.che.api.core.model.workspace.runtime.Server; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.BaseMacro; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroRegistry; -import org.eclipse.che.ide.api.workspace.WsAgentServerUtil; -import org.eclipse.che.ide.api.workspace.event.WorkspaceRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.model.MachineImpl; -import org.eclipse.che.ide.bootstrap.BasicIDEInitializedEvent; - -/** - * For every server in dev-machine registers a {@link Macro} that returns server's URL. - * - *

        Macro name: ${server.server_reference}. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class ServerAddressMacroRegistrar { - - private static final String MACRO_NAME_TEMPLATE = "${server.%}"; - - private final Provider macroRegistryProvider; - private final AppContext appContext; - private final WsAgentServerUtil wsAgentServerUtil; - - private Set macros = new HashSet<>(); - - @Inject - public ServerAddressMacroRegistrar( - EventBus eventBus, - Provider macroRegistryProvider, - AppContext appContext, - WsAgentServerUtil wsAgentServerUtil) { - this.macroRegistryProvider = macroRegistryProvider; - this.appContext = appContext; - this.wsAgentServerUtil = wsAgentServerUtil; - - eventBus.addHandler( - BasicIDEInitializedEvent.TYPE, - e -> { - if (appContext.getWorkspace().getStatus() == RUNNING) { - registerMacros(); - } - }); - - eventBus.addHandler(WorkspaceRunningEvent.TYPE, e -> registerMacros()); - - eventBus.addHandler( - WorkspaceStoppedEvent.TYPE, - e -> { - if (macros != null) { - macros.forEach(macro -> macroRegistryProvider.get().unregister(macro)); - macros.clear(); - } - }); - } - - private void registerMacros() { - final Optional devMachine = wsAgentServerUtil.getWsAgentServerMachine(); - - if (devMachine.isPresent()) { - macros.clear(); - - for (Map.Entry entry : devMachine.get().getServers().entrySet()) { - macros.add(new ServerAddressMacro(entry.getKey(), entry.getValue().getUrl())); - } - - macroRegistryProvider.get().register(macros); - } - } - - private class ServerAddressMacro extends BaseMacro { - ServerAddressMacro(String reference, String url) { - super( - MACRO_NAME_TEMPLATE.replaceAll("%", reference), - url, - "Returns address of the " + reference + " server"); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNameMacro.java deleted file mode 100644 index 88f7d03bf68..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNameMacro.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; - -/** - * Provider which is responsible for retrieving the workspace name. - * - *

        Macro provided: ${workspace.name} - * - * @author Vlad Zhukovskyi - * @see Macro - * @since 4.7.0 - */ -@Beta -@Singleton -public class WorkspaceNameMacro implements Macro { - - public static final String KEY = "${workspace.name}"; - - private final AppContext appContext; - private final PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public WorkspaceNameMacro( - AppContext appContext, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.appContext = appContext; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroWorkspaceNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - return promises.resolve(appContext.getWorkspace().getConfig().getName()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNamespaceMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNamespaceMacro.java deleted file mode 100644 index 4200f554c70..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/WorkspaceNamespaceMacro.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro; - -import com.google.common.annotations.Beta; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; - -/** - * Provider which is responsible for retrieving the workspace namespace. - * - *

        Macro provided: ${workspace.namespace} - */ -@Beta -@Singleton -public class WorkspaceNamespaceMacro implements Macro { - - public static final String KEY = "${workspace.namespace}"; - - private final AppContext appContext; - private final PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public WorkspaceNamespaceMacro( - AppContext appContext, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.appContext = appContext; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroWorkspaceNamespaceDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - return promises.resolve(appContext.getWorkspace().getNamespace()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooser.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooser.java deleted file mode 100644 index c0fa7e73434..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooser.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro.chooser; - -import static java.util.Comparator.comparing; -import static org.eclipse.che.ide.util.StringUtils.containsIgnoreCase; - -import com.google.gwt.view.client.ListDataProvider; -import com.google.inject.Inject; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.macro.MacroRegistry; - -/** - * Provides a simple mechanism for the user to choose a {@link Macro}. - * - * @author Artem Zatsarynnyi - * @see #show(MacroChosenCallback) - */ -public class MacroChooser implements MacroChooserView.ActionDelegate { - - private final MacroChooserView view; - private final MacroRegistry macroRegistry; - - /** - * Provides macros list for the view. All changes made in provider should be reflected in the view - * automatically. - */ - private final ListDataProvider macrosProvider; - - private MacroChosenCallback callback; - - @Inject - public MacroChooser(MacroChooserView view, MacroRegistry macroRegistry) { - this.view = view; - this.macroRegistry = macroRegistry; - - macrosProvider = new ListDataProvider<>(); - - view.setDelegate(this); - view.bindMacrosList(macrosProvider); - } - - /** - * Pops up a macro chooser dialog. {@link MacroChosenCallback} can be specified to be invoked when - * the user chose a {@link Macro}. - * - * @param callback callback that will be called to report about chosen {@link Macro} - */ - public void show(@Nullable MacroChosenCallback callback) { - this.callback = callback; - - updateMacrosProvider(macroRegistry.getMacros()); - - view.showDialog(); - } - - @Override - public void onMacroChosen(Macro macro) { - view.close(); - - if (callback != null) { - callback.onMacroChosen(macro); - } - } - - @Override - public void onFilterChanged(String filterValue) { - final List macrosList = new ArrayList<>(); - - if (filterValue.isEmpty()) { - macrosList.addAll(macroRegistry.getMacros()); - } else { - // filter works by macro's name and description - for (Macro macro : macroRegistry.getMacros()) { - if (containsIgnoreCase(macro.getName(), filterValue) - || containsIgnoreCase(macro.getDescription(), filterValue)) { - macrosList.add(macro); - } - } - } - - updateMacrosProvider(macrosList); - } - - /** Updates internal {@link #macrosProvider} with the given {@code macrosList}. */ - private void updateMacrosProvider(List macrosList) { - macrosProvider.getList().clear(); - macrosProvider.getList().addAll(macrosList); - macrosProvider.getList().sort(comparing(Macro::getName)); - } - - /** Callback to notify when some macro has been chosen. */ - public interface MacroChosenCallback { - - /** Called when macro has been chosen. */ - void onMacroChosen(Macro macro); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserView.java deleted file mode 100644 index 3a7a3888503..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserView.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro.chooser; - -import com.google.gwt.view.client.ListDataProvider; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.mvp.View; - -/** - * Defines requirements for the view for the macros explorer. - * - * @author Artem Zatsarynnyi - */ -public interface MacroChooserView extends View { - - /** Show the view. */ - void showDialog(); - - /** Close the view. */ - void close(); - - /** Bind the given {@code dataProvider} to the view. */ - void bindMacrosList(ListDataProvider dataProvider); - - /** The delegate to receive events from this view. */ - interface ActionDelegate { - - /** - * Called when macro has been chosen. - * - * @param macro {@link Macro} which has been chosen - */ - void onMacroChosen(Macro macro); - - /** - * Called when filtering macros list is requested. - * - * @param filterValue value for filtering the macros list - */ - void onFilterChanged(String filterValue); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.java deleted file mode 100644 index 76a01763f52..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.macro.chooser; - -import com.google.gwt.cell.client.TextCell; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.event.dom.client.KeyCodes; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.cellview.client.CellTable; -import com.google.gwt.user.cellview.client.Column; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.gwt.view.client.ListDataProvider; -import com.google.gwt.view.client.SingleSelectionModel; -import com.google.inject.Inject; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.ui.window.Window; - -/** - * The implementation of the {@link MacroChooserView} that shows table for exploring and choosing - * macros. Also provides ability to filter data in the table. - * - * @author Artem Zatsarynnyi - */ -public class MacroChooserViewImpl extends Window implements MacroChooserView { - - private static final MacroChooserViewImplUiBinder UI_BINDER = - GWT.create(MacroChooserViewImplUiBinder.class); - - @UiField(provided = true) - CellTable macrosTable; - - @UiField TextBox filterField; - - private ActionDelegate delegate; - - @Inject - public MacroChooserViewImpl(org.eclipse.che.ide.Resources resources) { - setTitle("Command Macros"); - - initMacrosTable(resources); - - setWidget(UI_BINDER.createAndBindUi(this)); - - filterField.getElement().setAttribute("placeholder", "Search macro"); - } - - private void initMacrosTable(org.eclipse.che.ide.Resources resources) { - macrosTable = new CellTable<>(500, resources); - - final Column nameColumn = - new Column(new TextCell()) { - @Override - public String getValue(Macro remote) { - return remote.getName(); - } - }; - - final Column descriptionColumn = - new Column(new TextCell()) { - @Override - public String getValue(Macro remote) { - return remote.getDescription(); - } - }; - - macrosTable.addColumn(nameColumn, "Macro"); - macrosTable.setColumnWidth(nameColumn, "40%"); - macrosTable.addColumn(descriptionColumn, "Description"); - macrosTable.setColumnWidth(descriptionColumn, "60%"); - - final SingleSelectionModel selectionModel = new SingleSelectionModel<>(); - - macrosTable.setSelectionModel(selectionModel); - - macrosTable.addDomHandler( - event -> { - if (selectionModel.getSelectedObject() != null) { - delegate.onMacroChosen(selectionModel.getSelectedObject()); - } - }, - DoubleClickEvent.getType()); - - macrosTable.addDomHandler( - event -> { - if (selectionModel.getSelectedObject() != null - && (KeyCodes.KEY_ENTER == event.getNativeKeyCode() - || KeyCodes.KEY_MAC_ENTER == event.getNativeKeyCode())) { - - delegate.onMacroChosen(selectionModel.getSelectedObject()); - } - }, - KeyUpEvent.getType()); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void showDialog() { - show(filterField); - } - - @Override - protected void onShow() { - filterField.setValue(""); - } - - @Override - public void close() { - hide(); - } - - @Override - public void bindMacrosList(ListDataProvider dataProvider) { - dataProvider.addDataDisplay(macrosTable); - } - - @UiHandler({"filterField"}) - void onFilterChanged(@SuppressWarnings("UnusedParameters") KeyUpEvent event) { - delegate.onFilterChanged(filterField.getValue()); - } - - interface MacroChooserViewImplUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.ui.xml deleted file mode 100644 index 45722cbf4c5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/macro/chooser/MacroChooserViewImpl.ui.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/ContextMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/ContextMenu.java deleted file mode 100644 index 0f876329c7a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/ContextMenu.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import static com.google.gwt.dom.client.Style.Unit.PX; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.RootPanel; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionGroup; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.ActionSelectedHandler; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.ui.toolbar.CloseMenuHandler; -import org.eclipse.che.ide.ui.toolbar.MenuLockLayer; -import org.eclipse.che.ide.ui.toolbar.PopupMenu; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; - -/** - * Manages the Content menu. Call show method to show menu and hide to hide it. Also - * this manager filters the list of actions and displays only actions that are belong to Main - * MachineContext menu group. - * - * @author Vitaliy Guliy - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class ContextMenu implements CloseMenuHandler, ActionSelectedHandler { - - protected final ActionManager actionManager; - protected final KeyBindingAgent keyBindingAgent; - protected final Provider managerProvider; - - private PopupMenu popupMenu; - private MenuLockLayer lockLayer; - - protected final PresentationFactory presentationFactory; - - @Inject - public ContextMenu( - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - this.actionManager = actionManager; - this.keyBindingAgent = keyBindingAgent; - this.managerProvider = managerProvider; - - presentationFactory = new PresentationFactory(); - - blockBrowserMenu(); - } - - /** Add a handler to block browser content menu. */ - private void blockBrowserMenu() { - com.google.gwt.user.client.Event.sinkEvents( - RootPanel.getBodyElement(), com.google.gwt.user.client.Event.ONCONTEXTMENU); - DOM.setEventListener( - RootPanel.getBodyElement(), - new com.google.gwt.user.client.EventListener() { - @Override - public void onBrowserEvent(com.google.gwt.user.client.Event event) { - if (com.google.gwt.user.client.Event.ONCONTEXTMENU == event.getTypeInt()) { - event.stopPropagation(); - event.preventDefault(); - } - } - }); - } - - /** - * Shows a content menu and moves it to specified position. - * - * @param x x coordinate - * @param y y coordinate - */ - public void show(final int x, final int y) { - hide(); - ActionGroup actions = updateActions(); - - lockLayer = new MenuLockLayer(this); - popupMenu = - new PopupMenu( - actions, - actionManager, - managerProvider, - presentationFactory, - lockLayer, - this, - keyBindingAgent, - "contextMenu"); - - popupMenu.getElement().getStyle().setProperty("opacity", "0"); - popupMenu.getElement().getStyle().setProperty("transition", "opacity 0.5s ease"); - - lockLayer.add(popupMenu); - - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - setPosition(x, y); - } - }); - } - - private void setPosition(int x, int y) { - if (popupMenu == null) { - return; - } - - popupMenu.getElement().getStyle().setProperty("opacity", "1"); - - if (x + popupMenu.getOffsetWidth() > Window.getClientWidth()) { - popupMenu.getElement().getStyle().setLeft(x - popupMenu.getOffsetWidth() - 1, PX); - } else { - popupMenu.getElement().getStyle().setLeft(x, PX); - } - - // adjust popup menu by the client window height (add scrollbars if necessary) - if (popupMenu.getOffsetHeight() > Window.getClientHeight()) { - popupMenu.getElement().getStyle().setOverflowY(Style.Overflow.SCROLL); - popupMenu.getElement().getStyle().setTop(5., PX); - popupMenu.getElement().getStyle().setBottom(5., PX); - } else if (y + popupMenu.getOffsetHeight() > Window.getClientHeight()) { - popupMenu - .getElement() - .getStyle() - .setTop(Math.max(y - popupMenu.getOffsetHeight() - 1, 5), PX); - } else { - popupMenu.getElement().getStyle().setTop(y, PX); - } - } - - /** Updates the list of visible actions. */ - protected ActionGroup updateActions() { - final ActionGroup actionGroup = (ActionGroup) actionManager.getAction(getGroupMenu()); - - if (actionGroup == null) { - return new DefaultActionGroup(actionManager); - } - - return actionGroup; - } - - protected String getGroupMenu() { - return IdeActions.GROUP_MAIN_CONTEXT_MENU; - } - - @Override - public void onActionSelected(Action action) { - hide(); - } - - @Override - public void onCloseMenu() { - hide(); - } - - /** Hides opened content menu. */ - public void hide() { - if (popupMenu != null) { - popupMenu.removeFromParent(); - popupMenu = null; - } - - if (lockLayer != null) { - lockLayer.removeFromParent(); - lockLayer = null; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuPresenter.java deleted file mode 100644 index 7617754a021..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuPresenter.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Manages Main Menu Items, their runtime visibility and enabled state. - * - * @author Nikolay Zamosenchuk - */ -@Singleton -public class MainMenuPresenter implements Presenter, MainMenuView.ActionDelegate { - - private final MainMenuView view; - - /** - * Main Menu Presenter requires View implementation - * - * @param view - */ - @Inject - public MainMenuPresenter(MainMenuView view) { - this.view = view; - this.view.setDelegate(this); - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuView.java deleted file mode 100644 index 8b05bf3a347..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuView.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import org.eclipse.che.ide.api.mvp.View; - -/** Main Menu View */ -public interface MainMenuView extends View { - /** Needs for delegate some function into MainMenu view. */ - interface ActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuViewImpl.java deleted file mode 100644 index 1f6dbed5b99..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MainMenuViewImpl.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import static org.eclipse.che.ide.util.dom.Elements.disableTextSelection; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlexTable; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Provider; -import elemental.html.DivElement; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionGroup; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.ActionSelectedHandler; -import org.eclipse.che.ide.api.action.CustomComponentAction; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.action.Separator; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.command.toolbar.CommandToolbarPresenter; -import org.eclipse.che.ide.ui.toolbar.CloseMenuHandler; -import org.eclipse.che.ide.ui.toolbar.MenuLockLayer; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.util.dom.Elements; - -/** - * Implements {@link MainMenuView} using standard GWT Menu Widgets - * - * @author Nikolay Zamosenchuk - * @author Oleksii Orel - */ -public class MainMenuViewImpl extends Composite - implements MainMenuView, CloseMenuHandler, ActionSelectedHandler { - private final MenuResources resources; - private final Provider managerProvider; - - private final PresentationFactory presentationFactory = new PresentationFactory(); - /** Working table, cells of which are contains element of Menu. */ - private final MenuBarTable table = new MenuBarTable(); - - private final FlowPanel rightPanel = new FlowPanel(); - - private final FlowPanel leftPanel = new FlowPanel(); - /** Panel, which contains top menu. */ - private final FlowPanel rootPanel = new FlowPanel(); - /** Lock layer for displaying popup menus. */ - private MenuLockLayer lockLayer; - /** List Menu Bar items. */ - private Map menuBarItems = new LinkedHashMap<>(); - - private Map action2barItem = new HashMap<>(); - - /** Store selected Menu Bar item. */ - private MenuBarItem selectedMenuBarItem; - - private List leftVisibleActions = new ArrayList<>(); - private List menuVisibleActions = new ArrayList<>(); - private ActionManager actionManager; - private KeyBindingAgent keyBindingAgent; - - /** Create new {@link MainMenuViewImpl} */ - @Inject - public MainMenuViewImpl( - MenuResources resources, - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider, - CommandToolbarPresenter toolbarPresenter) { - this.resources = resources; - this.actionManager = actionManager; - this.keyBindingAgent = keyBindingAgent; - this.managerProvider = managerProvider; - - initWidget(rootPanel); - disableTextSelection(rootPanel.getElement(), true); - - rootPanel.setStyleName(resources.menuCss().menuBar()); - - leftPanel.addStyleName(resources.menuCss().leftPanel()); - - table.setStyleName(resources.menuCss().menuBarTable()); - table.setCellPadding(0); - table.setCellSpacing(0); - - final DivElement triangleSeparator = - Elements.createDivElement(resources.menuCss().triangleSeparator()); - - rightPanel.addStyleName(resources.menuCss().rightPanel()); - rightPanel.addStyleName(resources.menuCss().commandToolbar()); - - rootPanel.add(leftPanel); - rootPanel.add(table); - rootPanel.getElement().appendChild((Element) triangleSeparator); - rootPanel.add(rightPanel); - - toolbarPresenter.go(rightPanel::add); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - new Timer() { - @Override - public void run() { - updateMenuActions(); - } - }.scheduleRepeating(1000); - } - - /** Handle closing of all popup windows. */ - public void onCloseMenu() { - selectedMenuBarItem.setNormalState(); - selectedMenuBarItem = null; - lockLayer = null; - } - - void updateMenuActions() { - if (selectedMenuBarItem != null) { - return; - } - - List newMenuVisibleActions = new ArrayList<>(); - expandActionGroup(IdeActions.GROUP_MAIN_MENU, newMenuVisibleActions, actionManager); - if (!newMenuVisibleActions.equals(menuVisibleActions)) { - removeAll(); - for (final Action action : newMenuVisibleActions) { - add(action, presentationFactory); - } - menuVisibleActions = newMenuVisibleActions; - } - List newLeftVisibleActions = new ArrayList<>(); - expandActionGroup(IdeActions.GROUP_LEFT_MAIN_MENU, newLeftVisibleActions, actionManager); - if (!newLeftVisibleActions.equals(leftVisibleActions)) { - leftPanel.clear(); - for (Action action : newLeftVisibleActions) { - addToPanel(leftPanel, action, presentationFactory); - } - leftVisibleActions = newLeftVisibleActions; - } - } - - /** Create a new widget and add it to panel menu. */ - private void addToPanel(FlowPanel panel, Action action, PresentationFactory presentationFactory) { - Presentation presentation = presentationFactory.getPresentation(action); - - if (action instanceof Separator) { - panel.add(new SeparatorItem(resources.menuCss().panelSeparator())); - - // todo find way to render non custom actions - } else if (action instanceof CustomComponentAction) { - CustomComponentAction customComponentAction = (CustomComponentAction) action; - Widget component = customComponentAction.createCustomComponent(presentation); - component.addStyleName(resources.menuCss().customComponent()); - panel.add(component); - } - } - - private void removeAll() { - table.clear(); - menuBarItems.clear(); - action2barItem.clear(); - } - - private void expandActionGroup( - String actionGroupId, final List newVisibleActions, ActionManager actionManager) { - final ActionGroup mainActionGroup = (ActionGroup) actionManager.getAction(actionGroupId); - if (mainActionGroup == null) return; - expandActionGroup(newVisibleActions, actionManager, mainActionGroup); - } - - private void expandActionGroup( - List newVisibleActions, ActionManager actionManager, ActionGroup mainActionGroup) { - final Action[] children = mainActionGroup.getChildren(null); - for (final Action action : children) { - final Presentation presentation = presentationFactory.getPresentation(action); - final ActionEvent e = new ActionEvent(presentation, actionManager); - action.update(e); - if (presentation.isVisible()) { // add only visible items - newVisibleActions.add(action); - } - if (action2barItem.containsKey(action)) { - action2barItem.get(action).update(); - } - } - } - - /** Create and add new item in menu. */ - private void add(Action action, PresentationFactory presentationFactory) { - Presentation presentation = presentationFactory.getPresentation(action); - if (action instanceof ActionGroup) { - ActionGroup group = (ActionGroup) action; - table.setText(0, menuBarItems.size(), presentation.getText()); - Element element = table.getCellFormatter().getElement(0, menuBarItems.size()); - MenuBarItem item = - new MenuBarItem( - group, - actionManager, - managerProvider, - presentationFactory, - element, - this, - keyBindingAgent, - resources.menuCss()); - - item.onMouseOut(); - menuBarItems.put(element, item); - action2barItem.put(group, item); - } else if (action instanceof CustomComponentAction) { - Widget widget = ((CustomComponentAction) action).createCustomComponent(presentation); - table.setWidget(0, menuBarItems.size(), widget); - Element element = table.getCellFormatter().getElement(0, menuBarItems.size()); - menuBarItems.put(element, null); - } - } - - /** - * Open Popup Menu. - * - * @param item popup menu item. - */ - public void openPopupMenu(MenuBarItem item) { - if (lockLayer == null) { - int top = getAbsoluteTop() + getOffsetHeight(); - lockLayer = new MenuLockLayer(this, top); - } - - item.openPopupMenu(lockLayer); - } - - @Override - public void onActionSelected(Action action) { - if (action2barItem.containsKey(action)) { - MenuBarItem item = action2barItem.get(action); - if (selectedMenuBarItem != null && selectedMenuBarItem != item) { - selectedMenuBarItem.setNormalState(); - selectedMenuBarItem.closePopupMenu(); - } - - selectedMenuBarItem = item; - } else { - lockLayer.close(); - lockLayer = null; - } - } - - private static class SeparatorItem extends Composite { - public SeparatorItem(String styleName) { - final FlowPanel widget = new FlowPanel(); - widget.addStyleName(styleName); - Element separator = widget.getElement(); - for (int i = 0; i < 6; i++) { - separator.appendChild(DOM.createDiv()); - } - - initWidget(widget); - } - } - - /** This is visual component. Uses for handling mouse events on MenuBar. */ - private class MenuBarTable extends FlexTable { - - public MenuBarTable() { - sinkEvents(Event.ONMOUSEOVER | Event.ONMOUSEOUT | Event.ONMOUSEDOWN); - } - - @Override - public void onBrowserEvent(Event event) { - Element td = getEventTargetCell(event); - MenuBarItem item = menuBarItems.get(td); - - if (item == null) { - return; - } - - switch (DOM.eventGetType(event)) { - case Event.ONMOUSEOVER: - if (selectedMenuBarItem != null && item != selectedMenuBarItem) { - if (item.onMouseDown()) { - openPopupMenu(item); - } - } - - item.onMouseOver(); - break; - - case Event.ONMOUSEOUT: - item.onMouseOut(); - break; - - case Event.ONMOUSEDOWN: - if (item == selectedMenuBarItem) { - if (lockLayer != null) { - lockLayer.close(); - } - return; - } - - if (item.onMouseDown()) { - openPopupMenu(item); - } - break; - - default: - break; - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuBarItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuBarItem.java deleted file mode 100644 index b384e48e1eb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuBarItem.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.user.client.ui.UIObject; -import com.google.inject.Provider; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionGroup; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.ActionSelectedHandler; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.ui.toolbar.MenuLockLayer; -import org.eclipse.che.ide.ui.toolbar.PopupMenu; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.ui.toolbar.Utils; - -/** - * Menu bar is implementation of Menu interface and represents a visual component. - * - * @author Vitaliy Gulyy - * @author Dmitry Shnurenko - */ -public class MenuBarItem implements ActionSelectedHandler { - - private final ActionGroup group; - private final ActionManager actionManager; - private final Provider managerProvider; - private final PresentationFactory presentationFactory; - /** Working variable: is need to store pressed state. */ - boolean pressed = false; - /** Visual element which is table cell. */ - private Element element; - /** Enabled or disabled state */ - private boolean enabled = true; - - private boolean hasVisibleItems = true; - private ActionSelectedHandler actionSelectedHandler; - private KeyBindingAgent keyBindingAgent; - private MenuResources.Css css; - /** Working variable: is needs to store opened Popup menu. */ - private PopupMenu popupMenu; - - /** Title of Menu Bar Item */ - private String title; - - public MenuBarItem( - ActionGroup group, - ActionManager actionManager, - Provider managerProvider, - PresentationFactory presentationFactory, - Element element, - ActionSelectedHandler handler, - KeyBindingAgent keyBindingAgent, - MenuResources.Css css) { - this.group = group; - this.actionManager = actionManager; - this.managerProvider = managerProvider; - this.presentationFactory = presentationFactory; - this.element = element; - this.actionSelectedHandler = handler; - this.keyBindingAgent = keyBindingAgent; - this.css = css; - Presentation presentation = presentationFactory.getPresentation(group); - title = presentation.getText(); - element.setInnerText(presentation.getText()); - setEnabled(Utils.hasVisibleChildren(group, presentationFactory, actionManager)); - } - - /** Close opened Popup Menu. */ - public void closePopupMenu() { - popupMenu.closePopup(); - } - - /** {@inheritDoc} */ - public boolean isEnabled() { - return enabled; - } - - /** {@inheritDoc} */ - public void setEnabled(boolean enabled) { - this.enabled = enabled; - updateEnabledState(); - } - - /** Mouse Down handler */ - public boolean onMouseDown() { - if (enabled && hasVisibleItems) { - element.setClassName(css.menuBarItemSelected()); - pressed = true; - actionSelectedHandler.onActionSelected(group); - return true; - } - - return false; - } - - /** Mouse Out Handler */ - public void onMouseOut() { - if (pressed) { - return; - } - - if (enabled && hasVisibleItems) { - element.setClassName(css.menuBarItem()); - } else { - element.setClassName(css.menuBarItemDisabled()); - } - } - - /** Mouse Over Handler */ - public void onMouseOver() { - if (pressed) { - return; - } - - if (enabled && hasVisibleItems) { - element.setClassName(css.menuBarItemOver()); - } - } - - /** - * Open sub Popup Menu - * - * @param menuLockLayer - lock layer which will receive PopupMenu visual component and - */ - public void openPopupMenu(MenuLockLayer menuLockLayer) { - int x = element.getAbsoluteLeft(); - int y = 0; - popupMenu = - new PopupMenu( - group, - actionManager, - managerProvider, - presentationFactory, - menuLockLayer, - this, - keyBindingAgent, - "topmenu/" + title); - menuLockLayer.add(popupMenu, x, y); - } - - /** Reset visual state of Menu Bar Item to default. */ - public void setNormalState() { - pressed = false; - element.setClassName(css.menuBarItem()); - } - - private void updateEnabledState() { - pressed = false; - if (enabled && hasVisibleItems) { - element.setClassName(css.menuBarItem()); - } else { - element.setClassName(css.menuBarItemDisabled()); - } - - UIObject.ensureDebugId(element, "MenuItem/" + actionManager.getId(group) + "-" + enabled); - } - - /** {@inheritDoc} */ - @Override - public void onActionSelected(Action action) { - setNormalState(); - actionSelectedHandler.onActionSelected(action); - } - - public String getTitle() { - return title; - } - - public void update() { - setEnabled(Utils.hasVisibleChildren(group, presentationFactory, actionManager)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuResources.java deleted file mode 100644 index 2b7cdcd1e71..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuResources.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; - -/** @author Evgen Vidolob */ -public interface MenuResources extends ClientBundle { - interface Css extends CssResource { - - String menuBar(); - - String menuBarTable(); - - String menuBarItem(); - - String menuBarItemSelected(); - - String menuBarItemDisabled(); - - String menuBarItemOver(); - - String leftPanel(); - - String triangleSeparator(); - - String rightPanel(); - - String commandToolbar(); - - String customComponent(); - - String panelSeparator(); - - String statusPanel(); - } - - @Source({"menu.css", "org/eclipse/che/ide/api/ui/style.css"}) - Css menuCss(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/PartMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/PartMenu.java deleted file mode 100644 index cb5b22b83f9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/PartMenu.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; - -/** - * Manages part menu based on context menu. - * - * @author Vitaliy Guliy - */ -@Singleton -public class PartMenu extends ContextMenu { - - @Inject - public PartMenu( - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - super(actionManager, keyBindingAgent, managerProvider); - } - - @Override - protected String getGroupMenu() { - return IdeActions.GROUP_PART_MENU; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupPresenter.java deleted file mode 100644 index 5d9d8258ede..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupPresenter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.mvp.Presenter; - -/** - * Manages status panel group items, their runtime visibility and enabled state. - * - * @author Oleksii Orel - */ -@Singleton -public class StatusPanelGroupPresenter implements Presenter, StatusPanelGroupView.ActionDelegate { - - private final StatusPanelGroupView view; - - /** - * Bottom Menu Presenter requires View implementation - * - * @param view - */ - @Inject - public StatusPanelGroupPresenter(StatusPanelGroupView view) { - this.view = view; - this.view.setDelegate(this); - } - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupView.java deleted file mode 100644 index 51c48c4a29f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupView.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import org.eclipse.che.ide.api.mvp.View; - -/** Status Panel Group View */ -public interface StatusPanelGroupView extends View { - /** Needs for delegate some function into BottomMenu view. */ - interface ActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupViewImpl.java deleted file mode 100644 index 3b0affa083f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/StatusPanelGroupViewImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.menu; - -import com.google.gwt.dom.client.Element; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionGroup; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.ActionSelectedHandler; -import org.eclipse.che.ide.api.action.CustomComponentAction; -import org.eclipse.che.ide.api.action.IdeActions; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.action.Separator; -import org.eclipse.che.ide.ui.toolbar.CloseMenuHandler; -import org.eclipse.che.ide.ui.toolbar.MenuLockLayer; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; - -/** - * Implements {@link StatusPanelGroupView} - * - * @author Oleksii Orel - * @author Dmitry Shnurenko - */ -public class StatusPanelGroupViewImpl extends Composite - implements StatusPanelGroupView, CloseMenuHandler, ActionSelectedHandler { - private final MenuResources resources; - - private final PresentationFactory presentationFactory = new PresentationFactory(); - - private final FlowPanel centerPanel = new FlowPanel(); - - private final FlowPanel rightPanel = new FlowPanel(); - - private final FlowPanel leftPanel = new FlowPanel(); - /** Panel, which contains top menu. */ - private final FlowPanel rootPanel = new FlowPanel(); - - /** Lock layer for displaying popup menus. */ - private MenuLockLayer lockLayer; - /** List Menu Bar items. */ - private Map action2barItem = new HashMap<>(); - - /** Store selected Menu Bar item. */ - private MenuBarItem selectedMenuBarItem; - - private List rightVisibleActions = new ArrayList<>(); - private List centerVisibleActions = new ArrayList<>(); - private List leftVisibleActions = new ArrayList<>(); - private ActionManager actionManager; - - /** Create new {@link MainMenuViewImpl} */ - @Inject - public StatusPanelGroupViewImpl(MenuResources resources, ActionManager actionManager) { - this.resources = resources; - this.actionManager = actionManager; - - initWidget(rootPanel); - - rootPanel.setStyleName(resources.menuCss().menuBar()); - rootPanel.addStyleName(resources.menuCss().statusPanel()); - - leftPanel.addStyleName(resources.menuCss().leftPanel()); - leftPanel.getElement().getStyle().setPropertyPx("marginLeft", 1); - rootPanel.add(leftPanel); - - centerPanel.setStyleName(resources.menuCss().leftPanel()); - rootPanel.add(centerPanel); - - rightPanel.addStyleName(resources.menuCss().rightPanel()); - rightPanel.getElement().getStyle().setPropertyPx("marginRight", 1); - rootPanel.add(rightPanel); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - new Timer() { - @Override - public void run() { - updateMenuActions(); - } - }.scheduleRepeating(1000); - } - - /** Handle closing of all popup windows. */ - public void onCloseMenu() { - selectedMenuBarItem.setNormalState(); - selectedMenuBarItem = null; - lockLayer = null; - } - - void updateMenuActions() { - if (selectedMenuBarItem != null) { - return; - } - List newCenterVisibleActions = new ArrayList<>(); - expandActionGroup(IdeActions.GROUP_CENTER_STATUS_PANEL, newCenterVisibleActions, actionManager); - if (!newCenterVisibleActions.equals(centerVisibleActions)) { - centerPanel.clear(); - for (Action action : newCenterVisibleActions) { - addToPanel(centerPanel, action, presentationFactory); - } - centerVisibleActions = newCenterVisibleActions; - } - List newRightVisibleActions = new ArrayList<>(); - expandActionGroup(IdeActions.GROUP_RIGHT_STATUS_PANEL, newRightVisibleActions, actionManager); - if (!newRightVisibleActions.equals(rightVisibleActions)) { - rightPanel.clear(); - for (Action action : newRightVisibleActions) { - addToPanel(rightPanel, action, presentationFactory); - } - rightVisibleActions = newRightVisibleActions; - } - List newLeftVisibleActions = new ArrayList<>(); - expandActionGroup(IdeActions.GROUP_LEFT_STATUS_PANEL, newLeftVisibleActions, actionManager); - if (!newLeftVisibleActions.equals(leftVisibleActions)) { - leftPanel.clear(); - for (Action action : newLeftVisibleActions) { - addToPanel(leftPanel, action, presentationFactory); - } - leftVisibleActions = newLeftVisibleActions; - } - centerPanel - .getElement() - .getStyle() - .setPropertyPx( - "marginLeft", - rootPanel.getOffsetWidth() / 2 - - leftPanel.getOffsetWidth() - - centerPanel.getOffsetWidth() / 2); - } - - /** Create a new widget and add it to panel menu. */ - private void addToPanel(FlowPanel panel, Action action, PresentationFactory presentationFactory) { - Presentation presentation = presentationFactory.getPresentation(action); - - if (action instanceof Separator) { - panel.add(new SeparatorItem(resources.menuCss().panelSeparator())); - - // todo find way to render non custom actions - } else if (action instanceof CustomComponentAction) { - CustomComponentAction customComponentAction = (CustomComponentAction) action; - Widget component = customComponentAction.createCustomComponent(presentation); - component.addStyleName(resources.menuCss().customComponent()); - panel.add(component); - } - } - - private void expandActionGroup( - String actionGroupId, final List newVisibleActions, ActionManager actionManager) { - final ActionGroup mainActionGroup = (ActionGroup) actionManager.getAction(actionGroupId); - if (mainActionGroup == null) return; - expandActionGroup(newVisibleActions, actionManager, mainActionGroup); - } - - private void expandActionGroup( - List newVisibleActions, ActionManager actionManager, ActionGroup mainActionGroup) { - final Action[] children = mainActionGroup.getChildren(null); - for (final Action action : children) { - final Presentation presentation = presentationFactory.getPresentation(action); - final ActionEvent e = new ActionEvent(presentation, actionManager); - action.update(e); - if (presentation.isVisible()) { // add only visible items - newVisibleActions.add(action); - } - if (action2barItem.containsKey(action)) { - action2barItem.get(action).update(); - } - } - } - - @Override - public void onActionSelected(Action action) { - if (action2barItem.containsKey(action)) { - MenuBarItem item = action2barItem.get(action); - if (selectedMenuBarItem != null && selectedMenuBarItem != item) { - selectedMenuBarItem.setNormalState(); - selectedMenuBarItem.closePopupMenu(); - } - - selectedMenuBarItem = item; - } else { - lockLayer.close(); - lockLayer = null; - } - } - - private static class SeparatorItem extends Composite { - SeparatorItem(String styleName) { - final FlowPanel widget = new FlowPanel(); - widget.addStyleName(styleName); - Element separator = widget.getElement(); - for (int i = 0; i < 6; i++) { - separator.appendChild(DOM.createDiv()); - } - - initWidget(widget); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFilePresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFilePresenter.java deleted file mode 100644 index 71ede173ccf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFilePresenter.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.navigation; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static java.util.Collections.emptyList; -import static java.util.stream.Collectors.toList; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; -import static org.eclipse.che.ide.util.NameUtils.getFileExtension; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Comparator; -import java.util.List; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.project.shared.dto.ProjectSearchRequestDto; -import org.eclipse.che.api.project.shared.dto.ProjectSearchResponseDto; -import org.eclipse.che.api.project.shared.dto.SearchResultDto; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Presenter for file navigation (find file by name and open it). - * - * @author Ann Shumilova - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class NavigateToFilePresenter implements NavigateToFileView.ActionDelegate { - - private static final int TYPING_PERIOD_DELAY_MS = 500; - private static final Comparator SEARCH_COMPARATOR = - (o1, o2) -> { - String ext1 = getFileExtension(o1.getItemReference().getName()); - String ext2 = getFileExtension(o2.getItemReference().getName()); - return ext1.compareToIgnoreCase(ext2); - }; - - private final EditorAgent editorAgent; - private final RequestTransmitter requestTransmitter; - private final DtoFactory dtoFactory; - private final NavigateToFileView view; - private final AppContext appContext; - - private DelayedTask searchTask = - new DelayedTask() { - @Override - public void onExecute() { - String searchName = view.getFileName(); - - if (isNullOrEmpty(searchName)) { - view.showItems(emptyList()); - return; - } - - view.setFileNameTextBoxEnabled(false); - - ProjectSearchRequestDto params = - dtoFactory - .createDto(ProjectSearchRequestDto.class) - .withPath("") - .withName(searchName + "*"); - - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName("project/search") - .paramsAsDto(params) - .sendAndReceiveResultAsDto(ProjectSearchResponseDto.class, 20_000) - .onSuccess( - response -> { - List items = - response - .getItemReferences() - .stream() - .sorted(SEARCH_COMPARATOR) - .collect(toList()); - view.showItems(items); - view.setFileNameTextBoxEnabled(true); - }) - .onFailure( - error -> { - view.setFileNameTextBoxEnabled(true); - Log.error(getClass(), error.getMessage()); - }) - .onTimeout( - () -> { - view.setFileNameTextBoxEnabled(true); - Log.error(getClass(), "Project search request failed due timeout"); - }); - } - }; - - @Inject - public NavigateToFilePresenter( - NavigateToFileView view, - AppContext appContext, - EditorAgent editorAgent, - RequestTransmitter requestTransmitter, - DtoFactory dtoFactory) { - this.view = view; - this.appContext = appContext; - this.editorAgent = editorAgent; - this.requestTransmitter = requestTransmitter; - this.dtoFactory = dtoFactory; - this.view.setDelegate(this); - } - - /** Show dialog with view for navigation. */ - public void showDialog() { - view.showPopup(); - } - - @Override - public void onFileSelected(Path path) { - view.hidePopup(); - - appContext - .getWorkspaceRoot() - .getFile(path) - .then( - optFile -> { - if (optFile.isPresent()) { - editorAgent.openEditor(optFile.get()); - } - }); - } - - @Override - public void onFileNameChanged() { - searchTask.delay(TYPING_PERIOD_DELAY_MS); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileView.java deleted file mode 100644 index c5405ee1910..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileView.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.navigation; - -import com.google.inject.ImplementedBy; -import java.util.List; -import org.eclipse.che.api.project.shared.dto.SearchResultDto; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.resource.Path; - -/** - * View for file navigation (find file by name and open it). - * - * @author Ann Shumilova - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@ImplementedBy(NavigateToFileViewImpl.class) -public interface NavigateToFileView extends View { - - /** Is needed to delegate actions to corresponding presenter. */ - interface ActionDelegate { - - /** - * Is called when file name is changed. - * - * @param fileName file name - */ - void onFileNameChanged(); - - /** - * Is called when file is selected. - * - * @param path file path - */ - void onFileSelected(Path path); - } - - /** Show popup. */ - void showPopup(); - - /** Hide popup. */ - void hidePopup(); - - /** - * Show suggestion popup with list of items. - * - * @param items items of suggestions - */ - void showItems(List items); - - /** - * Set the file name input field enabled or disabled. - * - * @param enabled {@code true} if field has to be enabled, otherwise {@code false} - */ - void setFileNameTextBoxEnabled(boolean enabled); - - /** Returns entered file name. */ - String getFileName(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.java deleted file mode 100644 index d7bef724209..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.navigation; - -import static com.google.gwt.event.dom.client.KeyCodes.KEY_DOWN; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_ESCAPE; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_PAGEDOWN; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_PAGEUP; -import static com.google.gwt.event.dom.client.KeyCodes.KEY_UP; - -import com.google.common.base.Strings; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.TextBox; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import elemental.dom.Element; -import elemental.html.TableCellElement; -import elemental.html.TableElement; -import java.util.Collections; -import java.util.List; -import org.eclipse.che.api.project.shared.dto.SearchResultDto; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.editor.codeassist.AutoCompleteResources; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.list.SimpleList; -import org.eclipse.che.ide.util.dom.Elements; - -/** - * The implementation of {@link NavigateToFileView} view. - * - * @author Ann Shumilova - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class NavigateToFileViewImpl extends PopupPanel implements NavigateToFileView { - - interface NavigateToFileViewImplUiBinder extends UiBinder {} - - interface Styles extends CssResource { - - String labelMargin(); - - String suggestionsPanel(); - - String noborder(); - } - - @UiField TextBox fileName; - - @UiField(provided = true) - CoreLocalizationConstant locale; - - private ActionDelegate delegate; - - private final AutoCompleteResources.Css css; - - private final Resources resources; - - private SimpleList list; - - @UiField FlowPanel suggestionsPanel; - - private HTML suggestionsContainer; - - @UiField Styles style; - - private HandlerRegistration resizeHandler; - - @Inject - public NavigateToFileViewImpl( - CoreLocalizationConstant locale, - NavigateToFileViewImplUiBinder uiBinder, - AutoCompleteResources autoCompleteResources, - Resources resources) { - this.locale = locale; - this.resources = resources; - - css = autoCompleteResources.autocompleteComponentCss(); - css.ensureInjected(); - - setWidget(uiBinder.createAndBindUi(this)); - setAutoHideEnabled(true); - setAnimationEnabled(true); - getElement().getStyle().setProperty("boxShadow", "0 2px 4px 0 rgba(0, 0, 0, 0.50)"); - getElement().getStyle().setProperty("borderRadius", "0px"); - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public void showPopup() { - fileName.getElement().setAttribute("placeholder", locale.navigateToFileSearchIsCaseSensitive()); - - setPopupPositionAndShow( - (offsetWidth, offsetHeight) -> { - setPopupPosition( - (Window.getClientWidth() / 2) - (offsetWidth / 2), - (Window.getClientHeight() / 4) - (offsetHeight / 2)); - // Set 'clip' css property to auto when show animation is finished. - new Timer() { - @Override - public void run() { - getElement().getStyle().setProperty("clip", "auto"); - delegate.onFileNameChanged(); - } - }.schedule(300); - }); - - new Timer() { - @Override - public void run() { - fileName.setFocus(true); - } - }.schedule(300); - - // Add window resize handler - if (resizeHandler == null) { - resizeHandler = Window.addResizeHandler(event -> updatePositionAndSize()); - } - } - - private final SimpleList.ListItemRenderer listItemRenderer = - new SimpleList.ListItemRenderer() { - @Override - public void render(Element itemElement, SearchResultDto itemData) { - TableCellElement label = Elements.createTDElement(); - TableCellElement path = Elements.createTDElement(); - - Path itemPath = Path.valueOf(itemData.getItemReference().getPath()); - - label.setInnerHTML(itemPath.lastSegment()); - path.setInnerHTML("(" + itemPath.parent() + ")"); - - itemElement.appendChild(label); - itemElement.appendChild(path); - - path.getStyle().setProperty("opacity", "0.6"); - } - - @Override - public Element createElement() { - return Elements.createTRElement(); - } - }; - - @Override - public void hidePopup() { - if (suggestionsContainer != null) { - suggestionsContainer.removeFromParent(); - } - suggestionsPanel.setVisible(false); - - suggestionsPanel.getElement().getStyle().setWidth(400, Style.Unit.PX); - suggestionsPanel.getElement().getStyle().setHeight(20, Style.Unit.PX); - - if (resizeHandler != null) { - resizeHandler.removeHandler(); - resizeHandler = null; - } - - super.hide(); - } - - @Override - public void showItems(List items) { - // Hide popup if it is nothing to show - if (items.isEmpty()) { - if (suggestionsContainer == null) { - return; - } - suggestionsContainer.getElement().setInnerHTML(""); - suggestionsContainer.removeFromParent(); - suggestionsPanel.setVisible(false); - - suggestionsPanel.getElement().getStyle().setWidth(400, Style.Unit.PX); - suggestionsPanel.getElement().getStyle().setHeight(20, Style.Unit.PX); - - return; - } - - // Show popup - suggestionsPanel.setVisible(true); - suggestionsContainer = new HTML(); - suggestionsContainer.addStyleName(style.noborder()); - suggestionsPanel.add(suggestionsContainer); - - // Create and show list of items - final TableElement itemHolder = Elements.createTableElement(); - suggestionsContainer.getElement().appendChild(((com.google.gwt.dom.client.Element) itemHolder)); - if (list != null) { - list.asWidget().removeFromParent(); - } - list = - SimpleList.create( - suggestionsContainer.getElement().cast(), - (Element) suggestionsContainer.getElement(), - itemHolder, - resources.defaultSimpleListCss(), - listItemRenderer, - eventDelegate); - list.render(items); - list.getSelectionModel().setSelectedItem(0); - - // Update popup position - updatePositionAndSize(); - } - - @Override - public String getFileName() { - return fileName.getText(); - } - - private void updatePositionAndSize() { - // Update position - setPopupPosition( - (com.google.gwt.user.client.Window.getClientWidth() / 2) - (getOffsetWidth() / 2), - (com.google.gwt.user.client.Window.getClientHeight() / 4) - (getOffsetHeight() / 2)); - - // Exit if suggestions is not shown - if (!suggestionsPanel.isVisible()) { - return; - } - - // Update popup width - int width = suggestionsContainer.getElement().getFirstChildElement().getOffsetWidth(); - int newWidth = Window.getClientWidth() - getElement().getAbsoluteLeft() - 50; - if (width < newWidth) { - newWidth = width; - } - suggestionsPanel.getElement().getStyle().setWidth(newWidth, Style.Unit.PX); - - // Update popup height - int height = suggestionsContainer.getElement().getFirstChildElement().getOffsetHeight(); - int newHeight = height > 300 ? 300 : height; - int bottom = getElement().getAbsoluteTop() + getElement().getOffsetHeight(); - - if (bottom + newHeight > Window.getClientHeight() - 10) { - newHeight = Window.getClientHeight() - 10 - bottom; - } - - if (newHeight < 50) { - newHeight = 50; - } - - suggestionsPanel.getElement().getStyle().setHeight(newHeight, Style.Unit.PX); - } - - @Override - public void setFileNameTextBoxEnabled(boolean enabled) { - fileName.setEnabled(enabled); - if (enabled) { - Scheduler.get().scheduleFinally(() -> fileName.setFocus(true)); - } - } - - private final SimpleList.ListEventDelegate eventDelegate = - new SimpleList.ListEventDelegate() { - @Override - public void onListItemClicked(Element listItemBase, SearchResultDto itemData) { - list.getSelectionModel().setSelectedItem(itemData); - } - - @Override - public void onListItemDoubleClicked(Element listItemBase, SearchResultDto itemData) { - delegate.onFileSelected(Path.valueOf(itemData.getItemReference().getPath())); - } - }; - - @UiHandler("fileName") - void handleKeyUp(KeyUpEvent event) { - int nativeKeyCode = event.getNativeKeyCode(); - switch (nativeKeyCode) { - case KEY_UP: - event.stopPropagation(); - event.preventDefault(); - if (list != null) { - list.getSelectionModel().selectPrevious(); - } - break; - - case KEY_DOWN: - event.stopPropagation(); - event.preventDefault(); - if (list != null) { - list.getSelectionModel().selectNext(); - } - break; - - case KEY_PAGEUP: - event.stopPropagation(); - event.preventDefault(); - if (list != null) { - list.getSelectionModel().selectPreviousPage(); - } - break; - - case KEY_PAGEDOWN: - event.stopPropagation(); - event.preventDefault(); - if (list != null) { - list.getSelectionModel().selectNextPage(); - } - break; - - case KEY_ENTER: - event.stopPropagation(); - event.preventDefault(); - SearchResultDto selectedItem = list.getSelectionModel().getSelectedItem(); - if (selectedItem != null) { - delegate.onFileSelected(Path.valueOf(selectedItem.getItemReference().getPath())); - } - break; - - case KEY_ESCAPE: - event.stopPropagation(); - event.preventDefault(); - hidePopup(); - break; - default: - if (Strings.isNullOrEmpty(fileName.getText())) { - showItems(Collections.emptyList()); - } else { - delegate.onFileNameChanged(); - } - break; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.ui.xml deleted file mode 100644 index e3c8a666ea4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/navigation/NavigateToFileViewImpl.ui.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - .labelMargin { - margin: 5px 0; - } - - .suggestionsPanel { - position: fixed; - width: 400px; - height: 10px; - overflow: hidden; - z-index: 65535; - transition: all 0.2s ease-in-out; - border: 1px solid completionPopupBorderColor; - border-radius: 0 0 3px 3px; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.50); - } - - .noborder { - border: none; - position: absolute; - width: 100%; - height: 100%; - overflow-y: auto; - overflow-x: hidden; - background-color: completionPopupBackgroundColor; - } - - .noborder * { - font-weight: normal; - font-style: normal; - font-size: 11px; - font-family: "Open Sans", sans-serif; - } - - .noborder tr > td:first-child { - padding-left: 3px; - } - - .noborder tr > td:last-child { - padding-right: 3px; - } - - .noborder table { - border-width: 0; - border-spacing: 0; - } - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/AbstractNewResourceAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/AbstractNewResourceAction.java deleted file mode 100644 index 11ae2c213e9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/AbstractNewResourceAction.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.newresource; - -import static com.google.common.base.Preconditions.checkState; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.FLOAT_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.BaseAction; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.input.InputCallback; -import org.eclipse.che.ide.ui.dialogs.input.InputDialog; -import org.eclipse.che.ide.ui.dialogs.input.InputValidator; -import org.eclipse.che.ide.util.NameUtils; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Implementation of an {@link BaseAction} that provides an ability to create new resource (e.g. - * file, folder). After performing this action, it asks user for the resource's name and then - * creates resource in the selected folder. - * - * @author Artem Zatsarynnyi - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -public abstract class AbstractNewResourceAction extends AbstractPerspectiveAction { - - protected final String title; - protected final DialogFactory dialogFactory; - protected final CoreLocalizationConstant coreLocalizationConstant; - protected final EventBus eventBus; - protected final AppContext appContext; - protected final Provider editorAgentProvider; - - private final InputValidator fileNameValidator; - private final NotificationManager notificationManager; - - public AbstractNewResourceAction( - String title, - String description, - SVGResource svgIcon, - DialogFactory dialogFactory, - CoreLocalizationConstant coreLocalizationConstant, - EventBus eventBus, - AppContext appContext, - NotificationManager notificationManager, - Provider editorAgentProvider) { - super(singletonList(PROJECT_PERSPECTIVE_ID), title, description, svgIcon); - this.dialogFactory = dialogFactory; - this.coreLocalizationConstant = coreLocalizationConstant; - this.eventBus = eventBus; - this.appContext = appContext; - this.notificationManager = notificationManager; - this.editorAgentProvider = editorAgentProvider; - this.fileNameValidator = new FileNameValidator(); - this.title = title; - } - - @Override - public void actionPerformed(ActionEvent e) { - InputDialog inputDialog = - dialogFactory - .createInputDialog( - coreLocalizationConstant.newResourceTitle(title), - coreLocalizationConstant.newResourceLabel(title.toLowerCase()), - new InputCallback() { - @Override - public void accepted(String value) { - createFile(value); - } - }, - null) - .withValidator(fileNameValidator); - inputDialog.show(); - } - - final void createFile(String nameWithoutExtension) { - final String name = - getExtension().isEmpty() - ? nameWithoutExtension - : nameWithoutExtension + '.' + getExtension(); - - Resource resource = appContext.getResource(); - - if (!(resource instanceof Container)) { - final Container parent = resource.getParent(); - - checkState(parent != null, "Parent should be a container"); - - resource = parent; - } - - ((Container) resource) - .newFile(name, getDefaultContent()) - .then( - new Operation() { - @Override - public void apply(File newFile) throws OperationException { - editorAgentProvider.get().openEditor(newFile); - eventBus.fireEvent(new RevealResourceEvent(newFile)); - } - }) - .catchError( - new Operation() { - @Override - public void apply(PromiseError error) throws OperationException { - notificationManager.notify( - "Failed to create resource", error.getMessage(), FAIL, FLOAT_MODE); - } - }); - } - - @Override - public void updateInPerspective(@NotNull ActionEvent e) { - e.getPresentation().setVisible(true); - - final Resource[] resources = appContext.getResources(); - - if (resources != null && resources.length == 1) { - final Resource resource = resources[0]; - - if (resource instanceof Container) { - e.getPresentation().setEnabled(true); - } else { - e.getPresentation().setEnabled(resource.getParent() != null); - } - - } else { - e.getPresentation().setEnabled(false); - } - } - - /** Returns extension (without dot) for a new resource. By default, returns an empty string. */ - protected String getExtension() { - return ""; - } - - /** Returns default content for a new resource. By default, returns an empty string. */ - protected String getDefaultContent() { - return ""; - } - - private class FileNameValidator implements InputValidator { - @Nullable - @Override - public Violation validate(String value) { - if (!NameUtils.checkFileName(value)) { - return new Violation() { - @Override - public String getMessage() { - return coreLocalizationConstant.invalidName(); - } - - @Nullable - @Override - public String getCorrectedValue() { - return null; - } - }; - } - return null; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFileAction.java deleted file mode 100644 index 07b8671aae7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFileAction.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.newresource; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; - -/** - * Action to create new file. - * - * @author Artem Zatsarynnyi - */ -@Singleton -public class NewFileAction extends AbstractNewResourceAction { - @Inject - public NewFileAction( - CoreLocalizationConstant localizationConstant, - Resources resources, - DialogFactory dialogFactory, - EventBus eventBus, - AppContext appContext, - NotificationManager notificationManager, - Provider editorAgentProvider) { - super( - localizationConstant.actionNewFileTitle(), - localizationConstant.actionNewFileDescription(), - resources.defaultFile(), - dialogFactory, - localizationConstant, - eventBus, - appContext, - notificationManager, - editorAgentProvider); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFolderAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFolderAction.java deleted file mode 100644 index eb77281ffb0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/newresource/NewFolderAction.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.newresource; - -import static com.google.common.base.Preconditions.checkState; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Folder; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.input.InputCallback; -import org.eclipse.che.ide.ui.dialogs.input.InputDialog; -import org.eclipse.che.ide.ui.dialogs.input.InputValidator; -import org.eclipse.che.ide.util.NameUtils; - -/** - * Action to create new folder. - * - * @author Artem Zatsarynnyi - * @author Vlad Zhukovskyi - */ -@Singleton -public class NewFolderAction extends AbstractNewResourceAction { - - private InputValidator folderNameValidator; - - @Inject - public NewFolderAction( - CoreLocalizationConstant localizationConstant, - Resources resources, - DialogFactory dialogFactory, - EventBus eventBus, - AppContext appContext, - NotificationManager notificationManager, - Provider editorAgentProvider) { - super( - localizationConstant.actionNewFolderTitle(), - localizationConstant.actionNewFolderDescription(), - resources.defaultFolder(), - dialogFactory, - localizationConstant, - eventBus, - appContext, - notificationManager, - editorAgentProvider); - this.folderNameValidator = new FolderNameValidator(); - } - - @Override - public void actionPerformed(ActionEvent e) { - - InputDialog inputDialog = - dialogFactory - .createInputDialog( - coreLocalizationConstant.newResourceTitle( - coreLocalizationConstant.actionNewFolderTitle()), - coreLocalizationConstant.newResourceLabel( - coreLocalizationConstant.actionNewFolderTitle().toLowerCase()), - new InputCallback() { - @Override - public void accepted(String value) { - createFolder(value); - } - }, - null) - .withValidator(folderNameValidator); - inputDialog.show(); - } - - final void createFolder(String name) { - Resource resource = appContext.getResource(); - - if (!(resource instanceof Container)) { - final Container parent = resource.getParent(); - - checkState(parent != null, "Parent should be a container"); - - resource = parent; - } - - ((Container) resource) - .newFolder(name) - .then( - new Operation() { - @Override - public void apply(Folder folder) throws OperationException { - eventBus.fireEvent(new RevealResourceEvent(folder)); - } - }) - .catchError( - new Operation() { - @Override - public void apply(PromiseError error) throws OperationException { - dialogFactory.createMessageDialog("Error", error.getMessage(), null).show(); - } - }); - } - - private class FolderNameValidator implements InputValidator { - @Nullable - @Override - public Violation validate(String value) { - if (!NameUtils.checkFolderName(value)) { - return new Violation() { - @Override - public String getMessage() { - return coreLocalizationConstant.invalidName(); - } - - @Nullable - @Override - public String getCorrectedValue() { - return null; - } - }; - } - return null; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationApiModule.java deleted file mode 100644 index 979d6440f21..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationApiModule.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.notification.NotificationManager; - -/** - * GIN module for configuring Notification API components. - * - * @author Artem Zatsarynnyi - */ -public class NotificationApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(NotificationManager.class).to(NotificationManagerImpl.class).in(Singleton.class); - bind(NotificationManagerView.class).to(NotificationManagerViewImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainer.java deleted file mode 100644 index 77cd8b12e8e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainer.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Grid; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.notification.NotificationManagerView.ActionDelegate; -import org.eclipse.che.ide.notification.NotificationManagerView.NotificationActionDelegate; - -/** - * Notification container. Performs rendering each notification. - * - *

        Possible improvements: - * - *

          - *
        • Add ability to check if notification is visible on viewport to mark it as read - *
        - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -@Singleton -public class NotificationContainer extends FlowPanel implements NotificationActionDelegate { - - private Grid nGrid; - private Resources resources; - private ActionDelegate delegate; - - private List notifications = new ArrayList<>(); - - /** - * Create notification container. - * - * @param resources core resources - */ - @Inject - public NotificationContainer(Resources resources) { - this.resources = resources; - - nGrid = new Grid(0, 1); - nGrid.setStyleName(resources.notificationCss().notificationPanelContainer()); - add(nGrid); - } - - /** - * Show notification in container. - * - * @param notification notification that need to show - */ - public void addNotification(@NotNull Notification notification) { - notifications.add(notification); - NotificationContainerItem item = new NotificationContainerItem(notification, resources); - item.setDelegate(this); - - int index = nGrid.getRowCount(); - nGrid.resizeRows(index + 1); - nGrid.setWidget(index, 0, item); - } - - /** - * Remove notification from the container. - * - * @param notification notification that need to removed - */ - public void removeNotification(@NotNull Notification notification) { - int index = notifications.indexOf(notification); - if (index >= 0) { - nGrid.removeRow(index); - notifications.remove(index); - } - } - - /** {@inheritDoc} */ - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public void onClick(Notification notification) { - if (delegate != null) { - delegate.onClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onDoubleClick(Notification notification) { - if (delegate != null) { - delegate.onDoubleClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onClose(Notification notification) { - removeNotification(notification); - delegate.onClose(notification); - } - - /** {@inheritDoc} */ - @Override - public void clear() { - notifications.clear(); - nGrid.clear(); - nGrid.resizeRows(0); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainerItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainerItem.java deleted file mode 100644 index cbd9ede0ca1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationContainerItem.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.i18n.client.DateTimeFormat; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import java.util.Date; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.api.notification.NotificationObserver; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.notification.NotificationManagerView.NotificationActionDelegate; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Widget for showing notification in the notification panel. - * - *

        {@link Notification} may be instance of {@link StatusNotification}. Each rendered notification - * consists of: - * - *

          - *
        • Icon - *
        • Title - *
        • Message content (optional) - *
        • Close control - *
        - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -public class NotificationContainerItem extends Composite implements NotificationObserver { - - public static final String MESSAGE_WRAPPER_DBG_ID = "message-wrapper"; - public static final String NOTIFICATION_WRAPPER_DBG_ID = "notification-wrapper"; - public static final String TITLE_DBG_ID = "title"; - public static final String CONTENT_DBG_ID = "content"; - public static final String ICON_DBG_ID = "icon"; - public static final String CLOSE_ICON_DBG_ID = "close-icon"; - - private static final DateTimeFormat DATA_FORMAT = DateTimeFormat.getFormat("h:mm a"); - - private SimplePanel titlePanel; - private SimplePanel messagePanel; - private SimplePanel iconPanel; - private Resources resources; - private Notification notification; - private NotificationActionDelegate delegate; - - private int clickCount = 0; - - /** - * Create notification item. - * - * @param resources core resources - * @param notification notification which should be wrapped into widget - */ - public NotificationContainerItem(final Notification notification, @NotNull Resources resources) { - notification.addObserver(this); - - this.resources = resources; - this.notification = notification; - - iconPanel = new SimplePanel(); - - FlowPanel contentWrapper = new FlowPanel(); - contentWrapper.add(titlePanel = createTitleWidget()); - contentWrapper.add(messagePanel = createContentWidget()); - contentWrapper.ensureDebugId(CONTENT_DBG_ID + notification.getId()); - contentWrapper.setStyleName(resources.notificationCss().notificationContentWrapper()); - - FlowPanel notificationWrapper = new FlowPanel(); - notificationWrapper.add(iconPanel = createIconWidget()); - notificationWrapper.add(contentWrapper); - notificationWrapper.add(createCloseWidget()); - notificationWrapper.ensureDebugId(NOTIFICATION_WRAPPER_DBG_ID + notification.getId()); - notificationWrapper.setStyleName(resources.notificationCss().notification()); - - update(); - - sinkEvents(Event.ONCLICK | Event.ONDBLCLICK); - - initWidget(notificationWrapper); - } - - /** {@inheritDoc} */ - @Override - public void onBrowserEvent(Event event) { - super.onBrowserEvent(event); - - switch (DOM.eventGetType(event)) { - case Event.ONCLICK: - clickCount++; - if (clickCount == 1) { - Timer timer = - new Timer() { - @Override - public void run() { - if (clickCount == 1) { - clickCount = 0; - delegate.onClick(notification); - } - } - }; - timer.schedule(200); - } - break; - case Event.ONDBLCLICK: - clickCount = 0; - delegate.onDoubleClick(notification); - break; - } - } - - /** - * Create icon wrapper that contains an icon. - * - * @return {@link SimplePanel} as icon wrapper - */ - private SimplePanel createIconWidget() { - SimplePanel iconWrapper = new SimplePanel(); - iconWrapper.setStyleName(resources.notificationCss().notificationIconWrapper()); - iconWrapper.ensureDebugId(ICON_DBG_ID + notification.getId()); - return iconWrapper; - } - - /** - * Create close icon widget that contains an close notification icon. - * - * @return {@link SimplePanel} as close icon wrapper - */ - private SimplePanel createCloseWidget() { - SimplePanel closeWrapper = new SimplePanel(); - SVGImage closeImage = new SVGImage(resources.closeIcon()); - closeImage.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - delegate.onClose(notification); - } - }); - closeWrapper.add(closeImage); - closeWrapper.setStyleName(resources.notificationCss().notificationCloseButtonWrapper()); - closeImage.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId()); - return closeWrapper; - } - - /** - * Create title widget that contains notification title. - * - * @return {@link SimplePanel} as title wrapper - */ - private SimplePanel createTitleWidget() { - SimplePanel titleWrapper = new SimplePanel(); - Label titleLabel = new Label(); - titleWrapper.add(titleLabel); - titleWrapper.setStyleName(resources.notificationCss().notificationTitleWrapper()); - titleWrapper.ensureDebugId(TITLE_DBG_ID + notification.getId()); - return titleWrapper; - } - - /** - * Create message widget that contains notification message. - * - * @return {@link SimplePanel} as message wrapper - */ - private SimplePanel createContentWidget() { - SimplePanel messageWrapper = new SimplePanel(); - Label messageLabel = new Label(); - messageWrapper.add(messageLabel); - messageWrapper.setStyleName(resources.notificationCss().notificationMessageWrapper()); - messageWrapper.ensureDebugId(MESSAGE_WRAPPER_DBG_ID + notification.getId()); - return messageWrapper; - } - - /** {@inheritDoc} */ - @Override - public Widget asWidget() { - return super.asWidget(); - } - - /** Sets the delegate for receiving events from this view. */ - public void setDelegate(NotificationActionDelegate delegate) { - this.delegate = delegate; - } - - /** - * Return an icon based on {@link org.eclipse.che.ide.api.notification.StatusNotification.Status}. - * - * @return SVG image that represents icon status - */ - private SVGImage getIconBaseOnStatus() { - final SVGResource icon; - final String status; - - switch (((StatusNotification) notification).getStatus()) { - case PROGRESS: - icon = resources.progress(); - status = "progress"; - break; - case SUCCESS: - icon = resources.success(); - status = "success"; - break; - case FAIL: - icon = resources.fail(); - status = "fail"; - break; - case WARNING: - icon = resources.warning(); - status = "warning"; - break; - default: - throw new IllegalArgumentException("Can't determine notification icon"); - } - - SVGImage image = new SVGImage(icon); - image.getElement().setAttribute("name", status); - return image; - } - - /** {@inheritDoc} */ - @Override - public void onValueChanged() { - update(); - } - - /** - * Update notification's widget values. - * - *

        Widget consumes: - * - *

          - *
        • {@link Notification#title} - *
        • {@link Notification#content} - *
        • Icon and background color based on {@link StatusNotification.Status} - *
        - */ - private void update() { - Widget titleWidget = titlePanel.getWidget(); - if (titleWidget != null && titleWidget instanceof Label) { - ((Label) titleWidget).setText(notification.getTitle()); - - StringBuilder infoBuilder = new StringBuilder(); - if (notification.getProject() != null) { - infoBuilder.append("Project: ").append(notification.getProject().getName()).append(". "); - } - - infoBuilder.append(DATA_FORMAT.format(new Date(notification.getTime()))); - - titlePanel.getElement().setAttribute("info", infoBuilder.toString()); - } - - Widget messageWidget = messagePanel.getWidget(); - if (messageWidget != null && messageWidget instanceof Label) { - ((Label) messageWidget).setText(notification.getContent()); - } - - if (notification instanceof StatusNotification) { - iconPanel.setWidget(getIconBaseOnStatus()); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerImpl.java deleted file mode 100644 index f06ecdb48fb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerImpl.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import static org.eclipse.che.ide.api.notification.ReadState.READ; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.api.notification.NotificationListener; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.notification.NotificationObserver; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.api.notification.StatusNotification.Status; -import org.eclipse.che.ide.api.notification.StatusNotificationListener; -import org.eclipse.che.ide.api.parts.base.BasePresenter; -import org.eclipse.che.ide.editor.EditorFileStatusNotificationOperation; -import org.eclipse.che.providers.DynaObject; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * The implementation of {@link NotificationManager}. Base notification part. Perform showing - * notification in the "Events panel". Also checking is performed on each created notification. - * - *

        Each notification may be simple notification {@link Notification} or status notification - * {@link StatusNotification}. - * - *

        If notification instance of {@link StatusNotification} then notification may be showed as - * balloon widget by need. By default all notifications are showed only in events panel. - * - * @author Andrey Plotnikov - * @author Dmitry Shnurenko - */ -@Singleton -@DynaObject -public class NotificationManagerImpl extends BasePresenter - implements NotificationManager, - NotificationObserver, - StatusNotificationListener, - NotificationManagerView.ActionDelegate { - public static final String TITLE = "Events"; - public static final String TOOLTIP = "Event Log"; - - private final NotificationManagerView view; - private final NotificationContainer nContainer; - private final NotificationPopupStack nPopupStack; - private final List notifications = new ArrayList<>(); - - private Resources resources; - - /** Count of unread notifications */ - private int unread = 0; - - /** - * Create instance of notification panel. - * - * @param view the view - * @param nContainer notification container. It holds showed notifications - * @param nPopupStack popup notification stack. It showed each notification as balloon - * @param resources core resources - */ - @Inject - public NotificationManagerImpl( - NotificationManagerView view, - NotificationContainer nContainer, - NotificationPopupStack nPopupStack, - Resources resources) { - this.view = view; - this.nContainer = nContainer; - this.nContainer.setDelegate(this); - this.nPopupStack = nPopupStack; - this.nPopupStack.setDelegate(this); - this.view.setDelegate(this); - this.view.setContainer(nContainer); - this.view.setTitle(TITLE); - this.resources = resources; - } - - @Inject - public void inject(EditorFileStatusNotificationOperation editorFileStatusNotificationOperation) { - editorFileStatusNotificationOperation.inject(this); - } - - /** {@inheritDoc} */ - @Override - public View getView() { - return view; - } - - /** {@inheritDoc} */ - @Override - public void onValueChanged() { - unread = 0; - - for (Notification notification : notifications) { - if (!notification.isRead()) { - unread++; - } - } - - firePropertyChange(TITLE_PROPERTY); - } - - /** {@inheritDoc} */ - @Override - public int getUnreadNotificationsCount() { - return unread; - } - - /** {@inheritDoc} */ - @Override - public T notify(T notification) { - notification.addObserver(this); - notifications.add(notification); - - if (notification instanceof StatusNotification) { - handleStatusNotification((StatusNotification) notification); - } - - nContainer.addNotification(notification); - onValueChanged(); - - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - view.scrollBottom(); - } - }); - - return notification; - } - - /** Performs appropriate actions for correct displaying of {@link StatusNotification} */ - private void handleStatusNotification(StatusNotification notification) { - DisplayMode displayMode = notification.getDisplayMode(); - if (!displayMode.equals(NOT_EMERGE_MODE)) { - nPopupStack.push(notification); - } - - if (displayMode.equals(EMERGE_MODE)) { - notification.setStatusListener(this); - } - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title) { - return notify(new Notification(title)); - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title, String content) { - return notify(title, content, (NotificationListener) null); - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title, String content, NotificationListener listener) { - return notify(title, content, listener, null); - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title, NotificationListener listener) { - return notify(title, listener, null); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify(String title, Status status, DisplayMode displayMode) { - return notify(new StatusNotification(title, status, displayMode)); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, Status status, DisplayMode displayMode, NotificationListener listener) { - return notify(new StatusNotification(title, status, displayMode, listener)); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, String content, Status status, DisplayMode displayMode) { - return notify(title, content, status, displayMode, (NotificationListener) null); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - NotificationListener listener) { - return notify(title, content, status, displayMode, listener, null); - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title, String content, ProjectConfigDto project) { - return notify(title, content, null, project); - } - - /** {@inheritDoc} */ - @Override - public Notification notify(String title, ProjectConfigDto project) { - return notify(title, (NotificationListener) null, project); - } - - /** {@inheritDoc} */ - @Override - public Notification notify( - String title, String content, NotificationListener listener, ProjectConfigDto project) { - return notify(new Notification(title, content, project, listener)); - } - - /** {@inheritDoc} */ - @Override - public Notification notify( - String title, NotificationListener listener, ProjectConfigDto project) { - return notify(title, null, listener, project); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - ProjectConfigDto project) { - return notify(title, content, status, displayMode, null, project); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, Status status, DisplayMode displayMode, ProjectConfigDto project) { - return notify(title, null, status, displayMode, null, project); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, - String content, - Status status, - DisplayMode displayMode, - NotificationListener listener, - ProjectConfigDto project) { - return notify(new StatusNotification(title, content, status, displayMode, project, listener)); - } - - /** {@inheritDoc} */ - @Override - public StatusNotification notify( - String title, - Status status, - DisplayMode displayMode, - NotificationListener listener, - ProjectConfigDto project) { - return notify(title, null, status, displayMode, listener, project); - } - - /** - * Remove notification. - * - * @param notification notification that need to remove - */ - public void removeNotification(Notification notification) { - notification.removeObserver(this); - notifications.remove(notification); - nContainer.removeNotification(notification); - onValueChanged(); - } - - /** {@inheritDoc} */ - @Override - public void onClick(Notification notification) { - NotificationListener listener = notification.getListener(); - if (listener != null) { - listener.onClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onDoubleClick(Notification notification) { - NotificationListener listener = notification.getListener(); - if (listener != null) { - listener.onDoubleClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onClose(Notification notification) { - removeNotification(notification); - - NotificationListener listener = notification.getListener(); - if (listener != null) { - listener.onClose(notification); - } - } - - /** {@inheritDoc} */ - @Override - public String getTitle() { - return TITLE; - } - - /** {@inheritDoc} */ - @Override - public SVGResource getTitleImage() { - return resources.eventsPartIcon(); - } - - /** {@inheritDoc} */ - @Override - public String getTitleToolTip() { - return TOOLTIP; - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - /** {@inheritDoc} */ - @Override - public void onOpen() { - super.onOpen(); - - for (Notification notification : notifications) { - notification.setState(READ); - } - } - - @Override - public void onNotificationStatusChanged(StatusNotification notification) { - if (notification.getDisplayMode().equals(EMERGE_MODE)) { - nPopupStack.remove(notification); // to avoid displaying of notification a few times - nPopupStack.push(notification); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerView.java deleted file mode 100644 index 722aab9677f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerView.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.api.parts.base.BaseActionDelegate; - -/** - * The view of {@link NotificationManagerImpl}. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - * @see {@link Notification} - */ -public interface NotificationManagerView extends View { - /** Required for delegating some functions in view. */ - interface ActionDelegate extends BaseActionDelegate, NotificationActionDelegate {} - - /** Delegate events between notifications widgets. */ - interface NotificationActionDelegate { - /** - * Handle notification com.google.gwt.user.client.Event.ONCLICK event. - * - * @param notification {@link Notification} on which onClick handled - */ - void onClick(Notification notification); - - /** - * Handle notification com.google.gwt.user.client.Event.ONDBLCLICK event. - * - * @param notification {@link Notification} on which onDoubleClick handled - */ - void onDoubleClick(Notification notification); - - /** - * Handle notification close event. This event fires when notification is closed automatically - * or manually by user. - * - * @param notification {@link Notification} on which onClose handled - */ - void onClose(Notification notification); - } - - /** - * Set widget container into notification manager presenter. This container need to display - * notification row by row. - * - * @param container instance of {@link NotificationContainer} - */ - void setContainer(NotificationContainer container); - - /** - * Manage notification manager visibility. - * - * @param visible true - if notification part should be showed, false - otherwise - */ - void setVisible(boolean visible); - - /** - * Set title of event log part. - * - * @param title title that need to be set - */ - void setTitle(String title); - - /** Scrolls the view to the bottom. */ - void scrollBottom(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.java deleted file mode 100644 index de3eea4b9ee..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.parts.base.BaseView; - -/** - * The implementation of {@link NotificationManagerView}. - * - * @author Andrey Plotnikov - */ -@Singleton -public class NotificationManagerViewImpl extends BaseView - implements NotificationManagerView { - - interface NotificationManagerViewImplUiBinder - extends UiBinder {} - - @UiField FlowPanel mainPanel; - - @UiField ScrollPanel scrollPanel; - - /** scroll events to the bottom if view is visible */ - private boolean scrollBottomRequired = false; - - /** Create view. */ - @Inject - public NotificationManagerViewImpl(NotificationManagerViewImplUiBinder uiBinder) { - setContentWidget(uiBinder.createAndBindUi(this)); - scrollPanel.getElement().setTabIndex(0); - } - - @Override - public void setContainer(NotificationContainer container) { - mainPanel.add(container); - } - - /** {@inheritDoc} */ - @Override - public void scrollBottom() { - /** scroll bottom immediately if view is visible */ - if (scrollPanel.getElement().getOffsetParent() != null) { - scrollPanel.getElement().setScrollTop(scrollPanel.getElement().getScrollHeight()); - return; - } - - /** otherwise, check the visibility periodically and scroll the view when it's visible */ - if (!scrollBottomRequired) { - scrollBottomRequired = true; - - Scheduler.get() - .scheduleFixedPeriod( - new Scheduler.RepeatingCommand() { - @Override - public boolean execute() { - if (scrollPanel.getElement().getOffsetParent() != null) { - scrollPanel - .getElement() - .setScrollTop(scrollPanel.getElement().getScrollHeight()); - scrollBottomRequired = false; - return false; - } - return true; - } - }, - 1000); - } - } - - @Override - protected void focusView() { - scrollPanel.getElement().focus(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.ui.xml deleted file mode 100644 index 5491d22454a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationManagerViewImpl.ui.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - .scrollPanel { - outline: none; - } - - .notificationPanel { - position: relative; - -moz-user-select: text; - -webkit-user-select: text; - user-select: text; - } - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopup.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopup.java deleted file mode 100644 index 934a4ddea5d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopup.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import static com.google.gwt.user.client.Event.ONCLICK; -import static com.google.gwt.user.client.Event.ONDBLCLICK; -import static com.google.gwt.user.client.Event.ONMOUSEOUT; -import static com.google.gwt.user.client.Event.ONMOUSEOVER; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.FLOAT_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.PROGRESS; - -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.api.notification.NotificationObserver; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode; -import org.eclipse.che.ide.api.notification.StatusNotification.Status; -import org.eclipse.che.ide.notification.NotificationManagerView.NotificationActionDelegate; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Widget for showing notification popup. - * - *

        {@link Notification} in this case must extends {@link StatusNotification}. Status may have one - * of three values {@link Status}. By default, if the {@link Notification} is set to - * Status.PROGRESS, then hide timer won't be handle popup closing, but if the popup has - * status Status.SUCCESS or Status.FAIL then hide timer will perform - * automatically hide popup widget in 5 seconds. - * - *

        Popup's showing and hiding is controlled by two animations. Showing animation simply sets - * opacity value from 0 to 1 in 1 second. Hiding animation simply sets opacity value from 1 to 0 and - * margin-left from element offset width to negative value. - * - *

        Possible improvements: - * - *

          - *
        • Widget should handle {@link com.google.gwt.user.client.Window} onBlur and onFocus events. - * This need to stop hide timer if window becomes blur. - *
        - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - * @see {@link Notification}. - * @see {@link StatusNotification}. - * @see {@link Status}. - */ -public class NotificationPopup extends SimplePanel implements NotificationObserver { - - public static final String MESSAGE_WRAPPER_DBG_ID = "popup-message-wrapper"; - public static final String NOTIFICATION_WRAPPER_DBG_ID = "popup-notification-wrapper"; - public static final String TITLE_DBG_ID = "popup-title"; - public static final String CONTENT_DBG_ID = "popup-content"; - public static final String ICON_DBG_ID = "popup-icon"; - public static final String CLOSE_ICON_DBG_ID = "popup-close-icon"; - - /** Value for the automatically hiding. By default it 5 seconds. */ - public static final int DEFAULT_TIME = 5000; - - private StatusNotification notification; - private NotificationActionDelegate delegate; - private Resources resources; - private SimplePanel titlePanel; - private SimplePanel messagePanel; - private SimplePanel iconPanel; - - private int clickCount = 0; - - private final Timer hideTimer = - new Timer() { - - /** {@inheritDoc} */ - @Override - public void run() { - delegate.onClose(notification); - } - }; - - /** - * Create notification message. - * - * @param notification the notification - * @param resources the resources - * @param delegate the delegate - */ - public NotificationPopup( - @NotNull StatusNotification notification, - @NotNull Resources resources, - @NotNull NotificationActionDelegate delegate) { - - this.notification = notification; - this.resources = resources; - this.delegate = delegate; - - setStyleName(resources.notificationCss().notificationPopupPanel()); - - notification.addObserver(this); - - FlowPanel contentWrapper = new FlowPanel(); - contentWrapper.add(titlePanel = createTitleWidget()); - contentWrapper.add(messagePanel = createContentWidget()); - contentWrapper.setStyleName(resources.notificationCss().notificationPopupContentWrapper()); - contentWrapper.ensureDebugId(CONTENT_DBG_ID + notification.getId()); - - FlowPanel notificationWrapper = new FlowPanel(); - notificationWrapper.add(iconPanel = createIconWidget()); - notificationWrapper.add(contentWrapper); - notificationWrapper.add(createCloseWidget()); - notificationWrapper.setStyleName(resources.notificationCss().notificationPopup()); - notificationWrapper.ensureDebugId(NOTIFICATION_WRAPPER_DBG_ID + notification.getId()); - - setWidget(notificationWrapper); - } - - /** {@inheritDoc} */ - @Override - public void onBrowserEvent(Event event) { - super.onBrowserEvent(event); - - switch (DOM.eventGetType(event)) { - case ONCLICK: - clickCount++; - if (clickCount == 1) { - Timer timer = - new Timer() { - @Override - public void run() { - if (clickCount == 1) { - clickCount = 0; - delegate.onClick(notification); - } - } - }; - timer.schedule(200); - } - break; - - case ONDBLCLICK: - clickCount = 0; - delegate.onDoubleClick(notification); - break; - - case ONMOUSEOVER: - hideTimer.cancel(); - break; - - case ONMOUSEOUT: - if (notification.getStatus() == PROGRESS) { - hideTimer.cancel(); - } else { - hideTimer.schedule(DEFAULT_TIME); - } - break; - } - } - - /** - * Return an icon based on {@link Status}. - * - * @return SVG image that represents icon status - */ - private SVGImage getIconBaseOnStatus() { - final SVGResource icon; - final String status; - - switch (notification.getStatus()) { - case PROGRESS: - icon = resources.progress(); - status = "progress"; - break; - case SUCCESS: - icon = resources.success(); - status = "success"; - break; - case FAIL: - icon = resources.fail(); - status = "fail"; - break; - case WARNING: - icon = resources.warning(); - status = "warning"; - break; - default: - throw new IllegalArgumentException("Can't determine notification icon"); - } - - SVGImage image = new SVGImage(icon); - image.getElement().setAttribute("name", status); - return image; - } - - /** - * Create icon wrapper that contains an icon. - * - * @return {@link SimplePanel} as icon wrapper - */ - private SimplePanel createIconWidget() { - SimplePanel iconWrapper = new SimplePanel(); - iconWrapper.setStyleName(resources.notificationCss().notificationPopupIconWrapper()); - iconWrapper.ensureDebugId(ICON_DBG_ID + notification.getId()); - return iconWrapper; - } - - /** - * Create close icon widget that contains an close notification icon. - * - * @return {@link SimplePanel} as close icon wrapper - */ - private SimplePanel createCloseWidget() { - SimplePanel closeWrapper = new SimplePanel(); - SVGImage closeImage = new SVGImage(resources.closeIcon()); - closeImage.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - delegate.onClose(notification); - } - }); - closeWrapper.add(closeImage); - closeWrapper.setStyleName(resources.notificationCss().notificationPopupCloseButtonWrapper()); - closeWrapper.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId()); - return closeWrapper; - } - - /** - * Create title widget that contains notification title. - * - * @return {@link SimplePanel} as title wrapper - */ - private SimplePanel createTitleWidget() { - SimplePanel titleWrapper = new SimplePanel(); - Label titleLabel = new Label(); - titleWrapper.add(titleLabel); - titleWrapper.setStyleName(resources.notificationCss().notificationPopupTitleWrapper()); - titleWrapper.ensureDebugId(TITLE_DBG_ID + notification.getId()); - return titleWrapper; - } - - /** - * Create message widget that contains notification message. - * - * @return {@link SimplePanel} as message wrapper - */ - private SimplePanel createContentWidget() { - SimplePanel messageWrapper = new SimplePanel(); - Label messageLabel = new Label(); - messageWrapper.add(messageLabel); - messageWrapper.setStyleName(resources.notificationCss().notificationPopupMessageWrapper()); - messageWrapper.ensureDebugId(MESSAGE_WRAPPER_DBG_ID + notification.getId()); - return messageWrapper; - } - - /** {@inheritDoc} */ - @Override - public void onValueChanged() { - update(); - } - - /** - * Update notification's widget values. - * - *

        Widget consumes: - * - *

          - *
        • {@link Notification#title} - *
        • {@link Notification#content} - *
        • Icon and background color based on {@link Status} - *
        - */ - private void update() { - Widget titleWidget = titlePanel.getWidget(); - if (titleWidget != null && titleWidget instanceof Label) { - ((Label) titleWidget).setText(notification.getTitle()); - titleWidget.setTitle(notification.getTitle()); - } - - Widget messageWidget = messagePanel.getWidget(); - if (messageWidget != null && messageWidget instanceof Label) { - ((Label) messageWidget).setText(notification.getContent()); - } - - iconPanel.setWidget(getIconBaseOnStatus()); - - removeStyleName(resources.notificationCss().notificationStatusProgress()); - removeStyleName(resources.notificationCss().notificationStatusSuccess()); - removeStyleName(resources.notificationCss().notificationStatusFail()); - removeStyleName(resources.notificationCss().notificationStatusWarning()); - - DisplayMode displayMode = notification.getDisplayMode(); - Status status = notification.getStatus(); - switch (status) { - case PROGRESS: - setStyleName(resources.notificationCss().notificationStatusProgress(), true); - break; - case SUCCESS: - setStyleName(resources.notificationCss().notificationStatusSuccess(), true); - break; - case FAIL: - setStyleName(resources.notificationCss().notificationStatusFail(), true); - break; - case WARNING: - setStyleName(resources.notificationCss().notificationStatusWarning(), true); - break; - } - - if (FLOAT_MODE == displayMode && PROGRESS == status) { - hideTimer.cancel(); - return; - } - hideTimer.schedule(DEFAULT_TIME); - } - - /** {@inheritDoc} */ - @Override - protected void onAttach() { - boolean isOrWasAttached = isOrWasAttached(); - super.onAttach(); - - if (!isOrWasAttached) { - sinkEvents(ONCLICK | ONDBLCLICK | ONMOUSEOUT | ONMOUSEOVER); - update(); - - addStyleName(resources.notificationCss().notificationShowingAnimation()); - } - } - - /** - * Return notification related to this widget. - * - * @return the {@link StatusNotification} - */ - public StatusNotification getNotification() { - return notification; - } - - /** {@inheritDoc} */ - @Override - public void removeFromParent() { - if (isOrWasAttached()) { - addStyleName(resources.notificationCss().notificationHidingAnimation()); - - new DelayedTask() { - @Override - public void onExecute() { - NotificationPopup.super.removeFromParent(); - } - }.delay(500); - } else { - super.removeFromParent(); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopupStack.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopupStack.java deleted file mode 100644 index c35f68914e8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationPopupStack.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.RootPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.LinkedList; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.notification.Notification; -import org.eclipse.che.ide.api.notification.StatusNotification; -import org.eclipse.che.ide.notification.NotificationManagerView.ActionDelegate; -import org.eclipse.che.ide.notification.NotificationManagerView.NotificationActionDelegate; - -/** - * Stack for storing notifications that should be showed to user in future. Three notifications may - * be showed at once. If new notification is pushed into stack it will wait when at least one - * notification will be release from the panel. To add new notification into stack to show it in the - * future simply call {@link - * NotificationPopupStack#push(org.eclipse.che.ide.api.notification.StatusNotification)}. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - * @see {@link StatusNotification} - */ -@Singleton -public class NotificationPopupStack implements NotificationActionDelegate { - - public static final int POPUP_COUNT = 3; - - private ActionDelegate delegate; - private LinkedList stack = new LinkedList<>(); - private FlowPanel notificationContainer = new FlowPanel(); - - public static final String NOTIFICATION_CONTAINER_DBG_ID = "popup-container"; - - /** - * Create message stack. - * - * @param resources core resources - */ - @Inject - public NotificationPopupStack(final Resources resources) { - notificationContainer.ensureDebugId(NOTIFICATION_CONTAINER_DBG_ID); - notificationContainer.setStyleName(resources.notificationCss().notificationPopupPlaceholder()); - - RootPanel.get().add(notificationContainer); - - Scheduler.get() - .scheduleFixedPeriod( - new Scheduler.RepeatingCommand() { - - /** {@inheritDoc} */ - @Override - public boolean execute() { - while (notificationContainer.getWidgetCount() < POPUP_COUNT && !stack.isEmpty()) { - notificationContainer.add( - new NotificationPopup(stack.pop(), resources, NotificationPopupStack.this)); - } - - return true; - } - }, - 1000); - } - - /** Sets the delegate for receiving events from this view. */ - public void setDelegate(@NotNull ActionDelegate delegate) { - this.delegate = delegate; - } - - /** - * Push notification to message stack. - * - * @param notification notification that need to add - */ - public void push(@NotNull StatusNotification notification) { - stack.push(notification); - } - - /** - * Remove notification from message stack. - * - * @param notification notification that need to remove - */ - public void remove(@NotNull StatusNotification notification) { - stack.remove(notification); - onClose(notification); - } - - /** {@inheritDoc} */ - @Override - public void onClick(Notification notification) { - if (delegate != null) { - delegate.onClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onDoubleClick(Notification notification) { - if (delegate != null) { - delegate.onDoubleClick(notification); - } - } - - /** {@inheritDoc} */ - @Override - public void onClose(Notification notification) { - for (int i = 0; i < notificationContainer.getWidgetCount(); i++) { - Widget child = notificationContainer.getWidget(i); - if (child instanceof NotificationPopup - && notification.equals(((NotificationPopup) child).getNotification())) { - child.removeFromParent(); - } - } - } - - /** Remove all notifications from the stack and from notifications container. */ - public void clear() { - stack.clear(); - - for (int i = 0; i < notificationContainer.getWidgetCount(); i++) { - Widget child = notificationContainer.getWidget(i); - if (child instanceof NotificationPopup) { - child.removeFromParent(); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationResources.java deleted file mode 100644 index e35f3b4d33f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/notification/NotificationResources.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.notification; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Notifications resources. Contains definition of styles and icons. - * - * @author Andrey Plotnikov - * @author Vlad Zhukovskyi - */ -public interface NotificationResources extends ClientBundle { - interface NotificationCss extends CssResource { - - String notificationPanel(); - - String notificationPanelContainer(); - - String notification(); - - String notificationIconWrapper(); - - String notificationContentWrapper(); - - String notificationTitleWrapper(); - - String notificationMessageWrapper(); - - String notificationCloseButtonWrapper(); - - String notificationStatusProgress(); - - String notificationStatusSuccess(); - - String notificationStatusFail(); - - String notificationStatusWarning(); - - String notificationPopup(); - - String notificationPopupContentWrapper(); - - String notificationPopupIconWrapper(); - - String notificationPopupCloseButtonWrapper(); - - String notificationPopupTitleWrapper(); - - String notificationPopupMessageWrapper(); - - String notificationPopupPanel(); - - String notificationPopupPlaceholder(); - - String notificationShowingAnimation(); - - String notificationHidingAnimation(); - } - - @Source({"notification.css", "org/eclipse/che/ide/api/ui/style.css"}) - NotificationCss notificationCss(); - - @Source("success.svg") - SVGResource success(); - - @Source("fail.svg") - SVGResource fail(); - - @Source("progress.svg") - SVGResource progress(); - - @Source("warning.svg") - SVGResource warning(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/DefaultOAuthAuthenticatorImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/DefaultOAuthAuthenticatorImpl.java deleted file mode 100644 index cd48f25da32..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/DefaultOAuthAuthenticatorImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.oauth; - -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.callback.AsyncPromiseHelper; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.oauth.OAuth2Authenticator; -import org.eclipse.che.ide.ui.dialogs.CancelCallback; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmCallback; -import org.eclipse.che.security.oauth.JsOAuthWindow; -import org.eclipse.che.security.oauth.OAuthCallback; -import org.eclipse.che.security.oauth.OAuthStatus; -import org.eclipse.che.security.oauth.SecurityTokenProvider; - -/** - * Default implementation of authenticator, used when no provider-specific one is present. - * - * @author Max Shaposhnik - */ -public class DefaultOAuthAuthenticatorImpl implements OAuth2Authenticator, OAuthCallback { - AsyncCallback callback; - - private final DialogFactory dialogFactory; - private final CoreLocalizationConstant localizationConstant; - private final SecurityTokenProvider provider; - private String authenticationUrl; - - @Inject - public DefaultOAuthAuthenticatorImpl( - DialogFactory dialogFactory, - CoreLocalizationConstant localizationConstant, - SecurityTokenProvider provider) { - - this.dialogFactory = dialogFactory; - this.localizationConstant = localizationConstant; - this.provider = provider; - } - - @Override - public void authenticate( - String authenticationUrl, @NotNull final AsyncCallback callback) { - this.authenticationUrl = authenticationUrl; - this.callback = callback; - showDialog(); - } - - public Promise authenticate(String authenticationUrl) { - this.authenticationUrl = authenticationUrl; - - return AsyncPromiseHelper.createFromAsyncRequest( - new AsyncPromiseHelper.RequestCall() { - @Override - public void makeCall(AsyncCallback callback) { - DefaultOAuthAuthenticatorImpl.this.callback = callback; - showDialog(); - } - }); - } - - private void showDialog() { - dialogFactory - .createConfirmDialog( - localizationConstant.authorizationDialogTitle(), - localizationConstant.authorizationDialogText(), - new ConfirmCallback() { - @Override - public void accepted() { - showAuthWindow(); - } - }, - new CancelCallback() { - @Override - public void cancelled() { - callback.onSuccess(OAuthStatus.NOT_PERFORMED); - } - }) - .show(); - } - - @Override - public String getProviderName() { - return "default"; - } - - @Override - public void onAuthenticated(OAuthStatus authStatus) { - callback.onSuccess(authStatus); - } - - private void showAuthWindow() { - JsOAuthWindow authWindow; - authWindow = new JsOAuthWindow(authenticationUrl, "error.url", 500, 980, this, provider); - authWindow.loginWithOAuth(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuth2AuthenticatorRegistryImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuth2AuthenticatorRegistryImpl.java deleted file mode 100644 index 0175fa8070c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuth2AuthenticatorRegistryImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.oauth; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.ide.api.oauth.OAuth2Authenticator; -import org.eclipse.che.ide.api.oauth.OAuth2AuthenticatorRegistry; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Map based implementation of OAuth registry - * - * @author Vitalii Parfonov - */ -@Singleton -public class OAuth2AuthenticatorRegistryImpl implements OAuth2AuthenticatorRegistry { - - private final Map authenticators; - - @Inject - public OAuth2AuthenticatorRegistryImpl(Set oAuth2Authenticators) { - authenticators = new HashMap<>(oAuth2Authenticators.size()); - for (OAuth2Authenticator authenticator : oAuth2Authenticators) { - final String providerName = authenticator.getProviderName(); - if (authenticators.get(providerName) != null) { - Log.warn( - OAuth2AuthenticatorRegistryImpl.class, - "OAuth2Authenticator provider " - + providerName - + " already registered. But can be only one"); - } else { - registerAuthenticator(providerName, authenticator); - } - } - } - - @Override - public void registerAuthenticator(String providerName, OAuth2Authenticator oAuth2Authenticator) { - authenticators.put(providerName, oAuth2Authenticator); - } - - @Override - public OAuth2Authenticator getAuthenticator(String providerName) { - return authenticators.get(providerName); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuthApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuthApiModule.java deleted file mode 100644 index 7372c49aa90..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/oauth/OAuthApiModule.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.oauth; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.multibindings.GinMultibinder; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.oauth.OAuth2Authenticator; -import org.eclipse.che.ide.api.oauth.OAuth2AuthenticatorRegistry; - -/** - * GIN module for configuring OAuth API components. - * - * @author Artem Zatsarynnyi - */ -public class OAuthApiModule extends AbstractGinModule { - - @Override - protected void configure() { - - GinMultibinder.newSetBinder(binder(), OAuth2Authenticator.class) - .addBinding() - .to(DefaultOAuthAuthenticatorImpl.class); - - bind(OAuth2AuthenticatorRegistry.class) - .to(OAuth2AuthenticatorRegistryImpl.class) - .in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/FocusManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/FocusManager.java deleted file mode 100644 index 04b517d3bc2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/FocusManager.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import static org.eclipse.che.ide.api.parts.PartStack.State.HIDDEN; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.Focusable; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackStateChangedEvent; -import org.eclipse.che.ide.part.PartStackPresenter.PartStackEventHandler; - -/** - * FocusManager is responsible for granting a focus for a stack when requested. - * - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -@Singleton -public class FocusManager implements PartStackStateChangedEvent.Handler { - - private final PartStackEventHandler partStackHandler; - - private PartStack activePartStack; - private PartPresenter activePart; - - /** - * Provides a handler, that is injected into PartStack, for the FocusManager to be able to track - * PartStack focus requests and changes of the active Part. - * - * @return instance of PartStackEventHandler - */ - public PartStackEventHandler getPartStackHandler() { - return partStackHandler; - } - - @Inject - public FocusManager(final EventBus eventBus) { - eventBus.addHandler(PartStackStateChangedEvent.TYPE, this); - - this.partStackHandler = - new PartStackEventHandler() { - @Override - public void onRequestFocus(PartStack partStack) { - if (partStack == null || partStack.getActivePart() == null) { - return; - } - - if (partStack == activePartStack && partStack.getActivePart() == activePart) { - return; - } - - /** unfocus active part stack */ - if (activePartStack != null) { - activePartStack.setFocus(false); - } - - /** unfocus active part */ - if (activePart != null && activePart.getView() instanceof Focusable) { - ((Focusable) activePart.getView()).setFocus(false); - } - - /** remember active part stack and part */ - activePartStack = partStack; - activePart = partStack.getActivePart(); - - /** focus part stack */ - activePartStack.setFocus(true); - - /** focus part if it has view and focusable */ - if (activePart != null) { - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - final IsWidget view = activePart.getView(); - if (view instanceof Focusable) { - ((Focusable) view).setFocus(true); - } - } - }); - } - - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - eventBus.fireEvent(new ActivePartChangedEvent(activePart)); - } - }); - } - }; - } - - @Override - public void onPartStackStateChanged(PartStackStateChangedEvent event) { - PartStack changedPartStack = event.getPartStack(); - if (HIDDEN == changedPartStack.getPartStackState() && activePartStack == changedPartStack) { - activePartStack = null; - activePart = null; - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartApiModule.java deleted file mode 100644 index 3f6ecc829f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartApiModule.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; -import com.google.gwt.inject.client.multibindings.GinMapBinder; -import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.inject.name.Named; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.parts.EditorMultiPartStack; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackUIResources; -import org.eclipse.che.ide.api.parts.PartStackView; -import org.eclipse.che.ide.api.parts.Perspective; -import org.eclipse.che.ide.api.parts.PerspectiveView; -import org.eclipse.che.ide.part.editor.EditorPartStackPresenter; -import org.eclipse.che.ide.part.editor.multipart.EditorMultiPartStackPresenter; -import org.eclipse.che.ide.part.editor.multipart.SplitEditorPartView; -import org.eclipse.che.ide.part.editor.multipart.SplitEditorPartViewFactory; -import org.eclipse.che.ide.part.editor.multipart.SplitEditorPartViewImpl; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerView; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerViewImpl; -import org.eclipse.che.ide.part.perspectives.general.PerspectiveViewImpl; -import org.eclipse.che.ide.part.perspectives.project.ProjectPerspective; -import org.eclipse.che.ide.part.widgets.TabItemFactory; -import org.eclipse.che.ide.part.widgets.editortab.EditorTabWidget; -import org.eclipse.che.ide.part.widgets.partbutton.PartButton; -import org.eclipse.che.ide.part.widgets.partbutton.PartButtonWidget; - -/** GIN module for configuring Part API components. */ -public class PartApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(Resources.class).in(Singleton.class); - bind(PartStackUIResources.class).to(Resources.class).in(Singleton.class); - - install( - new GinFactoryModuleBuilder() - .implement(PartStack.class, PartStackPresenter.class) - .build(PartStackPresenterFactory.class)); - - install( - new GinFactoryModuleBuilder() - .implement(PartStackView.class, PartStackViewImpl.class) - .build(PartStackViewFactory.class)); - - install( - new GinFactoryModuleBuilder() - .implement(PartButton.class, PartButtonWidget.class) - .implement(EditorTab.class, EditorTabWidget.class) - .build(TabItemFactory.class)); - - bind(EditorPartStack.class).to(EditorPartStackPresenter.class); - bind(EditorMultiPartStack.class).to(EditorMultiPartStackPresenter.class).in(Singleton.class); - install( - new GinFactoryModuleBuilder() - .implement(SplitEditorPartView.class, SplitEditorPartViewImpl.class) - .build(SplitEditorPartViewFactory.class)); - - // perspective related components - bind(PerspectiveView.class).to(PerspectiveViewImpl.class); - GinMapBinder.newMapBinder(binder(), String.class, Perspective.class) - .addBinding(PROJECT_PERSPECTIVE_ID) - .to(ProjectPerspective.class); - - // project explorer - bind(ProjectExplorerView.class).to(ProjectExplorerViewImpl.class).in(Singleton.class); - } - - @Provides - @Singleton - protected PartStackPresenter.PartStackEventHandler providePartStackEventHandler( - FocusManager partAgentPresenter) { - return partAgentPresenter.getPartStackHandler(); - } - - @Provides - @Singleton - @Named("defaultPerspectiveId") - protected String defaultPerspectiveId() { - return PROJECT_PERSPECTIVE_ID; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenter.java deleted file mode 100644 index 736c67e01ea..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenter.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import com.google.web.bindery.event.shared.EventBus; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.events.EditorDirtyStateChangedEvent; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackStateChangedEvent; -import org.eclipse.che.ide.api.parts.PartStackView; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; -import org.eclipse.che.ide.api.parts.PropertyListener; -import org.eclipse.che.ide.api.parts.base.BasePresenter; -import org.eclipse.che.ide.menu.PartMenu; -import org.eclipse.che.ide.part.widgets.TabItemFactory; -import org.eclipse.che.ide.part.widgets.partbutton.PartButton; - -/** - * Implements "Tab-like" UI Component, that accepts PartPresenters as child elements. - * - *

        PartStack support "focus" (please don't mix with GWT Widget's Focus feature). Focused - * PartStack will highlight active Part, notifying user what component is currently active. - * - * @author Nikolay Zamosenchuk - * @author Stéphane Daviet - * @author Dmitry Shnurenko - * @author Valeriy Svydenko - */ -public class PartStackPresenter - implements Presenter, PartStackView.ActionDelegate, PartButton.ActionDelegate, PartStack { - - /** The default size for the part. */ - private static final double DEFAULT_PART_SIZE = 260; - - /** The minimum allowable size for the part. */ - private static final int MIN_PART_SIZE = 100; - - private final WorkBenchPartController workBenchPartController; - private final PartsComparator partsComparator; - private final Map constraints; - private final PartStackEventHandler partStackHandler; - private final EventBus eventBus; - private final PartMenu partMenu; - - protected final Map parts; - protected final TabItemFactory tabItemFactory; - protected final PartStackView view; - protected final PropertyListener propertyListener; - - protected PartPresenter activePart; - protected TabItem activeTab; - - private TabItem previousActiveTab; - private PartPresenter previousActivePart; - - protected double currentSize; - - private State state = State.HIDDEN; - - private ActionDelegate delegate; - - @Inject - public PartStackPresenter( - final EventBus eventBus, - final PartMenu partMenu, - PartStackEventHandler partStackEventHandler, - TabItemFactory tabItemFactory, - PartsComparator partsComparator, - @Assisted final PartStackView view, - @Assisted @NotNull WorkBenchPartController workBenchPartController) { - this.view = view; - this.view.setDelegate(this); - - this.eventBus = eventBus; - this.partMenu = partMenu; - this.partStackHandler = partStackEventHandler; - this.workBenchPartController = workBenchPartController; - this.tabItemFactory = tabItemFactory; - this.partsComparator = partsComparator; - - this.parts = new HashMap<>(); - this.constraints = new LinkedHashMap<>(); - - this.propertyListener = - new PropertyListener() { - @Override - public void propertyChanged(PartPresenter source, int propId) { - if (PartPresenter.TITLE_PROPERTY == propId) { - updatePartTab(source); - } else if (EditorPartPresenter.PROP_DIRTY == propId) { - eventBus.fireEvent(new EditorDirtyStateChangedEvent((EditorPartPresenter) source)); - } - } - }; - - if (workBenchPartController != null) { - this.workBenchPartController.setSize(DEFAULT_PART_SIZE); - } - - currentSize = DEFAULT_PART_SIZE; - } - - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - private void updatePartTab(@NotNull PartPresenter part) { - if (!containsPart(part)) { - return; - } - - view.updateTabItem(part); - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part) { - addPart(part, null); - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part, @Nullable Constraints constraint) { - if (containsPart(part)) { - TabItem tab = getTabByPart(part); - onTabClicked(tab); - return; - } - - if (part instanceof BasePresenter) { - ((BasePresenter) part).setPartStack(this); - } - - part.addPropertyListener(propertyListener); - - PartButton partButton = - tabItemFactory - .createPartButton(part.getTitle()) - .setTooltip(part.getTitleToolTip()) - .setIcon(part.getTitleImage()); - partButton.setDelegate(this); - - parts.put(partButton, part); - constraints.put(part, constraint); - - view.addTab(partButton, part); - - sortPartsOnView(); - - onRequestFocus(); - } - - private void sortPartsOnView() { - List sortedParts = new ArrayList<>(); - sortedParts.addAll(parts.values()); - partsComparator.setConstraints(constraints); - - Collections.sort(sortedParts, partsComparator); - - view.setTabPositions(sortedParts); - } - - /** {@inheritDoc} */ - @Override - public boolean containsPart(PartPresenter part) { - return parts.values().contains(part); - } - - /** {@inheritDoc} */ - @Override - public PartPresenter getActivePart() { - return activePart; - } - - /** {@inheritDoc} */ - @Override - public void setActivePart(@NotNull PartPresenter part) { - TabItem tab = getTabByPart(part); - if (tab == null) { - return; - } - - activePart = part; - activeTab = tab; - - if (state == State.HIDDEN) { - state = State.NORMAL; - - if (currentSize < MIN_PART_SIZE) { - currentSize = DEFAULT_PART_SIZE; - } - - workBenchPartController.setSize(currentSize); - workBenchPartController.setHidden(false); - - } else if (state == State.MINIMIZED) { - // Minimized state means the other part stack is maximized. - // Ask the delegate to restore part stacks. - if (delegate != null) { - delegate.onRestore(this); - } - - } else if (state == State.NORMAL) { - if (workBenchPartController.getSize() < MIN_PART_SIZE) { - workBenchPartController.setSize(DEFAULT_PART_SIZE); - } - - workBenchPartController.setHidden(false); - } - - notifyPartStackStateChanged(); - - selectActiveTab(tab); - } - - @Nullable - protected TabItem getTabByPart(@NotNull PartPresenter part) { - for (Map.Entry entry : parts.entrySet()) { - - if (part.equals(entry.getValue())) { - return entry.getKey(); - } - } - - return null; - } - - /** {@inheritDoc} */ - @Override - public void removePart(PartPresenter part) { - parts.remove(getTabByPart(part)); - - view.removeTab(part); - } - - /** {@inheritDoc} */ - @Override - public void openPreviousActivePart() { - if (activePart == null) { - return; - } - - TabItem selectedTab = getTabByPart(activePart); - if (selectedTab != null) { - selectActiveTab(selectedTab); - } - } - - @Override - public void updateStack() { - for (PartPresenter partPresenter : parts.values()) { - if (partPresenter instanceof BasePresenter) { - ((BasePresenter) partPresenter).setPartStack(this); - } - } - } - - @Override - public List getParts() { - return new ArrayList<>(constraints.keySet()); - } - - /** {@inheritDoc} */ - @Override - public void onRequestFocus() { - partStackHandler.onRequestFocus(PartStackPresenter.this); - } - - /** {@inheritDoc} */ - @Override - public void setFocus(boolean focused) { - view.setFocus(focused); - } - - @Override - public void onToggleMaximize() { - if (getPartStackState() == PartStack.State.MAXIMIZED) { - restore(); - } else { - maximize(); - } - } - - @Override - public void onHide() { - hide(true); - } - - @Override - public void maximize() { - // Update the view state. - view.setMaximized(true); - - // Update dimensions of the part stack if it's already maximized. Used when resizing the view. - if (state == State.MAXIMIZED) { - workBenchPartController.maximize(); - return; - } - - // Part stack can be maximized only having NORMAL state. - if (state != State.NORMAL) { - return; - } - - // Maximize and update the state. - currentSize = workBenchPartController.getSize(); - workBenchPartController.maximize(); - state = State.MAXIMIZED; - - // Ask the delegate to maximize this part stack and collapse other. - if (delegate != null) { - delegate.onMaximize(this); - } - - notifyPartStackStateChanged(); - } - - @Override - public void minimize() { - // Update the view state. - view.setMaximized(false); - - // Part stack can be collapsed only having NORMAL state. - if (state != State.NORMAL) { - return; - } - - // Collapse and update the state. - currentSize = workBenchPartController.getSize(); - workBenchPartController.setSize(0); - workBenchPartController.setHidden(true); - state = State.MINIMIZED; - - // Deselect the active tab. - if (activeTab != null) { - activeTab.unSelect(); - } - - previousActiveTab = activeTab; - previousActivePart = activePart; - - activeTab = null; - activePart = null; - - notifyPartStackStateChanged(); - } - - @Override - public State getPartStackState() { - return state; - } - - @Override - public void hide() { - hide(false); - } - - @Override - public void hide(boolean isUserAction) { - // Update the view state. - view.setMaximized(false); - - // Ask the delegate to restore pack stack if it's maximized. - if (state == State.MAXIMIZED) { - if (delegate != null) { - delegate.onRestore(this); - } - } - - // Part stack can be minimized only having NORMAL state. - if (state == State.NORMAL) { - currentSize = workBenchPartController.getSize(); - workBenchPartController.setSize(0); - workBenchPartController.setHidden(true); - state = State.HIDDEN; - } - - // Deselect active tab. - if (activeTab != null) { - activeTab.unSelect(); - } - - previousActiveTab = activeTab; - previousActivePart = activePart; - - activeTab = null; - activePart = null; - - notifyPartStackStateChanged(isUserAction); - } - - @Override - public void show() { - if (state != State.HIDDEN) { - return; - } - - // Change the state to MINIMIZED for the following restoring. - state = State.MINIMIZED; - - if (delegate != null) { - delegate.onRestore(this); - } - - notifyPartStackStateChanged(); - - if (activePart != null) { - activePart.onOpen(); - } - - if (activeTab != null) { - selectActiveTab(activeTab); - } - } - - @Override - public void restore() { - // Update the view state. - view.setMaximized(false); - - // Don't restore part stack if it's in MINIMIZED or NORMAL state. - if (state == State.HIDDEN || state == State.NORMAL) { - return; - } - - // Restore and update the stack. - State prevState = state; - state = State.NORMAL; - - if (currentSize < MIN_PART_SIZE) { - currentSize = DEFAULT_PART_SIZE; - } - - workBenchPartController.setSize(currentSize); - workBenchPartController.setHidden(false); - - // Ask the delegate to restore part stacks if this part stack was maximized. - if (prevState == State.MAXIMIZED) { - if (delegate != null) { - delegate.onRestore(this); - } - } - - if (State.MINIMIZED == prevState) { - activeTab = previousActiveTab; - activePart = previousActivePart; - - previousActiveTab = null; - previousActivePart = null; - } - - // Select active tab. - if (activeTab != null) { - activeTab.select(); - } - - notifyPartStackStateChanged(); - } - - /** {@inheritDoc} */ - @Override - public void onTabClicked(@NotNull TabItem selectedTab) { - // Minimize the part stack if user clicked on the active tab. - if (selectedTab.equals(activeTab)) { - return; - } - - // Change active tab. - activeTab = selectedTab; - activePart = parts.get(selectedTab); - activePart.onOpen(); - selectActiveTab(activeTab); - } - - private void selectActiveTab(@NotNull TabItem selectedTab) { - workBenchPartController.setHidden(false); - - PartPresenter selectedPart = parts.get(selectedTab); - view.selectTab(selectedPart); - } - - @Override - public void onPartStackMenu(int mouseX, int mouseY) { - partMenu.show(mouseX, mouseY); - } - - /** Notify the Part Stack state has been changed. */ - private void notifyPartStackStateChanged() { - notifyPartStackStateChanged(false); - } - - /** - * Notify the Part Stack state has been changed. - * - * @param isUserInteraction pass {@code true} when hiding of the Part Stack is caused by user - * action (user clicked 'Hide' button, for example) or {@code false} otherwise - */ - private void notifyPartStackStateChanged(boolean isUserInteraction) { - Scheduler.get() - .scheduleDeferred( - () -> - eventBus.fireEvent( - new PartStackStateChangedEvent(PartStackPresenter.this, isUserInteraction))); - } - - /** Handles PartStack actions */ - public interface PartStackEventHandler { - /** PartStack is being clicked and requests Focus */ - void onRequestFocus(PartStack partStack); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenterFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenterFactory.java deleted file mode 100644 index 2741ef91703..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackPresenterFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackView; - -/** - * Gin factory for PartStack - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public interface PartStackPresenterFactory { - /** - * Creates new instance of {@link PartStack}. Each call of this method returns new object. - * - * @param view special view which is required for creating part stack - * @param workBenchPartController controller which is used by part stack - * @return an instance of {@link PartStack} - */ - PartStack create( - @NotNull PartStackView view, @NotNull WorkBenchPartController workBenchPartController); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewFactory.java deleted file mode 100644 index ff6e592d654..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.user.client.ui.FlowPanel; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.parts.PartStackView; - -/** - * Gin factory for PartStackView. - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public interface PartStackViewFactory { - - /** - * Creates new instance of {@link PartStackView}. Each call of this method returns new object. - * - * @param tabsPanel panel on which tab will be added - * @return an instance of {@link PartStackView} - */ - PartStackView create(@NotNull FlowPanel tabsPanel); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.java deleted file mode 100644 index 4988be6055f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.ContextMenuEvent; -import com.google.gwt.event.dom.client.ContextMenuHandler; -import com.google.gwt.event.dom.client.MouseDownEvent; -import com.google.gwt.event.dom.client.MouseDownHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.DeckLayoutPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.RequiresResize; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStackUIResources; -import org.eclipse.che.ide.api.parts.PartStackView; -import org.eclipse.che.ide.api.parts.base.ToolButton; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.menu.PositionController; -import org.vectomatic.dom.svg.ui.SVGImage; - -/** - * PartStack view class. Implements UI that manages Parts organized in a Tab-like widget. - * - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - * @author Valeriy Svydenko - */ -public class PartStackViewImpl extends Composite - implements RequiresResize, PartStackView, MouseDownHandler, ContextMenuHandler { - - interface PartStackViewImplUiBinder extends UiBinder {} - - private static final PartStackViewImplUiBinder UI_BINDER = - GWT.create(PartStackViewImplUiBinder.class); - - private final Map tabs; - - private final AcceptsOneWidget partViewContainer; - - private final PartStackUIResources resources; - private final CoreLocalizationConstant localizationConstant; - - @UiField FlowPanel partButtons; - - @UiField FlowPanel partStackActions; - - @UiField FlowPanel maximizeButton; - - @UiField FlowPanel hideButton; - - @UiField FlowPanel menuButton; - - @UiField DeckLayoutPanel partStackContent; - - private ActionDelegate delegate; - private Widget focusedWidget; - - @Inject - public PartStackViewImpl( - PartStackUIResources resources, CoreLocalizationConstant localizationConstant) { - this.resources = resources; - this.localizationConstant = localizationConstant; - initWidget(UI_BINDER.createAndBindUi(this)); - - partStackContent.getElement().getStyle().setPosition(Style.Position.ABSOLUTE); - - tabs = new HashMap<>(); - - partViewContainer = - new AcceptsOneWidget() { - @Override - public void setWidget(IsWidget widget) { - partStackContent.add(widget); - } - }; - - addDomHandler(this, MouseDownEvent.getType()); - addDomHandler(this, ContextMenuEvent.getType()); - - setMaximized(false); - - addMaximizeButton(); - addHideButton(); - addMenuButton(); - } - - /** Adds button to maximize part stack. */ - private void addMaximizeButton() { - SVGImage maximize = new SVGImage(resources.maximizePart()); - maximize.getElement().setAttribute("name", "workBenchIconMaximize"); - ToolButton maximizeToolButton = new ToolButton(maximize); - maximizeButton.add(maximizeToolButton); - - maximizeToolButton.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - delegate.onToggleMaximize(); - } - }); - - if (maximizeButton.getElement() instanceof elemental.dom.Element) { - Tooltip.create( - (elemental.dom.Element) maximizeButton.getElement(), - PositionController.VerticalAlign.BOTTOM, - PositionController.HorizontalAlign.MIDDLE, - localizationConstant.maximizePartStackTitle()); - } - } - - /** Adds button to hide part stack. */ - private void addHideButton() { - ToolButton hideToolButton = new ToolButton(FontAwesome.CARET_SQUARE_O_LEFT); - hideToolButton.getElement().setAttribute("name", "workBenchIconMinimize"); - hideButton.add(hideToolButton); - - hideToolButton.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - delegate.onHide(); - } - }); - - if (hideButton.getElement() instanceof elemental.dom.Element) { - Tooltip.create( - (elemental.dom.Element) hideButton.getElement(), - PositionController.VerticalAlign.BOTTOM, - PositionController.HorizontalAlign.MIDDLE, - localizationConstant.minimizePartStackTitle()); - } - } - - /** Adds part stack options button. */ - private void addMenuButton() { - final ToolButton menuToolButton = new ToolButton(FontAwesome.COG); - menuToolButton.getElement().setAttribute("name", "workBenchIconPartStackOptions"); - menuButton.add(menuToolButton); - menuToolButton.addClickHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - Scheduler.get() - .scheduleDeferred( - () -> { - int left = getAbsoluteLeft(menuToolButton.getElement()); - int top = getAbsoluteTop(menuToolButton.getElement()); - delegate.onPartStackMenu(left + 10, top + 21 - 8); - }); - } - }); - - if (menuButton.getElement() instanceof elemental.dom.Element) { - Tooltip.create( - (elemental.dom.Element) menuButton.getElement(), - PositionController.VerticalAlign.BOTTOM, - PositionController.HorizontalAlign.MIDDLE, - localizationConstant.partStackOptionsTitle()); - } - } - - /** - * Returns absolute left position of the element. - * - * @param element element - * @return element left position - */ - private native int getAbsoluteLeft(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().left; - }-*/; - - /** - * Returns absolute top position of the element. - * - * @param element element - * @return element top position - */ - private native int getAbsoluteTop(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().top; - }-*/; - - /** {@inheritDoc} */ - @Override - public void onMouseDown(@NotNull MouseDownEvent event) { - delegate.onRequestFocus(); - } - - /** {@inheritDoc} */ - @Override - public void onContextMenu(@NotNull ContextMenuEvent event) { - delegate.onRequestFocus(); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public void addTab(@NotNull TabItem tabItem, @NotNull PartPresenter presenter) { - partButtons.add(tabItem.getView()); - presenter.go(partViewContainer); - tabs.put(presenter, tabItem); - } - - /** {@inheritDoc} */ - @Override - public void removeTab(@NotNull PartPresenter presenter) { - TabItem tab = tabs.get(presenter); - partButtons.remove(tab.getView()); - partStackContent.remove(presenter.getView()); - tabs.remove(presenter); - } - - /** {@inheritDoc} */ - @Override - public void setTabPositions(List presenters) { - for (PartPresenter partPresenter : presenters) { - int tabIndex = presenters.indexOf(partPresenter); - TabItem tabItem = tabs.get(partPresenter); - partButtons.insert(tabItem.getView(), tabIndex); - } - } - - /** {@inheritDoc} */ - @Override - public void selectTab(@NotNull PartPresenter partPresenter) { - IsWidget view = partPresenter.getView(); - int viewIndex = partStackContent.getWidgetIndex(view); - - boolean isWidgetExist = viewIndex != -1; - - if (!isWidgetExist) { - partPresenter.go(partViewContainer); - - viewIndex = partStackContent.getWidgetIndex(view); - } - - partStackContent.showWidget(viewIndex); - - setActiveTab(partPresenter); - } - - /** - * Displays and sets part tab active. - * - * @param part - */ - private void setActiveTab(@NotNull PartPresenter part) { - for (TabItem tab : tabs.values()) { - tab.unSelect(); - } - - tabs.get(part).select(); - - delegate.onRequestFocus(); - } - - /** {@inheritDoc} */ - @Override - public void setFocus(boolean focused) { - if (focusedWidget != null) { - focusedWidget.getElement().removeAttribute("focused"); - } - - focusedWidget = partStackContent.getVisibleWidget(); - - if (focused && focusedWidget != null) { - focusedWidget.getElement().setAttribute("focused", ""); - } - } - - /** {@inheritDoc} */ - @Override - public void updateTabItem(@NotNull PartPresenter partPresenter) { - TabItem tabItem = tabs.get(partPresenter); - - tabItem.update(partPresenter); - } - - @Override - public void setMaximized(boolean maximized) { - getElement().setAttribute("maximized", "" + maximized); - } - - public void onResize() { - if (partStackContent instanceof RequiresResize) { - ((RequiresResize) partStackContent).onResize(); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.ui.xml deleted file mode 100644 index 59e848f19cd..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.ui.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - @eval hoveredTabIconColor org.eclipse.che.ide.api.theme.Style.theme.hoveredTabIconColor(); - @eval tabIconColor org.eclipse.che.ide.api.theme.Style.theme.tabIconColor(); - - .partStack { - position: relative; - overflow: hidden; - width: 100%; - height: 100%; - margin-top: 0px; - padding-top: 0px; - } - - /****************************************************************************** - * - * Left and right panels - * - ******************************************************************************/ - div[id="gwt-debug-navPanel"] .partStackHeader, - div[id="gwt-debug-toolPanel"] .partStackHeader { - position: absolute; - overflow: hidden; - left: 0px; - right: 0px; - top: 0px; - height: 26px; - background-color: partToolbar; - box-sizing: border-box; - border-bottom: tabBorderColor 1px solid; - } - - div[id="gwt-debug-navPanel"] .partSwitcher, - div[id="gwt-debug-toolPanel"] .partSwitcher { - position: absolute; - height: 25px; - left: 0px; - top: 0px; - right: 64px; - } - - div[id="gwt-debug-navPanel"] .partSwitcher .partButtons, - div[id="gwt-debug-toolPanel"] .partSwitcher .partButtons { - height: 25px; - margin-left: auto; - margin-right: auto; - display: table; - } - - div[id="gwt-debug-navPanel"] .partSwitcher .partButtons > div, - div[id="gwt-debug-toolPanel"] .partSwitcher .partButtons > div { - position: relative; - overflow: hidden; - display: table-cell; - width: 26px; - height: 25px; - line-height: 22px; - text-align: center; - box-sizing: border-box; - border-bottom: 3px solid transparent; - -webkit-transition: border-bottom-color 0.1s ease-in-out; - transition: border-bottom-color 0.1s ease-in-out; - } - - div[id="gwt-debug-navPanel"] .partSwitcher .partButtons > div[selected], - div[id="gwt-debug-toolPanel"] .partSwitcher .partButtons > div[selected] { - border-bottom-color: #fcc13d; - } - - div[id="gwt-debug-navPanel"] .partStackActions, - div[id="gwt-debug-toolPanel"] .partStackActions { - position: absolute; - width: 64px; - height: 18px; - right: 0px; - top: 4px; - box-sizing: border-box; - border-left: 1px solid #323949; - } - - div[id="gwt-debug-navPanel"] .partStackContent, - div[id="gwt-debug-toolPanel"] .partStackContent { - position: absolute; - overflow: hidden; - left: 0px; - right: 0px; - top: 26px; - bottom: 0px; - background-color: partBackground; - } - - /****************************************************************************** - * - * Bottom panel - * - ******************************************************************************/ - div[id="gwt-debug-infoPanel"] .partStackHeader { - position: absolute; - overflow: hidden; - left: 0px; - top: 0px; - width: 26px; - bottom: 0px; - background-color: partToolbar; - box-sizing: border-box; - border-right: tabBorderColor 1px solid; - } - - div[id="gwt-debug-infoPanel"] .partStackActions { - position: absolute; - width: 18px; - height: 64px; - left: 4px; - top: 0px; - box-sizing: border-box; - border-bottom: 1px solid #323949; - } - - div[id="gwt-debug-infoPanel"] .partSwitcher { - position: absolute; - left: 0px; - top: 64px; - width: 25px; - bottom: 0px; - display: flex; - align-items: center; - } - - div[id="gwt-debug-infoPanel"] .partSwitcher .partButtons { - width: 25px; - } - - div[id="gwt-debug-infoPanel"] .partSwitcher .partButtons > div { - position: relative; - overflow: hidden; - width: 25px; - height: 26px; - line-height: 26px; - text-align: center; - box-sizing: border-box; - border-right: 3px solid transparent; - -webkit-transition: border-right-color 0.1s ease-in-out; - transition: border-right-color 0.1s ease-in-out; - } - - div[id="gwt-debug-infoPanel"] .partSwitcher .partButtons > div[selected] { - border-right-color: #fcc13d; - } - - div[id="gwt-debug-infoPanel"] .partStackContent { - position: absolute; - overflow: hidden; - left: 26px; - right: 0px; - top: 0px; - bottom: 0px; - background-color: partBackground; - } - - /****************************************************************************** - * - * Part switcher icons - * - ******************************************************************************/ - .partSwitcher .partButtons > div svg, - .partSwitcher .partButtons > div svg rect, - .partSwitcher .partButtons > div svg path, - .partSwitcher .partButtons > div svg polygon { - fill: tabIconColor; - -webkit-transition: color 0.1s ease-in-out, - fill 0.1s ease-in-out; - transition: color 0.1s ease-in-out, - fill 0.1s ease-in-out; - } - - .partSwitcher .partButtons > div svg path { - stroke: tabIconColor; - -webkit-transition: color 0.1s ease-in-out, - stroke 0.1s ease-in-out; - transition: color 0.1s ease-in-out, - stroke 0.1s ease-in-out; - } - - .partSwitcher .partButtons > div:hover svg, - .partSwitcher .partButtons > div:hover svg rect, - .partSwitcher .partButtons > div:hover svg path, - .partSwitcher .partButtons > div:hover svg polygon { - fill: hoveredTabIconColor; - } - - .partSwitcher .partButtons > div:hover svg path { - stroke: hoveredTabIconColor; - } - - .partSwitcher .partButtons > div[selected] svg, - .partSwitcher .partButtons > div[selected] svg rect, - .partSwitcher .partButtons > div[selected] svg path, - .partSwitcher .partButtons > div[selected] svg polygon { - fill: activeTabIconColor; - } - - .partSwitcher .partButtons > div[selected] svg path { - stroke: activeTabIconColor; - } - - /****************************************************************************** - * - * Part buttons - * - ******************************************************************************/ - .maximizeButton, - .hideButton, - .menuButton { - position: absolute; - width: 18px; - height: 18px; - } - - /****************************************************************************** - * - * Left and right part buttons - * - ******************************************************************************/ - div[id="gwt-debug-navPanel"] .maximizeButton, - div[id="gwt-debug-toolPanel"] .maximizeButton { - top: 0px; - right: 4px; - } - - div[id="gwt-debug-navPanel"] .hideButton, - div[id="gwt-debug-toolPanel"] .hideButton { - top: 0px; - right: 23px; - } - - div[id="gwt-debug-navPanel"] .menuButton, - div[id="gwt-debug-toolPanel"] .menuButton { - top: 0px; - right: 42px; - } - - /****************************************************************************** - * - * Bottom part buttons - * - ******************************************************************************/ - div[id="gwt-debug-infoPanel"] .maximizeButton { - left: 0px; - top: 4px; - } - - div[id="gwt-debug-infoPanel"] .hideButton { - left: 0px; - top: 23px; - } - - div[id="gwt-debug-infoPanel"] .menuButton { - left: 0px; - top: 42px; - } - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartsComparator.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartsComparator.java deleted file mode 100644 index 05c78eecec1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartsComparator.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import java.util.Comparator; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.constraints.Anchor; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.parts.PartPresenter; - -/** @author Dmitry Shnurenko */ -public class PartsComparator implements Comparator { - - private Map constraints; - - public void setConstraints(@NotNull Map constraints) { - this.constraints = constraints; - } - - @Override - public int compare(PartPresenter part1, PartPresenter part2) { - String title1 = part1.getTitle(); - String title2 = part2.getTitle(); - Constraints constr1 = constraints.get(part1); - Constraints constr2 = constraints.get(part2); - - if (constr1 == null && constr2 == null) { - return 0; - } - - if ((constr1 != null && constr1.myAnchor == Anchor.FIRST) - || (constr2 != null && constr2.myAnchor == Anchor.LAST)) { - return -1; - } - - if ((constr2 != null && constr2.myAnchor == Anchor.FIRST) - || (constr1 != null && constr1.myAnchor == Anchor.LAST)) { - return 1; - } - - if (constr1 != null && constr1.relativeId != null) { - Anchor anchor1 = constr1.myAnchor; - String relative1 = constr1.relativeId; - if (anchor1 == Anchor.BEFORE && relative1.equals(title2)) { - return -1; - } - if (anchor1 == Anchor.AFTER && relative1.equals(title2)) { - return 1; - } - } - - if (constr2 != null && constr2.relativeId != null) { - Anchor anchor2 = constr2.myAnchor; - String relative2 = constr2.relativeId; - if (anchor2 == Anchor.BEFORE && relative2.equals(title1)) { - return 1; - } - if (anchor2 == Anchor.AFTER && relative2.equals(title1)) { - return -1; - } - } - - if (constr1 != null && constr2 == null) { - return 1; - } - if (constr1 == null) { - return -1; - } - return 0; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchControllerFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchControllerFactory.java deleted file mode 100644 index 183419cd505..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchControllerFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.SplitLayoutPanel; -import javax.validation.constraints.NotNull; - -/** - * Special factory for creating instances of {@link WorkBenchPartController}. Each call of factory - * method returns new instance. - * - * @author Dmitry Shnurenko - */ -public interface WorkBenchControllerFactory { - - /** - * Creates special controller using throwing parameters. - * - * @param parentPanel parent panel - * @param simplePanel child panel,changes of which should be controlled - * @return an instance of {@link WorkBenchPartController} - */ - WorkBenchPartController createController( - @NotNull SplitLayoutPanel parentPanel, @NotNull SimplePanel simplePanel); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartController.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartController.java deleted file mode 100644 index f5d3a3ddaca..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartController.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.inject.ImplementedBy; - -/** - * This interface give ability part stack manipulate visibility an size in container. - * - * @author Evgen Vidolob - */ -@ImplementedBy(WorkBenchPartControllerImpl.class) -public interface WorkBenchPartController { - - /** - * Get part stack size. - * - * @return the size - */ - double getSize(); - - /** - * Set part stack size. - * - * @param size size which need set - */ - void setSize(double size); - - /** Maximizes part stack. */ - void maximize(); - - /** - * Sets the minimum allowable size for the part. - * - *

        The splitter cannot be dragged to a position that would make the part smaller than this - * size. - * - * @param minSize the minimum size for the part - */ - void setMinSize(int minSize); - - /** - * Show/hide part stack. - * - * @param hidden true hides part, false display part - */ - void setHidden(boolean hidden); - - /** - * Return hidden state. - * - * @return the hidden state - */ - boolean isHidden(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartControllerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartControllerImpl.java deleted file mode 100644 index 3f5680595f0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchPartControllerImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.SplitLayoutPanel; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; - -/** - * Implementation of WorkBenchPartController, used with SplitLayoutPanel as container - * - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public class WorkBenchPartControllerImpl implements WorkBenchPartController { - - public static final int DURATION = 200; - - private final SplitLayoutPanel splitLayoutPanel; - private final SimplePanel widget; - - @Inject - public WorkBenchPartControllerImpl( - @Assisted SplitLayoutPanel splitLayoutPanel, @Assisted SimplePanel widget) { - this.splitLayoutPanel = splitLayoutPanel; - this.widget = widget; - - splitLayoutPanel.setWidgetToggleDisplayAllowed(widget, true); - splitLayoutPanel.setWidgetHidden(widget, true); - splitLayoutPanel.forceLayout(); - } - - /** {@inheritDoc} */ - @Override - public double getSize() { - return splitLayoutPanel.getWidgetSize(widget); - } - - /** {@inheritDoc} */ - @Override - public void setSize(double size) { - splitLayoutPanel.setWidgetSize(widget, size); - splitLayoutPanel.animate(DURATION); - } - - @Override - public void maximize() { - DockLayoutPanel.Direction direction = splitLayoutPanel.getWidgetDirection(widget); - - if (DockLayoutPanel.Direction.NORTH == direction - || DockLayoutPanel.Direction.SOUTH == direction) { - int maxHeight = splitLayoutPanel.getOffsetHeight() - splitLayoutPanel.getSplitterSize(); - splitLayoutPanel.setWidgetSize(widget, maxHeight); - splitLayoutPanel.animate(DURATION); - - } else if (DockLayoutPanel.Direction.WEST == direction - || DockLayoutPanel.Direction.EAST == direction) { - int maxWidth = splitLayoutPanel.getOffsetWidth() - splitLayoutPanel.getSplitterSize(); - splitLayoutPanel.setWidgetSize(widget, maxWidth); - splitLayoutPanel.animate(DURATION); - } - } - - /** {@inheritDoc} */ - @Override - public void setHidden(boolean hidden) { - if (!hidden) { - splitLayoutPanel.setWidgetHidden(widget, false); - } - - splitLayoutPanel.setWidgetSize(widget, hidden ? 0 : getSize()); - splitLayoutPanel.animate(DURATION); - } - - @Override - public boolean isHidden() { - return splitLayoutPanel.getWidgetSize(widget) == 0; - } - - @Override - public void setMinSize(int minSize) { - splitLayoutPanel.setWidgetMinSize(widget, minSize); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchResources.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchResources.java deleted file mode 100644 index 07e05bd62bf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/WorkBenchResources.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part; - -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - */ -public interface WorkBenchResources extends ClientBundle { - - interface WorkBenchCss extends CssResource { - - @ClassName("ide-work-bench-tool-panel-bottom") - String ideWorkBenchToolPanelBottom(); - - @ClassName("ide-work-bench-tool-panel-left") - String ideWorkBenchToolPanelLeft(); - - @ClassName("ide-work-bench-tool-panel-right") - String ideWorkBenchToolPanelRight(); - - @ClassName("ide-work-bench-split-panel-left") - String ideWorkBenchSplitPanelLeft(); - - @ClassName("ide-work-bench-split-panel-right") - String ideWorkBenchSplitPanelRight(); - - @ClassName("ide-work-bench-split-panel-bottom") - String ideWorkBenchSplitPanelBottom(); - - @ClassName("ide-work-bench-parent-panel") - String ideWorkBenchParentPanel(); - } - - @Source({"perspectives/general/WorkBench.css", "org/eclipse/che/ide/api/ui/style.css"}) - WorkBenchCss workBenchCss(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenu.java deleted file mode 100644 index ed6d026969a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenu.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionGroup; -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.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.menu.ContextMenu; - -/** Menu appeared after clicking on Add editor tab button. */ -public class AddEditorTabMenu extends ContextMenu { - - @Inject - public AddEditorTabMenu( - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - super(actionManager, keyBindingAgent, managerProvider); - } - - protected ActionGroup updateActions() { - DefaultActionGroup defaultGroup = new DefaultActionGroup(actionManager); - - final ActionGroup actionGroup = - (ActionGroup) actionManager.getAction(IdeActions.GROUP_FILE_NEW); - - for (Action action : actionGroup.getChildren(null)) { - defaultGroup.add(action); - } - - return defaultGroup; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenuFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenuFactory.java deleted file mode 100644 index a8097ec031a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/AddEditorTabMenuFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -/** Factory for creating instances of {@link AddEditorTabMenu} */ -public interface AddEditorTabMenuFactory { - - /** - * Creates new Add editor tab menu. - * - * @return editor tab menu - */ - AddEditorTabMenu newAddEditorTabMenu(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackPresenter.java deleted file mode 100644 index eca75a9bf0d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackPresenter.java +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.collect.Iterables.filter; -import static org.eclipse.che.ide.actions.EditorActions.SPLIT_HORIZONTALLY; -import static org.eclipse.che.ide.actions.EditorActions.SPLIT_VERTICALLY; -import static org.eclipse.che.ide.api.editor.EditorWithErrors.EditorState.ERROR; -import static org.eclipse.che.ide.api.editor.EditorWithErrors.EditorState.WARNING; -import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED; -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_FILE_PROP; -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_PANE_PROP; -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_TAB_PROP; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Predicate; -import com.google.gwt.core.client.Scheduler; -import com.google.inject.Inject; -import com.google.web.bindery.event.shared.EventBus; -import com.google.web.bindery.event.shared.HandlerRegistration; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.AbstractEditorPresenter; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.EditorWithErrors; -import org.eclipse.che.ide.api.editor.EditorWithErrors.EditorState; -import org.eclipse.che.ide.api.editor.texteditor.HasReadOnlyProperty; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; -import org.eclipse.che.ide.api.parts.PropertyListener; -import org.eclipse.che.ide.api.parts.base.MaximizePartEvent; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.menu.PartMenu; -import org.eclipse.che.ide.part.PartStackPresenter; -import org.eclipse.che.ide.part.PartsComparator; -import org.eclipse.che.ide.part.editor.actions.CloseAllTabsPaneAction; -import org.eclipse.che.ide.part.editor.actions.ClosePaneAction; -import org.eclipse.che.ide.part.editor.event.CloseNonPinnedEditorsEvent; -import org.eclipse.che.ide.part.editor.event.CloseNonPinnedEditorsEvent.CloseNonPinnedEditorsHandler; -import org.eclipse.che.ide.part.widgets.TabItemFactory; -import org.eclipse.che.ide.part.widgets.panemenu.EditorPaneMenu; -import org.eclipse.che.ide.part.widgets.panemenu.EditorPaneMenuItem; -import org.eclipse.che.ide.part.widgets.panemenu.EditorPaneMenuItemFactory; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; - -/** - * EditorPartStackPresenter is a special PartStackPresenter that is shared among all Perspectives - * and used to display Editors. - * - * @author Nikolay Zamosenchuk - * @author Stéphane Daviet - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - * @author Roman Nikitenko - */ -public class EditorPartStackPresenter extends PartStackPresenter - implements EditorPartStack, - EditorTab.ActionDelegate, - CloseNonPinnedEditorsHandler, - ResourceChangedHandler, - EditorPartStackView.AddTabButtonClickListener { - - private final PresentationFactory presentationFactory; - private final AppContext appContext; - private final EditorPaneMenuItemFactory editorPaneMenuItemFactory; - private final EventBus eventBus; - private final EditorPaneMenu editorPaneMenu; - private final ActionManager actionManager; - private final ClosePaneAction closePaneAction; - private final CloseAllTabsPaneAction closeAllTabsPaneAction; - private final EditorAgent editorAgent; - private final Map items; - private final AddEditorTabMenuFactory addEditorTabMenuFactory; - - // this list need to save order of added parts - private final LinkedList partsOrder; - private final LinkedList closedParts; - - private HandlerRegistration closeNonPinnedEditorsHandler; - private HandlerRegistration resourceChangeHandler; - - @VisibleForTesting PaneMenuActionItemHandler paneMenuActionItemHandler; - @VisibleForTesting PaneMenuTabItemHandler paneMenuTabItemHandler; - - @Inject - public EditorPartStackPresenter( - EditorPartStackView view, - AppContext appContext, - PartMenu partMenu, - PartsComparator partsComparator, - EditorPaneMenuItemFactory editorPaneMenuItemFactory, - PresentationFactory presentationFactory, - EventBus eventBus, - TabItemFactory tabItemFactory, - PartStackEventHandler partStackEventHandler, - EditorPaneMenu editorPaneMenu, - ActionManager actionManager, - ClosePaneAction closePaneAction, - CloseAllTabsPaneAction closeAllTabsPaneAction, - EditorAgent editorAgent, - AddEditorTabMenuFactory addEditorTabMenuFactory) { - super(eventBus, partMenu, partStackEventHandler, tabItemFactory, partsComparator, view, null); - this.appContext = appContext; - this.editorPaneMenuItemFactory = editorPaneMenuItemFactory; - this.eventBus = eventBus; - this.presentationFactory = presentationFactory; - this.editorPaneMenu = editorPaneMenu; - this.actionManager = actionManager; - this.closePaneAction = closePaneAction; - this.closeAllTabsPaneAction = closeAllTabsPaneAction; - this.editorAgent = editorAgent; - this.view.setDelegate(this); - this.items = new HashMap<>(); - this.partsOrder = new LinkedList<>(); - this.closedParts = new LinkedList<>(); - this.addEditorTabMenuFactory = addEditorTabMenuFactory; - - view.setAddTabButtonClickListener(this); - initializePaneMenu(); - view.addPaneMenuButton(editorPaneMenu); - } - - private void initializePaneMenu() { - paneMenuTabItemHandler = new PaneMenuTabItemHandler(); - paneMenuActionItemHandler = new PaneMenuActionItemHandler(); - - final EditorPaneMenuItem closePaneItemWidget = - editorPaneMenuItemFactory.createMenuItem(closePaneAction); - closePaneItemWidget.setDelegate(paneMenuActionItemHandler); - editorPaneMenu.addItem(closePaneItemWidget); - - final EditorPaneMenuItem closeAllTabsItemWidget = - editorPaneMenuItemFactory.createMenuItem(closeAllTabsPaneAction); - closeAllTabsItemWidget.setDelegate(paneMenuActionItemHandler); - editorPaneMenu.addItem(closeAllTabsItemWidget, true); - - final Action splitHorizontallyAction = actionManager.getAction(SPLIT_HORIZONTALLY); - final EditorPaneMenuItem splitHorizontallyItemWidget = - editorPaneMenuItemFactory.createMenuItem(splitHorizontallyAction); - splitHorizontallyItemWidget.setDelegate(paneMenuActionItemHandler); - editorPaneMenu.addItem(splitHorizontallyItemWidget); - - final Action splitVerticallyAction = actionManager.getAction(SPLIT_VERTICALLY); - final EditorPaneMenuItem splitVerticallyItemWidget = - editorPaneMenuItemFactory.createMenuItem(splitVerticallyAction); - splitVerticallyItemWidget.setDelegate(paneMenuActionItemHandler); - editorPaneMenu.addItem(splitVerticallyItemWidget); - } - - @Nullable - private EditorPaneMenuItem getPaneMenuItemByTab(@NotNull TabItem tabItem) { - for (Entry entry : items.entrySet()) { - if (tabItem.equals(entry.getValue())) { - return entry.getKey(); - } - } - - return null; - } - - @Override - public List getParts() { - return new ArrayList<>(partsOrder); - } - - /** {@inheritDoc} */ - @Override - public void setFocus(boolean focused) { - view.setFocus(focused); - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part, Constraints constraint) { - addPart(part); - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part) { - checkArgument( - part instanceof AbstractEditorPresenter, - "Can not add part " + part.getTitle() + " to editor part stack"); - - EditorPartPresenter editorPart = (AbstractEditorPresenter) part; - if (containsPart(editorPart)) { - setActivePart(editorPart); - return; - } - - VirtualFile file = editorPart.getEditorInput().getFile(); - checkArgument(file != null, "File doesn't provided"); - - addHandlers(); - updateListClosedParts(file); - - editorPart.addPropertyListener(propertyListener); - - final EditorTab editorTab = tabItemFactory.createEditorPartButton(editorPart, this); - - if (file instanceof Resource) { - appContext - .getWorkspaceRoot() - .getFile(file.getLocation()) - .then( - optional -> { - if (optional.isPresent()) { - editorTab.setTitleColor(optional.get().getVcsStatus().getColor()); - } - }); - } - - editorPart.addPropertyListener( - new PropertyListener() { - @Override - public void propertyChanged(PartPresenter source, int propId) { - if (!(source instanceof EditorPartPresenter)) { - return; - } - - boolean isReadOnly = - ((EditorPartPresenter) source).getEditorInput().getFile().isReadOnly(); - if (!isReadOnly && propId == EditorPartPresenter.PROP_DIRTY) { - editorTab.setUnsavedDataMark(((EditorPartPresenter) source).isDirty()); - } - } - }); - - editorTab.setDelegate(this); - - parts.put(editorTab, editorPart); - partsOrder.add(editorPart); - - view.addTab(editorTab, editorPart); - - TabItem tabItem = getTabByPart(editorPart); - - if (tabItem != null) { - final EditorPaneMenuItem item = editorPaneMenuItemFactory.createMenuItem(tabItem); - item.setDelegate(paneMenuTabItemHandler); - editorPaneMenu.addItem(item); - items.put(item, tabItem); - } - - if (editorPart instanceof EditorWithErrors) { - final EditorWithErrors presenter = ((EditorWithErrors) editorPart); - - editorPart.addPropertyListener( - new PropertyListener() { - @Override - public void propertyChanged(PartPresenter source, int propId) { - EditorState editorState = presenter.getErrorState(); - - editorTab.setErrorMark(ERROR.equals(editorState)); - editorTab.setWarningMark(WARNING.equals(editorState)); - } - }); - } - - if (editorPart instanceof HasReadOnlyProperty) { - boolean isReadOnly = editorPart.getEditorInput().getFile().isReadOnly(); - editorTab.setReadOnlyMark(isReadOnly); - } - - view.selectTab(editorPart); - } - - private void updateListClosedParts(VirtualFile file) { - if (closedParts.isEmpty()) { - return; - } - - for (EditorPartPresenter closedEditorPart : closedParts) { - Path path = closedEditorPart.getEditorInput().getFile().getLocation(); - if (path.equals(file.getLocation())) { - closedParts.remove(closedEditorPart); - return; - } - } - } - - /** {@inheritDoc} */ - @Override - public PartPresenter getActivePart() { - return activePart; - } - - /** {@inheritDoc} */ - @Override - public void setActivePart(@NotNull PartPresenter part) { - activePart = part; - view.selectTab(part); - } - - /** {@inheritDoc} */ - @Override - public void onTabClicked(@NotNull TabItem tab) { - activePart = parts.get(tab); - view.selectTab(parts.get(tab)); - } - - @Override - public void onTabDoubleClicked(@NotNull TabItem tab) { - eventBus.fireEvent(new MaximizePartEvent(parts.get(tab))); - } - - @Override - public void onAddTabButtonClicked(final int mouseX, final int mouseY) { - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - addEditorTabMenuFactory.newAddEditorTabMenu().show(mouseX, mouseY); - } - }); - } - - /** {@inheritDoc} */ - @Override - public void removePart(PartPresenter part) { - super.removePart(part); - partsOrder.remove(part); - activePart = partsOrder.isEmpty() ? null : partsOrder.getLast(); - - if (activePart != null) { - onRequestFocus(); - } - - if (parts.isEmpty()) { - removeHandlers(); - } - } - - @Override - public void openPreviousActivePart() { - if (activePart != null) { - view.selectTab(activePart); - } - } - - /** {@inheritDoc} */ - @Override - public void onTabClose(@NotNull TabItem tab) { - final EditorPaneMenuItem editorPaneMenuItem = getPaneMenuItemByTab(tab); - editorPaneMenu.removeItem(editorPaneMenuItem); - items.remove(editorPaneMenuItem); - - EditorPartPresenter part = ((EditorTab) tab).getRelativeEditorPart(); - closedParts.add(part); - } - - /** {@inheritDoc} */ - @Override - public void onCloseNonPinnedEditors(CloseNonPinnedEditorsEvent event) { - EditorPartPresenter editorPart = event.getEditorTab().getRelativeEditorPart(); - if (!containsPart(editorPart)) { - return; - } - - Iterable nonPinned = - filter( - parts.keySet(), - new Predicate() { - @Override - public boolean apply(@Nullable TabItem input) { - return input instanceof EditorTab && !((EditorTab) input).isPinned(); - } - }); - - for (final TabItem tabItem : nonPinned) { - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - editorAgent.closeEditor(((EditorTab) tabItem).getRelativeEditorPart()); - } - }); - } - } - - @Override - public EditorPartPresenter getPartByTabId(@NotNull String tabId) { - for (TabItem tab : parts.keySet()) { - EditorTab currentTab = (EditorTab) tab; - if (currentTab.getId().equals(tabId)) { - return (EditorPartPresenter) parts.get(currentTab); - } - } - return null; - } - - @Nullable - public EditorTab getTabByPart(@NotNull EditorPartPresenter part) { - for (Map.Entry entry : parts.entrySet()) { - PartPresenter currentPart = entry.getValue(); - if (part.equals(currentPart)) { - return (EditorTab) entry.getKey(); - } - } - return null; - } - - @Nullable - @Override - public EditorTab getTabByPath(@NotNull Path path) { - for (TabItem tab : parts.keySet()) { - EditorTab editorTab = (EditorTab) tab; - Path currentPath = editorTab.getFile().getLocation(); - - if (currentPath.equals(path)) { - return editorTab; - } - } - return null; - } - - @Nullable - public PartPresenter getPartByPath(Path path) { - for (TabItem tab : parts.keySet()) { - EditorTab editorTab = (EditorTab) tab; - Path currentPath = editorTab.getFile().getLocation(); - - if (currentPath.equals(path)) { - return parts.get(tab); - } - } - return null; - } - - @Override - public EditorPartPresenter getNextFor(EditorPartPresenter editorPart) { - int indexForNext = partsOrder.indexOf(editorPart) + 1; - return indexForNext >= partsOrder.size() ? partsOrder.getFirst() : partsOrder.get(indexForNext); - } - - @Override - public EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart) { - int indexForNext = partsOrder.indexOf(editorPart) - 1; - return indexForNext < 0 ? partsOrder.getLast() : partsOrder.get(indexForNext); - } - - @Nullable - @Override - public EditorPartPresenter getLastClosed() { - if (closedParts.isEmpty()) { - return null; - } - return closedParts.getLast(); - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - if (delta.getKind() != REMOVED) { - return; - } - - Path resourcePath = delta.getResource().getLocation(); - for (EditorPartPresenter editorPart : closedParts) { - Path editorPath = editorPart.getEditorInput().getFile().getLocation(); - if (editorPath.equals(resourcePath)) { - closedParts.remove(editorPart); - return; - } - } - } - - private void addHandlers() { - if (closeNonPinnedEditorsHandler == null) { - closeNonPinnedEditorsHandler = - eventBus.addHandler(CloseNonPinnedEditorsEvent.getType(), this); - } - - if (resourceChangeHandler == null) { - resourceChangeHandler = eventBus.addHandler(ResourceChangedEvent.getType(), this); - } - } - - private void removeHandlers() { - if (resourceChangeHandler != null) { - resourceChangeHandler.removeHandler(); - resourceChangeHandler = null; - } - - if (closeNonPinnedEditorsHandler != null) { - closeNonPinnedEditorsHandler.removeHandler(); - closeNonPinnedEditorsHandler = null; - } - } - - @VisibleForTesting - protected class PaneMenuActionItemHandler implements EditorPaneMenuItem.ActionDelegate { - - @Override - public void onItemClicked(@NotNull EditorPaneMenuItem item) { - editorPaneMenu.hide(); - - final Action action = item.getData(); - final Presentation presentation = presentationFactory.getPresentation(action); - presentation.putClientProperty(CURRENT_PANE_PROP, EditorPartStackPresenter.this); - - final PartPresenter activePart = getActivePart(); - final TabItem tab = getTabByPart(activePart); - - if (tab != null) { - final VirtualFile virtualFile = ((EditorTab) tab).getFile(); - // pass into action file property and editor tab - presentation.putClientProperty(CURRENT_TAB_PROP, tab); - presentation.putClientProperty(CURRENT_FILE_PROP, virtualFile); - } - action.actionPerformed(new ActionEvent(presentation, actionManager, null)); - } - - @Override - public void onCloseButtonClicked(@NotNull EditorPaneMenuItem item) {} - } - - @VisibleForTesting - protected class PaneMenuTabItemHandler implements EditorPaneMenuItem.ActionDelegate { - - @Override - public void onItemClicked(@NotNull EditorPaneMenuItem item) { - editorPaneMenu.hide(); - - final TabItem tabItem = item.getData(); - activePart = parts.get(tabItem); - view.selectTab(activePart); - } - - @Override - public void onCloseButtonClicked(@NotNull EditorPaneMenuItem item) { - editorPaneMenu.hide(); - - final TabItem tabItem = item.getData(); - if (tabItem instanceof EditorTab) { - EditorTab editorTab = (EditorTab) tabItem; - editorAgent.closeEditor(editorTab.getRelativeEditorPart()); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.java deleted file mode 100644 index d7b7361bc87..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import static com.google.gwt.dom.client.Style.Display.BLOCK; -import static com.google.gwt.dom.client.Style.Unit.PCT; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.core.client.JavaScriptObject; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.dom.client.MouseDownEvent; -import com.google.gwt.event.dom.client.MouseDownHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.DeckLayoutPanel; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.ResizeComposite; -import com.google.gwt.user.client.ui.Widget; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.FontAwesome; -import org.eclipse.che.ide.api.editor.texteditor.TextEditor; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStackView; -import org.eclipse.che.ide.part.widgets.panemenu.EditorPaneMenu; - -/** - * @author Evgen Vidolob - * @author Dmitry Shnurenko - * @author Vitaliy Guliy - */ -public class EditorPartStackView extends ResizeComposite - implements PartStackView, MouseDownHandler { - - interface PartStackUiBinder extends UiBinder {} - - /** Listener to handle clicking on Add tab button. */ - interface AddTabButtonClickListener { - - /** - * Called when clicking on Add tab button. - * - * @param mouseX absolute mouse left - * @param mouseY absolute mouse top - */ - void onAddTabButtonClicked(int mouseX, int mouseY); - } - - private static final PartStackUiBinder UI_BINDER = GWT.create(PartStackUiBinder.class); - - private static final int POPUP_OFFSET = 15; - - @UiField DockLayoutPanel parent; - - @UiField FlowPanel tabsPanel; - - @UiField FlowPanel plusPanel; - - @UiField DeckLayoutPanel contentPanel; - - @UiField FlowPanel menuPanel; - - private final Map tabs; - private final AcceptsOneWidget partViewContainer; - private final LinkedList contents; - - private int tabsPanelWidth = 0; - - private ActionDelegate delegate; - private EditorPaneMenu editorPaneMenu; - private TabItem activeTab; - private AddTabButtonClickListener addTabButtonClickListener; - - public EditorPartStackView() { - this.tabs = new HashMap<>(); - this.contents = new LinkedList<>(); - - initWidget(UI_BINDER.createAndBindUi(this)); - - plusPanel.getElement().setInnerHTML(FontAwesome.PLUS); - plusPanel.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent clickEvent) { - if (addTabButtonClickListener != null) { - addTabButtonClickListener.onAddTabButtonClicked( - getAbsoluteLeft(plusPanel.getElement()) + POPUP_OFFSET, - getAbsoluteTop(plusPanel.getElement()) + POPUP_OFFSET); - } - } - }, - ClickEvent.getType()); - - partViewContainer = - new AcceptsOneWidget() { - @Override - public void setWidget(IsWidget widget) { - contentPanel.add(widget); - } - }; - - addDomHandler(this, MouseDownEvent.getType()); - - setMaximized(false); - } - - /** - * Returns absolute left position of the element. - * - * @param element element - * @return element left position - */ - private native int getAbsoluteLeft(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().left; - }-*/; - - /** - * Returns absolute top position of the element. - * - * @param element element - * @return element top position - */ - private native int getAbsoluteTop(JavaScriptObject element) /*-{ - return element.getBoundingClientRect().top; - }-*/; - - public void setAddTabButtonClickListener(AddTabButtonClickListener listener) { - addTabButtonClickListener = listener; - } - - /** {@inheritDoc} */ - @Override - protected void onAttach() { - super.onAttach(); - - Style style = getElement().getParentElement().getStyle(); - style.setHeight(100, PCT); - style.setWidth(100, PCT); - } - - /** - * Adds editor pane menu button in special place on view. - * - * @param editorPaneMenu button which will be added - */ - public void addPaneMenuButton(@NotNull EditorPaneMenu editorPaneMenu) { - this.editorPaneMenu = editorPaneMenu; - menuPanel.add(editorPaneMenu); - } - - /** {@inheritDoc} */ - @Override - public void onMouseDown(@NotNull MouseDownEvent event) { - delegate.onRequestFocus(); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public void addTab(@NotNull TabItem tabItem, @NotNull PartPresenter partPresenter) { - /** Show editor area if it is empty and hidden */ - if (contents.isEmpty()) { - getElement().getParentElement().getStyle().setDisplay(BLOCK); - } - - /** Add editor tab to tab panel */ - tabsPanel.insert(tabItem.getView(), tabsPanel.getWidgetIndex(plusPanel)); - - /** Process added editor tab */ - tabs.put(partPresenter, tabItem); - contents.add(partPresenter); - partPresenter.go(partViewContainer); - } - - /** Ensures active tab and plus button are visible. */ - private void ensureActiveTabVisible() { - // do nothing if selected tab is null - if (activeTab == null) { - return; - } - - // do nothing if selected tab is visible and plus button is visible - if (getAbsoluteTop(activeTab.getView().asWidget().getElement()) - == getAbsoluteTop(tabsPanel.getElement()) - && getAbsoluteTop(plusPanel.getElement()) == getAbsoluteTop(tabsPanel.getElement()) - && tabsPanelWidth == tabsPanel.getOffsetWidth()) { - return; - } - - tabsPanelWidth = tabsPanel.getOffsetWidth(); - - // determine whether all widgets are visible - boolean allWidgetVisible = true; - for (int i = 0; i < tabsPanel.getWidgetCount(); i++) { - Widget w = tabsPanel.getWidget(i); - if (plusPanel == w) { - continue; - } - - if (!w.isVisible()) { - allWidgetVisible = false; - break; - } - } - - // do nothing if all widgets are visible and sum of children width less then panel width - if (allWidgetVisible) { - int childrenWidth = 0; - for (int i = 0; i < tabsPanel.getWidgetCount(); i++) { - Widget w = tabsPanel.getWidget(i); - childrenWidth += w.getOffsetWidth(); - } - - if (childrenWidth < tabsPanelWidth) { - return; - } - } - - // hide all widgets except plus button - for (int i = 0; i < tabsPanel.getWidgetCount(); i++) { - Widget w = tabsPanel.getWidget(i); - if (plusPanel == w) { - continue; - } - - w.setVisible(false); - } - - // determine selected tab index - int selectedTabIndex = tabsPanel.getWidgetIndex(activeTab.getView().asWidget()); - - // show all possible tabs before selected tab - for (int i = selectedTabIndex; i >= 0; i--) { - Widget w = tabsPanel.getWidget(i); - - // skip for plus button - if (plusPanel == w) { - continue; - } - - // set tab visible - w.setVisible(true); - - // continue cycle if plus button visible - if (getAbsoluteTop(plusPanel.getElement()) == getAbsoluteTop(tabsPanel.getElement())) { - continue; - } - - // otherwise hide tab and break - w.setVisible(false); - break; - } - - // show all possible tabs after selected tab - for (int i = selectedTabIndex + 1; i < tabsPanel.getWidgetCount(); i++) { - Widget w = tabsPanel.getWidget(i); - - // skip for plus button - if (plusPanel == w) { - continue; - } - - // set tab visible - w.setVisible(true); - - // continue cycle if plus button visible - if (getAbsoluteTop(plusPanel.getElement()) == getAbsoluteTop(tabsPanel.getElement())) { - continue; - } - - // otherwise hide tab and break - w.setVisible(false); - break; - } - } - - /** {@inheritDoc} */ - @Override - public void removeTab(@NotNull PartPresenter presenter) { - TabItem tab = tabs.get(presenter); - tabsPanel.remove(tab.getView()); - contentPanel.remove(presenter.getView()); - - tabs.remove(presenter); - contents.remove(presenter); - - if (!contents.isEmpty()) { - selectTab(contents.getLast()); - } - } - - /** {@inheritDoc} */ - @Override - public void selectTab(@NotNull PartPresenter partPresenter) { - IsWidget view = partPresenter.getView(); - - // set/remove attribute 'active' for Selenium tests - for (int i = 0; i < contentPanel.getWidgetCount(); i++) { - contentPanel.getWidget(i).getElement().removeAttribute("active"); - } - view.asWidget().getElement().setAttribute("active", ""); - - int viewIndex = contentPanel.getWidgetIndex(view); - if (viewIndex < 0) { - partPresenter.go(partViewContainer); - viewIndex = contentPanel.getWidgetIndex(view); - } - - contentPanel.showWidget(viewIndex); - setActiveTab(partPresenter); - - if (partPresenter instanceof TextEditor) { - ((TextEditor) partPresenter).activate(); - } - } - - /** - * Switches to specified tab. - * - * @param part tab part - */ - private void setActiveTab(@NotNull PartPresenter part) { - for (TabItem tab : tabs.values()) { - tab.unSelect(); - tab.getView().asWidget().getElement().removeAttribute("active"); - } - - activeTab = tabs.get(part); - activeTab.select(); - - activeTab.getView().asWidget().getElement().setAttribute("active", ""); - - delegate.onRequestFocus(); - - // reset timer and schedule it again - ensureActiveTabVisibleTimer.cancel(); - ensureActiveTabVisibleTimer.schedule(200); - } - - /** {@inheritDoc} */ - @Override - public void setTabPositions(List partPositions) { - throw new UnsupportedOperationException( - "The method doesn't allowed in this class " + getClass()); - } - - /** {@inheritDoc} */ - @Override - public void setFocus(boolean focused) { - if (activeTab == null) { - return; - } - - if (focused) { - activeTab.select(); - } else { - activeTab.unSelect(); - } - } - - @Override - public void setMaximized(boolean maximized) { - getElement().setAttribute("maximized", Boolean.toString(maximized)); - } - - /** {@inheritDoc} */ - @Override - public void updateTabItem(@NotNull PartPresenter partPresenter) { - TabItem tab = tabs.get(partPresenter); - tab.update(partPresenter); - } - - @Override - public void onResize() { - super.onResize(); - - // reset timer and schedule it again - ensureActiveTabVisibleTimer.cancel(); - ensureActiveTabVisibleTimer.schedule(200); - } - - /** - * Timer to prevent updating tabs visibility while resizing. It needs to update tabs once when - * resizing has stopped. - */ - private Timer ensureActiveTabVisibleTimer = - new Timer() { - @Override - public void run() { - ensureActiveTabVisible(); - } - }; -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.ui.xml deleted file mode 100644 index 0f4574fc740..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorPartStackView.ui.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - .topPanel { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - border-bottom: 1px solid editorPanelBorderColor; - overflow: hidden; - background-color: editorPanelBackgroundColor; - } - - .tabsPanel { - position: absolute; - top: 0px; - height: 25px; - left: 0px; - right: 32px; - overflow: hidden; - background-color: editorTabsBackgroundColor; - } - - .tabsPanel > div { - max-width: 300px; - } - - .plusPanel { - float: left; - width: 23px; - height: 25px; - cursor: pointer; - overflow: hidden; - line-height: 25px; - text-align: center; - font-size: 7pt; - opacity: 0.6; - color: editorTabIconColor; - } - - .plusPanel:HOVER { - opacity: 1; - } - - .menuPanel { - position: absolute; - top: 0px; - height: 23px; - right: 0px; - width: 32px; - background-color: editorTabsBackgroundColor; - } - - .menuPanel > div { - position: absolute; - left: 0px; - top: 0px; - } - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenu.java deleted file mode 100644 index 151dd169bae..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenu.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_FILE_PROP; -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_PANE_PROP; -import static org.eclipse.che.ide.part.editor.actions.EditorAbstractAction.CURRENT_TAB_PROP; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.assistedinject.Assisted; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionGroup; -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.action.Presentation; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.menu.ContextMenu; - -/** - * Editor tab context menu. Perform injecting client property into action when last ones performs. - * So we may obtain file on which context menu has been shown and editor tab pin state. - * - * @author Vlad Zhukovskiy - */ -public class EditorTabContextMenu extends ContextMenu { - - private final EditorTab editorTab; - private final EditorPartPresenter editorPart; - private final EditorPartStack editorPartStack; - private final ActionManager actionManager; - - @Inject - public EditorTabContextMenu( - @Assisted EditorTab editorTab, - @Assisted EditorPartPresenter editorPart, - @Assisted EditorPartStack editorPartStack, - ActionManager actionManager, - KeyBindingAgent keyBindingAgent, - Provider managerProvider) { - super(actionManager, keyBindingAgent, managerProvider); - - this.editorTab = editorTab; - this.editorPart = editorPart; - this.editorPartStack = editorPartStack; - this.actionManager = actionManager; - } - - /** {@inheritDoc} */ - @Override - protected String getGroupMenu() { - return IdeActions.GROUP_EDITOR_TAB_CONTEXT_MENU; - } - - protected ActionGroup updateActions() { - final ActionGroup mainActionGroup = (ActionGroup) actionManager.getAction(getGroupMenu()); - if (mainActionGroup == null) { - return new DefaultActionGroup(actionManager); - } - - final Action[] children = mainActionGroup.getChildren(null); - for (final Action action : children) { - final Presentation presentation = presentationFactory.getPresentation(action); - // pass into action properties - presentation.putClientProperty(CURRENT_FILE_PROP, editorTab.getFile()); - presentation.putClientProperty(CURRENT_TAB_PROP, editorTab); - presentation.putClientProperty(CURRENT_PANE_PROP, editorPartStack); - } - return super.updateActions(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenuFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenuFactory.java deleted file mode 100644 index 155d0dcf7fe..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EditorTabContextMenuFactory.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; - -/** - * Editor tab context menu factory. - * - * @author Vlad Zhukovskiy - */ -public interface EditorTabContextMenuFactory { - /** - * Creates new context menu for editor tab. - * - * @param editorTab editor tab item - * @return new context menu - */ - EditorTabContextMenu newContextMenu( - EditorTab editorTab, EditorPartPresenter editorPart, EditorPartStack editorPartStack); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.java deleted file mode 100644 index 2171ebc6985..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import static java.util.Objects.nonNull; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import elemental.dom.Element; -import elemental.dom.Node; -import elemental.events.Event; -import elemental.events.EventListener; -import elemental.html.LIElement; -import elemental.html.SpanElement; -import java.util.HashMap; -import java.util.Map; -import javax.inject.Inject; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.actions.CreateProjectAction; -import org.eclipse.che.ide.actions.ImportProjectAction; -import org.eclipse.che.ide.actions.NavigateToFileAction; -import org.eclipse.che.ide.actions.find.FindActionAction; -import org.eclipse.che.ide.api.ProductInfoDataProvider; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.Presentation; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.theme.Style; -import org.eclipse.che.ide.newresource.NewFileAction; -import org.eclipse.che.ide.ui.toolbar.PresentationFactory; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.input.KeyMapUtil; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** Represent empty state of editors panel */ -public class EmptyEditorsPanel extends Composite - implements ResourceChangedEvent.ResourceChangedHandler { - - private static EmptyEditorsPanelUiBinder uiBinder = GWT.create(EmptyEditorsPanelUiBinder.class); - protected final AppContext appContext; - private final ActionManager actionManager; - private final Provider perspectiveManagerProvider; - private final KeyBindingAgent keyBindingAgent; - private final PresentationFactory presentationFactory; - private final CoreLocalizationConstant localizationConstant; - private final Map noFiles = new HashMap<>(); - private final Map noProjects = new HashMap<>(); - private final Map factoryActions = new HashMap<>(); - @UiField protected DivElement title; - @UiField protected DivElement root; - @UiField protected DivElement container; - @UiField protected DivElement logo; - @UiField Css style; - - @Inject - public EmptyEditorsPanel( - ActionManager actionManager, - Provider perspectiveManagerProvider, - KeyBindingAgent keyBindingAgent, - ProductInfoDataProvider productInfoDataProvider, - AppContext appContext, - EventBus eventBus, - CoreLocalizationConstant localizationConstant, - NewFileAction newFileAction, - CreateProjectAction createProjectAction, - ImportProjectAction importProjectAction, - FindActionAction findActionAction, - NavigateToFileAction navigateToFileAction) { - this( - actionManager, - perspectiveManagerProvider, - keyBindingAgent, - appContext, - localizationConstant, - newFileAction, - createProjectAction, - importProjectAction); - - eventBus.addHandler(ResourceChangedEvent.getType(), this); - final SVGResource logo = productInfoDataProvider.getWaterMarkLogo(); - if (nonNull(logo)) { - this.logo.appendChild(new SVGImage(logo).getSvgElement().getElement()); - } - - factoryActions.put(findActionAction.getTemplatePresentation().getText(), findActionAction); - factoryActions.put( - navigateToFileAction.getTemplatePresentation().getText(), navigateToFileAction); - - // Sometimes initialization of Create/Import Project actions are completed after the Empty - // editor page is rendered. - // In this case we need to wait when actions will be initialized. - Timer hoverToRenderTimer = - new Timer() { - @Override - public void run() { - render(); - } - }; - hoverToRenderTimer.schedule(500); - } - - public EmptyEditorsPanel( - ActionManager actionManager, - Provider perspectiveManagerProvider, - KeyBindingAgent keyBindingAgent, - AppContext appContext, - CoreLocalizationConstant localizationConstant, - NewFileAction newFileAction, - CreateProjectAction createProjectAction, - ImportProjectAction importProjectAction) { - this.actionManager = actionManager; - this.perspectiveManagerProvider = perspectiveManagerProvider; - this.keyBindingAgent = keyBindingAgent; - this.appContext = appContext; - this.localizationConstant = localizationConstant; - - noFiles.put("Create File...", newFileAction); - noFiles.put("Create Project...", createProjectAction); - - noProjects.put("Import Project...", importProjectAction); - noProjects.put("Create Project...", createProjectAction); - - presentationFactory = new PresentationFactory(); - - initWidget(uiBinder.createAndBindUi(this)); - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - final Resource resource = delta.getResource(); - - if (!(resource.getResourceType() == PROJECT && resource.getLocation().segmentCount() == 1)) { - return; - } - - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - render(); - } - }); - } - - protected void render() { - if (appContext.getProjects() != null && appContext.getProjects().length == 0) { - renderNoProjects(); - return; - } - - if (appContext.getWorkspace().getAttributes().containsKey("factoryId")) { - renderFactoryActions(); - return; - } - - renderNoFiles(); - } - - protected void renderNoProjects() { - render(localizationConstant.emptyStateNoProjects(), noProjects); - } - - protected void renderNoFiles() { - render(localizationConstant.emptyStateNoFiles(), noFiles); - } - - protected void renderFactoryActions() { - render(localizationConstant.emptyStateNoFiles(), factoryActions); - } - - private void render(String title, Map actions) { - this.title.setInnerText(title); - container.removeAllChildren(); - Element listElement = Elements.createElement("ul", new String[] {style.list()}); - - for (Map.Entry pair : actions.entrySet()) { - LIElement liElement = Elements.createLiElement(); - liElement.appendChild(renderAction(pair.getKey(), pair.getValue())); - listElement.appendChild(liElement); - } - - container.appendChild((com.google.gwt.dom.client.Node) listElement); - } - - private Node renderAction(String title, final Action action) { - final Presentation presentation = presentationFactory.getPresentation(action); - Element divElement = Elements.createDivElement(style.listElement()); - divElement.addEventListener( - "click", - new EventListener() { - @Override - public void handleEvent(Event evt) { - ActionEvent event = new ActionEvent(presentation, actionManager); - action.actionPerformed(event); - } - }, - true); - divElement.getStyle().setCursor("pointer"); - divElement.getStyle().setColor(Style.getOutputLinkColor()); - Element label = Elements.createDivElement(style.actionLabel()); - label.setInnerText(title); - divElement.appendChild(label); - - String hotKey = - KeyMapUtil.getShortcutText(keyBindingAgent.getKeyBinding(actionManager.getId(action))); - if (hotKey == null) { - hotKey = " "; - } else { - hotKey = " " + hotKey + " "; - } - SpanElement hotKeyElement = Elements.createSpanElement(style.hotKey()); - hotKeyElement.setInnerHTML(hotKey); - divElement.appendChild(hotKeyElement); - return divElement; - } - - interface EmptyEditorsPanelUiBinder extends UiBinder {} - - interface Css extends CssResource { - String list(); - - String parent(); - - String center(); - - String child(); - - String listElement(); - - String title(); - - String hotKey(); - - String actionLabel(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.ui.xml deleted file mode 100644 index f1a52613ca3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/EmptyEditorsPanel.ui.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - @eval lineColor org.eclipse.che.ide.api.theme.Style.theme.iconColor(); - @eval fontColor org.eclipse.che.ide.api.theme.Style.getMainFontColor(); - @eval logoFill org.eclipse.che.ide.api.theme.Style.getLogoFill(); - - .center { - display: flex; - justify-content: center; - align-items: center; - margin-bottom: 50px; - } - - .center g { - fill: logoFill; - } - - .parent { - position: relative; - width: 100%; - height: 100%; - } - - .child { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 215px; - } - - .list { - padding-left: 26px; - margin: 0; - margin-top: 5px; - } - - .listElement { - font-size: 10px; - margin-bottom: 3px; - } - - .title { - padding-left: 8px; - border-bottom: 1px solid lineColor; - font-size: 13px; - width: 138px; - } - - .hotKey { - border: 1px solid fontColor; - color: fontColor; - border-radius: 2px; - margin-left: 30px; - } - - .actionLabel { - display: inline-block; - width: 77px; - } - - - -

        -
        -
        -
        -
        - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/TabItemWithMarks.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/TabItemWithMarks.java deleted file mode 100644 index 2d6b8435103..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/TabItemWithMarks.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor; - -import org.eclipse.che.ide.api.parts.PartStackView; - -/** - * Tab with error and warning marks - * - * @author Oleksii Orel - */ -public interface TabItemWithMarks extends PartStackView.TabItem { - - /** Add error mark for Tab title */ - void setErrorMark(boolean isVisible); - - /** Add warning mark for Tab title */ - void setWarningMark(boolean isVisible); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAction.java deleted file mode 100644 index c384c4ae11e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAction.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Performs closing selected editor. Note: the pane which contains this editor will be closed when - * the pane doesn't contains editors anymore. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class CloseAction extends EditorAbstractAction { - - @Inject - public CloseAction(EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super(locale.editorTabClose(), locale.editorTabCloseDescription(), null, editorAgent, eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - EditorTab editorTab = getEditorTab(e); - if (editorTab == null) { - return; - } - - final VirtualFile editorFile = getEditorFile(e); - final EditorPartPresenter openedEditor = editorAgent.getOpenedEditor(editorFile.getLocation()); - - editorAgent.closeEditor(openedEditor); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllAction.java deleted file mode 100644 index dd1f55e421d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllAction.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Performs closing pane and all opened editors for current pane. - * - * @author Vlad Zhukovskiy - * @author Roman Nikitenko - */ -@Singleton -public class CloseAllAction extends EditorAbstractAction { - - @Inject - public CloseAllAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorTabCloseAll(), - locale.editorTabCloseAllDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - for (EditorPartPresenter editorPart : editorAgent.getOpenedEditorsFor(currentPartStack)) { - editorAgent.closeEditor(editorPart); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllExceptPinnedAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllExceptPinnedAction.java deleted file mode 100644 index 741cca835a6..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllExceptPinnedAction.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.part.editor.event.CloseNonPinnedEditorsEvent; - -/** - * Performs closing editor tabs with unpinned status for current editor part stack. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class CloseAllExceptPinnedAction extends EditorAbstractAction { - - @Inject - public CloseAllExceptPinnedAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorTabCloseAllButPinned(), - locale.editorTabCloseAllButPinnedDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - eventBus.fireEvent(new CloseNonPinnedEditorsEvent(getEditorTab(e))); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllTabsPaneAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllTabsPaneAction.java deleted file mode 100644 index 4a1c184f730..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseAllTabsPaneAction.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Performs closing pane and all opened editors for current pane. - * - * @author Roman Nikitenko - */ -@Singleton -public class CloseAllTabsPaneAction extends EditorAbstractAction { - - @Inject - public CloseAllTabsPaneAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorCloseAllTabsInPane(), - locale.editorCloseAllTabsInPaneDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - for (EditorPartPresenter editorPart : editorAgent.getOpenedEditorsFor(currentPartStack)) { - editorAgent.closeEditor(editorPart); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseOtherAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseOtherAction.java deleted file mode 100644 index 4afc9a275ff..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/CloseOtherAction.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Performs closing all opened editors except selected one for current editor part stack. - * - * @author Vlad Zhukovskiy - * @author Roman Nikitenko - */ -@Singleton -public class CloseOtherAction extends EditorAbstractAction { - - @Inject - public CloseOtherAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorTabCloseAllExceptSelected(), - locale.editorTabCloseAllExceptSelectedDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabled(isFilesToCloseExist(event)); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - EditorPartPresenter currentEditor = getEditorTab(event).getRelativeEditorPart(); - for (EditorPartPresenter editorPart : editorAgent.getOpenedEditorsFor(currentPartStack)) { - if (currentEditor != editorPart) { - editorAgent.closeEditor(editorPart); - } - } - } - - private boolean isFilesToCloseExist(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - EditorPartPresenter currentEditor = getEditorTab(event).getRelativeEditorPart(); - for (EditorPartPresenter openedEditor : editorAgent.getOpenedEditorsFor(currentPartStack)) { - if (currentEditor != openedEditor) { - return true; - } - } - return false; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ClosePaneAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ClosePaneAction.java deleted file mode 100644 index d10c115ee50..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ClosePaneAction.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Performs closing current pane and all opened editors for this one. - * - * @author Roman Nikitenko - */ -@Singleton -public class ClosePaneAction extends EditorAbstractAction { - - @Inject - public ClosePaneAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorClosePane(), locale.editorClosePaneDescription(), null, editorAgent, eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - for (EditorPartPresenter editorPart : editorAgent.getOpenedEditorsFor(currentPartStack)) { - editorAgent.closeEditor(editorPart); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorAbstractAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorAbstractAction.java deleted file mode 100644 index c33b4a91280..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorAbstractAction.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Base action for editor tab. - * - * @author Vlad Zhukovskiy - */ -public abstract class EditorAbstractAction extends AbstractPerspectiveAction { - - public static final String CURRENT_FILE_PROP = "source"; - public static final String CURRENT_TAB_PROP = "tab"; - public static final String CURRENT_PANE_PROP = "pane"; - - protected final EventBus eventBus; - protected final EditorAgent editorAgent; - - public EditorAbstractAction( - String tooltip, - String description, - SVGResource icon, - EditorAgent editorAgent, - EventBus eventBus) { - super(singletonList(PROJECT_PERSPECTIVE_ID), tooltip, description, icon); - this.eventBus = eventBus; - this.editorAgent = editorAgent; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(!editorAgent.getOpenedEditors().isEmpty()); - } - - /** - * Fetch file from the action event. File should be passed by context menu during construction the - * last one. - * - * @param e action event - * @return {@link VirtualFile} file. - * @throws IllegalStateException in case if file not found in action event - */ - protected VirtualFile getEditorFile(ActionEvent e) { - Object o = e.getPresentation().getClientProperty(CURRENT_FILE_PROP); - - if (o instanceof VirtualFile) { - return (VirtualFile) o; - } - - throw new IllegalStateException("File doesn't provided"); - } - - protected EditorTab getEditorTab(ActionEvent e) { - Object o = e.getPresentation().getClientProperty(CURRENT_TAB_PROP); - - if (o instanceof EditorTab) { - return (EditorTab) o; - } - - throw new IllegalStateException("Tab doesn't provided"); - } - - protected EditorPartStack getEditorPane(ActionEvent e) { - Object o = e.getPresentation().getClientProperty(CURRENT_PANE_PROP); - - if (o instanceof EditorPartStack) { - return (EditorPartStack) o; - } - - throw new IllegalStateException("Editor pane doesn't provided"); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorSwitchAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorSwitchAction.java deleted file mode 100644 index 38e7ecb9f19..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/EditorSwitchAction.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static com.google.common.base.Preconditions.checkArgument; -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.common.annotations.Beta; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * @author Vlad Zhukovskiy - * @author Roman Nikitenko - */ -@Beta -abstract class EditorSwitchAction extends AbstractPerspectiveAction { - - protected final EditorAgent editorAgent; - - public EditorSwitchAction(String text, String description, EditorAgent editorAgent) { - super(singletonList(PROJECT_PERSPECTIVE_ID), text, description, null, null); - this.editorAgent = editorAgent; - } - - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setVisible(true); - event.getPresentation().setEnabled(editorAgent.getOpenedEditors().size() > 1); - } - - protected EditorPartPresenter getPreviousEditorBaseOn(EditorPartPresenter editor) { - checkArgument(editor != null); - - return editorAgent.getPreviousFor(editor); - } - - protected EditorPartPresenter getNextEditorBaseOn(EditorPartPresenter editor) { - checkArgument(editor != null); - - return editorAgent.getNextFor(editor); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/PinEditorTabAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/PinEditorTabAction.java deleted file mode 100644 index 1d8c6ab4dd4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/PinEditorTabAction.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.parts.EditorTab; - -/** - * Pin/Unpin current selected editor tab. - * - * @author Vlad Zhukovskiy - * @author Roman Nikitenko - */ -@Singleton -public class PinEditorTabAction extends EditorAbstractAction { - - @Inject - public PinEditorTabAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super(locale.editorTabPin(), locale.editorTabPinDescription(), null, editorAgent, eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - EditorTab editorTab = getEditorTab(e); - editorTab.setPinMark(!editorTab.isPinned()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ReopenClosedFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ReopenClosedFileAction.java deleted file mode 100644 index 96712f51d09..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/ReopenClosedFileAction.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Performs restoring closed editor tab for current editor part stack. - * - * @author Vlad Zhukovskiy - * @author Roman Nikitenko - */ -@Singleton -public class ReopenClosedFileAction extends EditorAbstractAction { - - @Inject - public ReopenClosedFileAction( - EventBus eventBus, CoreLocalizationConstant locale, EditorAgent editorAgent) { - super( - locale.editorTabReopenClosedTab(), - locale.editorTabReopenClosedTabDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - EditorPartPresenter lastClosed = currentPartStack.getLastClosed(); - - event.getPresentation().setEnabled(lastClosed != null); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - EditorPartStack currentPartStack = getEditorPane(event); - EditorPartPresenter lastClosed = currentPartStack.getLastClosed(); - VirtualFile file = lastClosed.getEditorInput().getFile(); - - editorAgent.openEditor(file); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitHorizontallyAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitHorizontallyAction.java deleted file mode 100644 index 02d8d2b2f2c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitHorizontallyAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static org.eclipse.che.ide.api.constraints.Direction.HORIZONTALLY; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Divides the area of the selected editor on two areas and displays copy horizontally relative to - * selected editor. - * - * @author Roman Nikitenko - */ -@Singleton -public class SplitHorizontallyAction extends EditorAbstractAction { - - @Inject - public SplitHorizontallyAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorTabSplitHorizontally(), - locale.editorTabSplitHorizontallyDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - final String tabId = getEditorTab(event).getId(); - final VirtualFile file = getEditorFile(event); - final Constraints constraints = new Constraints(HORIZONTALLY, tabId); - - editorAgent.openEditor(file, constraints); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitVerticallyAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitVerticallyAction.java deleted file mode 100644 index 58e6ab5173b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SplitVerticallyAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static org.eclipse.che.ide.api.constraints.Direction.VERTICALLY; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.resources.VirtualFile; - -/** - * Divides the area of the selected editor on two areas and displays copy vertically relative to - * selected editor. - * - * @author Roman Nikitenko - */ -@Singleton -public class SplitVerticallyAction extends EditorAbstractAction { - - @Inject - public SplitVerticallyAction( - EditorAgent editorAgent, EventBus eventBus, CoreLocalizationConstant locale) { - super( - locale.editorTabSplitVertically(), - locale.editorTabSplitVerticallyDescription(), - null, - editorAgent, - eventBus); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - final String tabId = getEditorTab(event).getId(); - final VirtualFile file = getEditorFile(event); - final Constraints constraints = new Constraints(VERTICALLY, tabId); - - editorAgent.openEditor(file, constraints); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchNextEditorAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchNextEditorAction.java deleted file mode 100644 index 3a87b015b79..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchNextEditorAction.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Switch to next opened editor based on current active. - * - * @author Vlad Zhukovskyi - * @author Roman Nikitenko - */ -@Singleton -public class SwitchNextEditorAction extends EditorSwitchAction { - - @Inject - public SwitchNextEditorAction(CoreLocalizationConstant constant, EditorAgent editorAgent) { - super( - constant.switchToRightEditorAction(), - constant.switchToRightEditorActionDescription(), - editorAgent); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - final EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - checkNotNull(activeEditor, "Null editor occurred"); - - final EditorPartPresenter previousEditor = getNextEditorBaseOn(activeEditor); - editorAgent.activateEditor(previousEditor); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchPreviousEditorAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchPreviousEditorAction.java deleted file mode 100644 index 7740a9bbd2b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/actions/SwitchPreviousEditorAction.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.actions; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; - -/** - * Switch to previous opened editor based on current active. - * - * @author Vlad Zhukovskyi - * @author Roman Nikitenko - */ -@Singleton -public class SwitchPreviousEditorAction extends EditorSwitchAction { - - @Inject - public SwitchPreviousEditorAction(CoreLocalizationConstant constant, EditorAgent editorAgent) { - super( - constant.switchToLeftEditorAction(), - constant.switchToLeftEditorActionDescription(), - editorAgent); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent event) { - final EditorPartPresenter activeEditor = editorAgent.getActiveEditor(); - - checkNotNull(activeEditor, "Null editor occurred"); - - final EditorPartPresenter previousEditor = getPreviousEditorBaseOn(activeEditor); - editorAgent.activateEditor(previousEditor); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/event/CloseNonPinnedEditorsEvent.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/event/CloseNonPinnedEditorsEvent.java deleted file mode 100644 index 4ce44a7899c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/event/CloseNonPinnedEditorsEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.event; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import org.eclipse.che.ide.api.parts.EditorTab; - -/** - * Close non pinned editor tabs event. - * - * @author Vlad Zhukovskiy - */ -public class CloseNonPinnedEditorsEvent - extends GwtEvent { - - public interface CloseNonPinnedEditorsHandler extends EventHandler { - void onCloseNonPinnedEditors(CloseNonPinnedEditorsEvent event); - } - - private static Type TYPE; - - public static Type getType() { - if (TYPE == null) { - TYPE = new Type<>(); - } - return TYPE; - } - - private final EditorTab editorTab; - - public CloseNonPinnedEditorsEvent(EditorTab editorTab) { - this.editorTab = editorTab; - } - - public EditorTab getEditorTab() { - return editorTab; - } - - /** {@inheritDoc} */ - @Override - public Type getAssociatedType() { - return getType(); - } - - /** {@inheritDoc} */ - @Override - protected void dispatch(CloseNonPinnedEditorsHandler handler) { - handler.onCloseNonPinnedEditors(this); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackPresenter.java deleted file mode 100644 index a1e9a121c26..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackPresenter.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.LinkedList; -import java.util.List; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.EditorMultiPartStack; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.workspace.event.WorkspaceRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStartingEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppingEvent; - -/** - * Presenter to control the displaying of multi editors. - * - * @author Roman Nikitenko - */ -@Singleton -public class EditorMultiPartStackPresenter - implements EditorMultiPartStack, ActivePartChangedHandler { - private final Provider editorPartStackFactory; - private final EditorMultiPartStackView view; - private final LinkedList partStackPresenters; - private PartPresenter activeEditor; - private EditorPartStack activeEditorPartStack; - - private State state = State.NORMAL; - - @Inject - public EditorMultiPartStackPresenter( - EventBus eventBus, - EditorMultiPartStackView view, - Provider editorPartStackFactory, - AppContext appContext) { - this.view = view; - this.editorPartStackFactory = editorPartStackFactory; - this.partStackPresenters = new LinkedList<>(); - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - - eventBus.addHandler(WorkspaceStoppingEvent.TYPE, event -> view.showPlaceholder(true)); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, event -> view.showPlaceholder(true)); - eventBus.addHandler(WorkspaceStartingEvent.TYPE, event -> view.showPlaceholder(true)); - eventBus.addHandler(WorkspaceRunningEvent.TYPE, event -> view.showPlaceholder(false)); - - if (WorkspaceStatus.RUNNING != appContext.getWorkspace().getStatus()) { - view.showPlaceholder(true); - } - } - - @Override - public void setDelegate(ActionDelegate delegate) {} - - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - @Override - public boolean containsPart(PartPresenter part) { - for (EditorPartStack partStackPresenter : partStackPresenters) { - if (partStackPresenter.containsPart(part)) { - return true; - } - } - return false; - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part) { - if (activeEditorPartStack != null) { - // open the part in the active editorPartStack - activeEditorPartStack.addPart(part); - return; - } - - // open the part in the new editorPartStack - addEditorPartStack(part, null, null, -1); - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part, Constraints constraint) { - if (constraint == null) { - addPart(part); - return; - } - - EditorPartStack relativePartStack = getPartStackByTabId(constraint.relativeId); - if (relativePartStack != null) { - // view of relativePartStack will be split corresponding to constraint on two areas and part - // will be added into created area - addEditorPartStack(part, relativePartStack, constraint, -1); - } - } - - private EditorPartStack addEditorPartStack( - final PartPresenter part, - final EditorPartStack relativePartStack, - final Constraints constraints, - double size) { - final EditorPartStack editorPartStack = editorPartStackFactory.get(); - partStackPresenters.add(editorPartStack); - - view.addPartStack(editorPartStack, relativePartStack, constraints, size); - - if (part != null) { - editorPartStack.addPart(part); - } - return editorPartStack; - } - - @Override - public void setFocus(boolean focused) { - if (activeEditorPartStack != null) { - activeEditorPartStack.setFocus(focused); - } - } - - /** {@inheritDoc} */ - @Override - public PartPresenter getActivePart() { - return activeEditor; - } - - /** {@inheritDoc} */ - @Override - public void setActivePart(@NotNull PartPresenter part) { - activeEditor = part; - EditorPartStack editorPartStack = getPartStackByPart(part); - if (editorPartStack != null) { - activeEditorPartStack = editorPartStack; - editorPartStack.setActivePart(part); - } - } - - @Override - public void show() { - state = State.NORMAL; - } - - @Override - public void hide() { - state = State.HIDDEN; - } - - @Override - public void maximize() { - state = State.MAXIMIZED; - } - - @Override - public void minimize() { - state = State.MINIMIZED; - } - - @Override - public void restore() { - state = State.NORMAL; - } - - @Override - public State getPartStackState() { - return state; - } - - /** {@inheritDoc} */ - @Override - public void removePart(PartPresenter part) { - EditorPartStack editorPartStack = getPartStackByPart(part); - if (editorPartStack == null) { - return; - } - - editorPartStack.removePart(part); - - if (editorPartStack.getActivePart() == null) { - removePartStack(editorPartStack); - } - } - - @Override - public void removePartStack(EditorPartStack editorPartStack) { - if (activeEditorPartStack == editorPartStack) { - activeEditorPartStack = null; - } - - editorPartStack.getParts().forEach(editorPartStack::removePart); - - view.removePartStack(editorPartStack); - partStackPresenters.remove(editorPartStack); - - if (!partStackPresenters.isEmpty()) { - EditorPartStack lastStackPresenter = partStackPresenters.getLast(); - lastStackPresenter.openPreviousActivePart(); - } - } - - @Override - public void openPreviousActivePart() { - if (activeEditor != null) { - EditorPartStack partStack = getPartStackByPart(activeEditor); - if (partStack != null) { - partStack.openPreviousActivePart(); - } - } - } - - @Override - public void updateStack() { - for (EditorPartStack editorPartStack : partStackPresenters) { - editorPartStack.updateStack(); - } - } - - @Override - public EditorPartStack getActivePartStack() { - return activeEditorPartStack; - } - - @Override - public List getParts() { - throw new UnsupportedOperationException(); - } - - @Nullable - public EditorPartStack getPartStackByPart(PartPresenter part) { - if (part == null) { - return null; - } - - for (EditorPartStack editorPartStack : partStackPresenters) { - if (editorPartStack.containsPart(part)) { - return editorPartStack; - } - } - return null; - } - - @Nullable - public EditorPartStack getPartStackByTabId(@NotNull String tabId) { - for (EditorPartStack editorPartStack : partStackPresenters) { - PartPresenter editorPart = editorPartStack.getPartByTabId(tabId); - if (editorPart != null) { - return editorPartStack; - } - } - return null; - } - - @Override - public EditorPartPresenter getPartByTabId(@NotNull String tabId) { - for (EditorPartStack editorPartStack : partStackPresenters) { - EditorPartPresenter editorPart = editorPartStack.getPartByTabId(tabId); - if (editorPart != null) { - return editorPart; - } - } - return null; - } - - @Override - public EditorTab getTabByPart(EditorPartPresenter editorPart) { - for (EditorPartStack editorPartStack : partStackPresenters) { - EditorTab editorTab = editorPartStack.getTabByPart(editorPart); - if (editorTab != null) { - return editorTab; - } - } - return null; - } - - @Override - public EditorPartPresenter getNextFor(EditorPartPresenter editorPart) { - for (EditorPartStack editorPartStack : partStackPresenters) { - if (editorPartStack.containsPart(editorPart)) { - return editorPartStack.getNextFor(editorPart); - } - } - return null; - } - - @Override - public EditorPartPresenter getPreviousFor(EditorPartPresenter editorPart) { - for (EditorPartStack editorPartStack : partStackPresenters) { - if (editorPartStack.containsPart(editorPart)) { - return editorPartStack.getPreviousFor(editorPart); - } - } - return null; - } - - @Override - public EditorPartStack createRootPartStack() { - EditorPartStack editorPartStack = addEditorPartStack(null, null, null, -1); - activeEditorPartStack = editorPartStack; - return editorPartStack; - } - - @Override - public EditorPartStack split( - EditorPartStack relativePartStack, Constraints constraints, double size) { - EditorPartStack editorPartStack = - addEditorPartStack(null, relativePartStack, constraints, size); - activeEditorPartStack = editorPartStack; - return editorPartStack; - } - - @Override - public EditorMultiPartStackState getState() { - return view.getState(); - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - PartPresenter activePart = event.getActivePart(); - if (activePart instanceof EditorPartPresenter) { - activeEditor = activePart; - activeEditorPartStack = getPartStackByPart(activePart); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackView.java deleted file mode 100644 index ac67c9ebf92..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackView.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.ImplementedBy; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Provides methods to control view representation of multi part stack container. - * - * @author Roman Nikitenko - */ -@ImplementedBy(EditorMultiPartStackViewImpl.class) -public interface EditorMultiPartStackView extends IsWidget { - - /** - * Adds editor part stack: - *
      • - if {@code relativePartStack} is null - Editor Part Stack will be added to the main editor - * area - *
      • - if {@code relativePartStack} not null - view of {@code relativePartStack} will be split - * corresponding to {@code constraints} on two areas and Editor Part Stack will be added into - * created area - * - * @param partStack editor part stack to adding in corresponding area - * @param relativePartStack relative editor part stack which will be split - * @param constraints contains info about way how view of {@code relativePartStack} should be - * split - * @param size - */ - void addPartStack( - @NotNull final EditorPartStack partStack, - @Nullable final EditorPartStack relativePartStack, - @Nullable final Constraints constraints, - double size); - - /** - * Remove given editor part stack from editor area. - * - * @param partStack editor part stack to removing from corresponding editor area - */ - void removePartStack(@NotNull final EditorPartStack partStack); - - /** @return the editor multi part stack state */ - EditorMultiPartStackState getState(); - - /** - * Shows placeholder instead editor area while the workspace is loading. - * - * @param placeholder true to show placeholder - */ - void showPlaceholder(boolean placeholder); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackViewImpl.java deleted file mode 100644 index f1247db514d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorMultiPartStackViewImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import static com.google.gwt.dom.client.Style.Unit.PCT; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.LayoutPanel; -import com.google.gwt.user.client.ui.ResizeComposite; -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.part.editor.EmptyEditorsPanel; -import org.eclipse.che.ide.util.loging.Log; - -/** @author Roman Nikitenko */ -public class EditorMultiPartStackViewImpl extends ResizeComposite - implements EditorMultiPartStackView { - - private LayoutPanel contentPanel; - - private final BiMap splitEditorParts; - private final SplitEditorPartViewFactory splitEditorPartViewFactory; - private final EmptyEditorsPanel emptyEditorsPanel; - - private SplitEditorPartView rootView; - - private EditorPlaceholderWidget editorPlaceholderWidget; - - @Inject - public EditorMultiPartStackViewImpl( - SplitEditorPartViewFactory splitEditorPartViewFactory, - EmptyEditorsPanel emptyEditorsPanel, - EditorPlaceholderWidget editorPlaceholderWidget) { - this.splitEditorPartViewFactory = splitEditorPartViewFactory; - this.emptyEditorsPanel = emptyEditorsPanel; - this.splitEditorParts = HashBiMap.create(); - this.editorPlaceholderWidget = editorPlaceholderWidget; - - contentPanel = new LayoutPanel(); - contentPanel.setSize("100%", "100%"); - contentPanel.ensureDebugId("editorMultiPartStack-contentPanel"); - initWidget(contentPanel); - contentPanel.add(emptyEditorsPanel); - } - - @Override - public void addPartStack( - @NotNull final EditorPartStack partStack, - final EditorPartStack relativePartStack, - final Constraints constraints, - final double size) { - AcceptsOneWidget partViewContainer = - new AcceptsOneWidget() { - @Override - public void setWidget(IsWidget widget) { - if (relativePartStack == null) { - rootView = splitEditorPartViewFactory.create(widget); - splitEditorParts.put(partStack, rootView); - contentPanel.remove(emptyEditorsPanel); - contentPanel.add(rootView); - return; - } - - SplitEditorPartView relativePartStackView = splitEditorParts.get(relativePartStack); - if (relativePartStackView == null) { - Log.error(getClass(), "Can not find container for specified editor"); - return; - } - - relativePartStackView.split(widget, constraints.direction, size); - splitEditorParts.put(partStack, relativePartStackView.getReplica()); - splitEditorParts.put(relativePartStack, relativePartStackView.getSpecimen()); - } - }; - partStack.go(partViewContainer); - } - - @Override - public void removePartStack(@NotNull EditorPartStack partStack) { - SplitEditorPartView splitEditorPartView = splitEditorParts.remove(partStack); - if (splitEditorPartView != null) { - splitEditorPartView.removeFromParent(); - } - if (splitEditorParts.size() == 0) { - contentPanel.remove(rootView); - contentPanel.add(emptyEditorsPanel); - rootView = null; - } - } - - @Override - public EditorMultiPartStackState getState() { - if (rootView == null) { - return null; - } - return rootView.getState(splitEditorParts.inverse()); - } - - @Override - protected void onAttach() { - super.onAttach(); - - Style style = getElement().getParentElement().getStyle(); - style.setHeight(100, PCT); - style.setWidth(100, PCT); - } - - @Override - public void showPlaceholder(boolean placeholder) { - if (placeholder) { - if (!editorPlaceholderWidget.getElement().hasParentElement()) { - getElement().appendChild(editorPlaceholderWidget.getElement()); - } - } else { - if (editorPlaceholderWidget.getElement().hasParentElement()) { - getElement().removeChild(editorPlaceholderWidget.getElement()); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.java deleted file mode 100644 index 837ddc4103b..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Element; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Widget; -import javax.inject.Inject; - -/** Represents loading mode widget for editor */ -public class EditorPlaceholderWidget extends Composite { - - interface EditorPlaceholderWidgetUiBinder extends UiBinder {} - - @UiField DivElement lineNumbers; - - @Inject - public EditorPlaceholderWidget(EditorPlaceholderWidgetUiBinder uiBinder) { - initWidget(uiBinder.createAndBindUi(this)); - - for (int i = 1; i <= 20; i++) { - Element lineNumber = DOM.createDiv(); - lineNumber.setInnerText("" + i); - lineNumbers.appendChild(lineNumber); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.ui.xml deleted file mode 100644 index 7dd32ebf5f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/EditorPlaceholderWidget.ui.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - @eval lineColor org.eclipse.che.ide.api.theme.Style.theme.iconColor(); - @eval fontColor org.eclipse.che.ide.api.theme.Style.getMainFontColor(); - @eval logoFill org.eclipse.che.ide.api.theme.Style.getLogoFill(); - - @eval editorPlaceholderTabsPanelBackground org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabsPanelBackground(); - @eval editorPlaceholderTabsPanelBottomBorderColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabsPanelBottomBorderColor(); - @eval editorPlaceholderTabBackground org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabBackground(); - @eval editorPlaceholderTabIconColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabIconColor(); - @eval editorPlaceholderTabLabelColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabLabelColor(); - @eval editorPlaceholderTabsPanelPlusColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderTabsPanelPlusColor(); - @eval editorPlaceholderContentBackground org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderContentBackground(); - @eval editorPlaceholderLineNumbersColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderLineNumbersColor(); - @eval editorPlaceholderRowsColor org.eclipse.che.ide.api.theme.Style.theme.editorPlaceholderRowsColor(); - - .panel { - position: absolute; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - overflow: hidden; - z-index: 100; - } - - .tabs { - position: absolute; - left: 0px; - right: 0px; - top: 0px; - height: 26px; - overflow: hidden; - background-color: editorPlaceholderTabsPanelBackground; - box-sizing: border-box; - border-bottom: 1px solid editorPlaceholderTabsPanelBottomBorderColor; - } - - .tab { - position: absolute; - overflow: hidden; - left: 0px; - top: 0px; - width: 120px; - height: 25px; - background-color: editorPlaceholderTabBackground; - } - - .tabIcon { - position: absolute; - left: 8px; - top: 4px; - width: 16px; - height: 16px; - border-radius: 2px; - background-color: editorPlaceholderTabIconColor; - } - - .tabLabel { - position: absolute; - left: 31px; - top: 10px; - width: 79px; - height: 6px; - border-radius: 2px; - background-color: editorPlaceholderTabLabelColor; - } - - .plus { - position: absolute; - overflow: hidden; - left: 121px; - top: 0px; - width: 35px; - height: 25px; - text-align: center; - line-height: 25px; - font-size: 10px; - color: editorPlaceholderTabsPanelPlusColor; - } - - .content { - position: absolute; - left: 0px; - right: 0px; - bottom: 0px; - top: 26px; - overflow: hidden; - background-color: editorPlaceholderContentBackground; - } - - .lineNumbers { - position: absolute; - overflow: hidden; - left: 0px; - top: 4px; - width: 35px; - bottom: 0px; - } - - .lineNumbers > div { - position: relative; - width: 100%; - height: 15px; - overflow: hidden; - text-align: right; - line-height: 15px; - font-family: "DejaVu Sans Mono", "Helvetica Neue", "Myriad Pro", "open sans", arial, sans-serif; - font-size: 11px; - color: editorPlaceholderLineNumbersColor; - } - - .lines { - position: absolute; - overflow: hidden; - left: 43px; - top: 4px; - right: 10px; - bottom: 0px; - } - - .line { - position: relative; - width: 100%; - height: 15px; - overflow: hidden; - animation-name: editorPlaceholderFadeIn; - animation-duration: 0.1s; - animation-fill-mode: both; - } - - @keyframes editorPlaceholderFadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - - .line > div { - position: absolute; - border-radius: 2px; - height: 6px; - top: 4px; - left: 0px; - right: 0px; - background-color: editorPlaceholderRowsColor; - background-size: 800px 104px; - background-repeat: no-repeat; - background-position: 827px; - opacity: 0.5; - } - - - -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartView.java deleted file mode 100644 index 4a2ba17dea8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartView.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import com.google.common.collect.BiMap; -import com.google.gwt.user.client.ui.IsWidget; -import org.eclipse.che.ide.api.constraints.Direction; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * View representation of editor to displaying in {@link EditorMultiPartStackView}. - * - *

        Provides ability to split view corresponding to {@link Direction} on two areas and display - * editor horizontally or vertically. Current view can be in two states: - *

      • - split state - *
      • - not split state In the split state view has two areas: - *
      • - "specimen" area - *
      • - "replica" area Otherwise view has only "specimen" area. - * - * @author Roman nikitenko - */ -public interface SplitEditorPartView extends IsWidget { - - /** - * Split the view corresponding to {@code direction} on two areas and adds {@code replica} into - * the created area. - * - * @param replica will be added into the created area - * @param direction contains info about way how {@code replica} should be displayed - * @param size - */ - void split(IsWidget replica, Direction direction, double size); - - /** Returns view of the "Specimen" area. */ - SplitEditorPartView getSpecimen(); - - /** Returns view of the "Replica" area. */ - SplitEditorPartView getReplica(); - - /** - * Removes given {@code child} from view. It allows to remove "Specimen" as well as "Replica". - * - * @param child child to remove - */ - void removeChild(SplitEditorPartView child); - - /** Removes this view from its parent widget */ - void removeFromParent(); - - /** - * Get editor multi part stack state - * - * @param splitEditorParts split editor part view mapped to their part stack - * @return the editor multi part stack state - */ - EditorMultiPartStackState getState(BiMap splitEditorParts); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewFactory.java deleted file mode 100644 index c127605674e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import com.google.gwt.user.client.ui.IsWidget; - -/** - * The factory creates instances of {@link SplitEditorPartView} to display view representation of - * editors in {@link EditorMultiPartStackView}. - * - * @author Roman Nikitenko - */ -public interface SplitEditorPartViewFactory { - - /** - * Creates implementation of {@link SplitEditorPartView}. - * - * @param specimen widget which is regarded as a specimen when splitting - * @return an instance of {@link SplitEditorPartView} - */ - SplitEditorPartView create(IsWidget specimen); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewImpl.java deleted file mode 100644 index 4bec995f208..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/multipart/SplitEditorPartViewImpl.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.multipart; - -import static org.eclipse.che.ide.api.constraints.Direction.HORIZONTALLY; -import static org.eclipse.che.ide.api.constraints.Direction.VERTICALLY; - -import com.google.common.collect.BiMap; -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Node; -import com.google.gwt.dom.client.NodeList; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.SimpleLayoutPanel; -import com.google.gwt.user.client.ui.SplitLayoutPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; -import org.eclipse.che.ide.api.constraints.Direction; -import org.eclipse.che.ide.api.parts.EditorMultiPartStackState; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.theme.Style; - -/** @author Roman Nikitenko */ -public class SplitEditorPartViewImpl implements SplitEditorPartView { - private static final int SPLITTER_SIZE = 5; - private static final String VERTICAL_DRAGGER_CLASS = "gwt-SplitLayoutPanel-VDragger"; - private static final String HORIZONTAL_DRAGGER_CLASS = "gwt-SplitLayoutPanel-HDragger"; - - private SplitEditorPartView parent; - private SplitEditorPartView specimenView; - private SplitEditorPartView replicaView; - private final IsWidget specimenWidget; - private final SimpleLayoutPanel rootPanel; - private SplitLayoutPanel splitLayoutPanel; - private Direction direction; - - @AssistedInject - public SplitEditorPartViewImpl(@Assisted IsWidget specimenWidget) { - this.specimenWidget = specimenWidget; - rootPanel = new SimpleLayoutPanel(); - rootPanel.add(specimenWidget); - } - - @AssistedInject - public SplitEditorPartViewImpl( - @Assisted IsWidget specimen, @Assisted SplitEditorPartView parent) { - this(specimen); - this.parent = parent; - } - - @Override - public SplitEditorPartView getSpecimen() { - return specimenView; - } - - @Override - public SplitEditorPartView getReplica() { - return replicaView; - } - - @Override - public void split(IsWidget replicaWidget, Direction direction, double size) { - this.direction = direction; - splitLayoutPanel = new SplitLayoutPanel(SPLITTER_SIZE); - specimenView = new SplitEditorPartViewImpl(specimenWidget, this); - replicaView = new SplitEditorPartViewImpl(replicaWidget, this); - - if (direction == VERTICALLY) { - splitVertically(size); - } else if (direction == HORIZONTALLY) { - splitHorizontally(size); - } - - splitLayoutPanel.add(replicaView); - rootPanel.remove(specimenWidget); - rootPanel.add(splitLayoutPanel); - - tuneSplitter(splitLayoutPanel); - } - - private void splitVertically(double size) { - double newSize = size == -1 ? rootPanel.getOffsetWidth() / 2 : size; - splitLayoutPanel.addWest(specimenView, newSize); - } - - private void splitHorizontally(double size) { - double newSize = size == -1 ? rootPanel.getOffsetHeight() / 2 : size; - splitLayoutPanel.addNorth(specimenView, newSize); - } - - @Override - public void removeChild(SplitEditorPartView child) { - splitLayoutPanel.remove(child); - if (child == replicaView && specimenView != null) { - splitLayoutPanel.add(specimenView); - } - - if (child == specimenView) { - specimenView = null; - } else if (child == replicaView) { - replicaView = null; - } - - if (parent != null && isEmpty()) { - parent.removeChild(this); - } - - if (isEmpty()) { - rootPanel.removeFromParent(); - } - splitLayoutPanel.forceLayout(); - } - - @Override - public void removeFromParent() { - if (parent != null) { - parent.removeChild(this); - } else { - rootPanel.removeFromParent(); - } - } - - @Override - public EditorMultiPartStackState getState( - BiMap splitEditorParts) { - if (splitLayoutPanel == null) { - return new EditorMultiPartStackState(splitEditorParts.get(this)); - - } else if (specimenView == null && replicaView != null) { - return replicaView.getState(splitEditorParts); - } else if (replicaView == null && specimenView != null) { - return specimenView.getState(splitEditorParts); - } - if (specimenView != null) { - return new EditorMultiPartStackState( - direction, - splitLayoutPanel.getWidgetSize(specimenView.asWidget()), - specimenView.getState(splitEditorParts), - replicaView.getState(splitEditorParts)); - } - throw new IllegalStateException( - "Can't create state, specimenView and replicaView are both null."); - } - - private boolean isEmpty() { - return specimenView == null && replicaView == null; - } - - /** Improves splitter visibility. */ - private void tuneSplitter(SplitLayoutPanel splitLayoutPanel) { - NodeList nodes = splitLayoutPanel.getElement().getChildNodes(); - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.getItem(i); - if (node.hasChildNodes()) { - Element el = node.getFirstChild().cast(); - String className = el.getClassName(); - if (HORIZONTAL_DRAGGER_CLASS.equals(className)) { - tuneVerticalSplitter(el); - } else if (VERTICAL_DRAGGER_CLASS.equals(className)) { - tuneHorizontalSplitter(el); - } - } - } - } - - /** - * Tunes splitter. Makes it wider and adds double border to seem rich. - * - * @param el element to tune - */ - private void tuneVerticalSplitter(Element el) { - /** Add Z-Index to move the splitter on the top and make content visible */ - el.getParentElement().getStyle().setProperty("zIndex", "1000"); - el.getParentElement().getStyle().setProperty("overflow", "visible"); - - /** Tune splitter catch panel */ - el.getStyle().setProperty("boxSizing", "border-box"); - el.getStyle().setProperty("width", "5px"); - el.getStyle().setProperty("overflow", "hidden"); - el.getStyle().setProperty("marginLeft", "-3px"); - el.getStyle().setProperty("backgroundColor", "transparent"); - - /** Add small border */ - DivElement smallBorder = Document.get().createDivElement(); - smallBorder.getStyle().setProperty("position", "absolute"); - smallBorder.getStyle().setProperty("width", "1px"); - smallBorder.getStyle().setProperty("height", "100%"); - smallBorder.getStyle().setProperty("left", "3px"); - smallBorder.getStyle().setProperty("top", "0px"); - smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor()); - el.appendChild(smallBorder); - } - - /** - * Tunes bottom splitter. Makes it tiny but with a transparent area for easy resizing. - * - * @param el element to tune - */ - private void tuneHorizontalSplitter(Element el) { - /** Add Z-Index to move the splitter on the top and make content visible */ - el.getParentElement().getStyle().setProperty("zIndex", "1000"); - el.getParentElement().getStyle().setProperty("overflow", "visible"); - - el.getStyle().setProperty("height", "3px"); - el.getStyle().setProperty("marginTop", "-2px"); - el.getStyle().setProperty("backgroundColor", "transparent"); - - /** Add small border */ - DivElement delimiter = Document.get().createDivElement(); - delimiter.getStyle().setProperty("position", "absolute"); - delimiter.getStyle().setProperty("width", "100%"); - delimiter.getStyle().setProperty("height", "1px"); - delimiter.getStyle().setProperty("left", "0px"); - delimiter.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor()); - delimiter.getStyle().setProperty("top", "2px"); - el.appendChild(delimiter); - } - - @Override - public Widget asWidget() { - return rootPanel; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/ClearRecentListAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/ClearRecentListAction.java deleted file mode 100644 index 6a41eb5c0ed..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/ClearRecentListAction.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; - -/** - * Action clears list of recently opened files. - * - * @author Oleksii Orel - */ -@Singleton -public class ClearRecentListAction extends AbstractPerspectiveAction { - - private RecentFileList recentFileList; - - @Inject - public ClearRecentListAction(RecentFileList recentFileList, CoreLocalizationConstant locale) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.openRecentFileClearTitle(), - locale.openRecentFileClearDescription()); - - this.recentFileList = recentFileList; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(!recentFileList.isEmpty()); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - recentFileList.clear(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.java deleted file mode 100644 index 5c527a2138a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import static com.google.gwt.dom.client.Style.Overflow.AUTO; -import static org.eclipse.che.ide.part.editor.recent.RecentFileStore.getShortPath; -import static org.eclipse.che.ide.ui.smartTree.SelectionModel.Mode.SINGLE; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.NativeEvent; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.resources.client.ClientBundle; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.resources.tree.FileNode; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.KeyboardNavigationHandler; -import org.eclipse.che.ide.ui.smartTree.NodeLoader; -import org.eclipse.che.ide.ui.smartTree.NodeStorage; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.HasAttributes; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.presentation.DefaultPresentationRenderer; -import org.eclipse.che.ide.ui.window.Window; - -/** - * Implementation for the {@link OpenRecentFilesView}. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class OpenRecentFileViewImpl extends Window implements OpenRecentFilesView { - - public static final String CUSTOM_BACKGROUND_FILL = "background"; - - interface OpenRecentFileViewImplUiBinder extends UiBinder {} - - private static OpenRecentFileViewImplUiBinder uiBinder = - GWT.create(OpenRecentFileViewImplUiBinder.class); - - @UiField DockLayoutPanel content; - - private Tree tree; - private Label pathLabel; - - @Inject - public OpenRecentFileViewImpl(CoreLocalizationConstant locale, Styles styles) { - - Widget widget = uiBinder.createAndBindUi(this); - widget.addStyleName(styles.css().window()); - setWidget(widget); - - styles.css().ensureInjected(); - - pathLabel = new Label(); - pathLabel.setStyleName(styles.css().label()); - - final NodeStorage storage = new NodeStorage(); - final NodeLoader loader = new NodeLoader(); - tree = new Tree(storage, loader); - tree.setPresentationRenderer( - new DefaultPresentationRenderer(tree.getTreeStyles()) { - @Override - public Element render(Node node, String domID, Tree.Joint joint, int depth) { - Element element = super.render(node, domID, joint, depth); - - element.setAttribute("name", node.getName()); - - if (node instanceof ResourceNode) { - element.setAttribute( - "path", ((ResourceNode) node).getData().getLocation().toString()); - element.setAttribute( - "project", - ((ResourceNode) node) - .getData() - .getRelatedProject() - .get() - .getLocation() - .toString()); - } - - if (node instanceof HasAttributes - && ((HasAttributes) node).getAttributes().containsKey(CUSTOM_BACKGROUND_FILL)) { - element - .getFirstChildElement() - .getStyle() - .setBackgroundColor( - ((HasAttributes) node).getAttributes().get(CUSTOM_BACKGROUND_FILL).get(0)); - } - - return element; - } - }); - tree.setAutoSelect(true); - tree.getSelectionModel().setSelectionMode(SINGLE); - tree.getSelectionModel() - .addSelectionChangedHandler( - event -> { - List selection = event.getSelection(); - if (selection == null || selection.isEmpty()) { - pathLabel.setText(""); - pathLabel.setTitle(""); - return; - } - - Node head = selection.get(0); - - if (head instanceof ResourceNode) { - String path = - getShortPath(((ResourceNode) head).getData().getLocation().toString()); - pathLabel.setText(path); - pathLabel.setTitle(path); - return; - } - - pathLabel.setText(""); - pathLabel.setTitle(""); - }); - - KeyboardNavigationHandler handler = - new KeyboardNavigationHandler() { - @Override - public void onEnter(NativeEvent evt) { - hide(); - } - }; - - handler.bind(tree); - - tree.addDomHandler(event -> hide(), DoubleClickEvent.getType()); - - tree.ensureDebugId("recent-files"); - tree.getElement().getStyle().setOverflowY(AUTO); - - content.addSouth(pathLabel, 20.); - content.add(tree); - - setTitle(locale.openRecentFilesTitle()); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) {} - - /** {@inheritDoc} */ - @Override - public void setRecentFiles(List recentFiles) { - tree.getNodeStorage().clear(); - for (FileNode recentFile : recentFiles) { - tree.getNodeStorage().add(recentFile); - } - } - - /** {@inheritDoc} */ - @Override - public void clearRecentFiles() { - tree.getNodeStorage().clear(); - } - - /** {@inheritDoc} */ - @Override - public void showDialog() { - show(tree); - } - - @Override - protected void onShow() { - if (!tree.getRootNodes().isEmpty()) { - tree.getSelectionModel().select(tree.getRootNodes().get(0), false); - } - } - - public interface Styles extends ClientBundle { - interface Css extends CssResource { - String window(); - - String label(); - } - - @Source("recent.css") - Css css(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.ui.xml deleted file mode 100644 index d22e16f9bb2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFileViewImpl.ui.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - \ No newline at end of file diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesAction.java deleted file mode 100644 index 891ecfecc95..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; - -/** - * Action shows dialog with recently opened files. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class OpenRecentFilesAction extends AbstractPerspectiveAction { - - private final RecentFileList recentFileList; - - @Inject - public OpenRecentFilesAction(RecentFileList recentFileList, CoreLocalizationConstant locale) { - super( - singletonList(PROJECT_PERSPECTIVE_ID), - locale.openRecentFileTitle(), - locale.openRecentFileDescription()); - this.recentFileList = recentFileList; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(!recentFileList.isEmpty()); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - recentFileList.getRecentViewDialog().show(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesPresenter.java deleted file mode 100644 index 70edb8181f7..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesPresenter.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import static com.google.common.collect.Lists.newArrayListWithCapacity; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.api.resources.File; -import org.eclipse.che.ide.resources.tree.FileNode; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.settings.SettingsProvider; - -/** - * Presenter for showing recently opened files. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class OpenRecentFilesPresenter implements OpenRecentFilesView.ActionDelegate { - - private final OpenRecentFilesView view; - private final ResourceNode.NodeFactory nodeFactory; - private final SettingsProvider settingsProvider; - - @Inject - public OpenRecentFilesPresenter( - OpenRecentFilesView view, - ResourceNode.NodeFactory nodeFactory, - SettingsProvider settingsProvider) { - this.view = view; - this.nodeFactory = nodeFactory; - this.settingsProvider = settingsProvider; - - view.setDelegate(this); - } - - /** Show dialog. */ - public void show() { - view.showDialog(); - } - - /** - * Set recent file list. - * - * @param recentFiles recent file list - */ - public void setRecentFiles(List recentFiles) { - final List nodes = newArrayListWithCapacity(recentFiles.size()); - - for (File recentFile : recentFiles) { - nodes.add(nodeFactory.newFileNode(recentFile, settingsProvider.getSettings())); - } - - view.setRecentFiles(nodes); - } - - /** Clear recent file list. */ - public void clearRecentFiles() { - view.clearRecentFiles(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesView.java deleted file mode 100644 index 86c84876e38..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/OpenRecentFilesView.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import com.google.inject.ImplementedBy; -import java.util.List; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.resources.tree.FileNode; - -/** - * View for the {@link OpenRecentFilesPresenter}. - * - * @author Vlad Zhukovskiy - */ -@ImplementedBy(OpenRecentFileViewImpl.class) -public interface OpenRecentFilesView extends View { - - /** - * Set recent file list. - * - * @param recentFiles recent file list - */ - void setRecentFiles(List recentFiles); - - /** Clear recent file list. */ - void clearRecentFiles(); - - /** Show dialog. */ - void showDialog(); - - interface ActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileAction.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileAction.java deleted file mode 100644 index 3685f8bdb8e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileAction.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.part.editor.recent.RecentFileStore.getShortPath; -import static org.eclipse.che.ide.part.perspectives.project.ProjectPerspective.PROJECT_PERSPECTIVE_ID; - -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.action.AbstractPerspectiveAction; -import org.eclipse.che.ide.api.action.ActionEvent; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.resources.File; - -/** - * Action for the recent file. When user click on this action, recent file opens again in editor. - * - * @author Vlad Zhukovskiy - */ -public class RecentFileAction extends AbstractPerspectiveAction { - - private final File file; - private final EditorAgent editorAgent; - - @Inject - public RecentFileAction(@Assisted File file, EditorAgent editorAgent) { - super(singletonList(PROJECT_PERSPECTIVE_ID), getShortPath(file.getLocation().toString())); - this.file = file; - this.editorAgent = editorAgent; - } - - /** {@inheritDoc} */ - @Override - public void updateInPerspective(@NotNull ActionEvent event) { - event.getPresentation().setEnabledAndVisible(true); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(ActionEvent e) { - editorAgent.openEditor(file); - } - - /** - * Return an id for the registration in action manager. ID value forms based on file path to - * define unique key for this action. - * - * @return action id - */ - public String getId() { - return "recent/" + file.getLocation(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileActionFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileActionFactory.java deleted file mode 100644 index d07e5be609d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileActionFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import org.eclipse.che.ide.api.resources.File; - -/** - * Factory for the recent files action. - * - * @author Vlad Zhukovskiy - */ -public interface RecentFileActionFactory { - /** - * Creates new recent file action to show in main menu. - * - * @param file file associated with - * @return action - */ - RecentFileAction newRecentFileAction(File file); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileList.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileList.java deleted file mode 100644 index d4aa5771eab..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileList.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import org.eclipse.che.ide.api.resources.File; - -/** - * Extension for the recent list which process recent file lists. - * - * @author Vlad Zhukovskiy - */ -public interface RecentFileList extends RecentList { - /** - * Return recent file list user dialog. - * - * @return user dialog with recent file list - */ - OpenRecentFilesPresenter getRecentViewDialog(); -} 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 deleted file mode 100644 index 2346c0f9d16..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentFileStore.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -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.editor.events.FileEvent.FileOperation.OPEN; -import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -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.editor.events.FileEvent; -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; - -/** - * Default implementation of Recent File List. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class RecentFileStore implements RecentFileList { - - public static final int MAX_FILES_IN_STACK = 25; - public static final int MAX_PATH_LENGTH_TO_DISPLAY = 50; - public static final String RECENT_GROUP_ID = "Recent"; - - private final OpenRecentFilesPresenter openRecentFilesPresenter; - private final ActionManager actionManager; - private final RecentFileActionFactory recentFileActionFactory; - - private DefaultActionGroup recentGroup; - private LinkedList recentStorage = newLinkedList(); - private LinkedList> fileToAction = newLinkedList(); - - @Inject - public RecentFileStore( - EventBus eventBus, - OpenRecentFilesPresenter openRecentFilesPresenter, - ActionManager actionManager, - RecentFileActionFactory recentFileActionFactory) { - this.openRecentFilesPresenter = openRecentFilesPresenter; - this.actionManager = actionManager; - this.recentFileActionFactory = recentFileActionFactory; - - 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() { - if (recentGroup == null) { - recentGroup = (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_RECENT_FILES); - } - } - - /** {@inheritDoc} */ - @Override - public boolean isEmpty() { - return recentStorage.isEmpty(); - } - - /** {@inheritDoc} */ - @Override - public boolean add(final File item) { - ensureGroupExist(); - - if (item == null || recentGroup == null) { - return false; - } - - // initial precondition - if (recentStorage.size() == MAX_FILES_IN_STACK) { - remove(recentStorage.getLast()); - } - - remove(item); - - recentStorage.addFirst(item); - openRecentFilesPresenter.setRecentFiles(getAll()); - - // register recent item action - RecentFileAction action = recentFileActionFactory.newRecentFileAction(item); - fileToAction.add(Pair.of(item, action)); - actionManager.registerAction(action.getId(), action); - recentGroup.add(action, FIRST); - - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean remove(File item) { - if (recentGroup == null) { - return false; - } - - recentStorage.remove(item); - openRecentFilesPresenter.setRecentFiles(getAll()); - - // with one cycle de-register action and remove it from recent group - Iterator> iterator = fileToAction.iterator(); - while (iterator.hasNext()) { - Pair pair = iterator.next(); - if (pair.getFirst().equals(item)) { - recentGroup.remove(pair.getSecond()); - actionManager.unregisterAction(pair.getSecond().getId()); - iterator.remove(); - return true; - } - } - - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean contains(File item) { - return recentStorage.contains(item); - } - - /** {@inheritDoc} */ - @Override - public List getAll() { - return recentStorage; - } - - /** {@inheritDoc} */ - @Override - public void clear() { - if (recentGroup == null) { - return; - } - - openRecentFilesPresenter.clearRecentFiles(); - recentStorage.clear(); - - // de-register all previously registered actions - for (Pair pair : fileToAction) { - actionManager.unregisterAction(pair.getSecond().getId()); - recentGroup.remove(pair.getSecond()); - } - - fileToAction.clear(); - } - - /** {@inheritDoc} */ - @Override - public OpenRecentFilesPresenter getRecentViewDialog() { - return openRecentFilesPresenter; - } - - /** - * Split path if it more then 50 characters. Otherwise, if path is less then 50 characters then it - * returns as is. - * - * @param path path to check - * @return path to display - */ - static String getShortPath(String path) { - if (path.length() < MAX_PATH_LENGTH_TO_DISPLAY) { - return path; - } - - int bIndex = path.length() - MAX_PATH_LENGTH_TO_DISPLAY; - String raw = path.substring(bIndex); - - if (raw.indexOf('/') == -1) { - return raw; - } - - raw = raw.substring(raw.indexOf('/')); - raw = "..." + raw; - - return raw; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentList.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentList.java deleted file mode 100644 index faba2ffcff2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/editor/recent/RecentList.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.editor.recent; - -import java.util.List; - -/** - * Recent list of abstract items. - * - * @author Vlad Zhukovskiy - */ -public interface RecentList { - /** - * Check whether recent list is empty. - * - * @return true if empty - */ - boolean isEmpty(); - - /** - * Add abstract item to the recent list. - * - * @param item item to add - * @return true if item has been added - */ - boolean add(T item); - - /** - * Remove abstract item from the recent list. - * - * @param item item to remove - * @return true if item has been removed - */ - boolean remove(T item); - - /** - * Check if item contains in recent list. - * - * @param item item to check - * @return true if contains - */ - boolean contains(T item); - - /** - * Get all recent list items. - * - * @return list of abstract items - */ - List getAll(); - - /** Clear recent list. */ - void clear(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/DefaultNodeInterceptor.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/DefaultNodeInterceptor.java deleted file mode 100644 index e364c5d9df9..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/DefaultNodeInterceptor.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.data.NodeInterceptor; - -/** - * Default implementation of node interceptor that do nothing. Just need to proper initialization of - * ide components at startup. - * - * @author Vitalii Parfonov - * @author Vlad Zhukovskyi - */ -@Singleton -public class DefaultNodeInterceptor implements NodeInterceptor { - /** {@inheritDoc} */ - @Override - public Promise> intercept(Node parent, List children) { - return Promises.resolve(children); - } - - /** {@inheritDoc} */ - @Override - public int getPriority() { - return MAX_PRIORITY; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/EmptyTreePanel.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/EmptyTreePanel.java deleted file mode 100644 index 1b97eb8e5f3..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/EmptyTreePanel.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.dom.client.Style; -import com.google.gwt.user.client.Timer; -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import javax.inject.Inject; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.actions.CreateProjectAction; -import org.eclipse.che.ide.actions.ImportProjectAction; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; -import org.eclipse.che.ide.api.parts.PerspectiveManager; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.newresource.NewFileAction; -import org.eclipse.che.ide.part.editor.EmptyEditorsPanel; - -/** Represent empty state of project explorer */ -public class EmptyTreePanel extends EmptyEditorsPanel { - - @Inject - public EmptyTreePanel( - ActionManager actionManager, - Provider perspectiveManagerProvider, - KeyBindingAgent keyBindingAgent, - AppContext appContext, - EventBus eventBus, - CoreLocalizationConstant localizationConstant, - NewFileAction newFileAction, - CreateProjectAction createProjectAction, - ImportProjectAction importProjectAction) { - super( - actionManager, - perspectiveManagerProvider, - keyBindingAgent, - appContext, - localizationConstant, - newFileAction, - createProjectAction, - importProjectAction); - eventBus.addHandler(ResourceChangedEvent.getType(), this); - - root.getStyle().setTop(46, Style.Unit.PX); - - // Sometimes initialization of Create/Import Project actions are completed after the Empty - // editor page is rendered. - // In this case we need to wait when actions will be initialized. - new Timer() { - @Override - public void run() { - renderNoProjects(); - } - }.schedule(500); - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - Scheduler.get() - .scheduleDeferred( - new Scheduler.ScheduledCommand() { - @Override - public void execute() { - if (appContext.getProjects().length != 0) { - getElement().removeFromParent(); - } - } - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/NodeTypeComparator.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/NodeTypeComparator.java deleted file mode 100644 index 3c5ca9989ac..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/NodeTypeComparator.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import static org.eclipse.che.ide.api.resources.Resource.FILE; -import static org.eclipse.che.ide.api.resources.Resource.FOLDER; -import static org.eclipse.che.ide.api.resources.Resource.PROJECT; - -import java.util.Comparator; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Compares node by their type. By design folders should be on top, then files and finally synthetic - * based nodes. - * - * @author Vlad Zhukovskiy - */ -public class NodeTypeComparator implements Comparator { - - private int getClassIndex(Node node) { - if (node instanceof ResourceNode - && (((ResourceNode) node).getData().getResourceType() == FOLDER - || ((ResourceNode) node).getData().getResourceType() == PROJECT)) { - return 1; - } - - if (node instanceof ResourceNode && ((ResourceNode) node).getData().getResourceType() == FILE) { - return 2; - } - - if (node instanceof SyntheticNode) { - return 3; - } - - return 0; - } - - @Override - public int compare(Node o1, Node o2) { - int classIdx1 = getClassIndex(o1); - int classIdx2 = getClassIndex(o2); - - if (classIdx1 != classIdx2) return classIdx1 - classIdx2; - - return 0; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.java deleted file mode 100644 index b4d6064aaa4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.Widget; -import javax.inject.Inject; - -/** Represents loading mode widget for project explorer */ -public class ProjectExplorerPlaceholderWidget extends Composite { - - interface ProjectExplorerPlaceholderWidgetUiBinder - extends UiBinder {} - - @Inject - public ProjectExplorerPlaceholderWidget(ProjectExplorerPlaceholderWidgetUiBinder uiBinder) { - initWidget(uiBinder.createAndBindUi(this)); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.ui.xml deleted file mode 100644 index 77e2a4d6926..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPlaceholderWidget.ui.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - @eval lineColor org.eclipse.che.ide.api.theme.Style.theme.iconColor(); - @eval fontColor org.eclipse.che.ide.api.theme.Style.getMainFontColor(); - @eval logoFill org.eclipse.che.ide.api.theme.Style.getLogoFill(); - - @eval projectExplorerPlaceholderBackground org.eclipse.che.ide.api.theme.Style.theme.projectExplorerPlaceholderBackground(); - @eval projectExplorerPlaceholderIconColor org.eclipse.che.ide.api.theme.Style.theme.projectExplorerPlaceholderIconColor(); - @eval projectExplorerPlaceholderRowColor org.eclipse.che.ide.api.theme.Style.theme.projectExplorerPlaceholderRowColor(); - - .panel { - position: absolute; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - overflow: hidden; - background-color: projectExplorerPlaceholderBackground; - } - - .row { - position: relative; - width: 100%; - height: 23px; - box-sizing: border-box; - border-top: 1px solid transparent; - overflow: hidden; - animation-name: projectExplorerFadeIn; - animation-duration: 0.1s; - animation-fill-mode: both; - } - - @keyframes projectExplorerFadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - - .first { - margin-top: 4px; - } - - .icon { - position: absolute; - width: 16px; - height: 16px; - border-radius: 2px; - background-color: projectExplorerPlaceholderIconColor; - left: 13px; - top: 3px; - opacity: 0.8; - } - - .text { - position: absolute; - border-radius: 2px; - height: 6px; - left: 37px; - right: 10px; - top: 8px; - background-color: projectExplorerPlaceholderRowColor; - background-size: 800px 104px; - background-repeat: no-repeat; - background-position: 827px; - opacity: 0.5; - } - - .shifted .icon { - left: 37px; - } - - .shifted .text { - left: 61px; - } - - - -
        -
        -
        -
        -
        -
        -
        - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPresenter.java deleted file mode 100644 index 52e25917846..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerPresenter.java +++ /dev/null @@ -1,569 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import static org.eclipse.che.api.project.shared.dto.event.ProjectTreeTrackingOperationDto.Type.START; -import static org.eclipse.che.api.project.shared.dto.event.ProjectTreeTrackingOperationDto.Type.STOP; -import static org.eclipse.che.ide.api.jsonrpc.Constants.WS_AGENT_JSON_RPC_ENDPOINT_ID; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; -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.UPDATED; - -import com.google.common.collect.Sets; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.event.logical.shared.SelectionHandler; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.HashSet; -import java.util.Set; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.core.jsonrpc.commons.RequestTransmitter; -import org.eclipse.che.api.core.model.workspace.WorkspaceStatus; -import org.eclipse.che.api.project.shared.dto.event.ProjectTreeTrackingOperationDto; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.extension.ExtensionsInitializedEvent; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.base.BasePresenter; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.resources.marker.MarkerChangedEvent; -import org.eclipse.che.ide.api.resources.marker.MarkerChangedEvent.MarkerChangedHandler; -import org.eclipse.che.ide.api.selection.Selection; -import org.eclipse.che.ide.api.workspace.event.WorkspaceRunningEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStartingEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent; -import org.eclipse.che.ide.api.workspace.event.WorkspaceStoppingEvent; -import org.eclipse.che.ide.dto.DtoFactory; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerView.ActionDelegate; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.project.node.SyntheticNodeUpdateEvent; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.NodeDescriptor; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.data.TreeExpander; -import org.eclipse.che.ide.ui.smartTree.data.settings.NodeSettings; -import org.eclipse.che.ide.ui.smartTree.data.settings.SettingsProvider; -import org.eclipse.che.ide.ui.smartTree.presentation.HasPresentation; -import org.eclipse.che.ide.util.loging.Log; -import org.eclipse.che.providers.DynaObject; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Project explorer presenter. Handle basic logic to control project tree display. - * - * @author Vlad Zhukovskiy - * @author Dmitry Shnurenko - */ -@Singleton -@DynaObject -public class ProjectExplorerPresenter extends BasePresenter - implements ActionDelegate, - ResourceChangedHandler, - MarkerChangedHandler, - SyntheticNodeUpdateEvent.SyntheticNodeUpdateHandler { - private static final int PART_SIZE = 500; - private final ProjectExplorerView view; - private final EventBus eventBus; - private final ResourceNode.NodeFactory nodeFactory; - private final SettingsProvider settingsProvider; - private final CoreLocalizationConstant locale; - private final Resources resources; - private final TreeExpander treeExpander; - private final AppContext appContext; - private final RequestTransmitter requestTransmitter; - private final DtoFactory dtoFactory; - private NotificationManager notificationManager; - private UpdateTask updateTask = new UpdateTask(); - private Set expandQueue = new HashSet<>(); - private boolean hiddenFilesAreShown; - - @Inject - public ProjectExplorerPresenter( - ProjectExplorerView view, - EventBus eventBus, - CoreLocalizationConstant locale, - Resources resources, - ResourceNode.NodeFactory nodeFactory, - SettingsProvider settingsProvider, - AppContext appContext, - RequestTransmitter requestTransmitter, - NotificationManager notificationManager, - DtoFactory dtoFactory) { - this.view = view; - this.eventBus = eventBus; - this.nodeFactory = nodeFactory; - this.settingsProvider = settingsProvider; - this.locale = locale; - this.resources = resources; - this.appContext = appContext; - this.requestTransmitter = requestTransmitter; - this.notificationManager = notificationManager; - this.dtoFactory = dtoFactory; - this.view.setDelegate(this); - - eventBus.addHandler(ResourceChangedEvent.getType(), this); - eventBus.addHandler(MarkerChangedEvent.getType(), this); - eventBus.addHandler(SyntheticNodeUpdateEvent.getType(), this); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, event -> onWorkspaceStopped()); - eventBus.addHandler(WorkspaceRunningEvent.TYPE, event -> view.showPlaceholder(false)); - eventBus.addHandler(WorkspaceStoppedEvent.TYPE, event -> view.showPlaceholder(true)); - eventBus.addHandler(WorkspaceStartingEvent.TYPE, event -> view.showPlaceholder(true)); - eventBus.addHandler(WorkspaceStoppingEvent.TYPE, event -> view.showPlaceholder(true)); - - if (WorkspaceStatus.RUNNING != appContext.getWorkspace().getStatus()) { - view.showPlaceholder(true); - } - - view.getTree() - .getSelectionModel() - .addSelectionChangedHandler(event -> setSelection(new Selection<>(event.getSelection()))); - - view.getTree() - .addBeforeExpandHandler( - event -> { - NodeDescriptor nodeDescriptor = view.getTree().getNodeDescriptor(event.getNode()); - - if (event.getNode() instanceof SyntheticNode - && nodeDescriptor != null - && nodeDescriptor.isExpandDeep()) { - event.setCancelled(true); - } - }); - - view.getTree() - .getNodeLoader() - .addPostLoadHandler( - event -> { - for (Node node : event.getReceivedNodes()) { - if (node instanceof ResourceNode - && expandQueue.remove(((ResourceNode) node).getData().getLocation())) { - view.getTree().setExpanded(node, true); - } - } - }); - - treeExpander = new ProjectExplorerTreeExpander(view.getTree(), appContext); - - registerNative(); - - // when ide has already initialized, then we force set focus to the current part - eventBus.addHandler( - ExtensionsInitializedEvent.getType(), - event -> { - if (partStack != null) { - partStack.setActivePart(ProjectExplorerPresenter.this); - } - }); - } - - private void onWorkspaceStopped() { - try { - getTree().getNodeStorage().clear(); - } catch (Exception e) { - Log.error(getClass(), e.getMessage(), e); - } - } - - public void addSelectionHandler(SelectionHandler handler) { - getTree().getSelectionModel().addSelectionHandler(handler); - } - - @Inject - public void initFileWatchers() { - final String method = "track/project-tree"; - - getTree() - .addExpandHandler( - event -> { - Node node = event.getNode(); - - if (node instanceof ResourceNode) { - Resource data = ((ResourceNode) node).getData(); - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(method) - .paramsAsDto( - dtoFactory - .createDto(ProjectTreeTrackingOperationDto.class) - .withPath(data.getLocation().toString()) - .withType(START)) - .sendAndSkipResult(); - } - }); - - getTree() - .addCollapseHandler( - event -> { - Node node = event.getNode(); - - if (node instanceof ResourceNode) { - Resource data = ((ResourceNode) node).getData(); - requestTransmitter - .newRequest() - .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) - .methodName(method) - .paramsAsDto( - dtoFactory - .createDto(ProjectTreeTrackingOperationDto.class) - .withPath(data.getLocation().toString()) - .withType(STOP)) - .sendAndSkipResult(); - } - }); - } - - /* Expose Project Explorer's internal API to the world, to allow automated Selenium scripts expand all projects tree. */ - /* - Notice that the reference to the exported method has been wrapped in a call to the $entry function. - This implicitly-defined function ensures that the Java-derived method is executed with the uncaught - exception handler installed and pumps a number of other utility services. The $entry function is - reentrant-safe and should be used anywhere that GWT-derived JavaScript may be called into from a non-GWT context. - */ - private native void registerNative() /*-{ - var that = this; - - var ProjectExplorer = {}; - - ProjectExplorer.expandAll = $entry(function () { - that.@org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter::doExpand()(); - }); - - ProjectExplorer.collapseAll = $entry(function () { - that.@org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter::doCollapse()(); - }); - - ProjectExplorer.reveal = $entry(function (path) { - that.@org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter::doReveal(*)(path); - }); - - ProjectExplorer.refresh = $entry(function () { - that.@org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter::doRefresh()(); - }); - - $wnd.IDE.ProjectExplorer = ProjectExplorer; - }-*/; - - private void doExpand() { - if (treeExpander.isExpandEnabled()) { - treeExpander.expandTree(); - } - } - - private void doCollapse() { - if (treeExpander.isCollapseEnabled()) { - treeExpander.collapseTree(); - } - } - - private void doReveal(String path) { - eventBus.fireEvent(new RevealResourceEvent(Path.valueOf(path))); - } - - private void doRefresh() { - appContext.getWorkspaceRoot().synchronize(); - } - - @Override - @SuppressWarnings("unchecked") - public void onResourceChanged(ResourceChangedEvent event) { - final Tree tree = view.getTree(); - final ResourceDelta delta = event.getDelta(); - final Resource resource = delta.getResource(); - final NodeSettings nodeSettings = settingsProvider.getSettings(); - - // process root projects, they have only one segment in path - if (resource.getLocation().segmentCount() == 1) { - if (delta.getKind() == ADDED) { - if ((delta.getFlags() & (MOVED_FROM | MOVED_TO)) != 0) { - Node node = getNode(delta.getFromPath()); - if (node != null) { - boolean expanded = tree.isExpanded(node); - - tree.getNodeStorage().remove(node); - - node = nodeFactory.newContainerNode((Container) resource, nodeSettings); - tree.getNodeStorage().add(node); - if (expanded) { - tree.setExpanded(node, true); - } - } - } else { - Node node = getNode(resource.getLocation()); - if (node != null) { - String oldId = tree.getNodeStorage().getKeyProvider().getKey(node); - ((ResourceNode) node).setData(delta.getResource()); - tree.getNodeStorage().reIndexNode(oldId, node); - tree.refresh(node); - } else { - tree.getNodeStorage() - .add(nodeFactory.newContainerNode((Container) resource, nodeSettings)); - } - } - } else if (delta.getKind() == REMOVED) { - Node node = getNode(resource.getLocation()); - - if (node != null) { - tree.getNodeStorage().remove(node); - if (resource.isProject()) { - notificationManager.notify( - locale.projectRemoved(node.getName()), SUCCESS, NOT_EMERGE_MODE); - } - } - } else if (delta.getKind() == UPDATED) { - for (Node node : tree.getNodeStorage().getAll()) { - if (node instanceof ResourceNode - && ((ResourceNode) node) - .getData() - .getLocation() - .equals(delta.getResource().getLocation())) { - final String oldId = tree.getNodeStorage().getKeyProvider().getKey(node); - ((ResourceNode) node).setData(delta.getResource()); - tree.getNodeStorage().reIndexNode(oldId, node); - tree.refresh(node); - updateTask.submit(delta.getResource().getLocation()); - } - } - } - } else { - - if ((delta.getFlags() & (MOVED_FROM | MOVED_TO)) != 0) { - final Node node = getNode(delta.getFromPath()); - - if (node != null && tree.isExpanded(node)) { - expandQueue.add(delta.getToPath()); - } - } - - final Node node = getNode(delta.getResource().getLocation()); - if (node != null) { - - if (node instanceof ResourceNode) { - int srcResourceType = ((ResourceNode) node).getData().getResourceType(); - if (srcResourceType != resource.getResourceType()) { // resource changed own type - String oldId = tree.getNodeStorage().getKeyProvider().getKey(node); - ((ResourceNode) node).setData(delta.getResource()); - tree.getNodeStorage().reIndexNode(oldId, node); - } else { - ((ResourceNode) node).setData(delta.getResource()); - } - } - - if (node instanceof HasPresentation) { - tree.refresh(node); - } - } - - updateTask.submit(resource.getLocation()); - - if (delta.getFromPath() != null) { - updateTask.submit(delta.getFromPath()); - } - } - } - - private Node getNode(Path path) { - final Tree tree = view.getTree(); - - for (final Node node : tree.getNodeStorage().getAll()) { - if (isNodeServesLocation(node, path)) { - return node; - } - } - - return null; - } - - private boolean isNodeServesLocation(Node node, Path location) { - return node instanceof ResourceNode - && ((ResourceNode) node).getData().getLocation().equals(location); - } - - @Override - public void onMarkerChanged(MarkerChangedEvent event) { - final Tree tree = view.getTree(); - for (Node node : tree.getNodeStorage().getAll()) { - if (node instanceof ResourceNode - && ((ResourceNode) node) - .getData() - .getLocation() - .equals(event.getResource().getLocation())) { - tree.refresh(node); - } - } - } - - @Override - public void onSyntheticNodeUpdate(SyntheticNodeUpdateEvent event) { - final Tree tree = getTree(); - final NodeDescriptor descriptor = tree.getNodeDescriptor(event.getNode()); - - if (descriptor == null) { - return; - } - - if (descriptor.isLoaded()) { - tree.getNodeLoader().loadChildren(event.getNode(), false); - } - } - - public Tree getTree() { - return view.getTree(); - } - - /** {@inheritDoc} */ - @Override - public View getView() { - return view; - } - - /** {@inheritDoc} */ - @NotNull - @Override - public String getTitle() { - return locale.projectExplorerButtonTitle(); - } - - /** {@inheritDoc} */ - @Override - public SVGResource getTitleImage() { - return resources.projectExplorerPartIcon(); - } - - /** {@inheritDoc} */ - @Nullable - @Override - public String getTitleToolTip() { - return locale.projectExplorerPartTooltip(); - } - - /** {@inheritDoc} */ - @Override - public int getSize() { - return PART_SIZE; - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - } - - /** - * Activate "Go Into" mode on specified node if. Node should support this mode. See {@link - * Node#supportGoInto()}. - * - * @param node node which should be activated in "Go Into" mode - */ - @Deprecated - public boolean goInto(Node node) { - return view.setGoIntoModeOn(node); - } - - /** Deactivate "Go Into" mode. */ - public void goBack() { - view.setGoIntoModeOff(); - } - - /** - * Get "Go Into" state on current tree. - * - * @return true - if "Go Into" mode has been activated. - */ - @Deprecated - public boolean isGoIntoActivated() { - return view.isGoIntoActivated(); - } - - /** Collapse all non-leaf nodes. */ - public void collapseAll() { - doCollapse(); - } - - /** - * Configure tree to show or hide files that starts with ".", e.g. hidden files. - * - * @param show true - if those files should be shown, otherwise - false - */ - @Deprecated - public void showHiddenFiles(boolean show) { - hiddenFilesAreShown = show; - settingsProvider.getSettings().setShowHiddenFiles(show); - view.showHiddenFilesForAllExpandedNodes(show); - } - - /** - * Retrieve status of showing hidden files. - * - * @return true - if hidden files are shown, otherwise - false - */ - @Deprecated - public boolean isShowHiddenFiles() { - return hiddenFilesAreShown; - } - - private class UpdateTask extends DelayedTask { - - private Set toRefresh = new HashSet<>(); - - public void submit(Path path) { - toRefresh.add(path.uptoSegment(1)); - - delay(500); - } - - @Override - public void onExecute() { - Scheduler.get() - .scheduleDeferred( - () -> { - if (view.getTree().getNodeLoader().isBusy()) { - delay(500); - - return; - } - - final Set updateQueue = Sets.newHashSet(toRefresh); - toRefresh.clear(); - - for (Path path : updateQueue) { - final Node node = getNode(path); - - if (node == null) { - continue; - } - - if (getTree().isExpanded(node)) { - view.getTree().getNodeLoader().loadChildren(node, true); - } - } - }); - } - } -} 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 deleted file mode 100644 index 15e13d8af9f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerStateComponent.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import elemental.json.Json; -import elemental.json.JsonArray; -import elemental.json.JsonObject; -import java.util.List; -import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.api.statepersistance.StateComponent; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.loaders.request.LoaderFactory; -import org.eclipse.che.ide.ui.loaders.request.MessageLoader; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Persists and restore state of the project explorer presenter, like expanded nodes and showing - * hidden files - * - * @author Vlad Zhukovskyi - */ -@Singleton -public class ProjectExplorerStateComponent implements StateComponent { - private static final String PATH_PARAM_ID = "revealPath"; - private static final String SHOW_HIDDEN_FILES = "showHiddenFiles"; - - private final ProjectExplorerPresenter projectExplorer; - private final TreeResourceRevealer revealer; - private final LoaderFactory loaderFactory; - private final PromiseProvider promises; - - @Inject - public ProjectExplorerStateComponent( - ProjectExplorerPresenter projectExplorer, - TreeResourceRevealer revealer, - LoaderFactory loaderFactory, - PromiseProvider promises) { - this.projectExplorer = projectExplorer; - this.revealer = revealer; - this.loaderFactory = loaderFactory; - this.promises = promises; - } - - @Override - public JsonObject getState() { - JsonObject state = Json.createObject(); - JsonArray array = Json.createArray(); - state.put(PATH_PARAM_ID, array); - - List rawPaths = - projectExplorer - .getTree() - .getNodeStorage() - .getAll() - .stream() - .filter(node -> projectExplorer.getTree().isExpanded(node)) - .filter(node -> node instanceof ResourceNode) - .map(node -> ((ResourceNode) node).getData().getLocation().toString()) - .collect(Collectors.toList()); - - int i = 0; - for (String path : rawPaths) { - array.set(i++, path); - } - - state.put(SHOW_HIDDEN_FILES, projectExplorer.isShowHiddenFiles()); - - return state; - } - - @Override - public Promise loadState(@NotNull JsonObject state) { - if (state.hasKey(SHOW_HIDDEN_FILES)) { - projectExplorer.showHiddenFiles(state.getBoolean(SHOW_HIDDEN_FILES)); - } - - JsonArray paths = - state.hasKey(PATH_PARAM_ID) ? state.getArray(PATH_PARAM_ID) : Json.createArray(); - - if (paths.length() == 0) { - return promises.resolve(null); - } - - Promise revealPromise = null; - - MessageLoader loader = loaderFactory.newLoader("Restoring project structure..."); - loader.show(); - - for (int i = 0; i < paths.length(); i++) { - String path = paths.getString(i); - if (revealPromise == null) { - revealPromise = revealer.reveal(Path.valueOf(path), false).thenPromise(this::doExpand); - continue; - } - - revealPromise - .thenPromise(node -> revealer.reveal(Path.valueOf(path), false)) - .thenPromise(this::doExpand) - .catchError(this::logError); - } - - if (revealPromise != null) { - revealPromise - .then( - node -> { - loader.hide(); - }) - .catchError( - error -> { - loader.hide(); - }); - } - - if (revealPromise == null) { - return promises.resolve(null); - } - - return revealPromise.thenPromise(ignored -> promises.resolve(null)); - } - - private Promise doExpand(Node node) { - projectExplorer.getTree().setExpanded(node, true); - - return promises.resolve(null); - } - - private Promise logError(PromiseError error) { - Log.info(getClass(), error.getMessage()); - - return promises.resolve(null); - } - - @Override - public int getPriority() { - return MAX_PRIORITY; - } - - @Override - public String getId() { - return "projectExplorer"; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerTreeExpander.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerTreeExpander.java deleted file mode 100644 index 51fab28c34e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerTreeExpander.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.collect.Iterables.any; - -import com.google.common.base.Predicate; -import org.eclipse.che.api.promises.client.Operation; -import org.eclipse.che.api.promises.client.OperationException; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.data.TreeExpander; - -/** - * Project explorer tree expander. Takes care about resources loading state, in case if tree has - * been never expanded before, it requests infinite resource tree from the server and then expands - * project tree on the UI. On the second time it just expands project tree without additional - * resource requests. - * - * @author Vlad Zhukovskyi - * @since 5.0.0 - * @see TreeExpander - */ -final class ProjectExplorerTreeExpander implements TreeExpander { - - private Tree tree; - private AppContext appContext; - - public ProjectExplorerTreeExpander(Tree tree, AppContext appContext) { - this.tree = tree; - this.appContext = appContext; - } - - private final boolean[] everExpanded = new boolean[] {false}; - - @Override - public void expandTree() { - if (everExpanded[0]) { - tree.expandAll(); - - return; - } - - appContext - .getWorkspaceRoot() - .getTree(-1) - .then( - new Operation() { - @Override - public void apply(Resource[] ignored) throws OperationException { - everExpanded[0] = true; - - tree.expandAll(); - } - }); - } - - @Override - public boolean isExpandEnabled() { - return tree.getNodeStorage().getAllItemsCount() != 0; - } - - @Override - public void collapseTree() { - tree.collapseAll(); - } - - @Override - public boolean isCollapseEnabled() { - return any(tree.getRootNodes(), isExpanded()); - } - - private Predicate isExpanded() { - return new Predicate() { - @Override - public boolean apply(@javax.annotation.Nullable Node node) { - checkNotNull(node); - - return tree.isExpanded(node); - } - }; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerView.java deleted file mode 100644 index f11fd8b9426..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerView.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import java.util.List; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.base.BaseActionDelegate; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * View interface for the {@link ProjectExplorerViewImpl}. - * - * @author Vlad Zhukovskiy - */ -public interface ProjectExplorerView extends View { - - /** - * Activate "Go Into" mode on specified node if. Node should support this mode. See {@link - * Node#supportGoInto()}. - * - * @param node node which should be activated in "Go Into" mode - * @return true - if "Go Into" mode has been activated - */ - boolean setGoIntoModeOn(Node node); - - /** Deactivate "Go Into" mode. */ - void setGoIntoModeOff(); - - /** - * Get "Go Into" state on current tree. - * - * @return true - if "Go Into" mode has been activated. - */ - boolean isGoIntoActivated(); - - void reloadChildren(Node parent); - - void reloadChildren(Node parent, boolean deep); - - /** - * Reload children by node type. Useful method if you want to reload specified nodes, e.g. - * External Liraries. - * - * @param type node type to update - */ - void reloadChildrenByType(Class type); - - /** Collapse all non-leaf nodes. */ - void collapseAll(); - - /** - * Configure tree to show or hide files that starts with ".", e.g. hidden files. Affects all - * expanded nodes. - * - * @param show true - if those files should be shown, otherwise - false - */ - void showHiddenFilesForAllExpandedNodes(boolean show); - - /** - * Set selection on node in project tree. - * - * @param item node which should be selected - * @param keepExisting keep current selection or reset it - */ - void select(Node item, boolean keepExisting); - - /** - * Set selection on nodes in project tree. - * - * @param items nodes which should be selected - * @param keepExisting keep current selection or reset it - */ - void select(List items, boolean keepExisting); - - /** - * Set current part visibility state. - * - * @param visible true - if visible, otherwise - false - */ - void setVisible(boolean visible); - - Tree getTree(); - - /** - * Shows placeholder instead projects tree while the workspace is loading. - * - * @param placeholder true to show placeholder - */ - void showPlaceholder(boolean placeholder); - - interface ActionDelegate extends BaseActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerViewImpl.java deleted file mode 100644 index 3c48ace88bf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/ProjectExplorerViewImpl.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import static java.util.Collections.singletonList; -import static org.eclipse.che.ide.project.node.SyntheticNode.CUSTOM_BACKGROUND_FILL; - -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Comparator; -import java.util.List; -import java.util.Set; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.parts.base.BaseView; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.menu.ContextMenu; -import org.eclipse.che.ide.project.node.SyntheticNode; -import org.eclipse.che.ide.resources.tree.ContainerNode; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.resources.tree.SkipHiddenNodesInterceptor; -import org.eclipse.che.ide.ui.smartTree.NodeDescriptor; -import org.eclipse.che.ide.ui.smartTree.NodeLoader; -import org.eclipse.che.ide.ui.smartTree.NodeStorage; -import org.eclipse.che.ide.ui.smartTree.NodeStorage.StoreSortInfo; -import org.eclipse.che.ide.ui.smartTree.SortDir; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.TreeStyles; -import org.eclipse.che.ide.ui.smartTree.data.HasAction; -import org.eclipse.che.ide.ui.smartTree.data.HasAttributes; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.ui.smartTree.data.NodeInterceptor; -import org.eclipse.che.ide.ui.smartTree.presentation.DefaultPresentationRenderer; -import org.eclipse.che.ide.ui.status.StatusWidget; - -/** - * Implementation of the {@link ProjectExplorerView}. - * - * @author Vlad Zhukovskiy - */ -@Singleton -public class ProjectExplorerViewImpl extends BaseView - implements ProjectExplorerView { - private final Tree tree; - private final SkipHiddenNodesInterceptor skipHiddenNodesInterceptor; - - private static final String PROJECT_TREE_WIDGET_ID = "projectTree"; - - private ProjectExplorerPlaceholderWidget projectExplorerPlaceholderWidget; - - @Inject - public ProjectExplorerViewImpl( - final ContextMenu contextMenu, - final CoreLocalizationConstant coreLocalizationConstant, - final Set nodeInterceptorSet, - final SkipHiddenNodesInterceptor skipHiddenNodesInterceptor, - final EmptyTreePanel emptyTreePanel, - final ProjectExplorerPlaceholderWidget projectExplorerPlaceholderWidget) { - this.skipHiddenNodesInterceptor = skipHiddenNodesInterceptor; - - setTitle(coreLocalizationConstant.projectExplorerTitleBarText()); - - this.projectExplorerPlaceholderWidget = projectExplorerPlaceholderWidget; - - NodeStorage nodeStorage = new NodeStorage(); - - NodeLoader nodeLoader = new NodeLoader(nodeInterceptorSet); - nodeLoader.getNodeInterceptors().add(skipHiddenNodesInterceptor); - - tree = new Tree(nodeStorage, nodeLoader, new StatusWidget(emptyTreePanel)); - tree.setContextMenuInvocationHandler( - new Tree.ContextMenuInvocationHandler() { - @Override - public void onInvokeContextMenu(int x, int y) { - contextMenu.show(x, y); - } - }); - - tree.getNodeStorage().addSortInfo(new StoreSortInfo(new NodeTypeComparator(), SortDir.ASC)); - tree.getNodeStorage() - .addSortInfo( - new StoreSortInfo( - new Comparator() { - @Override - public int compare(Node o1, Node o2) { - if (o1 instanceof ResourceNode && o2 instanceof ResourceNode) { - return ((ResourceNode) o1).compareTo((ResourceNode) o2); - } - - return 0; - } - }, - SortDir.ASC)); - - tree.setPresentationRenderer(new ProjectExplorerRenderer(tree.getTreeStyles())); - tree.ensureDebugId(PROJECT_TREE_WIDGET_ID); - tree.setAutoSelect(true); - tree.getNodeLoader().setUseCaching(false); - - setContentWidget(tree); - } - - @Override - protected void focusView() { - tree.setFocus(true); - } - - @Override - protected void blurView() { - tree.setFocus(false); - } - - @Override - public Tree getTree() { - return tree; - } - - /** {@inheritDoc} */ - @Override - public void reloadChildren(Node parent) { - reloadChildren(parent, false); - } - - /** {@inheritDoc} */ - @Override - public void reloadChildren(Node parent, boolean deep) { - // iterate on root nodes and call tree widget to reload their children - for (Node node : parent == null ? tree.getRootNodes() : singletonList(parent)) { - if (node.isLeaf()) { // just preventive actions - continue; - } - - if (tree.isExpanded(node)) { - tree.getNodeLoader().loadChildren(node, deep); - } - } - } - - /** {@inheritDoc} */ - @Override - public void reloadChildrenByType(Class type) { - List rootNodes = tree.getRootNodes(); - for (Node rootNode : rootNodes) { - List allChildren = tree.getNodeStorage().getAllChildren(rootNode); - for (Node child : allChildren) { - if (child.getClass().equals(type)) { - NodeDescriptor nodeDescriptor = tree.getNodeDescriptor(child); - if (nodeDescriptor.isLoaded()) { - tree.getNodeLoader().loadChildren(child); - } - } - } - } - } - - /** {@inheritDoc} */ - @Override - public void select(Node node, boolean keepExisting) { - tree.getSelectionModel().select(node, keepExisting); - } - - /** {@inheritDoc} */ - @Override - public void select(List nodes, boolean keepExisting) { - tree.getSelectionModel().select(nodes, keepExisting); - } - - /** {@inheritDoc} */ - @Override - public void showHiddenFilesForAllExpandedNodes(boolean show) { - if (show) { - tree.getNodeLoader().getNodeInterceptors().remove(skipHiddenNodesInterceptor); - } else { - tree.getNodeLoader().getNodeInterceptors().add(skipHiddenNodesInterceptor); - } - - for (Node node : tree.getRootNodes()) { - reloadChildren(node, true); - } - } - - /** {@inheritDoc} */ - @Override - public boolean setGoIntoModeOn(Node node) { - return tree.getGoInto().activate(node); - } - - @Override - public void setGoIntoModeOff() { - tree.getGoInto().reset(); - } - - /** {@inheritDoc} */ - @Override - public boolean isGoIntoActivated() { - return tree.getGoInto().isActive(); - } - - /** {@inheritDoc} */ - @Override - public void collapseAll() { - tree.collapseAll(); - } - - private class ProjectExplorerRenderer extends DefaultPresentationRenderer { - - ProjectExplorerRenderer(TreeStyles treeStyles) { - super(treeStyles); - } - - @Override - public Element render(Node node, String domID, Tree.Joint joint, int depth) { - Element element = super.render(node, domID, joint, depth); - - element.setAttribute("name", node.getName()); - - if (node instanceof ResourceNode) { - final Resource resource = ((ResourceNode) node).getData(); - element.setAttribute("path", resource.getLocation().toString()); - - Project project = resource.getProject(); - if (project != null) { - element.setAttribute("project", project.getLocation().toString()); - } - } - - if (node instanceof HasAction) { - element.setAttribute("actionable", "true"); - } - - if (node instanceof SyntheticNode) { - element.setAttribute("synthetic", "true"); - element.setAttribute("project", ((SyntheticNode) node).getProject().toString()); - } - - if (node instanceof HasAttributes - && ((HasAttributes) node).getAttributes().containsKey(CUSTOM_BACKGROUND_FILL)) { - element - .getFirstChildElement() - .getStyle() - .setBackgroundColor( - ((HasAttributes) node).getAttributes().get(CUSTOM_BACKGROUND_FILL).get(0)); - } - - if (node instanceof ContainerNode) { - Container container = ((ContainerNode) node).getData(); - if (container instanceof Project) { - String head = container.getProject().getAttribute("git.current.head.name"); - if (head != null) { - Element nodeContainer = element.getFirstChildElement(); - DivElement divElement = Document.get().createDivElement(); - divElement.setInnerText("(" + head + ")"); - divElement.setClassName(treeStyles.treeStylesCss().vcsHeadContainer()); - divElement.setId("git.reference.name"); - nodeContainer.insertBefore(divElement, nodeContainer.getLastChild()); - } - } - } - return element; - } - } - - @Override - public void showPlaceholder(boolean placeholder) { - if (placeholder) { - if (!projectExplorerPlaceholderWidget.getElement().hasParentElement()) { - getElement().appendChild(projectExplorerPlaceholderWidget.getElement()); - } - } else { - if (projectExplorerPlaceholderWidget.getElement().hasParentElement()) { - getElement().removeChild(projectExplorerPlaceholderWidget.getElement()); - } - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/TreeResourceRevealer.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/TreeResourceRevealer.java deleted file mode 100644 index e0537b2b54c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/TreeResourceRevealer.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project; - -import static java.util.Arrays.copyOf; -import static org.eclipse.che.api.promises.client.callback.AsyncPromiseHelper.createFromAsyncRequest; - -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import java.util.List; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.DelayedTask; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.resources.reveal.RevealResourceEvent; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.Tree; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Search node handler, perform searching specified node in the tree by storable value. For example - * if user passes "/project/path/to/file" then this node handler will check opened root nodes and if - * it contains project node with path "/project" then it will search children by path - * "path/to/file". - * - * @author Vlad Zhukovskiy - * @see RevealResourceEvent - * @since 4.4.0 - */ -@Singleton -public class TreeResourceRevealer { - - private Promise queue; - - private Tree tree; - - private Node[] toSelect = null; - private boolean isFocusRequired = true; - - private DelayedTask selectTask = - new DelayedTask() { - @Override - public void onExecute() { - if (toSelect != null) { - final Node[] copy = copyOf(toSelect, toSelect.length); - - if (copy.length == 1) { - tree.getSelectionModel().select(copy[0], false); - tree.scrollIntoView(copy[0], isFocusRequired); - } - - toSelect = null; - isFocusRequired = true; - } - } - }; - - @Inject - public TreeResourceRevealer( - ProjectExplorerView projectExplorer, EventBus eventBus, PromiseProvider promises) { - this.tree = projectExplorer.getTree(); - - queue = promises.resolve(null); - - eventBus.addHandler( - RevealResourceEvent.getType(), - event -> - queue.thenPromise( - ignored -> - reveal( - event.getLocation(), - event.isSelectionRequired(), - event.isFocusRequired()) - .catchError((Function) arg -> null))); - } - - /** - * Search node in the project explorer tree by storable path. - * - * @param path path to node - * @return promise object with found node or promise error if node wasn't found - */ - public Promise reveal(final Path path) { - return reveal(path, true); - } - - /** - * Search node in the project explorer tree by storable path. - * - * @param path path to node - * @param select select node after reveal - * @return promise object with found node or promise error if node wasn't found - */ - public Promise reveal(final Path path, final boolean select) { - return reveal(path, select, select); - } - - /** - * Search node in the project explorer tree by storable path. - * - * @param path path to node - * @param select select node after reveal - * @param isFocusRequired whether tree should take focus after reveal - * @return promise object with found node or promise error if node wasn't found - */ - public Promise reveal( - final Path path, final boolean select, final boolean isFocusRequired) { - return queue.thenPromise( - ignored -> - createFromAsyncRequest(callback -> reveal(path, select, isFocusRequired, callback))); - } - - protected void reveal( - final Path path, - final boolean select, - final boolean isFocusRequired, - final AsyncCallback callback) { - if (path == null) { - callback.onFailure(new IllegalArgumentException("Invalid search path")); - } - - Scheduler.get() - .scheduleFixedDelay( - () -> { - if (tree.getNodeLoader().isBusy()) { - return true; - } - - ResourceNode nodeByPath = getNodeByPath(path); - if (nodeByPath != null) { - - if (select) { - TreeResourceRevealer.this.isFocusRequired = isFocusRequired; - - if (toSelect == null) { - toSelect = new Node[] {nodeByPath}; - } else { - final int index = toSelect.length; - toSelect = copyOf(toSelect, index + 1); - toSelect[index] = nodeByPath; - } - - selectTask.delay(200); - } - - callback.onSuccess(nodeByPath); - return false; - } - - ResourceNode root = getRootResourceNode(path); - - if (root == null) { - callback.onFailure(new IllegalStateException()); - return false; - } - - if (root.getData().getLocation().equals(path)) { - callback.onSuccess(root); - return false; - } - - expandToPath(root, path, select, isFocusRequired) - .then(callback::onSuccess) - .catchError( - arg -> { - callback.onFailure(arg.getCause()); - }); - - return false; - }, - 500); - } - - private Promise expandToPath( - final ResourceNode root, - final Path path, - final boolean select, - final boolean isFocusRequired) { - return createFromAsyncRequest( - callback -> expand(root, path, select, isFocusRequired, callback)); - } - - protected void expand( - final ResourceNode parent, - final Path segment, - final boolean select, - final boolean isFocusRequired, - final AsyncCallback callback) { - - if (parent.getData().getLocation().equals(segment)) { - if (select) { - this.isFocusRequired = isFocusRequired; - - if (toSelect == null) { - toSelect = new Node[] {parent}; - } else { - final int index = toSelect.length; - toSelect = copyOf(toSelect, index + 1); - toSelect[index] = parent; - } - - selectTask.delay(200); - } - - callback.onSuccess(parent); - return; - } - - final HandlerRegistration[] handler = new HandlerRegistration[1]; - - handler[0] = - tree.getNodeLoader() - .addPostLoadHandler( - event -> { - if (!event.getRequestedNode().equals(parent)) { - return; - } - - if (handler[0] != null) { - // Do not remove the handler immediately to not to lose 'loadChildren' events - // that were fired after the children request. - new Timer() { - @Override - public void run() { - handler[0].removeHandler(); - } - }.schedule(2000); - } - final List children = - tree.getNodeStorage().getChildren(event.getRequestedNode()); - - for (Node child : children) { - if (child instanceof ResourceNode - && ((ResourceNode) child).getData().getLocation().isPrefixOf(segment)) { - expand((ResourceNode) child, segment, select, isFocusRequired, callback); - return; - } - } - - callback.onFailure(new IllegalStateException("Not found")); - }); - - tree.getNodeLoader().loadChildren(parent); - } - - private ResourceNode getNodeByPath(Path path) { - return (ResourceNode) - tree.getNodeStorage() - .getAll() - .stream() - .filter(node -> node instanceof ResourceNode) - .filter(node -> ((ResourceNode) node).getData().getLocation().equals(path)) - .findFirst() - .orElse(null); - } - - private ResourceNode getRootResourceNode(Path path) { - return (ResourceNode) - tree.getRootNodes() - .stream() - .filter(node -> node instanceof ResourceNode) - .filter(node -> ((ResourceNode) node).getData().getLocation().isPrefixOf(path)) - .findFirst() - .orElse(null); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileBaseNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileBaseNameMacro.java deleted file mode 100644 index 246bd7a2b2a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileBaseNameMacro.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.transform; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Predicate; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import javax.annotation.Nullable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource name without extension from the project - * explorer. - * - *

        Macro provided: ${explorer.current.file.basename} - * - *

        In case if project explorer has more than one selected file, comma separated file list is - * returned. - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 5.6.0 - */ -@Beta -@Singleton -public class ExplorerCurrentFileBaseNameMacro implements Macro { - - public static final String KEY = "${explorer.current.file.basename}"; - - private final CoreLocalizationConstant localizationConstants; - - private Predicate resNodePredicate = - input -> { - checkNotNull(input); - - return input instanceof ResourceNode; - }; - - private Function nodeToResourceFun = - new Function() { - @Nullable - @Override - public Resource apply(@Nullable Node input) { - checkNotNull(input); - checkState(input instanceof ResourceNode); - - return ((ResourceNode) input).getData(); - } - }; - private Function resourceToNameFun = - new Function() { - @Nullable - @Override - public String apply(@Nullable Resource input) { - checkNotNull(input); - - if (input.isFile()) { - return input.asFile().getNameWithoutExtension(); - } - - return input.getName(); - } - }; - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - - @Inject - public ExplorerCurrentFileBaseNameMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentFileBaseNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty()) { - return promises.resolve(""); - } - - final Iterable resources = - transform(filter(selectedNodes, resNodePredicate), nodeToResourceFun); - final String commaSeparated = Joiner.on(", ").join(transform(resources, resourceToNameFun)); - - return promises.resolve(commaSeparated); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileNameMacro.java deleted file mode 100644 index 8e9d42cd477..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileNameMacro.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.transform; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Predicate; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import javax.annotation.Nullable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource name from the project explorer. - * - *

        Macro provided: ${explorer.current.file.name} - * - *

        In case if project explorer has more than one selected file, comma separated file list is - * returned. - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 4.7.0 - */ -@Beta -@Singleton -public class ExplorerCurrentFileNameMacro implements Macro { - - public static final String KEY = "${explorer.current.file.name}"; - - private Predicate resNodePredicate = - new Predicate() { - @Override - public boolean apply(@Nullable Node input) { - checkNotNull(input); - - return input instanceof ResourceNode; - } - }; - - private Function nodeToResourceFun = - new Function() { - @Nullable - @Override - public Resource apply(@Nullable Node input) { - checkNotNull(input); - checkState(input instanceof ResourceNode); - - return ((ResourceNode) input).getData(); - } - }; - - private Function resourceToNameFun = - new Function() { - @Nullable - @Override - public String apply(@Nullable Resource input) { - checkNotNull(input); - - return input.getName(); - } - }; - - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public ExplorerCurrentFileNameMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentFileNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty()) { - return promises.resolve(""); - } - - final Iterable resources = - transform(filter(selectedNodes, resNodePredicate), nodeToResourceFun); - final String commaSeparated = Joiner.on(", ").join(transform(resources, resourceToNameFun)); - - return promises.resolve(commaSeparated); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileParentPathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileParentPathMacro.java deleted file mode 100644 index 61975e7da2f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileParentPathMacro.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.transform; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Predicate; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import javax.annotation.Nullable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Container; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource's parent path from the project - * explorer. - * - *

        Macro provided: ${explorer.current.file.parent.path} - * - *

        In case if project explorer has more than one selected file, comma separated file list is - * returned. - * - * @author Artem Zatsarynnyi - * @see Macro - * @see ProjectExplorerPresenter - */ -@Beta -@Singleton -public class ExplorerCurrentFileParentPathMacro implements Macro { - - public static final String KEY = "${explorer.current.file.parent.path}"; - - private Predicate resNodePredicate = - new Predicate() { - @Override - public boolean apply(@Nullable Node input) { - checkNotNull(input); - - return input instanceof ResourceNode; - } - }; - - private Function nodeToResourceFun = - new Function() { - @Nullable - @Override - public Resource apply(@Nullable Node input) { - checkNotNull(input); - checkState(input instanceof ResourceNode); - - return ((ResourceNode) input).getData(); - } - }; - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private AppContext appContext; - private final CoreLocalizationConstant localizationConstants; - private Function resourceToAbsoluteParentPathFun = - new Function() { - @Nullable - @Override - public String apply(@Nullable Resource input) { - checkNotNull(input); - - final Container parent = input.getParent(); - if (parent == null) { - return ""; - } - - return appContext.getProjectsRoot().append(parent.getLocation()).toString(); - } - }; - - @Inject - public ExplorerCurrentFileParentPathMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - AppContext appContext, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.appContext = appContext; - this.localizationConstants = localizationConstants; - } - - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentFileParentPathDescription(); - } - - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty()) { - return promises.resolve(""); - } - - final Iterable resources = - transform(filter(selectedNodes, resNodePredicate), nodeToResourceFun); - final String commaSeparated = - Joiner.on(", ").join(transform(resources, resourceToAbsoluteParentPathFun)); - - return promises.resolve(commaSeparated); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFilePathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFilePathMacro.java deleted file mode 100644 index 06fe3689f91..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFilePathMacro.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.transform; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Predicate; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import javax.annotation.Nullable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource path from the project explorer. - * - *

        Macro provided: ${explorer.current.file.path} - * - *

        In case if project explorer has more than one selected file, comma separated file list is - * returned. - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 4.7.0 - */ -@Beta -@Singleton -public class ExplorerCurrentFilePathMacro implements Macro { - - public static final String KEY = "${explorer.current.file.path}"; - - private Predicate resNodePredicate = - new Predicate() { - @Override - public boolean apply(@Nullable Node input) { - checkNotNull(input); - - return input instanceof ResourceNode; - } - }; - - private Function nodeToResourceFun = - new Function() { - @Nullable - @Override - public Resource apply(@Nullable Node input) { - checkNotNull(input); - checkState(input instanceof ResourceNode); - - return ((ResourceNode) input).getData(); - } - }; - - private Function resourceToAbsolutePathFun = - new Function() { - @Nullable - @Override - public String apply(@Nullable Resource input) { - checkNotNull(input); - - return appContext.getProjectsRoot().append(input.getLocation()).toString(); - } - }; - - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private AppContext appContext; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public ExplorerCurrentFilePathMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - AppContext appContext, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.appContext = appContext; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentFilePathDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty()) { - return promises.resolve(""); - } - - final Iterable resources = - transform(filter(selectedNodes, resNodePredicate), nodeToResourceFun); - final String commaSeparated = - Joiner.on(", ").join(transform(resources, resourceToAbsolutePathFun)); - - return promises.resolve(commaSeparated); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileRelativePathMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileRelativePathMacro.java deleted file mode 100644 index 97f3248719f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentFileRelativePathMacro.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; -import static com.google.common.collect.Iterables.filter; -import static com.google.common.collect.Iterables.transform; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Predicate; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import javax.annotation.Nullable; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource relative path from the project - * explorer. - * - *

        Macro provided: ${explorer.current.file.relpath} - * - *

        In case if project explorer has more than one selected file, comma separated file list is - * returned. - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 4.7.0 - */ -@Beta -@Singleton -public class ExplorerCurrentFileRelativePathMacro implements Macro { - - public static final String KEY = "${explorer.current.file.relpath}"; - - private Predicate resNodePredicate = - new Predicate() { - @Override - public boolean apply(@Nullable Node input) { - checkNotNull(input); - - return input instanceof ResourceNode; - } - }; - - private Function nodeToResourceFun = - new Function() { - @Nullable - @Override - public Resource apply(@Nullable Node input) { - checkNotNull(input); - checkState(input instanceof ResourceNode); - - return ((ResourceNode) input).getData(); - } - }; - - private Function resourceToPathFun = - new Function() { - @Nullable - @Override - public String apply(@Nullable Resource input) { - checkNotNull(input); - - return input.getLocation().toString(); - } - }; - - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public ExplorerCurrentFileRelativePathMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentFileRelpathDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty()) { - return promises.resolve(""); - } - - final Iterable resources = - transform(filter(selectedNodes, resNodePredicate), nodeToResourceFun); - final String commaSeparated = Joiner.on(", ").join(transform(resources, resourceToPathFun)); - - return promises.resolve(commaSeparated); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectNameMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectNameMacro.java deleted file mode 100644 index 0429840300d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectNameMacro.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource's project name from the project - * explorer. - * - *

        Macro provided: ${explorer.current.project.name} - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 4.7.0 - */ -@Beta -@Singleton -public class ExplorerCurrentProjectNameMacro implements Macro { - - public static final String KEY = "${explorer.current.project.name}"; - - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public ExplorerCurrentProjectNameMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentProjectNameDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty() || selectedNodes.size() > 1) { - return promises.resolve(""); - } - - final Node node = selectedNodes.get(0); - - if (node instanceof ResourceNode) { - final Optional project = ((ResourceNode) node).getData().getRelatedProject(); - - if (!project.isPresent()) { - return promises.resolve(""); - } - - return promises.resolve(project.get().getName()); - } - - return promises.resolve(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectTypeMacro.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectTypeMacro.java deleted file mode 100644 index d88ad4d7cdf..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/macro/ExplorerCurrentProjectTypeMacro.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.macro; - -import com.google.common.annotations.Beta; -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseProvider; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.macro.Macro; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.smartTree.data.Node; - -/** - * Provider which is responsible for retrieving the resource's project type from the project - * explorer. - * - *

        Macro provided: ${explorer.current.project.type} - * - * @author Vlad Zhukovskyi - * @see Macro - * @see ProjectExplorerPresenter - * @since 4.7.0 - */ -@Beta -@Singleton -public class ExplorerCurrentProjectTypeMacro implements Macro { - - public static final String KEY = "${explorer.current.project.type}"; - - private ProjectExplorerPresenter projectExplorer; - private PromiseProvider promises; - private final CoreLocalizationConstant localizationConstants; - - @Inject - public ExplorerCurrentProjectTypeMacro( - ProjectExplorerPresenter projectExplorer, - PromiseProvider promises, - CoreLocalizationConstant localizationConstants) { - this.projectExplorer = projectExplorer; - this.promises = promises; - this.localizationConstants = localizationConstants; - } - - /** {@inheritDoc} */ - @Override - public String getName() { - return KEY; - } - - @Override - public String getDescription() { - return localizationConstants.macroExplorerCurrentProjectTypeDescription(); - } - - /** {@inheritDoc} */ - @Override - public Promise expand() { - - List selectedNodes = projectExplorer.getTree().getSelectionModel().getSelectedNodes(); - - if (selectedNodes.isEmpty() || selectedNodes.size() > 1) { - return promises.resolve(""); - } - - final Node node = selectedNodes.get(0); - - if (node instanceof ResourceNode) { - final Optional project = ((ResourceNode) node).getData().getRelatedProject(); - - if (!project.isPresent()) { - return promises.resolve(""); - } - - return promises.resolve(project.get().getType()); - } - - return promises.resolve(""); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ChangeLocationWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ChangeLocationWidget.java deleted file mode 100644 index 23f87505d65..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ChangeLocationWidget.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.synchronize; - -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.TextBox; -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.CoreLocalizationConstant; - -/** - * The class represent widget which contains label with description and text field to input correct - * location. - * - * @author Dmitry Shnurenko - */ -class ChangeLocationWidget extends FlowPanel { - - private final TextBox textBox; - - @Inject - public ChangeLocationWidget(TextBox textBox, Label label, CoreLocalizationConstant locale) { - this.textBox = textBox; - - label.setText(locale.locationIncorrect()); - textBox.setWidth("420px"); - - add(label); - add(textBox); - } - - @NotNull - public String getText() { - return textBox.getText(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ProjectConfigSynchronized.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ProjectConfigSynchronized.java deleted file mode 100644 index fdbebfa526a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/explorer/project/synchronize/ProjectConfigSynchronized.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.explorer.project.synchronize; - -import static com.google.common.base.Strings.isNullOrEmpty; -import static org.eclipse.che.api.core.ErrorCodes.NO_PROJECT_ON_FILE_SYSTEM; -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS; -import static org.eclipse.che.ide.api.resources.Project.ProblemProjectMarker.PROBLEM_PROJECT; - -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import java.util.Map; -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.workspace.shared.dto.SourceStorageDto; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.resources.Project; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.marker.Marker; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.resources.tree.ResourceNode; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.smartTree.data.Node; -import org.eclipse.che.ide.util.loging.Log; - -/** - * Synchronize projects in workspace with projects on file system. The synchronization performs - * based on project problems. Project problem with code 10 means that project exist in workspace but - * it is absent on file system. - */ -@Singleton -public class ProjectConfigSynchronized { - private final AppContext appContext; - private final DialogFactory dialogFactory; - private final CoreLocalizationConstant locale; - private final NotificationManager notificationManager; - private final ChangeLocationWidget changeLocationWidget; - - @Inject - public ProjectConfigSynchronized( - AppContext appContext, - ProjectExplorerPresenter projectExplorerPresenter, - DialogFactory dialogFactory, - CoreLocalizationConstant locale, - NotificationManager notificationManager, - ChangeLocationWidget changeLocationWidget) { - this.appContext = appContext; - this.dialogFactory = dialogFactory; - this.locale = locale; - this.notificationManager = notificationManager; - this.changeLocationWidget = changeLocationWidget; - - projectExplorerPresenter - .getTree() - .getNodeLoader() - .addBeforeLoadHandler( - event -> { - final Node requestedNode = event.getRequestedNode(); - if (requestedNode == null || !(requestedNode instanceof ResourceNode)) { - return; - } - - final ResourceNode resourceNode = (ResourceNode) requestedNode; - final Resource data = resourceNode.getData(); - if (!data.isProject()) { - return; - } - - checkProjectProblems((Project) data); - }); - } - - private void checkProjectProblems(Project project) { - final Optional marker = project.getMarker(PROBLEM_PROJECT); - if (!marker.isPresent()) { - return; - } - - final Project.ProblemProjectMarker problemProjectMarker = - (Project.ProblemProjectMarker) marker.get(); - final Map problems = problemProjectMarker.getProblems(); - - // If no project folder on file system - final String noProjectFolderProblem = problems.get(NO_PROJECT_ON_FILE_SYSTEM); - final List importingProjects = appContext.getImportingProjects(); - if (!isNullOrEmpty(noProjectFolderProblem) && !importingProjects.contains(project.getPath())) { - showImportDialog(project); - } - } - - private void showImportDialog(Project project) { - dialogFactory - .createConfirmDialog( - locale.synchronizeDialogTitle(), - locale.existInWorkspaceDialogContent(project.getName()), - locale.buttonImport(), - locale.buttonRemove(), - () -> importCallback(project), - () -> deleteCallback(project)) - .show(); - } - - private Promise deleteCallback(Project project) { - return project - .delete() - .then( - deletedProject -> { - notificationManager.notify( - locale.projectRemoved(project.getName()), SUCCESS, EMERGE_MODE); - }); - } - - private void importCallback(Project project) { - final String location = project.getSource().getLocation(); - if (isNullOrEmpty(location)) { - changeLocation(project); - - return; - } - - importProject(project); - } - - private void changeLocation(Project project) { - dialogFactory - .createConfirmDialog( - locale.synchronizeDialogTitle(), - changeLocationWidget, - () -> { - final SourceStorageDto source = (SourceStorageDto) project.getSource(); - - source.setLocation(changeLocationWidget.getText()); - source.setType("github"); - - importProject(project); - }, - null) - .show(); - } - - private void importProject(Project project) { - appContext - .getWorkspaceRoot() - .importProject() - .withBody(project) - .send() - .then( - new Operation() { - @Override - public void apply(Project project) throws OperationException { - Log.info(getClass(), "Project " + project.getName() + " imported."); - } - }); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspective.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspective.java deleted file mode 100644 index 5f2a9781fb8..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/AbstractPerspective.java +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.perspectives.general; - -import static org.eclipse.che.ide.api.parts.PartStack.State.HIDDEN; -import static org.eclipse.che.ide.api.parts.PartStackType.EDITING; -import static org.eclipse.che.ide.api.parts.PartStackType.INFORMATION; -import static org.eclipse.che.ide.api.parts.PartStackType.NAVIGATION; -import static org.eclipse.che.ide.api.parts.PartStackType.TOOLING; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.ACTIVE_PART; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.HIDDEN_STATE; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.PART_CLASS_NAME; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.PART_STACKS; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.PART_STACK_PARTS; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.PART_STACK_SIZE; -import static org.eclipse.che.ide.statepersistance.AppStateConstants.PART_STACK_STATE; - -import com.google.inject.Provider; -import com.google.web.bindery.event.shared.EventBus; -import elemental.json.Json; -import elemental.json.JsonArray; -import elemental.json.JsonObject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.constraints.NotNull; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.constraints.Constraints; -import org.eclipse.che.ide.api.mvp.Presenter; -import org.eclipse.che.ide.api.parts.ActivePartChangedEvent; -import org.eclipse.che.ide.api.parts.ActivePartChangedHandler; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.api.parts.PartStackStateChangedEvent; -import org.eclipse.che.ide.api.parts.PartStackType; -import org.eclipse.che.ide.api.parts.PartStackView; -import org.eclipse.che.ide.api.parts.Perspective; -import org.eclipse.che.ide.api.parts.PerspectiveView; -import org.eclipse.che.ide.api.parts.base.MaximizePartEvent; -import org.eclipse.che.ide.part.PartStackPresenterFactory; -import org.eclipse.che.ide.part.PartStackViewFactory; -import org.eclipse.che.ide.part.WorkBenchControllerFactory; -import org.eclipse.che.ide.part.WorkBenchPartController; -import org.eclipse.che.providers.DynaProvider; - -/** - * The class which contains general business logic for all perspectives. - * - * @author Dmitry Shnurenko - */ -// TODO need rewrite this, remove direct dependency on PerspectiveViewImpl and other GWT Widgets -public abstract class AbstractPerspective - implements Presenter, - Perspective, - ActivePartChangedHandler, - PartStackStateChangedEvent.Handler, - MaximizePartEvent.Handler, - PerspectiveView.ActionDelegate, - PartStack.ActionDelegate { - - /** The default size for the part. */ - private static final double DEFAULT_PART_SIZE = 260; - - /** The minimum allowable size for the part. */ - private static final int MIN_PART_SIZE = 100; - - protected final Map partStacks; - protected final PerspectiveViewImpl view; - - private final String perspectiveId; - private final DynaProvider dynaProvider; - - private final WorkBenchPartController leftPartController; - private final WorkBenchPartController rightPartController; - private final WorkBenchPartController belowPartController; - - private PartPresenter activePart; - private PartPresenter activePartBeforeChangePerspective; - - private PartStack maximizedPartStack; - - protected AbstractPerspective( - @NotNull String perspectiveId, - @NotNull PerspectiveViewImpl view, - @NotNull PartStackPresenterFactory stackPresenterFactory, - @NotNull PartStackViewFactory partViewFactory, - @NotNull WorkBenchControllerFactory controllerFactory, - @NotNull EventBus eventBus, - @NotNull DynaProvider dynaProvider) { - this.view = view; - this.perspectiveId = perspectiveId; - this.dynaProvider = dynaProvider; - this.partStacks = new HashMap<>(); - - view.setDelegate(this); - - PartStackView navigationView = partViewFactory.create(view.getLeftPanel()); - leftPartController = - controllerFactory.createController(view.getSplitPanel(), view.getNavigationPanel()); - PartStack navigationPartStack = - stackPresenterFactory.create(navigationView, leftPartController); - navigationPartStack.setDelegate(this); - partStacks.put(NAVIGATION, navigationPartStack); - - PartStackView informationView = partViewFactory.create(view.getBottomPanel()); - belowPartController = - controllerFactory.createController(view.getSplitPanel(), view.getInformationPanel()); - PartStack informationStack = stackPresenterFactory.create(informationView, belowPartController); - informationStack.setDelegate(this); - partStacks.put(INFORMATION, informationStack); - - PartStackView toolingView = partViewFactory.create(view.getRightPanel()); - rightPartController = - controllerFactory.createController(view.getSplitPanel(), view.getToolPanel()); - PartStack toolingPartStack = stackPresenterFactory.create(toolingView, rightPartController); - toolingPartStack.setDelegate(this); - partStacks.put(TOOLING, toolingPartStack); - - eventBus.addHandler(ActivePartChangedEvent.TYPE, this); - eventBus.addHandler(PartStackStateChangedEvent.TYPE, this); - eventBus.addHandler(MaximizePartEvent.TYPE, this); - } - - /** - * Opens previous active tab on current perspective. - * - * @param partStackType part type on which need open previous active part - */ - protected void openActivePart(@NotNull PartStackType partStackType) { - PartStack partStack = partStacks.get(partStackType); - partStack.openPreviousActivePart(); - } - - @Override - public void storeState() { - activePartBeforeChangePerspective = activePart; - - if (activePartBeforeChangePerspective != null) { - activePartBeforeChangePerspective.storeState(); - } - } - - @Override - public void restoreState() { - if (activePartBeforeChangePerspective != null) { - setActivePart(activePartBeforeChangePerspective); - activePartBeforeChangePerspective.restoreState(); - } - } - - @Override - public void onActivePartChanged(ActivePartChangedEvent event) { - activePart = event.getActivePart(); - } - - @Override - public void onPartStackStateChanged(PartStackStateChangedEvent event) { - PartStack changedPartStack = event.getPartStack(); - if (HIDDEN == changedPartStack.getPartStackState() - && activePart != null - && activePart.getPartStack() == changedPartStack) { - activePart = null; - } - } - - /** {@inheritDoc} */ - @Override - public void removePart(@NotNull PartPresenter part) { - PartStack destPartStack = findPartStackByPart(part); - if (destPartStack != null) { - destPartStack.removePart(part); - } - } - - /** {@inheritDoc} */ - @Override - public void hidePart(@NotNull PartPresenter part) { - PartStack destPartStack = findPartStackByPart(part); - if (destPartStack != null) { - destPartStack.hide(); - } - } - - /** {@inheritDoc} */ - @Override - public void maximizeCentralPartStack() { - onMaximize(partStacks.get(EDITING)); - } - - /** {@inheritDoc} */ - @Override - public void maximizeLeftPartStack() { - onMaximize(partStacks.get(NAVIGATION)); - } - - /** {@inheritDoc} */ - @Override - public void maximizeRightPartStack() { - onMaximize(partStacks.get(TOOLING)); - } - - /** {@inheritDoc} */ - @Override - public void maximizeBottomPartStack() { - onMaximize(partStacks.get(INFORMATION)); - } - - @Override - public void onMaximizePart(MaximizePartEvent event) { - PartStack partStack = findPartStackByPart(event.getPart()); - if (partStack == null) { - return; - } - - if (partStack.getPartStackState() == PartStack.State.MAXIMIZED) { - onRestore(partStack); - } else { - onMaximize(partStack); - } - } - - @Override - public void onMaximize(PartStack partStack) { - if (partStack == null) { - return; - } - - if (partStack.equals(maximizedPartStack)) { - return; - } - - maximizedPartStack = partStack; - - for (PartStack ps : partStacks.values()) { - if (!ps.equals(partStack)) { - ps.minimize(); - } - } - - partStack.maximize(); - } - - @Override - public void onRestore(PartStack partStack) { - for (PartStack ps : partStacks.values()) { - ps.restore(); - } - - maximizedPartStack = null; - } - - /** {@inheritDoc} */ - @Override - public void restore() { - onRestore(null); - } - - /** {@inheritDoc} */ - @Override - public void setActivePart(@NotNull PartPresenter part) { - PartStack destPartStack = findPartStackByPart(part); - if (destPartStack != null) { - destPartStack.setActivePart(part); - } - } - - /** {@inheritDoc} */ - @Override - public void setActivePart(@NotNull PartPresenter part, @NotNull PartStackType type) { - PartStack destPartStack = partStacks.get(type); - destPartStack.setActivePart(part); - } - - /** - * Find parent PartStack for given Part - * - * @param part part for which need find parent - * @return Parent PartStackPresenter or null if part not registered - */ - public PartStack findPartStackByPart(@NotNull PartPresenter part) { - for (PartStackType partStackType : PartStackType.values()) { - if (partStacks.get(partStackType).containsPart(part)) { - return partStacks.get(partStackType); - } - } - return null; - } - - /** {@inheritDoc} */ - @Override - public void addPart(@NotNull PartPresenter part, @NotNull PartStackType type) { - addPart(part, type, null); - } - - /** {@inheritDoc} */ - @Override - public void addPart( - @NotNull PartPresenter part, @NotNull PartStackType type, @Nullable Constraints constraint) { - PartStack destPartStack = partStacks.get(type); - - List rules = part.getRules(); - if (rules.isEmpty() || rules.contains(perspectiveId)) { - destPartStack.addPart(part, constraint); - } - } - - @Override - public void onResize(int width, int height) { - if (maximizedPartStack != null) { - maximizedPartStack.maximize(); - } - } - - /** {@inheritDoc} */ - @Override - @Nullable - public PartStack getPartStack(@NotNull PartStackType type) { - return partStacks.get(type); - } - - @Override - @Nullable - public PartPresenter getActivePart() { - return activePart; - } - - @Override - public JsonObject getState() { - JsonObject state = Json.createObject(); - JsonObject partStacks = Json.createObject(); - if (activePart != null) { - state.put(ACTIVE_PART, activePart.getClass().getName()); - } - state.put(PART_STACKS, partStacks); - - partStacks.put( - PartStackType.INFORMATION.name(), - getPartStackState(this.partStacks.get(INFORMATION), belowPartController)); - partStacks.put( - PartStackType.NAVIGATION.name(), - getPartStackState(this.partStacks.get(NAVIGATION), leftPartController)); - partStacks.put( - PartStackType.TOOLING.name(), - getPartStackState(this.partStacks.get(TOOLING), rightPartController)); - - return state; - } - - private JsonObject getPartStackState( - PartStack partStack, WorkBenchPartController partController) { - JsonObject state = Json.createObject(); - state.put(PART_STACK_SIZE, partController.getSize()); - state.put(PART_STACK_STATE, partStack.getPartStackState().name()); - - if (partStack.getParts().isEmpty()) { - state.put(HIDDEN_STATE, true); - } else { - if (partStack.getActivePart() != null) { - state.put(ACTIVE_PART, partStack.getActivePart().getClass().getName()); - } - state.put(HIDDEN_STATE, partController.isHidden()); - - JsonArray parts = Json.createArray(); - state.put(PART_STACK_PARTS, parts); - int i = 0; - for (PartPresenter entry : partStack.getParts()) { - JsonObject presenterState = Json.createObject(); - presenterState.put(PART_CLASS_NAME, entry.getClass().getName()); - parts.set(i++, presenterState); - } - } - return state; - } - - @Override - public Promise loadState(@NotNull JsonObject state) { - if (state.hasKey(PART_STACKS)) { - 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: - loadPartStackState( - partStacks.get(INFORMATION), - belowPartController, - partStackState, - perspectiveMaximized); - break; - case NAVIGATION: - loadPartStackState( - partStacks.get(NAVIGATION), - leftPartController, - partStackState, - perspectiveMaximized); - break; - case TOOLING: - loadPartStackState( - partStacks.get(TOOLING), rightPartController, partStackState, perspectiveMaximized); - break; - default: - } - } - } - - // restore perspective's active part - if (state.hasKey(ACTIVE_PART)) { - String activePart = state.getString(ACTIVE_PART); - Provider provider = dynaProvider.getProvider(activePart); - if (provider != null) { - setActivePart(provider.get()); - } - } - - return Promises.resolve(null); - } - - /** - * 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(PART_STACK_STATE) - && PartStack.State.MAXIMIZED.name().equals(partStackState.getString(PART_STACK_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(PART_STACK_PARTS)) { - JsonArray parts = partStackState.get(PART_STACK_PARTS); - - for (int i = 0; i < parts.length(); i++) { - JsonObject value = parts.get(i); - if (value.hasKey(PART_CLASS_NAME)) { - String className = value.getString(PART_CLASS_NAME); - Provider provider = dynaProvider.getProvider(className); - if (provider != null) { - PartPresenter partPresenter = provider.get(); - if (!partStack.containsPart(partPresenter)) { - partStack.addPart(partPresenter); - } - } - } - } - } - - // restore part stack's 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()); - } - } - - // hide part stack if it has no parts - if (partStack.getParts().isEmpty()) { - controller.setHidden(true); - return; - } - - if (skipRestoreDimensions) { - return; - } - - if (partStackState.hasKey(HIDDEN_STATE) && partStackState.getBoolean(HIDDEN_STATE)) { - - partStack.hide(); - controller.setHidden(true); - return; - } - - if (partStackState.hasKey(PART_STACK_SIZE)) { - double size = partStackState.getNumber(PART_STACK_SIZE); - - // Size of the part must not be less 100 pixels. - if (size <= MIN_PART_SIZE) { - size = DEFAULT_PART_SIZE; - } - - controller.setSize(size); - } - } - - @Override - public String getId() { - return null; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.java deleted file mode 100644 index 6b9cbfc6671..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.perspectives.general; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.DivElement; -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Node; -import com.google.gwt.dom.client.NodeList; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.LayoutPanel; -import com.google.gwt.user.client.ui.RequiresResize; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.SplitLayoutPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import org.eclipse.che.ide.api.parts.PerspectiveView; -import org.eclipse.che.ide.api.theme.Style; -import org.eclipse.che.ide.part.WorkBenchResources; - -/** - * General-purpose Perspective View - * - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - */ -public class PerspectiveViewImpl extends LayoutPanel - implements PerspectiveView { - - interface PerspectiveViewImplUiBinder extends UiBinder {} - - private static final PerspectiveViewImplUiBinder UI_BINDER = - GWT.create(PerspectiveViewImplUiBinder.class); - - @UiField(provided = true) - SplitLayoutPanel splitPanel = new SplitLayoutPanel(1); - - @UiField ScrollPanel editorPanel; - @UiField SimplePanel navPanel; - @UiField SimplePanel infoPanel; - - @UiField SimplePanel toolPanel; - - @UiField DockLayoutPanel layoutPanel; - - @UiField FlowPanel rightPanelContainer; - @UiField FlowPanel leftPanelContainer; - @UiField FlowPanel bottomPanelContainer; - - private FlowPanel rightPanel; - private FlowPanel leftPanel; - private FlowPanel bottomPanel; - - @UiField(provided = true) - final WorkBenchResources resources; - - private ActionDelegate delegate; - - @Inject - public PerspectiveViewImpl(WorkBenchResources resources) { - this.resources = resources; - resources.workBenchCss().ensureInjected(); - add(UI_BINDER.createAndBindUi(this)); - - rightPanel = new FlowPanel(); - rightPanelContainer.add(rightPanel); - rightPanel.addStyleName(resources.workBenchCss().ideWorkBenchToolPanelRight()); - - leftPanel = new FlowPanel(); - leftPanelContainer.add(leftPanel); - leftPanel.addStyleName(resources.workBenchCss().ideWorkBenchToolPanelLeft()); - - bottomPanel = new FlowPanel(); - bottomPanelContainer.add(bottomPanel); - bottomPanel.addStyleName(resources.workBenchCss().ideWorkBenchToolPanelBottom()); - - /* Makes splitters much better */ - tuneSplitters(); - - layoutPanel.setWidgetHidden(leftPanelContainer, true); - layoutPanel.setWidgetHidden(rightPanelContainer, true); - layoutPanel.setWidgetHidden(bottomPanelContainer, true); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public SimplePanel getEditorPanel() { - return editorPanel; - } - - /** {@inheritDoc} */ - @Override - public SimplePanel getNavigationPanel() { - return navPanel; - } - - /** {@inheritDoc} */ - @Override - public SimplePanel getInformationPanel() { - return infoPanel; - } - - /** {@inheritDoc} */ - @Override - public SimplePanel getToolPanel() { - return toolPanel; - } - - /** Returns split panel. */ - public SplitLayoutPanel getSplitPanel() { - return splitPanel; - } - - /** Makes splitter better. */ - public void tuneSplitters() { - NodeList nodes = splitPanel.getElement().getChildNodes(); - boolean firstFound = false; - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.getItem(i); - if (node.hasChildNodes()) { - com.google.gwt.dom.client.Element el = node.getFirstChild().cast(); - if ("gwt-SplitLayoutPanel-HDragger".equals(el.getClassName())) { - if (!firstFound) { - firstFound = true; - tuneLeftSplitter(el); - } else { - tuneRightSplitter(el); - } - } else if ("gwt-SplitLayoutPanel-VDragger".equals(el.getClassName())) { - tuneBottomSplitter(el); - } - } - } - } - - /** - * Tunes left splitter. Makes it wider and adds double border to seem rich. - * - * @param el element to tune - */ - private void tuneLeftSplitter(Element el) { - /** Add Z-Index to move the splitter on the top and make content visible */ - el.getParentElement().getStyle().setProperty("zIndex", "1000"); - el.getParentElement().getStyle().setProperty("overflow", "visible"); - - /** Tune splitter catch panel */ - el.getStyle().setProperty("boxSizing", "border-box"); - el.getStyle().setProperty("width", "5px"); - el.getStyle().setProperty("overflow", "hidden"); - el.getStyle().setProperty("marginLeft", "-2px"); - el.getStyle().setProperty("backgroundColor", "transparent"); - - /** Add small border */ - DivElement smallBorder = Document.get().createDivElement(); - smallBorder.getStyle().setProperty("position", "absolute"); - smallBorder.getStyle().setProperty("width", "1px"); - smallBorder.getStyle().setProperty("height", "100%"); - smallBorder.getStyle().setProperty("left", "2px"); - smallBorder.getStyle().setProperty("top", "0px"); - smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor()); - el.appendChild(smallBorder); - } - - /** - * Tunes left splitter. Makes it wider and adds double border to seem rich. - * - * @param el element to tune - */ - private void tuneRightSplitter(Element el) { - /** Add Z-Index to move the splitter on the top and make content visible */ - el.getParentElement().getStyle().setProperty("zIndex", "1000"); - el.getParentElement().getStyle().setProperty("overflow", "visible"); - - /** Tune splitter catch panel */ - el.getStyle().setProperty("boxSizing", "border-box"); - el.getStyle().setProperty("width", "5px"); - el.getStyle().setProperty("overflow", "hidden"); - el.getStyle().setProperty("marginLeft", "-2px"); - el.getStyle().setProperty("backgroundColor", "transparent"); - - /** Add small border */ - DivElement smallBorder = Document.get().createDivElement(); - smallBorder.getStyle().setProperty("position", "absolute"); - smallBorder.getStyle().setProperty("width", "1px"); - smallBorder.getStyle().setProperty("height", "100%"); - smallBorder.getStyle().setProperty("left", "2px"); - smallBorder.getStyle().setProperty("top", "0px"); - smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor()); - el.appendChild(smallBorder); - } - - /** - * Tunes bottom splitter. Makes it tiny but with a transparent area for easy resizing. - * - * @param el element to tune - */ - private void tuneBottomSplitter(Element el) { - /** Add Z-Index to move the splitter on the top and make content visible */ - el.getParentElement().getStyle().setProperty("zIndex", "1000"); - el.getParentElement().getStyle().setProperty("overflow", "visible"); - - el.getStyle().setProperty("height", "4px"); - el.getStyle().setProperty("marginTop", "-2px"); - el.getStyle().setProperty("backgroundColor", "transparent"); - - /** Add small border */ - DivElement delimiter = Document.get().createDivElement(); - delimiter.getStyle().setProperty("position", "absolute"); - delimiter.getStyle().setProperty("width", "100%"); - delimiter.getStyle().setProperty("height", "1px"); - delimiter.getStyle().setProperty("left", "0px"); - delimiter.getStyle().setProperty("top", "2px"); - delimiter.getStyle().setProperty("backgroundColor", Style.theme.tabBorderColor()); - el.appendChild(delimiter); - } - - /** Returns right panel.Outline tab is located on this panel. */ - public FlowPanel getRightPanel() { - return rightPanel; - } - - /** Returns left panel.Project explorer tab is located on this panel. */ - public FlowPanel getLeftPanel() { - return leftPanel; - } - - /** - * Returns bottom panel. This panel can contains different tabs. When perspective is project, this - * panel contains Events and Outputs tabs. - */ - public FlowPanel getBottomPanel() { - return bottomPanel; - } - - /** {@inheritDoc} */ - @Override - public void onResize() { - editorPanel.onResize(); - super.onResize(); - Widget widget = infoPanel.getWidget(); - if (widget instanceof RequiresResize) { - ((RequiresResize) widget).onResize(); - } - - int width = getOffsetWidth(); - int height = getOffsetHeight(); - - if (delegate != null) { - delegate.onResize(width, height); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.ui.xml deleted file mode 100644 index 692a411681a..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/general/PerspectiveViewImpl.ui.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - @eval editorPanelBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPanelBackgroundColor(); - - .bg { - background-color: editorPanelBackgroundColor; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/project/ProjectPerspective.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/project/ProjectPerspective.java deleted file mode 100644 index 6fffe4381b4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/perspectives/project/ProjectPerspective.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.perspectives.project; - -import static org.eclipse.che.ide.api.parts.PartStackType.EDITING; -import static org.eclipse.che.ide.api.parts.PartStackType.INFORMATION; -import static org.eclipse.che.ide.api.parts.PartStackType.NAVIGATION; -import static org.eclipse.che.ide.api.parts.PartStackType.TOOLING; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.parts.PartStack; -import org.eclipse.che.ide.command.explorer.CommandsExplorerPresenter; -import org.eclipse.che.ide.part.PartStackPresenterFactory; -import org.eclipse.che.ide.part.PartStackViewFactory; -import org.eclipse.che.ide.part.WorkBenchControllerFactory; -import org.eclipse.che.ide.part.editor.multipart.EditorMultiPartStackPresenter; -import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter; -import org.eclipse.che.ide.part.perspectives.general.AbstractPerspective; -import org.eclipse.che.ide.part.perspectives.general.PerspectiveViewImpl; -import org.eclipse.che.ide.processes.panel.ProcessesPanelPresenter; -import org.eclipse.che.providers.DynaProvider; - -/** - * General-purpose, displaying all the PartStacks in a default manner: Navigation at the left side; - * Tooling at the right side; Information at the bottom of the page; Editors in the center. - * - * @author Nikolay Zamosenchuk - * @author Dmitry Shnurenko - */ -@Singleton -public class ProjectPerspective extends AbstractPerspective { - - public static final String PROJECT_PERSPECTIVE_ID = "Project Perspective"; - - @Inject - public ProjectPerspective( - PerspectiveViewImpl view, - EditorMultiPartStackPresenter editorMultiPartStackPresenter, - PartStackPresenterFactory stackPresenterFactory, - PartStackViewFactory partViewFactory, - WorkBenchControllerFactory controllerFactory, - EventBus eventBus, - DynaProvider dynaProvider, - ProjectExplorerPresenter projectExplorerPresenter, - CommandsExplorerPresenter commandsExplorerPresenter, - NotificationManager notificationManager, - ProcessesPanelPresenter processesPanelPresenter) { - super( - PROJECT_PERSPECTIVE_ID, - view, - stackPresenterFactory, - partViewFactory, - controllerFactory, - eventBus, - dynaProvider); - - partStacks.put(EDITING, editorMultiPartStackPresenter); - - addPart(projectExplorerPresenter, NAVIGATION); - addPart(commandsExplorerPresenter, NAVIGATION); - addPart(notificationManager, INFORMATION); - addPart(processesPanelPresenter, INFORMATION); - - PartStack navigatorPanel = getPartStack(NAVIGATION); - PartStack editorPanel = getPartStack(EDITING); - PartStack toolPanel = getPartStack(TOOLING); - PartStack infoPanel = getPartStack(INFORMATION); - - if (navigatorPanel == null || editorPanel == null || toolPanel == null || infoPanel == null) { - return; - } - - navigatorPanel.go(view.getNavigationPanel()); - editorPanel.go(view.getEditorPanel()); - toolPanel.go(view.getToolPanel()); - infoPanel.go(view.getInformationPanel()); - } - - @Override - public String getPerspectiveId() { - return PROJECT_PERSPECTIVE_ID; - } - - @Override - public String getPerspectiveName() { - return PROJECT_PERSPECTIVE_ID; - } - - /** {@inheritDoc} */ - @Override - public void go(@NotNull AcceptsOneWidget container) { - PartStack navigatorPanel = getPartStack(NAVIGATION); - PartStack editorPanel = getPartStack(EDITING); - PartStack toolPanel = getPartStack(TOOLING); - PartStack infoPanel = getPartStack(INFORMATION); - - if (navigatorPanel != null) { - navigatorPanel.go(view.getNavigationPanel()); - } - if (editorPanel != null) { - editorPanel.go(view.getEditorPanel()); - } - if (toolPanel != null) { - toolPanel.go(view.getToolPanel()); - } - if (infoPanel != null) { - infoPanel.go(view.getInformationPanel()); - } - container.setWidget(view); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/TabItemFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/TabItemFactory.java deleted file mode 100644 index 17ecc54fb10..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/TabItemFactory.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.part.widgets.partbutton.PartButton; - -/** - * @author Dmitry Shnurenko - * @author Vlad Zhukovskyi - */ -public interface TabItemFactory { - - PartButton createPartButton(@NotNull String title); - - EditorTab createEditorPartButton( - @NotNull EditorPartPresenter relatedEditorPart, @NotNull EditorPartStack editorPartStack); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.java deleted file mode 100644 index 96ee25942aa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.editortab; - -import static org.eclipse.che.ide.api.editor.events.FileEvent.FileOperation.CLOSE; -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.UPDATED; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.NativeEvent; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ContextMenuEvent; -import com.google.gwt.event.dom.client.ContextMenuHandler; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import com.google.web.bindery.event.shared.EventBus; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.editor.EditorAgent; -import org.eclipse.che.ide.api.editor.EditorPartPresenter; -import org.eclipse.che.ide.api.editor.events.FileEvent; -import org.eclipse.che.ide.api.editor.events.FileEvent.FileEventHandler; -import org.eclipse.che.ide.api.parts.EditorPartStack; -import org.eclipse.che.ide.api.parts.EditorTab; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.api.parts.PartStackUIResources; -import org.eclipse.che.ide.api.resources.Resource; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent; -import org.eclipse.che.ide.api.resources.ResourceChangedEvent.ResourceChangedHandler; -import org.eclipse.che.ide.api.resources.ResourceDelta; -import org.eclipse.che.ide.api.resources.VirtualFile; -import org.eclipse.che.ide.part.editor.EditorTabContextMenuFactory; -import org.eclipse.che.ide.resource.Path; -import org.eclipse.che.ide.util.UUID; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Editor tab widget. Contains icon, title and close mark. May be pinned. Pin state indicates - * whether this tab should be skipped during operation "Close All but Pinned". - * - * @author Dmitry Shnurenko - * @author Valeriy Svydenko - * @author Vitaliy Guliy - * @author Vlad Zhukovskyi - */ -public class EditorTabWidget extends Composite - implements EditorTab, ContextMenuHandler, ResourceChangedHandler, FileEventHandler { - - interface EditorTabWidgetUiBinder extends UiBinder {} - - private static final EditorTabWidgetUiBinder UI_BINDER = - GWT.create(EditorTabWidgetUiBinder.class); - - @UiField SimplePanel iconPanel; - - @UiField Label title; - - @UiField FlowPanel closeButton; - - @UiField(provided = true) - final PartStackUIResources resources; - - private final EditorTabContextMenuFactory editorTabContextMenu; - private final String id; - private final EditorPartPresenter relatedEditorPart; - private final EditorPartStack relatedEditorPartStack; - private final EditorAgent editorAgent; - - private ActionDelegate delegate; - private SVGResource icon; - private boolean pinned; - private VirtualFile file; - - @Inject - public EditorTabWidget( - @Assisted final EditorPartPresenter relatedEditorPart, - @Assisted EditorPartStack relatedEditorPartStack, - PartStackUIResources resources, - EditorTabContextMenuFactory editorTabContextMenu, - final EventBus eventBus, - final EditorAgent editorAgent) { - this.resources = resources; - this.relatedEditorPart = relatedEditorPart; - this.relatedEditorPartStack = relatedEditorPartStack; - this.editorAgent = editorAgent; - - initWidget(UI_BINDER.createAndBindUi(this)); - - this.editorTabContextMenu = editorTabContextMenu; - this.file = relatedEditorPart.getEditorInput().getFile(); - this.icon = relatedEditorPart.getTitleImage(); - this.title.setText(file.getDisplayName()); - // add "path" attribute describing the full path of opened file, will be used full for testing - this.title.getElement().setAttribute("path", file.getLocation().toString()); - this.id = title + UUID.uuid(4); - - iconPanel.add(getIcon()); - - addDomHandler(this, ClickEvent.getType()); - addDomHandler(this, DoubleClickEvent.getType()); - addDomHandler(this, ContextMenuEvent.getType()); - - eventBus.addHandler(ResourceChangedEvent.getType(), this); - eventBus.addHandler(FileEvent.TYPE, this); - - sinkEvents(Event.ONMOUSEDOWN); - - closeButton.addDomHandler( - event -> editorAgent.closeEditor(relatedEditorPart), ClickEvent.getType()); - - relatedEditorPart.addPropertyListener( - (source, propId) -> { - if (propId == EditorPartPresenter.PROP_INPUT) { - file = relatedEditorPart.getEditorInput().getFile(); - title.setText(file.getDisplayName()); - } - }); - } - - @Override - public void onBrowserEvent(Event event) { - if (event.getTypeInt() == Event.ONMOUSEDOWN && event.getButton() == NativeEvent.BUTTON_MIDDLE) { - if (editorAgent.getOpenedEditors().size() == 1) { - editorAgent.closeEditor(relatedEditorPart); - } else { - // In some OS paste action is assigned to middle mouse key by default. 'closeEditor' - // command restores cursor position in a new editor in the same time when the paste - // action fires. So adding 150 ms delay prevents pasting buffer content to the editor. - new Timer() { - @Override - public void run() { - editorAgent.closeEditor(relatedEditorPart); - } - }.schedule(150); - } - } - - super.onBrowserEvent(event); - } - - /** {@inheritDoc} */ - @Override - public Widget getIcon() { - return new SVGImage(icon); - } - - /** {@inheritDoc} */ - @Override - @NotNull - public String getTitle() { - return title.getText(); - } - - /** {@inheritDoc} */ - @NotNull - @Override - public IsWidget getView() { - return this.asWidget(); - } - - /** {@inheritDoc} */ - @Override - public void update(@NotNull PartPresenter part) { - if (part instanceof EditorPartPresenter) { - EditorPartPresenter editorPartPresenter = (EditorPartPresenter) part; - file = editorPartPresenter.getEditorInput().getFile(); - icon = editorPartPresenter.getTitleImage(); - iconPanel.setWidget(getIcon()); - } - } - - /** {@inheritDoc} */ - @Override - public void select() { - getElement().setAttribute("focused", ""); - } - - /** {@inheritDoc} */ - @Override - public void unSelect() { - getElement().removeAttribute("focused"); - } - - /** {@inheritDoc} */ - @Override - public void setErrorMark(boolean isVisible) { - if (isVisible) { - title.addStyleName(resources.partStackCss().lineError()); - } else { - title.removeStyleName(resources.partStackCss().lineError()); - } - } - - /** {@inheritDoc} */ - @Override - public void setWarningMark(boolean isVisible) { - if (isVisible) { - title.addStyleName(resources.partStackCss().lineWarning()); - } else { - title.removeStyleName(resources.partStackCss().lineWarning()); - } - } - - @Override - public String getId() { - return id; - } - - /** {@inheritDoc} */ - @Override - public void onClick(@NotNull ClickEvent event) { - if (NativeEvent.BUTTON_LEFT == event.getNativeButton()) { - delegate.onTabClicked(this); - } - } - - /** {@inheritDoc} */ - @Override - public void onContextMenu(ContextMenuEvent event) { - // construct for each editor tab own context menu, - // that will have store information about selected virtual file and pin state at first step - // in future maybe we should create another mechanism to associate context menu with initial - // dto's - editorTabContextMenu - .newContextMenu(this, relatedEditorPart, relatedEditorPartStack) - .show(event.getNativeEvent().getClientX(), event.getNativeEvent().getClientY()); - } - - /** {@inheritDoc} */ - @Override - public void onDoubleClick(@NotNull DoubleClickEvent event) { - delegate.onTabDoubleClicked(this); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public void setReadOnlyMark(boolean isVisible) { - if (isVisible) { - getElement().setAttribute("readonly", ""); - } else { - getElement().removeAttribute("readonly"); - } - } - - /** {@inheritDoc} */ - @Override - public VirtualFile getFile() { - return file; - } - - @Override - public void setFile(VirtualFile file) { - this.file = file; - } - - @Override - public void setTitleColor(String color) { - if (color == null || color.isEmpty()) { - title.getElement().getStyle().clearColor(); - } else { - title.getElement().getStyle().setColor(color); - } - } - - @Override - public EditorPartPresenter getRelativeEditorPart() { - return relatedEditorPart; - } - - @Override - public void setUnsavedDataMark(boolean hasUnsavedData) { - if (hasUnsavedData) { - getElement().setAttribute("unsaved", ""); - } else { - getElement().removeAttribute("unsaved"); - } - } - - /** {@inheritDoc} */ - @Override - public void setPinMark(boolean pinned) { - this.pinned = pinned; - - if (pinned) { - getElement().setAttribute("pinned", ""); - } else { - getElement().removeAttribute("pinned"); - } - } - - /** {@inheritDoc} */ - @Override - public boolean isPinned() { - return pinned; - } - - @Override - public void onResourceChanged(ResourceChangedEvent event) { - final ResourceDelta delta = event.getDelta(); - - if (delta.getKind() == ADDED) { - if (!delta.getResource().isFile() || (delta.getFlags() & (MOVED_FROM | MOVED_TO)) == 0) { - return; - } - - final Resource resource = delta.getResource(); - final Path movedFrom = delta.getFromPath(); - - if (file.getLocation().equals(movedFrom)) { - file = (VirtualFile) resource; - title.setText(file.getDisplayName()); - } - } else if (delta.getKind() == UPDATED) { - if (!delta.getResource().isFile()) { - return; - } - - final Resource resource = delta.getResource(); - - if (file.getLocation().equals(resource.getLocation())) { - file = (VirtualFile) resource; - - title.setText(file.getDisplayName()); - } - } - } - - @Override - public void onFileOperation(FileEvent event) { - if (event.getOperationType() == CLOSE && this.equals(event.getEditorTab())) { - delegate.onTabClose(this); - } - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.ui.xml deleted file mode 100644 index d71b2ee7a6d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/editortab/EditorTabWidget.ui.xml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - @eval editorPanelBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorPanelBackgroundColor(); - @eval tabBorderColor org.eclipse.che.ide.api.theme.Style.theme.tabBorderColor(); - @eval tabTextColor org.eclipse.che.ide.api.theme.Style.theme.tabTextColor(); - @eval hoveredTabTextColor org.eclipse.che.ide.api.theme.Style.theme.hoveredTabTextColor(); - @eval activeTabTextColor org.eclipse.che.ide.api.theme.Style.theme.activeTabTextColor(); - @eval editorTabIconColor org.eclipse.che.ide.api.theme.Style.getEditorTabIconColor(); - @eval activeEditorTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.activeEditorTabBackgroundColor(); - @eval focusedEditorTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.focusedEditorTabBackgroundColor(); - @eval focusedEditorTabBorderBottomColor org.eclipse.che.ide.api.theme.Style.theme.focusedEditorTabBorderBottomColor(); - @eval editorReadonlyTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorReadonlyTabBackgroundColor(); - @eval activeEditorReadonlyTabBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.activeEditorReadonlyTabBackgroundColor(); - @eval editorTabPinBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.editorTabPinBackgroundColor(); - @eval editorTabPinDropShadow org.eclipse.che.ide.api.theme.Style.theme.editorTabPinDropShadow(); - @eval unsavedMarkColor org.eclipse.che.ide.api.theme.Style.getBadgeBackgroundColor(); - - .mainPanel { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: left; - border-bottom: 1px solid transparent; - height: 25px; - background: transparent; - color: tabTextColor; - cursor: default; - margin-bottom: 1px; - - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - - -webkit-transition: all 0.3s ease-in-out, - fill 0.3s ease-in-out, - stroke 0.3s ease-in-out; - transition: all 0.3s ease-in-out, - fill 0.3s ease-in-out, - stroke 0.3s ease-in-out; - } - - .iconPanel { - float: left; - width: 26px; - height: 25px; - overflow: hidden; - } - - .mainPanel[unsaved] .iconPanel::after { - color: unsavedMarkColor; - content: '*'; - float: right; - margin-top: 9px; - margin-left: 19px; - } - - .iconPanel svg { - transform-origin: 0px 0px 0px; - position: absolute; - margin-left: 8px; - margin-top: 5px; - width: 14px; - height: 14px; - } - - .titlePanel { - float: left; - height: 25px; - font-family: "Open Sans", sans-serif; - font-size: 9pt; - line-height: 26px; - max-width: 247px; - overflow: hidden; - text-overflow: ellipsis; - margin-left: 3px; - } - - .closeTabPanel { - float: left; - width: 22px; - height: 25px; - overflow: hidden; - border-right: 1px solid tabBorderColor; - position: relative; - } - - .closeTabPanel .closeTabButton { - position: absolute; - left: 4px; - top: 5px; - width: 14px; - height: 14px; - cursor: pointer; - } - - .closeTabPanel svg { - position: absolute; - width: 6px; - height: 6px; - left: 4px; - top: 4px; - transform-origin: 0px 0px 0px; - pointer-events: none; - display: none; - opacity: 0.8; - -webkit-transition: opacity 0.1s ease-in-out; - transition: opacity 0.1s ease-in-out; - } - - .closeTabPanel .closeTabButton:HOVER svg { - opacity: 1; - } - - .closeTabPanel svg g, - .closeTabPanel svg path { - fill: editorTabIconColor; - } - - .mainPanel:HOVER { - background-color: editorPanelBackgroundColor; - color: hoveredTabTextColor; - } - - .mainPanel:HOVER .closeTabPanel svg { - display: block; - } - - /** - * Please note that 'active' attribute is NOT the same as 'focused' attribute. - * The 'active' attribute indicates tab currently selected in editor area. - */ - .mainPanel[active] { - background-color: activeEditorTabBackgroundColor; - } - - .mainPanel[readonly] { - background-color: editorReadonlyTabBackgroundColor; - } - - .mainPanel[active][readonly] { - background-color: activeEditorReadonlyTabBackgroundColor; - } - - .mainPanel[active] .closeTabPanel svg { - display: block; - } - - .mainPanel[pinned] .iconPanel::before { - content: ''; - width: 6px; - height: 6px; - -moz-border-radius: 1px; - -webkit-border-radius: 3px; - border-radius: 3px; - background-color: editorTabPinBackgroundColor; - position: absolute; - top: 4px; - margin-left: 7px; - z-index: 1; - -webkit-filter: editorTabPinDropShadow; - filter: editorTabPinDropShadow; - -webkit-animation: pin 0.3s; - animation: pin 0.3s; - -webkit-transition: all 0.3s ease-in-out, - fill 0.3s ease-in-out, - stroke 0.3s ease-in-out; - transition: all 0.3s ease-in-out, - fill 0.3s ease-in-out, - stroke 0.3s ease-in-out; - } - - @-webkit-keyframes pin { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - - @keyframes pin { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - - /** - * The 'focused' attribute indicates the editor having focus. - */ - .mainPanel[focused] { - background-color: focusedEditorTabBackgroundColor; - border-bottom-color: focusedEditorTabBorderBottomColor; - color: activeTabTextColor; - } - - .mainPanel[focused] .closeTabPanel svg { - display: block; - } - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenu.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenu.java deleted file mode 100644 index 279e8dd6c4c..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenu.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import com.google.gwt.user.client.ui.IsWidget; -import com.google.inject.ImplementedBy; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Contract for menu for managing opened editors for corresponding {@link EditorPartStack}. - * - * @author Roman Nikitenko - */ -@ImplementedBy(EditorPaneMenuWidget.class) -public interface EditorPaneMenu extends IsWidget { - - /** Displays the editor pane menu */ - void show(); - - /** Hides the editor pane menu */ - void hide(); - - /** Adds given item to pane menu without separator */ - void addItem(@NotNull EditorPaneMenuItem item); - - /** - * Adds given item to pane menu - * - * @param item item to adding - * @param isSeparated a separator will be added when {@code isSeparated} is set as {@code true} - */ - void addItem(@NotNull EditorPaneMenuItem item, boolean isSeparated); - - /** Removes given item from pane menu */ - void removeItem(@NotNull EditorPaneMenuItem item); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItem.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItem.java deleted file mode 100644 index cbf3b4b54fe..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItem.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.mvp.View; - -/** - * Contract to implementations of item for displaying in {@link EditorPaneMenu} - * - * @author Dmitry Shnurenko - * @author Vitaliy Guliy - */ -public interface EditorPaneMenuItem extends View> { - - /** Returns associated data. */ - T getData(); - - interface ActionDelegate { - - /** Handle clicking on item */ - void onItemClicked(@NotNull EditorPaneMenuItem item); - - /** - * Handle clicking on close button - * - * @param item item to close - */ - void onCloseButtonClicked(@NotNull EditorPaneMenuItem item); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItemFactory.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItemFactory.java deleted file mode 100644 index a547b06f4a0..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuItemFactory.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; - -/** - * The factory creates instances of {@link EditorPaneMenuItem} to display items of editor pane menu. - * - * @author Roman Nikitenko - */ -public class EditorPaneMenuItemFactory { - - /** - * Creates implementation of {@link EditorPaneMenuItem} to display some {@code action} as item of - * editor pane menu. - * - * @param action action to display as item of editor pane menu. - * @return an instance of {@link EditorPaneMenuItem} - */ - public EditorPaneMenuItem createMenuItem(@NotNull Action action) { - return new PaneMenuActionItemWidget(action); - } - - /** - * Creates implementation of {@link EditorPaneMenuItem} to display some {@code tabItem} as item of - * editor pane menu. - * - * @param tabItem item of opened file to display as item of editor pane menu. - * @return an instance of {@link EditorPaneMenuItem} - */ - public EditorPaneMenuItem createMenuItem(@NotNull TabItem tabItem) { - return new PaneMenuTabItemWidget(tabItem); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.java deleted file mode 100644 index b21ac7f8764..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.MouseDownEvent; -import com.google.gwt.event.dom.client.MouseDownHandler; -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.parts.EditorPartStack; - -/** - * Menu for managing opened editors for corresponding {@link EditorPartStack}. - * - * @author Dmitry Shnurenko - * @author Vitaliy Guliy - * @author Roman Nikitenko - */ -public class EditorPaneMenuWidget extends Composite implements EditorPaneMenu { - - interface EditorPaneMenuWidgetUiBinder extends UiBinder {} - - private static final String GWT_POPUP_STANDARD_STYLE = "gwt-PopupPanel"; - - private static final EditorPaneMenuWidgetUiBinder UI_BINDER = - GWT.create(EditorPaneMenuWidgetUiBinder.class); - - private final PopupPanel popupPanel; - - private final FlowPanel actionsPanel; - private final FlowPanel itemsPanel; - - @UiField(provided = true) - final Resources resources; - - private long closeTime; - - @Inject - public EditorPaneMenuWidget(Resources resources) { - this.resources = resources; - - initWidget(UI_BINDER.createAndBindUi(this)); - - closeTime = System.currentTimeMillis(); - addDomHandler( - new MouseDownHandler() { - @Override - public void onMouseDown(MouseDownEvent event) { - long time = System.currentTimeMillis(); - if (time - closeTime < 100) { - return; - } - show(); - } - }, - MouseDownEvent.getType()); - - FlowPanel rootPanel = new FlowPanel(); - rootPanel.addStyleName(resources.partStackCss().listItemPanel()); - - itemsPanel = new FlowPanel(); - actionsPanel = new FlowPanel(); - - popupPanel = new PopupPanel(); - popupPanel.setAutoHideEnabled(true); - popupPanel.removeStyleName(GWT_POPUP_STANDARD_STYLE); - - popupPanel.add(rootPanel); - rootPanel.add(itemsPanel); - rootPanel.add(getDelimiter()); - rootPanel.add(actionsPanel); - - popupPanel.addCloseHandler( - new CloseHandler() { - @Override - public void onClose(CloseEvent event) { - closeTime = System.currentTimeMillis(); - } - }); - } - - @Override - public void show() { - int x = getAbsoluteLeft() + getOffsetWidth() - 6; - int y = getAbsoluteTop() + 19; - - popupPanel.show(); - popupPanel.getElement().getStyle().setProperty("position", "absolute"); - popupPanel.getElement().getStyle().clearProperty("left"); - popupPanel.getElement().getStyle().setProperty("right", "calc(100% - " + x + "px"); - popupPanel.getElement().getStyle().setProperty("top", "" + y + "px"); - } - - @Override - public void hide() { - popupPanel.hide(); - } - - @Override - public void addItem(@NotNull EditorPaneMenuItem item) { - addItem(item, false); - } - - /** {@inheritDoc} */ - @Override - public void addItem(@NotNull EditorPaneMenuItem item, boolean isSeparated) { - FlowPanel targetPanel = item instanceof PaneMenuActionItemWidget ? actionsPanel : itemsPanel; - targetPanel.add(item); - - if (isSeparated) { - targetPanel.add(getDelimiter()); - } - } - - /** {@inheritDoc} */ - @Override - public void removeItem(@NotNull EditorPaneMenuItem item) { - FlowPanel targetPanel = item instanceof PaneMenuActionItemWidget ? actionsPanel : itemsPanel; - targetPanel.remove(item); - } - - private FlowPanel getDelimiter() { - final FlowPanel delimiter = new FlowPanel(); - delimiter.addStyleName(resources.coreCss().editorPaneMenuDelimiter()); - return delimiter; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.ui.xml deleted file mode 100644 index 0071aa88057..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/EditorPaneMenuWidget.ui.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - @eval openedFilesDropdownButtonBackground org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonBackground(); - @eval openedFilesDropdownButtonBorderColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonBorderColor(); - @eval openedFilesDropdownButtonShadowColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonShadowColor(); - @eval openedFilesDropdownButtonIconColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonIconColor(); - @eval openedFilesDropdownButtonHoverIconColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonHoverIconColor(); - @eval openedFilesDropdownButtonActiveBackground org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonActiveBackground(); - @eval openedFilesDropdownButtonActiveBorderColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownButtonActiveBorderColor(); - - .listButton { - float: right; - position: relative; - width: 33px; - height: 23px; - overflow: hidden; - } - - .main { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - position: relative; - width: 26px; - height: 14px; - margin-top: 4px; - margin-right: 7px; - - background-color: openedFilesDropdownButtonBackground; - border: 1px solid openedFilesDropdownButtonBorderColor; - box-shadow: 0px 1px 0px 0px openedFilesDropdownButtonShadowColor; - } - - .main svg { - transform-origin: 0px 0px 0px; - position: absolute; - - left: 5px; - top: 2px; - - width: 15px; - height: 8px; - } - - .main svg g, - .main svg path { - fill: openedFilesDropdownButtonIconColor; - } - - .main:HOVER svg g, - .main:HOVER svg path { - fill: openedFilesDropdownButtonHoverIconColor; - } - - .main:ACTIVE { - background-color: openedFilesDropdownButtonActiveBackground; - border-color: openedFilesDropdownButtonActiveBorderColor; - } - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.java deleted file mode 100644 index 3a631576147..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.action.Action; -import org.eclipse.che.ide.api.action.Presentation; - -/** - * Implementation of {@link EditorPaneMenuItem} to displaying editor's actions in {@link - * EditorPaneMenu} - * - * @author Roman Nikitenko - */ -public class PaneMenuActionItemWidget extends Composite implements EditorPaneMenuItem { - - interface PaneMenuActionItemWidgetUiBinder extends UiBinder {} - - private static final PaneMenuActionItemWidgetUiBinder UI_BINDER = - GWT.create(PaneMenuActionItemWidgetUiBinder.class); - - private Action action; - - @UiField FlowPanel iconPanel; - - @UiField Label title; - - private ActionDelegate delegate; - - public PaneMenuActionItemWidget(@NotNull Action action) { - initWidget(UI_BINDER.createAndBindUi(this)); - this.action = action; - Presentation presentation = action.getTemplatePresentation(); - title.setText(presentation.getText()); - - addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (delegate != null) { - delegate.onItemClicked(PaneMenuActionItemWidget.this); - } - } - }, - ClickEvent.getType()); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public Action getData() { - return action; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.ui.xml deleted file mode 100644 index 9ffb209da54..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuActionItemWidget.ui.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - @eval openedFilesDropdownListTextColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListTextColor(); - @eval openedFilesDropdownListCloseButtonColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListCloseButtonColor(); - @eval openedFilesDropdownListHoverBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListHoverBackgroundColor(); - - .main { - height: 24px; - line-height: 24px; - color: openedFilesDropdownListTextColor; - position: relative; - font-family: "Open Sans", sans-serif; - font-size: 9pt; - } - - .icon { - width: 22px; - height: 20px; - overflow: hidden; - position: absolute; - left: 0px; - top: 2px; - } - - .icon svg { - width: 14px; - height: 14px; - margin-left: 6px; - margin-top: 3px; - } - - .title { - padding-left: 4px; - cursor: default; - overflow: hidden; - text-overflow: ellipsis; - width: 145px; - position: absolute; - left: 22px; - top: 0px; - height: 24px; - line-height: 24px; - white-space: nowrap; - } - - .main:HOVER { - background-color: openedFilesDropdownListHoverBackgroundColor; - } - - .main:HOVER .closePanel .closeButton svg { - display: block; - } - - .main:HOVER .closePanel .closeButton:HOVER svg { - opacity: 1; - } - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.java deleted file mode 100644 index ce9b84a67fe..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.panemenu; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; -import javax.validation.constraints.NotNull; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; - -/** - * Implementation of {@link EditorPaneMenuItem} to displaying editor tab item in {@link - * EditorPaneMenu} - * - * @author Dmitry Shnurenko - * @author Vitaliy Guliy - */ -public class PaneMenuTabItemWidget extends Composite implements EditorPaneMenuItem { - - interface PaneMenuTabItemWidgetUiBinder extends UiBinder {} - - private static final PaneMenuTabItemWidgetUiBinder UI_BINDER = - GWT.create(PaneMenuTabItemWidgetUiBinder.class); - - private TabItem tabItem; - - @UiField FlowPanel iconPanel; - - @UiField Label title; - - @UiField FlowPanel closeButton; - - private ActionDelegate delegate; - - public PaneMenuTabItemWidget(@NotNull TabItem tabItem) { - initWidget(UI_BINDER.createAndBindUi(this)); - this.tabItem = tabItem; - - Widget icon = tabItem.getIcon(); - if (icon != null) { - iconPanel.add(icon); - } - title.setText(tabItem.getTitle()); - - addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - if (delegate != null) { - delegate.onItemClicked(PaneMenuTabItemWidget.this); - } - } - }, - ClickEvent.getType()); - - closeButton.addDomHandler( - new ClickHandler() { - @Override - public void onClick(ClickEvent clickEvent) { - clickEvent.stopPropagation(); - clickEvent.preventDefault(); - - if (delegate != null) { - delegate.onCloseButtonClicked(PaneMenuTabItemWidget.this); - } - } - }, - ClickEvent.getType()); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - @Override - public TabItem getData() { - return tabItem; - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.ui.xml deleted file mode 100644 index 6da8215689f..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/panemenu/PaneMenuTabItemWidget.ui.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - @eval openedFilesDropdownListTextColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListTextColor(); - @eval openedFilesDropdownListCloseButtonColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListCloseButtonColor(); - @eval openedFilesDropdownListHoverBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.openedFilesDropdownListHoverBackgroundColor(); - - .main { - height: 24px; - line-height: 24px; - color: openedFilesDropdownListTextColor; - position: relative; - font-family: "Open Sans", sans-serif; - font-size: 9pt; - } - - .icon { - width: 22px; - height: 20px; - overflow: hidden; - position: absolute; - left: 0px; - top: 2px; - } - - .icon svg { - width: 14px; - height: 14px; - margin-left: 6px; - margin-top: 3px; - } - - .title { - padding-left: 4px; - cursor: default; - overflow: hidden; - text-overflow: ellipsis; - width: 145px; - position: absolute; - left: 22px; - top: 0px; - height: 24px; - line-height: 24px; - white-space: nowrap; - } - - .closePanel { - width: 22px; - height: 20px; - overflow: hidden; - position: absolute; - right: 0px; - top: 2px; - } - - .closeButton { - width: 14px; - height: 14px; - cursor: pointer; - position: absolute; - left: 4px; - top: 3px; - } - - .closePanel .closeButton svg { - width: 6px; - height: 6px; - opacity: 0.5; - display: none; - position: absolute; - left: 4px; - top: 4px; - pointer-events: none; - } - - .closePanel .closeButton svg g, - .closePanel .closeButton svg path { - fill: openedFilesDropdownListCloseButtonColor; - } - - .main:HOVER { - background-color: openedFilesDropdownListHoverBackgroundColor; - } - - .main:HOVER .closePanel .closeButton svg { - display: block; - } - - .main:HOVER .closePanel .closeButton:HOVER svg { - opacity: 1; - } - - - - - - - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButton.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButton.java deleted file mode 100644 index fab8f1955b1..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButton.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.partbutton; - -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.parts.PartStackView.TabItem; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * @author Dmitry Shnurenko - * @author Valeriy Svydenko - */ -public interface PartButton extends View, TabItem { - - @NotNull - PartButton setTooltip(@Nullable String tooltip); - - @NotNull - PartButton setIcon(@Nullable SVGResource resource); - - interface ActionDelegate { - void onTabClicked(@NotNull TabItem selectedTab); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.java deleted file mode 100644 index 2174240d1aa..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.part.widgets.partbutton; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Style; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.DoubleClickEvent; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.IsWidget; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.assistedinject.Assisted; -import javax.validation.constraints.NotNull; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.parts.PartPresenter; -import org.eclipse.che.ide.ui.Tooltip; -import org.eclipse.che.ide.ui.menu.PositionController; -import org.vectomatic.dom.svg.ui.SVGImage; -import org.vectomatic.dom.svg.ui.SVGResource; - -/** - * Widget that response for displaying part tab. - * - * @author Dmitry Shnurenko - * @author Valeriy Svydenko - * @author Vitaliy Guliy - * @author Vlad Zhukovskyi - */ -public class PartButtonWidget extends Composite implements PartButton { - - private static final PartButtonWidgetUiBinder UI_BINDER = - GWT.create(PartButtonWidgetUiBinder.class); - - @UiField FlowPanel iconPanel; - - private ActionDelegate delegate; - - private Widget badgeWidget; - - private SVGResource tabIcon; - - @Inject - public PartButtonWidget(@Assisted String title) { - initWidget(UI_BINDER.createAndBindUi(this)); - ensureDebugId("partButton-" + title); - - addDomHandler(this, DoubleClickEvent.getType()); - addDomHandler(this, ClickEvent.getType()); - } - - /** {@inheritDoc} */ - @NotNull - @Override - public IsWidget getView() { - return asWidget(); - } - - @Override - public Widget getIcon() { - return tabIcon != null ? new SVGImage(tabIcon) : null; - } - - private Tooltip tooltipHint; - - /** {@inheritDoc} */ - @NotNull - public PartButton setTooltip(@Nullable String tooltip) { - if (tooltipHint == null) { - tooltipHint = - Tooltip.create( - (elemental.dom.Element) getElement(), - PositionController.VerticalAlign.BOTTOM, - PositionController.HorizontalAlign.MIDDLE, - tooltip); - } else { - tooltipHint.setTitle(tooltip); - } - - return this; - } - - /** {@inheritDoc} */ - @NotNull - @Override - public PartButton setIcon(@Nullable SVGResource iconResource) { - this.tabIcon = iconResource; - iconPanel.clear(); - - if (tabIcon != null) { - iconPanel.add(new SVGImage(tabIcon)); - } - - return this; - } - - /** {@inheritDoc} */ - @Override - public void update(@NotNull PartPresenter part) { - if (badgeWidget != null) { - badgeWidget.getElement().removeFromParent(); - badgeWidget = null; - } - - int unreadMessages = part.getUnreadNotificationsCount(); - if (unreadMessages == 0) { - return; - } - - badgeWidget = getBadge(unreadMessages); - if (badgeWidget != null) { - iconPanel.getParent().getElement().appendChild(badgeWidget.asWidget().getElement()); - updateBadge(); - } - } - - /** - * Creates a badge widget with a message - * - * @param messages messages count - * @return new badge widget - */ - private Widget getBadge(int messages) { - FlowPanel w = new FlowPanel(); - Style s = w.getElement().getStyle(); - - s.setProperty("position", "absolute"); - s.setProperty("width", "12px"); - s.setProperty("height", "12px"); - - s.setProperty("boxSizing", "border-box"); - s.setProperty("borderRadius", "8px"); - s.setProperty("textAlign", "center"); - - s.setProperty("color", org.eclipse.che.ide.api.theme.Style.getBadgeFontColor()); - - s.setProperty("left", "9px"); - s.setProperty("top", "2px"); - - s.setProperty("borderWidth", "1.5px"); - s.setProperty("borderStyle", "solid"); - - s.setProperty( - "fontFamily", "'Helvetica Neue', 'Myriad Pro', arial, Verdana, Verdana, sans-serif"); - s.setProperty("fontSize", "9.5px"); - s.setProperty("fontWeight", "bold"); - s.setProperty("textShadow", "none"); - - s.setProperty("backgroundColor", org.eclipse.che.ide.api.theme.Style.getBadgeBackgroundColor()); - - w.setStyleName("bounceOutUp"); - - if (messages > 9) { - s.setProperty("lineHeight", "5px"); - w.getElement().setInnerHTML("..."); - } else { - s.setProperty("lineHeight", "10px"); - w.getElement().setInnerHTML("" + messages); - } - - return w; - } - - /** {@inheritDoc} */ - @Override - public void onClick(@NotNull ClickEvent event) { - delegate.onTabClicked(this); - } - - @Override - public void onDoubleClick(DoubleClickEvent event) { - event.stopPropagation(); - event.preventDefault(); - } - - /** {@inheritDoc} */ - @Override - public void select() { - getElement().setAttribute("selected", "true"); - updateBadge(); - } - - /** {@inheritDoc} */ - @Override - public void unSelect() { - getElement().removeAttribute("selected"); - updateBadge(); - } - - /** Updates a badge style. */ - private void updateBadge() { - if (badgeWidget == null) { - return; - } - - if (getElement().hasAttribute("selected")) { - badgeWidget - .getElement() - .getStyle() - .setBorderColor(org.eclipse.che.ide.api.theme.Style.theme.activeTabBackground()); - } else { - badgeWidget - .getElement() - .getStyle() - .setBorderColor(org.eclipse.che.ide.api.theme.Style.theme.tabsPanelBackground()); - } - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(@NotNull ActionDelegate delegate) { - this.delegate = delegate; - } - - interface PartButtonWidgetUiBinder extends UiBinder {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.ui.xml deleted file mode 100644 index 917bd469074..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/widgets/partbutton/PartButtonWidget.ui.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - .button { - cursor: pointer; - position: relative; - } - - .icon { - } - - .icon svg { - width: 14px; - height: 14px; - position: absolute; - left: 4px; - top: 6px; - } - - - - - - - - diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesApiModule.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesApiModule.java deleted file mode 100644 index 75358a83341..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesApiModule.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.multibindings.GinMultibinder; -import com.google.inject.Singleton; -import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.preferences.pages.extensions.ExtensionManagerPresenter; -import org.eclipse.che.ide.preferences.pages.extensions.ExtensionManagerView; -import org.eclipse.che.ide.preferences.pages.extensions.ExtensionManagerViewImpl; -import org.eclipse.che.ide.preferences.pages.general.IdeGeneralPreferencesPresenter; -import org.eclipse.che.ide.preferences.pages.general.IdeGeneralPreferencesView; -import org.eclipse.che.ide.preferences.pages.general.IdeGeneralPreferencesViewImpl; - -/** GIN module for configuring Preferences API components. */ -public class PreferencesApiModule extends AbstractGinModule { - - @Override - protected void configure() { - bind(PreferencesManager.class).to(PreferencesManagerImpl.class).in(Singleton.class); - GinMultibinder.newSetBinder(binder(), PreferencesManager.class) - .addBinding() - .to(PreferencesManagerImpl.class); - - bind(PreferencesView.class).to(PreferencesViewImpl.class).in(Singleton.class); - - GinMultibinder pagesBinder = - GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class); - pagesBinder.addBinding().to(IdeGeneralPreferencesPresenter.class); - pagesBinder.addBinding().to(ExtensionManagerPresenter.class); - - bind(IdeGeneralPreferencesView.class) - .to(IdeGeneralPreferencesViewImpl.class) - .in(Singleton.class); - bind(ExtensionManagerView.class).to(ExtensionManagerViewImpl.class).in(Singleton.class); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesLocalizationConstants.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesLocalizationConstants.java deleted file mode 100644 index 3f67663de47..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesLocalizationConstants.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import com.google.gwt.i18n.client.Messages; - -public interface PreferencesLocalizationConstants extends Messages { - - @Key("ide.general.theme-label") - String ideGeneralThemeLabel(); - - @Key("ide.general.ask-before-closing-tab-label") - String ideGeneralAskBeforeClosingTabLabel(); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesManagerImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesManagerImpl.java deleted file mode 100644 index 509fdcb22f5..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesManagerImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import static org.eclipse.che.ide.MimeType.APPLICATION_JSON; -import static org.eclipse.che.ide.rest.HTTPHeader.ACCEPT; -import static org.eclipse.che.ide.rest.HTTPHeader.CONTENT_TYPE; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.HashMap; -import java.util.Map; -import org.eclipse.che.api.promises.client.Function; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.ide.api.app.AppContext; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.json.JsonHelper; -import org.eclipse.che.ide.rest.AsyncRequestFactory; -import org.eclipse.che.ide.rest.StringMapUnmarshaller; - -/** The implementation of {@link PreferencesManager}. */ -@Singleton -public class PreferencesManagerImpl implements PreferencesManager { - - private final String PREFERENCES_SERVICE_ENDPOINT; - private final AsyncRequestFactory asyncRequestFactory; - private final Map persistedPreferences; - private final Map changedPreferences; - - @Inject - protected PreferencesManagerImpl(AsyncRequestFactory asyncRequestFactory, AppContext appContext) { - this.asyncRequestFactory = asyncRequestFactory; - this.persistedPreferences = new HashMap<>(); - this.changedPreferences = new HashMap<>(); - - PREFERENCES_SERVICE_ENDPOINT = appContext.getMasterApiEndpoint() + "/preferences"; - } - - @Override - @Nullable - public String getValue(String preference) { - if (changedPreferences.containsKey(preference)) { - return changedPreferences.get(preference); - } - return persistedPreferences.get(preference); - } - - @Override - public void setValue(String preference, String value) { - changedPreferences.put(preference, value); - } - - @Override - public Promise flushPreferences() { - if (changedPreferences.isEmpty()) { - return Promises.resolve(null); - } - - return updatePreferences(changedPreferences) - .thenPromise( - result -> { - persistedPreferences.putAll(changedPreferences); - changedPreferences.clear(); - return Promises.resolve(null); - }); - } - - @Override - public Promise> loadPreferences() { - return getPreferences() - .then( - (Function, Map>) - preferences -> { - persistedPreferences.clear(); - persistedPreferences.putAll(preferences); - return preferences; - }); - } - - private Promise> getPreferences() { - return asyncRequestFactory - .createGetRequest(PREFERENCES_SERVICE_ENDPOINT) - .header(ACCEPT, APPLICATION_JSON) - .header(CONTENT_TYPE, APPLICATION_JSON) - .send(new StringMapUnmarshaller()); - } - - private Promise> updatePreferences(Map newPreferences) { - final String data = JsonHelper.toJson(newPreferences); - - return asyncRequestFactory - .createPutRequest(PREFERENCES_SERVICE_ENDPOINT, null) - .header(ACCEPT, APPLICATION_JSON) - .header(CONTENT_TYPE, APPLICATION_JSON) - .data(data) - .send(new StringMapUnmarshaller()); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesPresenter.java deleted file mode 100644 index 9de2a3eebad..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesPresenter.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.FLOAT_MODE; -import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL; - -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.api.promises.client.Promise; -import org.eclipse.che.api.promises.client.PromiseError; -import org.eclipse.che.api.promises.client.js.Promises; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.notification.NotificationManager; -import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; -import org.eclipse.che.ide.api.preferences.PreferencesManager; -import org.eclipse.che.ide.ui.dialogs.CancelCallback; -import org.eclipse.che.ide.ui.dialogs.DialogFactory; -import org.eclipse.che.ide.ui.dialogs.confirm.ConfirmCallback; - -/** - * PreferencesPresenter is presentation of preference pages. It manages preference pages. It's - * responsible for the communication user and wizard page. In typical usage, the client instantiates - * this class with list of preferences. The presenter serves as the preference page container and - * orchestrates the presentation of its pages. - * - * @author Andrey Plotnikov - */ -@Singleton -public class PreferencesPresenter - implements PreferencesView.ActionDelegate, PreferencePagePresenter.DirtyStateListener { - - private final PreferencesView view; - private final Set preferences; - private final Set managers; - private final Provider notificationManagerProvider; - - private Map> preferencesMap; - - private DialogFactory dialogFactory; - - private CoreLocalizationConstant locale; - - /** - * Create presenter. - * - *

        For tests. - * - * @param view - * @param preferences - * @param dialogFactory - * @param locale - * @param managers - */ - @Inject - protected PreferencesPresenter( - PreferencesView view, - Set preferences, - DialogFactory dialogFactory, - CoreLocalizationConstant locale, - Set managers, - Provider notificationManagerProvider) { - this.view = view; - this.preferences = preferences; - this.dialogFactory = dialogFactory; - this.locale = locale; - this.managers = managers; - this.notificationManagerProvider = notificationManagerProvider; - this.view.setDelegate(this); - for (PreferencePagePresenter preference : preferences) { - preference.setUpdateDelegate(this); - } - } - - /** {@inheritDoc} */ - @Override - public void onDirtyChanged() { - for (PreferencePagePresenter p : preferences) { - if (p.isDirty()) { - view.enableSaveButton(true); - return; - } - } - view.enableSaveButton(false); - } - - /** {@inheritDoc} */ - @Override - public void onPreferenceSelected(PreferencePagePresenter preference) { - preference.go(view.getContentPanel()); - } - - /** Shows preferences. */ - public void showPreferences() { - if (preferencesMap != null) { - view.showDialog(); - return; - } - - preferencesMap = new HashMap<>(); - for (PreferencePagePresenter preference : preferences) { - Set prefsList = preferencesMap.get(preference.getCategory()); - if (prefsList == null) { - prefsList = new HashSet<>(); - preferencesMap.put(preference.getCategory(), prefsList); - } - - prefsList.add(preference); - } - view.setPreferences(preferencesMap); - - view.enableSaveButton(false); - PreferencePagePresenter preferencePagePresenter = - preferencesMap.entrySet().iterator().next().getValue().iterator().next(); - view.selectPreference(preferencePagePresenter); - preferencePagePresenter.go(view.getContentPanel()); - view.showDialog(); - } - - @Override - public void onSaveClicked() { - for (PreferencePagePresenter preference : preferences) { - if (preference.isDirty()) { - preference.storeChanges(); - } - } - - Promise promise = Promises.resolve(null); - final List promiseErrorList = new ArrayList<>(); - - for (final PreferencesManager preferencesManager : managers) { - promise = - promise.thenPromise( - ignored -> - preferencesManager - .flushPreferences() - .catchError( - error -> { - notificationManagerProvider - .get() - .notify( - locale.unableToSavePreference(), - error.getMessage(), - FAIL, - FLOAT_MODE); - promiseErrorList.add(error); - })); - } - - promise.then( - ignored -> { - if (promiseErrorList.isEmpty()) { - view.enableSaveButton(false); - } - }); - } - - @Override - public void onRefreshClicked() { - Promise> promise = Promises.resolve(null); - for (final PreferencesManager preferencesManager : managers) { - promise = - promise.thenPromise( - ignored -> - preferencesManager - .loadPreferences() - .catchError( - error -> { - notificationManagerProvider - .get() - .notify( - locale.unableToLoadPreference(), - error.getMessage(), - FAIL, - FLOAT_MODE); - })); - } - - /** Revert changes on every preference page */ - promise.then( - ignored -> { - for (PreferencePagePresenter p : PreferencesPresenter.this.preferences) { - p.revertChanges(); - } - - view.enableSaveButton(false); - }); - } - - /** {@inheritDoc} */ - @Override - public void onCloseClicked() { - boolean haveUnsavedData = false; - for (PreferencePagePresenter preference : preferences) { - if (preference.isDirty()) { - haveUnsavedData = true; - break; - } - } - if (haveUnsavedData) { - dialogFactory - .createConfirmDialog( - "", - locale.messagesPromptSaveChanges(), - locale.yesButtonTitle(), - locale.noButtonTitle(), - getConfirmCallback(), - getCancelCallback()) - .show(); - } else { - view.close(); - } - } - - private ConfirmCallback getConfirmCallback() { - return () -> { - for (PreferencePagePresenter preference : preferences) { - if (preference.isDirty()) { - preference.storeChanges(); - } - } - view.enableSaveButton(false); - view.close(); - }; - } - - private CancelCallback getCancelCallback() { - return () -> { - for (PreferencePagePresenter preference : preferences) { - if (preference.isDirty()) { - preference.revertChanges(); - } - } - view.close(); - }; - } - - /** {@inheritDoc} */ - @Override - public void onCloseWindow() { - onCloseClicked(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesView.java deleted file mode 100644 index bbab75b2ada..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesView.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import java.util.Map; -import java.util.Set; -import org.eclipse.che.ide.api.mvp.View; -import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; - -/** - * Interface of Preferences view. - * - * @author Andrey Plotnikov - */ -public interface PreferencesView extends View { - /** Needs for delegate some function into preferences view. */ - interface ActionDelegate { - /** - * Performs actions when user click Save button. Actually when button is pressed, preferences - * must be stored on the server. - */ - void onSaveClicked(); - - /** Loads preferences from the server discarding any changes. */ - void onRefreshClicked(); - - /** Performs any actions appropriate in response to the user having pressed the Close button */ - void onCloseClicked(); - - /** - * Performs any actions appropriate in response to select some preference. - * - * @param preference selected preference - */ - void onPreferenceSelected(PreferencePagePresenter preference); - - /** Performs any actions on the preferences window closing. */ - void onCloseWindow(); - } - - /** - * Select the pointed preference. - * - * @param preference preference to select. - */ - void selectPreference(PreferencePagePresenter preference); - - /** Close view. */ - void close(); - - /** Show preferences. */ - void showDialog(); - - /** - * Returns content panel. - * - * @return - */ - AcceptsOneWidget getContentPanel(); - - /** - * Enables or disables Save button. - * - * @param enabled true to enable the button, false to disable it - */ - void enableSaveButton(boolean enabled); - - /** - * Sets available preferences. - * - * @param preferences - */ - void setPreferences(Map> preferences); -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.java deleted file mode 100644 index 4ce7af7329e..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import com.google.gwt.dom.client.Document; -import com.google.gwt.dom.client.SpanElement; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.gwt.user.client.ui.Button; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import elemental.html.TableElement; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; -import org.eclipse.che.ide.ui.list.CategoriesList; -import org.eclipse.che.ide.ui.list.Category; -import org.eclipse.che.ide.ui.list.CategoryRenderer; -import org.eclipse.che.ide.ui.window.Window; -import org.eclipse.che.ide.util.dom.Elements; -import org.eclipse.che.ide.util.loging.Log; - -/** - * PreferenceViewImpl is the view of preferences. The view shows preference pages to the end user. - * It has an area at the bottom containing OK, Apply and Close buttons, on the left hand side of - * page is list of available preferences, on the right hand side of page is current preference page. - * - * @author Andrey Plotnikov - */ -@Singleton -public class PreferencesViewImpl extends Window implements PreferencesView { - interface PreferenceViewImplUiBinder extends UiBinder {} - - Button btnClose; - Button btnSave; - Button btnRefresh; - - @UiField SimplePanel preferences; - @UiField SimplePanel contentPanel; - - @UiField(provided = true) - org.eclipse.che.ide.Resources resources; - - private CoreLocalizationConstant locale; - private ActionDelegate delegate; - private CategoriesList list; - - private final Category.CategoryEventDelegate preferencesPageDelegate = - new Category.CategoryEventDelegate() { - @Override - public void onListItemClicked( - com.google.gwt.dom.client.Element listItemBase, PreferencePagePresenter itemData) { - delegate.onPreferenceSelected(itemData); - } - }; - - private final CategoryRenderer preferencesPageRenderer = - new CategoryRenderer() { - @Override - public void renderElement( - com.google.gwt.dom.client.Element element, PreferencePagePresenter preference) { - element.setInnerText(preference.getTitle()); - } - - @Override - public com.google.gwt.dom.client.SpanElement renderCategory( - Category category) { - SpanElement spanElement = Document.get().createSpanElement(); - spanElement.setClassName(resources.defaultCategoriesListCss().headerText()); - spanElement.setInnerText(category.getTitle()); - return spanElement; - } - }; - - /** - * Create view. - * - * @param resources - */ - @Inject - protected PreferencesViewImpl( - org.eclipse.che.ide.Resources resources, - PreferenceViewImplUiBinder uiBinder, - CoreLocalizationConstant locale) { - this.resources = resources; - this.locale = locale; - - Widget widget = uiBinder.createAndBindUi(this); - - this.setTitle("Preferences"); - this.setWidget(widget); - - // create list of preferences - TableElement tableElement = Elements.createTableElement(); - tableElement.setAttribute("style", "width: 100%"); - list = new CategoriesList(resources); - preferences.add(list); - createButtons(); - } - - private void createButtons() { - btnSave = - addFooterButton( - locale.save(), - "window-preferences-storeChanges", - event -> delegate.onSaveClicked(), - true); - btnRefresh = - addFooterButton( - locale.refresh(), "window-preferences-refresh", event -> delegate.onRefreshClicked()); - btnClose = - addFooterButton( - locale.close(), - "window-preferences-close", - event -> { - delegate.onCloseClicked(); - Log.info(getClass(), "close clicked"); - }); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public void close() { - hide(); - } - - /** {@inheritDoc} */ - @Override - public AcceptsOneWidget getContentPanel() { - return contentPanel; - } - - /** {@inheritDoc} */ - @Override - public void enableSaveButton(boolean enabled) { - btnSave.setEnabled(enabled); - } - - /** {@inheritDoc} */ - @Override - public void setPreferences(Map> preferences) { - List> categoriesList = new ArrayList<>(); - for (Entry> entry : preferences.entrySet()) { - categoriesList.add( - new Category<>( - entry.getKey(), preferencesPageRenderer, entry.getValue(), preferencesPageDelegate)); - } - - list.render(categoriesList, true); - } - - /** {@inheritDoc} */ - @Override - public void selectPreference(PreferencePagePresenter preference) { - list.selectElement(preference); - } - - @Override - public void showDialog() { - show(btnClose); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.ui.xml deleted file mode 100644 index df20542e6a2..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/PreferencesViewImpl.ui.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - .emptyBorder { - margin: 6px; - } - - - - - - - - - - \ No newline at end of file diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/StyleInjector.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/StyleInjector.java deleted file mode 100644 index b2ed0e2a4d4..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/StyleInjector.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.ui.window.WindowClientBundle; - -/** @author Evgen Vidolob */ -@Singleton -public class StyleInjector { - private Resources resources; - private WindowClientBundle windowClientBundle; - - @Inject - public StyleInjector(Resources resources, WindowClientBundle windowClientBundle) { - this.resources = resources; - this.windowClientBundle = windowClientBundle; - } - - public void inject() { - resources.coreCss().ensureInjected(); - windowClientBundle.getStyle().ensureInjected(); - resources.treeCss().ensureInjected(); - resources.defaultSimpleListCss().ensureInjected(); - resources.partStackCss().ensureInjected(); - resources.dialogBox().ensureInjected(); - resources.clipboardCss().ensureInjected(); - resources.notificationCss().ensureInjected(); - resources.dataGridStyle().ensureInjected(); - resources.cellTableStyle().ensureInjected(); - resources.defaultCategoriesListCss().ensureInjected(); - resources.buttonLoaderCss().ensureInjected(); - resources.menuCss().ensureInjected(); - - resources.commandsExplorerCss().ensureInjected(); - resources.commandsPaletteCss().ensureInjected(); - resources.commandToolbarCss().ensureInjected(); - resources.editorCss().ensureInjected(); - resources.commandTypeChooserCss().ensureInjected(); - resources.treeStylesCss().ensureInjected(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerPresenter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerPresenter.java deleted file mode 100644 index 3137a6eb739..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerPresenter.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences.pages.extensions; - -import com.google.gwt.user.client.ui.AcceptsOneWidget; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.che.ide.CoreLocalizationConstant; -import org.eclipse.che.ide.api.extension.ExtensionDescription; -import org.eclipse.che.ide.api.extension.ExtensionRegistry; -import org.eclipse.che.ide.api.preferences.AbstractPreferencePagePresenter; - -/** @author Evgen Vidolob */ -@Singleton -public class ExtensionManagerPresenter extends AbstractPreferencePagePresenter - implements ExtensionManagerView.ActionDelegate { - - private ExtensionManagerView view; - private ExtensionRegistry extensionRegistry; - private boolean dirty; - - @Inject - public ExtensionManagerPresenter( - CoreLocalizationConstant constant, - ExtensionManagerView view, - ExtensionRegistry extensionRegistry) { - super(constant.extensionTitle(), constant.extensionCategory()); - this.view = view; - this.extensionRegistry = extensionRegistry; - view.setDelegate(this); - } - - /** {@inheritDoc} */ - @Override - public boolean isDirty() { - return dirty; - } - - /** {@inheritDoc} */ - @Override - public void go(AcceptsOneWidget container) { - container.setWidget(view); - List extensions = new ArrayList<>(); - for (ExtensionDescription ed : extensionRegistry.getExtensionDescriptions().values()) { - extensions.add(ed); - } - view.setExtensions(extensions); - } - - @Override - public void storeChanges() { - dirty = false; - } - - @Override - public void revertChanges() {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerView.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerView.java deleted file mode 100644 index b5ca27e412d..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerView.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences.pages.extensions; - -import java.util.List; -import org.eclipse.che.ide.api.extension.ExtensionDescription; -import org.eclipse.che.ide.api.mvp.View; - -/** @author Evgen Vidolob */ -public interface ExtensionManagerView extends View { - - void setExtensions(List extensions); - - interface ActionDelegate {} -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.java deleted file mode 100644 index 8a2f530d300..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2012-2018 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.ide.preferences.pages.extensions; - -import com.google.gwt.cell.client.TextCell; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.TextAreaElement; -import com.google.gwt.resources.client.CssResource; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.cellview.client.Column; -import com.google.gwt.user.cellview.client.DataGrid; -import com.google.gwt.user.client.ui.DockLayoutPanel; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.UIObject; -import com.google.gwt.user.client.ui.Widget; -import com.google.gwt.view.client.SelectionChangeEvent; -import com.google.gwt.view.client.SingleSelectionModel; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.List; -import org.eclipse.che.ide.Resources; -import org.eclipse.che.ide.api.action.ActionManager; -import org.eclipse.che.ide.api.action.DefaultActionGroup; -import org.eclipse.che.ide.api.extension.ExtensionDescription; -import org.eclipse.che.ide.ui.toolbar.ToolbarPresenter; - -/** @author Evgen Vidolob */ -@Singleton -public class ExtensionManagerViewImpl implements ExtensionManagerView { - private static ExtensionManagerViewImplUiBinder ourUiBinder = - GWT.create(ExtensionManagerViewImplUiBinder.class); - private final DockLayoutPanel rootElement; - @UiField Style style; - - @UiField(provided = true) - DataGrid dataGrid; - - @UiField TextAreaElement descriptionArea; - @UiField SimplePanel toolBarPanel; - - private ActionDelegate delegate; - - @Inject - public ExtensionManagerViewImpl( - ToolbarPresenter toolbarPresenter, ActionManager actionManager, Resources resources) { - dataGrid = new DataGrid<>(100, resources); - rootElement = ourUiBinder.createAndBindUi(this); - DefaultActionGroup actionGroup = - new DefaultActionGroup("extensionManager", false, actionManager); - actionManager.registerAction("extensionManagerGroup", actionGroup); - toolbarPresenter.bindMainGroup(actionGroup); - UIObject.ensureDebugId(descriptionArea, "window-preferences-extensions-descriptionArea"); - - Column titleColumn = - new Column(new TextCell()) { - @Override - public String getValue(ExtensionDescription object) { - return object.getTitle(); - } - }; - titleColumn.setCellStyleNames(style.titleColumn()); - - dataGrid.addColumn(titleColumn); - SingleSelectionModel selectionModel = - new SingleSelectionModel(); - dataGrid.setSelectionModel(selectionModel); - selectionModel.addSelectionChangeHandler( - new SelectionChangeEvent.Handler() { - @Override - public void onSelectionChange(SelectionChangeEvent event) {} - }); - } - - /** {@inheritDoc} */ - @Override - public void setDelegate(ActionDelegate delegate) { - this.delegate = delegate; - } - - /** {@inheritDoc} */ - @Override - public Widget asWidget() { - return rootElement; - } - - /** {@inheritDoc} */ - @Override - public void setExtensions(List extensions) { - dataGrid.setRowData(extensions); - dataGrid.redraw(); - } - - interface ExtensionManagerViewImplUiBinder - extends UiBinder {} - - interface Style extends CssResource { - String headerTitle(); - - String labelName(); - - String titleColumn(); - - String chatMessageInput(); - - String messageInputContainer(); - } -} diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.ui.xml b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.ui.xml deleted file mode 100644 index d4a41aa16bb..00000000000 --- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/preferences/pages/extensions/ExtensionManagerViewImpl.ui.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - @eval partBackground org.eclipse.che.ide.api.theme.Style.theme.partBackground(); - @eval separatorColor org.eclipse.che.ide.api.theme.Style.getWindowSeparatorColor(); - - .headerTitle { - text-align: center; - background-color: partBackground; - } - - .labelName { - padding-top: 2px; - } - - .enabledColumn > div { - margin-top: 2px; - text-align: center; - } - - .titleColumn > div { - margin-top: 2px; - margin-left: 10px; - } - - .titleColumn { - min-height: 20px; - padding: 0px; - margin: 0px; - } - - .chatMessageInput { - font: 100% Arial, sans-serif; - height: 100%; - outline: 0; - overflow: auto; - resize: none; - width: 100%; - margin: 0; /* don't want to add to container size */ - border: 0; /* don't want to add to container size */ - padding: 2px; - box-sizing: border-box; - -moz-box-sizing: border-box; /* Firefox */ - -webkit-box-sizing: border-box; - } - - .messageInputContainer { - position: absolute; - bottom: 0; - top: 0; - left: 0; - right: 0; - outline: 0; - margin: 2px; - } - - - - - - - - - - - - - Plugin Name - - - - - - - - - - -

        -