map);
+
}
diff --git a/plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/credentials/CurrentUserPreferencesAccess.java b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MyOtherDTO.java
similarity index 66%
rename from plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/credentials/CurrentUserPreferencesAccess.java
rename to core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MyOtherDTO.java
index f03158bdba31..eb5a0780b891 100644
--- a/plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/credentials/CurrentUserPreferencesAccess.java
+++ b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MyOtherDTO.java
@@ -8,12 +8,18 @@
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
-package org.eclipse.che.plugin.svn.server.credentials;
+package org.eclipse.che.plugin.typescript.dto;
+import org.eclipse.che.dto.shared.DTO;
-public interface CurrentUserPreferencesAccess {
+/**
+ * @author Florent Benoit
+ */
+@DTO
+public interface MyOtherDTO {
- void updatePreference(String key, String content) throws PreferencesAccessException;
+ String getName();
+ void setName(String name);
+ MyOtherDTO withName(String name);
- String getPreference(String key) throws PreferencesAccessException;
}
diff --git a/plugins/plugin-svn/che-plugin-svn-ext-shared/src/main/java/org/eclipse/che/plugin/svn/shared/SaveCredentialsRequest.java b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MySimpleDTO.java
similarity index 61%
rename from plugins/plugin-svn/che-plugin-svn-ext-shared/src/main/java/org/eclipse/che/plugin/svn/shared/SaveCredentialsRequest.java
rename to core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MySimpleDTO.java
index 38b13436a06a..13443e53b4da 100644
--- a/plugins/plugin-svn/che-plugin-svn-ext-shared/src/main/java/org/eclipse/che/plugin/svn/shared/SaveCredentialsRequest.java
+++ b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/MySimpleDTO.java
@@ -8,22 +8,22 @@
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
-package org.eclipse.che.plugin.svn.shared;
+package org.eclipse.che.plugin.typescript.dto;
import org.eclipse.che.dto.shared.DTO;
+/**
+ * @author Florent Benoit
+ */
@DTO
-public interface SaveCredentialsRequest {
+public interface MySimpleDTO {
- String getUsername();
+ int getId();
+ MySimpleDTO withId(int id);
- SaveCredentialsRequest withUsername(String username);
+ boolean getBoolean();
+ MySimpleDTO withBoolean(boolean bool);
- String getPassword();
-
- SaveCredentialsRequest withPassword(String password);
-
- String getRepositoryUrl();
-
- SaveCredentialsRequest withRepositoryUrl(String repositoryUrl);
+ double getDouble();
+ MySimpleDTO withDouble(double d);
}
diff --git a/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/Status.java b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/Status.java
new file mode 100644
index 000000000000..dbea6b60e27f
--- /dev/null
+++ b/core/che-core-typescript-dto-maven-plugin/src/test/java/org/eclipse/che/plugin/typescript/dto/Status.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2012-2016 Codenvy, S.A.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Codenvy, S.A. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.che.plugin.typescript.dto;
+
+/**
+ * @author Florent Benoit
+ */
+public enum Status {
+
+ SHUTDOWN,
+
+ ALIVE
+}
diff --git a/core/che-core-typescript-dto-maven-plugin/src/test/projects/project/pom.xml b/core/che-core-typescript-dto-maven-plugin/src/test/projects/project/pom.xml
index 19b4abadf54a..1315d9fd4382 100644
--- a/core/che-core-typescript-dto-maven-plugin/src/test/projects/project/pom.xml
+++ b/core/che-core-typescript-dto-maven-plugin/src/test/projects/project/pom.xml
@@ -16,7 +16,7 @@
4.0.0
org.eclipse.che.test
- my-typescript-test-moddule
+ my-typescript-test-module
1.0-SNAPSHOT
pom
Test of Eclipse Che TypeScript plugin
diff --git a/dashboard/.gitignore b/dashboard/.gitignore
index 55ff2df0b810..1c93788306f8 100644
--- a/dashboard/.gitignore
+++ b/dashboard/.gitignore
@@ -23,3 +23,4 @@ docs
target/
uE001-README.MD
+typings/
diff --git a/dashboard/README.md b/dashboard/README.md
index dfaa36e7ddf4..5844bb9a9dd7 100644
--- a/dashboard/README.md
+++ b/dashboard/README.md
@@ -5,8 +5,13 @@ Che Dashboard
==============
#Requirements
+- Node.js `v4.x.x` (`v5.x.x` / `v6.x.x` are currently not supported)
+- npm
+- Bower
+- gulp
+
+Installation instructions for Node.js and npm can be found on the following [link](https://docs.npmjs.com/getting-started/installing-node). Bower and gulp are CLI utilities which are installed via npm:
-This version is using bower and gulp as tools.
```sh
$ npm install --global bower gulp
```
diff --git a/dashboard/package.json b/dashboard/package.json
index 3002f789da04..abf5a4730eb2 100644
--- a/dashboard/package.json
+++ b/dashboard/package.json
@@ -58,6 +58,7 @@
"tsd": "~0.6.4",
"tslint-loader": "~1.0.1",
"typescript": "^1.8.10",
+ "typings": "^1.4.0",
"uglify-save-license": "~0.4.1",
"webpack": "^1.12.11",
"webpack-stream": "~2.1.0",
diff --git a/dashboard/src/app/stacks/list-stacks/list-stacks.controller.ts b/dashboard/src/app/stacks/list-stacks/list-stacks.controller.ts
index dbdedb2e7343..94f84a1857cf 100644
--- a/dashboard/src/app/stacks/list-stacks/list-stacks.controller.ts
+++ b/dashboard/src/app/stacks/list-stacks/list-stacks.controller.ts
@@ -22,7 +22,7 @@ export class ListStacksController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
- constructor(cheStack, $log, $mdDialog, cheNotification, $rootScope, lodash, $q) {
+ constructor(cheStack, cheProfile, $log, $mdDialog, cheNotification, $rootScope, lodash, $q) {
this.cheStack = cheStack;
this.$log = $log;
this.$mdDialog = $mdDialog;
@@ -40,7 +40,19 @@ export class ListStacksController {
this.isNoSelected = true;
this.stacks = [];
- this.getStacks();
+
+ this.profile = cheProfile.getProfile();
+ if (this.profile.userId) {
+ this.userId = this.profile.userId;
+ this.getStacks();
+ } else {
+ this.profile.$promise.then(() => {
+ this.userId = this.profile.userId ? this.profile.userId : undefined;
+ this.getStacks();
+ }, () => {
+ this.userId = undefined;
+ });
+ }
}
/**
diff --git a/dashboard/src/app/stacks/list-stacks/list-stacks.html b/dashboard/src/app/stacks/list-stacks/list-stacks.html
index 462bdbf2a9e4..18c9eba7d7fa 100644
--- a/dashboard/src/app/stacks/list-stacks/list-stacks.html
+++ b/dashboard/src/app/stacks/list-stacks/list-stacks.html
@@ -66,7 +66,8 @@
che-on-checkbox-click="listStacksController.updateSelectionState()"
che-on-delete="listStacksController.deleteStack(stack)"
che-on-duplicate="listStacksController.duplicateStack(stack)"
- che-stack="stack">
+ stack="stack"
+ user-id="listStacksController.userId">
diff --git a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
index 93f7cbaba27e..6d9fc5ff30d4 100644
--- a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
+++ b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.directive.ts
@@ -28,7 +28,8 @@ export class StackItem {
// scope values
this.scope = {
- stack: '=cheStack',
+ stack: '=stack',
+ userId: '=userId',
isSelectable: '=cheSelectable',
isSelect: '=?ngModel',
onCheckboxClick: '&?cheOnCheckboxClick',
diff --git a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.html b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.html
index 673b5aabbaeb..ed2b19d1f876 100644
--- a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.html
+++ b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.html
@@ -19,9 +19,10 @@
layout-align="start center"
class="che-checkbox-area"
ng-if="stackItemController.isSelectable === true">
-
+
-
+
diff --git a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.styl b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.styl
index 9032b0b0d83c..e11ebbb1a627 100644
--- a/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.styl
+++ b/dashboard/src/app/stacks/list-stacks/stack-item/stack-item.styl
@@ -3,3 +3,7 @@
stack-item:last-child .che-list-item
border-bottom none
+
+stack-item .che-list-actions a[disabled]
+ pointer-events none
+ opacity 0.5
diff --git a/dashboard/src/app/stacks/stack-details/stack.controller.ts b/dashboard/src/app/stacks/stack-details/stack.controller.ts
index bc3165048094..60926f4f6dab 100644
--- a/dashboard/src/app/stacks/stack-details/stack.controller.ts
+++ b/dashboard/src/app/stacks/stack-details/stack.controller.ts
@@ -16,6 +16,27 @@
* @author Ann Shumilova
*/
export class StackController {
+ $log: ng.ILogService;
+ $filter: ng.IFilterService;
+ $timeout: ng.ITimeoutService;
+ $location: ng.ILocationService;
+ $mdDialog: angular.material.IDialogService;
+
+ loading: boolean;
+ isLoading: boolean;
+ isCreation: boolean;
+
+ stackId: string;
+ stackName: string;
+ stackContent: string;
+ invalidStack: string;
+
+ stack: any;
+ editorOptions: any;
+ changesPromise: any;
+
+ cheStack;
+ cheNotification;
/**
* Default constructor that is using resource injection
@@ -57,14 +78,14 @@ export class StackController {
*
* @returns {{stack}} new stack template
*/
- getNewStackTemplate() {
+ getNewStackTemplate(): any {
this.stackName = 'New Stack';
- let stack = {};
+ let stack: any = {};
stack.name = this.stackName;
stack.description = '';
stack.source = {};
stack.source.origin = '';
- stack.source.type = ''
+ stack.source.type = '';
stack.components = [];
stack.tags = [];
stack.workspaceConfig = {};
@@ -75,7 +96,7 @@ export class StackController {
/**
* Fetch the stack details.
*/
- fetchStack() {
+ fetchStack(): void {
this.loading = true;
this.stack = this.cheStack.getStackById(this.stackId);
@@ -102,10 +123,36 @@ export class StackController {
});
}
+ /**
+ * Handle stack's tag adding.
+ *
+ * @param tag {string} stack's tag
+ * @returns {string} tag if it is unique one, otherwise null
+ */
+ handleTagAdding(tag: string): string {
+ //Prevents mentioning same tags twice:
+ if (this.stack.tags.includes(tag)) {
+ return null;
+ }
+
+ return tag;
+ }
+
+ /**
+ * Update stack's editor content.
+ */
+ updateEditorContent(): void {
+ this.stackContent = this.$filter('json')(this.stack);
+ }
+
/**
* Prepare data to be displayed.
*/
- prepareStackData() {
+ prepareStackData(): void {
+ if (!this.stack.tags) {
+ this.stack.tags = [];
+ }
+
delete this.stack.links;
this.stackName = angular.copy(this.stack.name);
this.stackContent = this.$filter('json')(this.stack);
@@ -115,14 +162,14 @@ export class StackController {
* Updates stack info.
* @param isFormValid {Boolean} true if form is valid
*/
- updateStack(isFormValid) {
+ updateStack(isFormValid: boolean) {
if (this.isCreation) {
this.stack.name = this.stackName;
- this.stackContent = this.$filter('json')(this.stack);
+ this.updateEditorContent();
return;
}
- this.stackContent = this.$filter('json')(this.stack);
+ this.updateEditorContent();
if (this.changesPromise) {
this.$timeout.cancel(this.changesPromise);
@@ -154,7 +201,7 @@ export class StackController {
/**
* Saves stack configuration - creates new one or updates existing.
*/
- saveStack() {
+ saveStack(): void {
if (this.isCreation) {
this.createStack();
return;
@@ -176,7 +223,7 @@ export class StackController {
/**
* Creates new stack.
*/
- createStack() {
+ createStack(): void {
this.cheStack.createStack(this.stackContent).then((stack) => {
this.cheNotification.showInfo('Stack is successfully created.');
this.stack = stack;
@@ -193,7 +240,7 @@ export class StackController {
/**
* Deletes current stack if user confirms.
*/
- deleteStack() {
+ deleteStack(): void {
let confirmTitle = 'Would you like to delete ' + this.stack.name + '?';
let confirm = this.$mdDialog.confirm()
diff --git a/dashboard/src/app/stacks/stack-details/stack.html b/dashboard/src/app/stacks/stack-details/stack.html
index f21a6f435091..1d8b203a885d 100644
--- a/dashboard/src/app/stacks/stack-details/stack.html
+++ b/dashboard/src/app/stacks/stack-details/stack.html
@@ -47,6 +47,30 @@
+
+
+
+
+
start(String id, StartActionDto action) {
public Promise addBreakpoint(String id, BreakpointDto breakpointDto) {
final String requestUrl = getBaseUrl(id) + "/breakpoint";
return asyncRequestFactory.createPostRequest(requestUrl, breakpointDto)
- .loader(loaderFactory.newLoader())
.send();
}
@@ -104,7 +103,6 @@ public Promise addBreakpoint(String id, BreakpointDto breakpointDto) {
public Promise> getAllBreakpoints(String id) {
final String requestUrl = getBaseUrl(id) + "/breakpoint";
return asyncRequestFactory.createGetRequest(requestUrl)
- .loader(loaderFactory.newLoader())
.send(dtoUnmarshallerFactory.newListUnmarshaller(BreakpointDto.class));
}
@@ -148,7 +146,6 @@ public Promise getValue(String id, VariableDto variableDto) {
}
return asyncRequestFactory.createGetRequest(requestUrl + params)
- .loader(loaderFactory.newLoader())
.send(dtoUnmarshallerFactory.newUnmarshaller(SimpleValueDto.class));
}
@@ -156,7 +153,6 @@ public Promise getValue(String id, VariableDto variableDto) {
public Promise setValue(String id, VariableDto variableDto) {
final String requestUrl = getBaseUrl(id) + "/value";
return asyncRequestFactory.createPutRequest(requestUrl, variableDto)
- .loader(loaderFactory.newLoader())
.send();
}
@@ -195,7 +191,6 @@ private String getBaseUrl(String id) {
protected Promise performAction(String id, ActionDto actionDto) {
final String requestUrl = getBaseUrl(id);
return asyncRequestFactory.createPostRequest(requestUrl, actionDto)
- .loader(loaderFactory.newLoader())
.send();
}
}
diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/dialogs/DialogFactory.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/dialogs/DialogFactory.java
index 954ec74db87a..5105c1175239 100644
--- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/dialogs/DialogFactory.java
+++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/dialogs/DialogFactory.java
@@ -206,6 +206,40 @@ InputDialog createInputDialog(@NotNull @Assisted("title") String title,
@Nullable InputCallback inputCallback,
@Nullable CancelCallback cancelCallback);
+ /**
+ * Create an input dialog with the specified initial value.
+ *
+ * The {@code initialValue} may be pre-selected. Selection begins
+ * at the specified {@code selectionStartIndex} and extends to the
+ * character at index {@code selectionLength}.
+ *
+ * @param title
+ * the window title
+ * @param label
+ * the label of the input field
+ * @param initialValue
+ * the value used to initialize the input
+ * @param selectionStartIndex
+ * the beginning index of the {@code initialValue} to select, inclusive
+ * @param selectionLength
+ * the number of characters of the {@code initialValue} to be selected
+ * @param okButtonLabel
+ * label for OK button
+ * @param inputCallback
+ * the callback used on OK
+ * @param cancelCallback
+ * the callback used on cancel
+ * @return an {@link InputDialog} instance
+ */
+ InputDialog createInputDialog(@NotNull @Assisted("title") String title,
+ @NotNull @Assisted("label") String label,
+ @NotNull @Assisted("initialValue") String initialValue,
+ @NotNull @Assisted("selectionStartIndex") Integer selectionStartIndex,
+ @NotNull @Assisted("selectionLength") Integer selectionLength,
+ @NotNull @Assisted("okButtonLabel") String okButtonLabel,
+ @Nullable InputCallback inputCallback,
+ @Nullable CancelCallback cancelCallback);
+
/**
* Create a choice dialog with only text as content.
* Use empty string for button label to hide button.
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
index e718eda605a6..ca094ae583e5 100644
--- 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
@@ -12,6 +12,7 @@
import org.eclipse.che.ide.api.resources.VirtualFile;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -41,6 +42,9 @@ public List identifyType(final VirtualFile file) {
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;
diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/ProjectTreeStatusNotificationReceiver.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/ProjectTreeStatusNotificationReceiver.java
index 4d55131a7ae9..9f56771f8ff6 100644
--- a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/ProjectTreeStatusNotificationReceiver.java
+++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/ProjectTreeStatusNotificationReceiver.java
@@ -24,6 +24,7 @@
import javax.inject.Inject;
import javax.inject.Singleton;
+import java.util.Objects;
import static org.eclipse.che.ide.api.resources.ResourceDelta.ADDED;
import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED;
@@ -80,8 +81,12 @@ public void receive(JsonRpcRequest request) {
}
}
- Log.debug(getClass(), "Received request\npath: " + path +"\ntype:"+ type +"\nstatus:" + status);
+ Log.debug(getClass(), "Received request\npath: " + path + "\ntype:" + type + "\nstatus:" + status);
- appContext.getWorkspaceRoot().synchronize(new ExternalResourceDelta(Path.valueOf(path), Path.valueOf(path), status));
+ if (path == null || path.isEmpty()) {
+ appContext.getWorkspaceRoot().synchronize();
+ } else {
+ appContext.getWorkspaceRoot().synchronize(new ExternalResourceDelta(Path.valueOf(path), Path.valueOf(path), status));
+ }
}
}
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
index 6df8d76245aa..ddbfd14ddf9a 100644
--- 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
@@ -40,17 +40,21 @@ public interface OutputConsole extends Presenter {
void close();
/**
- * Listener for new output in the console.
+ * Action Delegate interface.
*/
- interface ConsoleOutputListener {
+ interface ActionDelegate {
+ /** Is called when new is printed */
void onConsoleOutput(OutputConsole console);
+ /** Is called when user asked to download output */
+ void onDownloadOutput(OutputConsole console);
+
}
/**
- * Adds an output listener.
+ * Sets action delegate.
*/
- void addOutputListener(ConsoleOutputListener listener);
+ void addActionDelegate(ActionDelegate actionDelegate);
}
diff --git a/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/subversion/Credentials.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/subversion/Credentials.java
new file mode 100644
index 000000000000..ee58997c6b24
--- /dev/null
+++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/subversion/Credentials.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2012-2016 Codenvy, S.A.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Codenvy, S.A. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.che.ide.api.subversion;
+
+/**
+ * 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/subversion/SubversionCredentialsDialog.java b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/subversion/SubversionCredentialsDialog.java
new file mode 100644
index 000000000000..8cbe9bf4125a
--- /dev/null
+++ b/ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/subversion/SubversionCredentialsDialog.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2012-2016 Codenvy, S.A.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Codenvy, S.A. - initial API and implementation
+ *******************************************************************************/
+//TODO This is used in wizard/ProjectImporter, find a solution to move it to plugin-svn.
+package org.eclipse.che.ide.api.subversion;
+
+import org.eclipse.che.api.promises.client.Promise;
+
+/**
+ * Dialog for retrieving credentials for SVN operations.
+ *
+ * @author Igor Vinokur
+ */
+public interface SubversionCredentialsDialog {
+
+ /**
+ * Returns credentials from dialog.
+ *
+ * @return {@link Credentials} that contains user name and password
+ */
+ Promise askCredentials();
+}
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
index 2736667a6e67..ce49eb448474 100644
--- 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
@@ -662,6 +662,13 @@ public interface Theme {
*/
String completionPopupItemSubtitleTextColor();
+ /**
+ * Item highlight text color for completion popup.
+ *
+ * @return color
+ */
+ String completionPopupItemHighlightTextColor();
+
/**
* Background color of the window widget.
*
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
index 7fe01b89902b..a1bc24a52218 100644
--- 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
@@ -146,6 +146,7 @@
@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();
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java
index 9c1abb6d6199..04b0bb3c49c6 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/editor/EditorAgentImpl.java
@@ -318,7 +318,7 @@ public List getOpenedEditorsBasedOn(EditorPartPresenter edi
@Override
public EditorPartPresenter getOpenedEditor(Path path) {
EditorPartStack editorPartStack = editorMultiPartStack.getPartStackByPart(activeEditor);
- return (EditorPartPresenter)editorPartStack.getPartByPath(path);
+ return editorPartStack == null ? null : (EditorPartPresenter)editorPartStack.getPartByPath(path);
}
/** {@inheritDoc} */
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporter.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporter.java
index f9380dcec520..43262c61e8c4 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporter.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporter.java
@@ -29,6 +29,8 @@
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.subversion.Credentials;
+import org.eclipse.che.ide.api.subversion.SubversionCredentialsDialog;
import org.eclipse.che.ide.api.project.MutableProjectConfig;
import org.eclipse.che.ide.api.project.wizard.ImportProjectNotificationSubscriberFactory;
import org.eclipse.che.ide.api.project.wizard.ProjectNotificationSubscriber;
@@ -45,6 +47,7 @@
import static com.google.common.base.Strings.isNullOrEmpty;
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.api.promises.client.callback.AsyncPromiseHelper.createFromAsyncRequest;
@@ -60,6 +63,7 @@ public class ProjectImporter extends AbstractImporter {
private final CoreLocalizationConstant localizationConstant;
private final ProjectResolver projectResolver;
private final String restContext;
+ private final SubversionCredentialsDialog credentialsDialog;
private final OAuth2AuthenticatorRegistry oAuth2AuthenticatorRegistry;
@@ -69,11 +73,13 @@ public ProjectImporter(CoreLocalizationConstant localizationConstant,
AppContext appContext,
ProjectResolver projectResolver,
@RestContext String restContext,
+ SubversionCredentialsDialog credentialsDialog,
OAuth2AuthenticatorRegistry oAuth2AuthenticatorRegistry) {
super(appContext, subscriberFactory);
this.localizationConstant = localizationConstant;
this.projectResolver = projectResolver;
this.restContext = restContext;
+ this.credentialsDialog = credentialsDialog;
this.oAuth2AuthenticatorRegistry = oAuth2AuthenticatorRegistry;
}
@@ -136,6 +142,8 @@ public Promise apply(PromiseError exception) throws FunctionException {
switch (getErrorCode(exception.getCause())) {
case UNABLE_GET_PRIVATE_SSH_KEY:
throw new IllegalStateException(localizationConstant.importProjectMessageUnableGetSshKey());
+ case UNAUTHORIZED_SVN_OPERATION:
+ return recallImportWithCredentials(sourceStorage, path);
case UNAUTHORIZED_GIT_OPERATION:
final Map attributes = ExceptionUtils.getAttributes(exception.getCause());
final String providerName = attributes.get(PROVIDER_NAME);
@@ -156,6 +164,32 @@ public Promise apply(PromiseError exception) throws FunctionException {
});
}
+ private Promise recallImportWithCredentials(final SourceStorage sourceStorage, final Path path) {
+ return createFromAsyncRequest(new RequestCall() {
+ @Override
+ public void makeCall(final AsyncCallback callback) {
+ credentialsDialog.askCredentials().then(new Operation() {
+ @Override
+ public void apply(Credentials credentials) throws OperationException {
+ sourceStorage.getParameters().put("username", credentials.getUsername());
+ sourceStorage.getParameters().put("password", credentials.getPassword());
+ doImport(path, sourceStorage).then(new Operation() {
+ @Override
+ public void apply(Project project) throws OperationException {
+ callback.onSuccess(project);
+ }
+ }).catchError(new Operation() {
+ @Override
+ public void apply(PromiseError error) throws OperationException {
+ callback.onFailure(error.getCause());
+ }
+ });
+ }
+ });
+ }
+ });
+ }
+
private Promise authUserAndRecallImport(final String providerName,
final String authenticateUrl,
final Path path,
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java
index 9154b14661bf..e8cd77ae4bc8 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/resources/impl/ResourceManager.java
@@ -1131,7 +1131,9 @@ public Void apply(Optional resource) throws FunctionException {
protected Promise search(final Container container, String fileMask, String contentMask) {
QueryExpression queryExpression = new QueryExpression();
- queryExpression.setText(contentMask + '*');
+ if (!isNullOrEmpty(contentMask)) {
+ queryExpression.setText(contentMask + '*');
+ }
if (!isNullOrEmpty(fileMask)) {
queryExpression.setName(fileMask);
}
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/DarkTheme.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/DarkTheme.java
index 95482df337d1..056ac6d55d07 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/DarkTheme.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/DarkTheme.java
@@ -506,6 +506,11 @@ public String completionPopupItemSubtitleTextColor() {
return "#727272";
}
+ @Override
+ public String completionPopupItemHighlightTextColor() {
+ return "#4EABFF";
+ }
+
@Override
public String getWindowContentBackground() {
return "#292C2F";
@@ -788,7 +793,7 @@ public String colsolesToolbarBorderColor() {
@Override
public String consolesToolbarButtonColor() {
- return "#aaaaaa";
+ return "#808080";
}
@Override
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/LightTheme.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/LightTheme.java
index dfddc812c039..d60ca22067c0 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/LightTheme.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/theme/LightTheme.java
@@ -487,6 +487,11 @@ public String completionPopupItemSubtitleTextColor() {
return "#909090";
}
+ @Override
+ public String completionPopupItemHighlightTextColor() {
+ return "#1A68AF";
+ }
+
@Override
public String getWindowContentBackground() {
return "#ECECEC";
diff --git a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/start/StartWorkspaceNotification.java b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/start/StartWorkspaceNotification.java
index 75476dd4a556..fbfeee166351 100644
--- a/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/start/StartWorkspaceNotification.java
+++ b/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/start/StartWorkspaceNotification.java
@@ -88,8 +88,7 @@ public void apply(List snapshots) throws OperationException {
Widget widget = uiBinder.createAndBindUi(StartWorkspaceNotification.this);
if (snapshots.isEmpty()) {
- restore.setValue(false);
- restore.setEnabled(false);
+ restore.setVisible(false);
}
loader.show(LoaderPresenter.Phase.WORKSPACE_STOPPED, widget);
diff --git a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporterTest.java b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporterTest.java
index f06506d9b11a..1e338ebcce0f 100644
--- a/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporterTest.java
+++ b/ide/che-core-ide-app/src/test/java/org/eclipse/che/ide/projectimport/wizard/ProjectImporterTest.java
@@ -95,6 +95,7 @@ public void setUp() {
appContext,
resolver,
null,
+ null,
null);
}
diff --git a/ide/che-core-ide-stacks/pom.xml b/ide/che-core-ide-stacks/pom.xml
index fb77b26e0b4c..df41537c9446 100644
--- a/ide/che-core-ide-stacks/pom.xml
+++ b/ide/che-core-ide-stacks/pom.xml
@@ -30,6 +30,7 @@
**/type-bitnami.svg
+ **/type-zend.svg
diff --git a/ide/che-core-ide-stacks/src/main/resources/images/type-zend.svg b/ide/che-core-ide-stacks/src/main/resources/images/type-zend.svg
new file mode 100644
index 000000000000..3ce9e2bcbf68
--- /dev/null
+++ b/ide/che-core-ide-stacks/src/main/resources/images/type-zend.svg
@@ -0,0 +1,70 @@
+
+
+
diff --git a/ide/che-core-ide-stacks/src/main/resources/stacks.json b/ide/che-core-ide-stacks/src/main/resources/stacks.json
index a9c004e24064..29d1ec7a82b9 100644
--- a/ide/che-core-ide-stacks/src/main/resources/stacks.json
+++ b/ide/che-core-ide-stacks/src/main/resources/stacks.json
@@ -2008,5 +2008,92 @@
"name": "type-bitnami.svg",
"mediaType": "image/svg+xml"
}
+ },
+ {
+ "id": "zend",
+ "creator": "ide",
+ "name": "Zend",
+ "description": "Zend stack with PHP 7, Zend Server 9 and Z-Ray.",
+ "scope": "advanced",
+ "tags": [
+ "PHP",
+ "Zend",
+ "Z-Ray",
+ "Composer",
+ "Ubuntu",
+ "Git"
+ ],
+ "components": [
+ {
+ "name": "PHP",
+ "version": "7.0.6"
+ },
+ {
+ "name": "Zend Server",
+ "version": "9.0.0"
+ },
+ {
+ "name": "Composer",
+ "version": "---"
+ }
+ ],
+ "source": {
+ "type": "image",
+ "origin": "kaloyanraev/che-zendserver"
+ },
+ "workspaceConfig": {
+ "environments": {
+ "default": {
+ "machines": {
+ "dev-machine": {
+ "agents": [
+ "org.eclipse.che.terminal", "org.eclipse.che.ws-agent", "org.eclipse.che.ssh", "org.eclipse.che.ls.php", "org.eclipse.che.ls.json"
+ ],
+ "servers": {},
+ "attributes" : {
+ "memoryLimitBytes": "2147483648"
+ }
+ }
+ },
+ "recipe": {
+ "location": "kaloyanraev/che-zendserver",
+ "type": "dockerimage"
+ }
+ }
+ },
+ "name": "default",
+ "defaultEnv": "default",
+ "description": null,
+ "commands": [
+ {
+ "name": "restart zend server",
+ "type": "custom",
+ "commandLine": "sudo sed -i 's#zray.zendserver_ui_url=.*#zray.zendserver_ui_url=http://${server.port.10081}/ZendServer#g' /usr/local/zend/etc/conf.d/zray.ini && sudo /usr/local/zend/bin/zendctl.sh restart",
+ "attributes": {
+ "previewUrl": "http://${server.port.80}"
+ }
+ },
+ {
+ "name": "stop zend server",
+ "type": "custom",
+ "commandLine": "sudo /usr/local/zend/bin/zendctl.sh stop",
+ "attributes": {
+ "previewUrl": ""
+ }
+ },
+ {
+ "name": "show admin password",
+ "type": "custom",
+ "commandLine": "echo \"Zend Server admin password is `sudo cat /root/zend-password`\"",
+ "attributes": {
+ "previewUrl": "http://${server.port.10081}"
+ }
+ }
+ ]
+ },
+ "stackIcon": {
+ "name": "type-zend.svg",
+ "mediaType": "image/svg+xml"
+ }
}
]
diff --git a/ide/che-core-ide-templates/src/main/resources/samples.json b/ide/che-core-ide-templates/src/main/resources/samples.json
index e7a0423123b6..237bfbb80efa 100644
--- a/ide/che-core-ide-templates/src/main/resources/samples.json
+++ b/ide/che-core-ide-templates/src/main/resources/samples.json
@@ -671,7 +671,7 @@
{
"name": "install dependencies",
"type": "custom",
- "commandLine": "cd ${current.project.path} && npm install --no-bin-links && bower install",
+ "commandLine": "cd ${current.project.path} && npm install && bower install",
"attributes": {
"previewUrl": ""
}
@@ -1260,5 +1260,56 @@
"tags": [
"Play"
]
+ },
+ {
+ "name": "astro-splash",
+ "displayName": "astro-splash",
+ "path": "/astro-splash",
+ "description": "An app that uses the Astronomy Picture of the Day API provided by NASA and the Zend Expressive framework.",
+ "projectType": "php",
+ "mixins": [],
+ "attributes": {
+ "language": [
+ "php"
+ ]
+ },
+ "modules": [],
+ "problems": [],
+ "source": {
+ "type": "git",
+ "location": "https://github.com/kaloyan-raev/AstroSplash.git",
+ "parameters": {}
+ },
+ "commands": [
+ {
+ "name": "configure",
+ "type": "custom",
+ "commandLine": "chmod 777 ${current.project.path}/data; echo -e \"\n DocumentRoot ${current.project.path}/public\n SetEnv APPLICATION_ENV 'development'\n \n DirectoryIndex index.php\n AllowOverride All\n Require all granted\n \n\" | sudo tee /etc/apache2/sites-available/000-default.conf; composer --working-dir=${current.project.path} install && cp /usr/local/zend/etc/php.ini /tmp/update-php.ini && grep -q 'extension=pcntl.so' /tmp/update-php.ini || echo -e \"\nextension=pcntl.so\" | sudo tee -a /tmp/update-php.ini && php -c /tmp/update-php.ini ${current.project.path}/bin/update.php && rm /tmp/update-php.ini",
+ "attributes": {
+ "previewUrl": ""
+ }
+ },
+ {
+ "name": "update images",
+ "type": "custom",
+ "commandLine": "cp /usr/local/zend/etc/php.ini /tmp/update-php.ini && grep -q 'extension=pcntl.so' /tmp/update-php.ini || echo -e \"\nextension=pcntl.so\" | sudo tee -a /tmp/update-php.ini && php -c /tmp/update-php.ini ${current.project.path}/bin/update.php && rm /tmp/update-php.ini",
+ "attributes": {
+ "previewUrl": ""
+ }
+ },
+ {
+ "name": "clean doctrine cache",
+ "type": "custom",
+ "commandLine": "sudo rm -rf ${current.project.path}/data/doctrine-cache",
+ "attributes": {
+ "previewUrl": ""
+ }
+ }
+ ],
+ "links": [],
+ "category": "Samples",
+ "tags": [
+ "Zend"
+ ]
}
]
diff --git a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/FontAwesome.java b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/FontAwesome.java
index 829f3c9dc77b..dd2a9dcc0936 100644
--- a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/FontAwesome.java
+++ b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/FontAwesome.java
@@ -42,6 +42,11 @@ public class FontAwesome {
*/
public static final String DOT_CIRCLE = "";
+ /**
+ * http://fortawesome.github.io/Font-Awesome/icon/download/
+ */
+ public static final String DOWNLOAD = "";
+
/**
* http://fortawesome.github.io/Font-Awesome/icon/expand/
*/
diff --git a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenter.java b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenter.java
index 33b5b6465486..35c9ccf6cc38 100644
--- a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenter.java
+++ b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogPresenter.java
@@ -74,6 +74,30 @@ public InputDialogPresenter(final @NotNull InputDialogView view,
this.localizationConstant = localizationConstant;
}
+ @AssistedInject
+ public InputDialogPresenter(final @NotNull InputDialogView view,
+ final @NotNull @Assisted("title") String title,
+ final @NotNull @Assisted("label") String label,
+ final @NotNull @Assisted("initialValue") String initialValue,
+ final @NotNull @Assisted("selectionStartIndex") Integer selectionStartIndex,
+ final @NotNull @Assisted("selectionLength") Integer selectionLength,
+ final @NotNull @Assisted("okButtonLabel") String okButtonLabel,
+ final @Nullable @Assisted InputCallback inputCallback,
+ final @Nullable @Assisted CancelCallback cancelCallback,
+ final UILocalizationConstant localizationConstant) {
+ this.view = view;
+ this.view.setContent(label);
+ this.view.setTitle(title);
+ this.view.setValue(initialValue);
+ this.view.setSelectionStartIndex(selectionStartIndex);
+ this.view.setSelectionLength(selectionLength);
+ this.view.setOkButtonLabel(okButtonLabel);
+ this.inputCallback = inputCallback;
+ this.cancelCallback = cancelCallback;
+ this.view.setDelegate(this);
+ this.localizationConstant = localizationConstant;
+ }
+
@Override
public void cancelled() {
view.closeDialog();
diff --git a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogView.java b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogView.java
index 1f14d5c74624..c5768da5fb3a 100644
--- a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogView.java
+++ b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogView.java
@@ -36,6 +36,9 @@ public interface InputDialogView {
/** Sets the window title. */
void setTitle(String title);
+ /** Sets new label for Ok button */
+ void setOkButtonLabel(String label);
+
/** Returns the input value. */
String getValue();
@@ -62,7 +65,7 @@ public interface InputDialogView {
boolean isCancelButtonInFocus();
/** The interface for the action delegate. */
- public interface ActionDelegate {
+ interface ActionDelegate {
/** Defines what's done when the user clicks cancel. */
void cancelled();
@@ -76,4 +79,5 @@ public interface ActionDelegate {
/** Performs any actions appropriate in response to the user having clicked the Enter key. */
void onEnterClicked();
}
+
}
diff --git a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.java b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.java
index 5c7fc71aac89..3561965b3ec0 100644
--- a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.java
+++ b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/dialogs/input/InputDialogViewImpl.java
@@ -104,6 +104,11 @@ public void setValue(String value) {
this.value.setText(value);
}
+ @Override
+ public void setOkButtonLabel(String label) {
+ footer.getOkButton().setText(label);
+ }
+
@Override
public String getValue() {
return value.getValue();
diff --git a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.java b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.java
index dddd04df60a9..b6919d86d7d6 100644
--- a/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.java
+++ b/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/multisplitpanel/panel/SubPanelViewImpl.java
@@ -19,6 +19,7 @@
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.RequiresResize;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
@@ -53,7 +54,8 @@
*/
public class SubPanelViewImpl extends Composite implements SubPanelView,
Menu.ActionDelegate,
- Tab.ActionDelegate {
+ Tab.ActionDelegate,
+ RequiresResize {
private final TabItemFactory tabItemFactory;
private final Menu menu;
@@ -133,6 +135,8 @@ public void splitHorizontally(SubPanelView subPanelView) {
splitLayoutPanel.remove(mainPanel);
splitLayoutPanel.addSouth(subPanelView, height);
splitLayoutPanel.add(mainPanel);
+
+ onResize();
}
@Override
@@ -144,6 +148,8 @@ public void splitVertically(SubPanelView subPanelView) {
splitLayoutPanel.remove(mainPanel);
splitLayoutPanel.addEast(subPanelView, width);
splitLayoutPanel.add(mainPanel);
+
+ onResize();
}
@Override
@@ -300,7 +306,7 @@ public void onMenuItemSelected(MenuItem menuItem) {
public void onMenuItemClosing(MenuItem menuItem) {
Object data = menuItem.getData();
if (data instanceof Tab) {
- closeTab((Tab)data);
+ closeTab((Tab) data);
}
}
@@ -326,6 +332,16 @@ public void onTabClosing(Tab tab) {
closeTab(tab);
}
+ @Override
+ public void onResize() {
+ for (WidgetToShow widgetToShow : widgets2Tabs.keySet()) {
+ if (widgetToShow.getWidget() instanceof RequiresResize) {
+ ((RequiresResize)widgetToShow.getWidget()).onResize();
+ }
+ }
+ }
+
interface SubPanelViewImplUiBinder extends UiBinder {
}
+
}
diff --git a/ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/popup/popup.css b/ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/popup/popup.css
index 88e600d203b8..f0cdaa3e13f3 100644
--- a/ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/popup/popup.css
+++ b/ide/che-core-ide-ui/src/main/resources/org/eclipse/che/ide/ui/popup/popup.css
@@ -110,7 +110,3 @@
color: completionPopupItemTextColor;
}
-
-.label span {
- color: completionPopupItemSubtitleTextColor !important;
-}
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/DownloadWorkspaceOutputEvent.java b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/DownloadWorkspaceOutputEvent.java
new file mode 100644
index 000000000000..26210b95bec6
--- /dev/null
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/DownloadWorkspaceOutputEvent.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2012-2016 Codenvy, S.A.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Codenvy, S.A. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.che.ide.ui.loaders;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+
+/**
+ * Fire this event to download logs of the current workspace.
+ *
+ * @author Vitaliy Guliy
+ */
+public class DownloadWorkspaceOutputEvent extends GwtEvent {
+
+ public interface Handler extends EventHandler {
+
+ void onDownloadWorkspaceOutput(DownloadWorkspaceOutputEvent event);
+
+ }
+
+ public static final Type TYPE = new Type<>();
+
+ @Override
+ public Type getAssociatedType() {
+ return TYPE;
+ }
+
+ @Override
+ protected void dispatch(Handler handler) {
+ handler.onDownloadWorkspaceOutput(this);
+ }
+
+}
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/LoaderPresenter.java b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/LoaderPresenter.java
index 6b7a45498e8f..d935da86935f 100644
--- a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/LoaderPresenter.java
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/LoaderPresenter.java
@@ -13,6 +13,7 @@
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.google.inject.Singleton;
+import com.google.web.bindery.event.shared.EventBus;
import java.util.HashMap;
import java.util.Map;
@@ -23,7 +24,7 @@
* @author Vitaliy Guliy
*/
@Singleton
-public class LoaderPresenter {
+public class LoaderPresenter implements PopupLoader.ActionDelegate {
public enum Phase {
STARTING_WORKSPACE_RUNTIME,
@@ -36,14 +37,17 @@ public enum Phase {
private PopupLoaderFactory popupLoaderFactory;
private PopupLoaderMessages locale;
+ private EventBus eventBus;
private Map popups = new HashMap<>();
@Inject
public LoaderPresenter(PopupLoaderFactory popupLoaderFactory,
- PopupLoaderMessages locale) {
+ PopupLoaderMessages locale,
+ EventBus eventBus) {
this.popupLoaderFactory = popupLoaderFactory;
this.locale = locale;
+ this.eventBus = eventBus;
}
/**
@@ -78,6 +82,7 @@ public PopupLoader show(Phase phase, Widget widget) {
switch (phase) {
case STARTING_WORKSPACE_RUNTIME:
loader = popupLoaderFactory.getPopup(locale.startingWorkspaceRuntime(), locale.startingWorkspaceRuntimeDescription());
+ loader.showDownloadButton();
break;
case STARTING_WORKSPACE_AGENT:
loader = popupLoaderFactory.getPopup(locale.startingWorkspaceAgent(), locale.startingWorkspaceAgentDescription());
@@ -96,6 +101,7 @@ public PopupLoader show(Phase phase, Widget widget) {
break;
}
+ loader.setDelegate(this);
popups.put(phase, loader);
return loader;
}
@@ -130,4 +136,9 @@ public void setError(Phase phase) {
}
}
+ @Override
+ public void onDownloadLogs() {
+ eventBus.fireEvent(new DownloadWorkspaceOutputEvent());
+ }
+
}
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoader.java b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoader.java
index dc8b2b06af58..e8bd53704ab1 100644
--- a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoader.java
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoader.java
@@ -27,4 +27,23 @@ public interface PopupLoader {
*/
void setError();
+ /**
+ * Shows a button to download logs.
+ */
+ void showDownloadButton();
+
+ /**
+ * Sets an action delegate to handle user actions.
+ *
+ * @param actionDelegate
+ * action delegate
+ */
+ void setDelegate(ActionDelegate actionDelegate);
+
+ interface ActionDelegate {
+
+ void onDownloadLogs();
+
+ }
+
}
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.java b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.java
index 6839dfc35603..a017a46ea863 100644
--- a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.java
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.java
@@ -10,11 +10,14 @@
*******************************************************************************/
package org.eclipse.che.ide.ui.loaders;
+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.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -53,6 +56,11 @@ interface LoaderPopupImplUiBinder extends UiBinder {
@UiField
FlowPanel customWidget;
+ @UiField
+ Hyperlink downloadOutputs;
+
+ private ActionDelegate actionDelegate;
+
@AssistedInject
public PopupLoaderImpl(LoaderPopupImplUiBinder uiBinder,
@NotNull @Assisted("title") String title,
@@ -83,6 +91,7 @@ public PopupLoaderImpl(LoaderPopupImplUiBinder uiBinder,
this(uiBinder, title, description);
if (widget != null) {
+ customWidget.clear();
customWidget.setVisible(true);
customWidget.add(widget);
playTimer.cancel();
@@ -115,6 +124,24 @@ public void setError() {
titleLabel.setText(title);
}
+ @Override
+ public void showDownloadButton() {
+ customWidget.setVisible(true);
+ downloadOutputs.setVisible(true);
+ }
+
+ @Override
+ public void setDelegate(ActionDelegate actionDelegate) {
+ this.actionDelegate = actionDelegate;
+ }
+
+ @UiHandler("downloadOutputs")
+ void downloadLogsClicked(ClickEvent e) {
+ if (actionDelegate != null) {
+ actionDelegate.onDownloadLogs();
+ }
+ }
+
private Timer playTimer = new Timer() {
@Override
public void run() {
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.ui.xml b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.ui.xml
index 042ab981578b..0c45590e6758 100644
--- a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.ui.xml
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderImpl.ui.xml
@@ -14,6 +14,8 @@
+
+
@eval popupLoaderBackgroundColor org.eclipse.che.ide.api.theme.Style.theme.popupLoaderBackgroundColor();
@@ -66,12 +68,25 @@
overflow: hidden;
}
+ .hyperlink {
+ position: absolute;
+ top: 25px;
+ left: 15px;
+ }
+
+ .hyperlink a {
+ font-size: 11px;
+ color: #94b6d4;
+ }
+
-
+
+
+
diff --git a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.java b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.java
index e6ff4e4b580f..5a0e2e85fc30 100644
--- a/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.java
+++ b/ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.java
@@ -55,4 +55,7 @@ public interface PopupLoaderMessages extends Messages {
@Key("workspaceStopped.description")
String workspaceStoppedDescription();
+ @Key("downloadOutputs")
+ String downloadOutputs();
+
}
diff --git a/ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.properties b/ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.properties
index b154e18f5504..93b9dbb0a4a2 100644
--- a/ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.properties
+++ b/ide/commons-gwt/src/main/resources/org/eclipse/che/ide/ui/loaders/PopupLoaderMessages.properties
@@ -21,3 +21,4 @@ snapshottingWorkspace.title = Snapshotting the workspace
snapshottingWorkspace.description = Creating a snapshot of the current workspace
workspaceStopped.title = Workspace is not running
workspaceStopped.description =
+downloadOutputs = Download outputs
diff --git a/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml b/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml
index b430de5fffd8..76048a34568f 100644
--- a/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml
+++ b/plugins/plugin-csharp/che-plugin-csharp-lang-server/pom.xml
@@ -36,10 +36,22 @@
com.google.inject.extensions
guice-multibindings