Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHE-3614: Rework Git commit window #5081

Merged
merged 17 commits into from
May 31, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,6 @@ public interface GitLocalizationConstant extends Messages {
@Key("view.commit.title")
String commitTitle();

@Key("view.commit.all_field_title")
String commitAddAllFieldTitle();

@Key("view.commit.selection_field_title")
String commitSelectionFieldTitle();

@Key("view.commit.all_project_field_title")
String commitAllFieldTitle();

@Key("view.commit.amend_field_title")
String commitAmendFieldTitle();

Expand All @@ -376,6 +367,12 @@ public interface GitLocalizationConstant extends Messages {
@Key("view.commit.grid.comment")
String commitGridComment();

@Key("view.commit.push.checkbox.title")
String commitPushCheckboxTitle();

@Key("view.commit.nothing_to_commit.text")
String commitNothingToCommitMessageText();

@Key("view.push.title")
String pushViewTitle();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.eclipse.che.ide.api.resources.Project;
import org.eclipse.che.ide.api.resources.Resource;
import org.eclipse.che.ide.ext.git.client.GitLocalizationConstant;
import org.eclipse.che.ide.ext.git.client.compare.branchList.BranchListPresenter;
import org.eclipse.che.ide.ext.git.client.compare.branchlist.BranchListPresenter;

import static com.google.common.base.Preconditions.checkState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.eclipse.che.ide.ext.git.client.GitLocalizationConstant;
import org.eclipse.che.ide.ext.git.client.compare.ComparePresenter;
import org.eclipse.che.ide.ext.git.client.compare.FileStatus.Status;
import org.eclipse.che.ide.ext.git.client.compare.changedList.ChangedListPresenter;
import org.eclipse.che.ide.ext.git.client.compare.changedlist.ChangedListPresenter;
import org.eclipse.che.ide.api.dialogs.DialogFactory;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.eclipse.che.ide.api.resources.Project;
import org.eclipse.che.ide.api.resources.Resource;
import org.eclipse.che.ide.ext.git.client.GitLocalizationConstant;
import org.eclipse.che.ide.ext.git.client.compare.revisionsList.RevisionListPresenter;
import org.eclipse.che.ide.ext.git.client.compare.revisionslist.RevisionListPresenter;

import javax.validation.constraints.NotNull;

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
*******************************************************************************/
package org.eclipse.che.ide.ext.git.client.commit;

import org.eclipse.che.api.git.shared.Branch;
import org.eclipse.che.ide.api.mvp.View;
import org.eclipse.che.ide.ext.git.client.compare.changedpanel.ChangedPanelView;
import org.eclipse.che.ide.resource.Path;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Set;

/**
* The view of {@link CommitPresenter}.
Expand All @@ -31,70 +36,51 @@ interface ActionDelegate {
/** Performs any actions appropriate in response to the user having changed something. */
void onValueChanged();

/**
* Set the commit message for an amend commit.
*/
/** Performs any actions appropriate in response to the user having clicked on changed file check-box. */
void onFileNodeCheckBoxValueChanged(Path path, boolean newCheckBoxValue);

/** Set the commit message for an amend commit. */
void setAmendCommitMessage();

/** Get list of changed files paths. */
Set<String> getChangedFiles();
}

/** @return entered message */
@NotNull
String getMessage();

/**
* Set content into message field.
* Mark check-boxes of given paths as checked.
*
* @param message
* text what need to insert
*/
void setMessage(@NotNull String message);

/**
* Returns <code>true</code> if need to add all changes to index except from new files before commit, and <code>false</code> otherwise
* @param paths
* pats of nodes
*/
boolean isAddAllExceptNew();
void checkCheckBoxes(Set<Path> paths);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setMarkedPaths( or smth else, checkCheck sounds not good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to setMarkedPaths()


/**
* Set status of flag that represents add all changes to index except from new files before commit.
*
* @param addAllExceptNew
* <code>true</code> if need to add all changes to index except from new files before commit,
* <code>false</code> otherwise
* Returns selected remote branch from branches drop-down list.
*/
void setAddAllExceptNew(boolean addAllExceptNew);

/** Returns true if the selection must be added to index before commit, and <code>false</code> otherwise. */
boolean isAddSelectedFiles();
String getRemoteBranch();

/**
* Sets the status of flag that represents add selected files.
* Set content into message field.
*
* @param addSelectedFiles
* <code>true</code> if need to add selected files before commit, <code>false</code> otherwise
* @param message
* text what need to insert
*/
void setAddSelectedFiles(boolean addSelectedFiles);

/** Returns <code>true</code> if need to commit all files in the project, and <code>false</code> otherwise. */
boolean isCommitAllFiles();
void setMessage(@NotNull String message);

/**
* Sets the status of flag that represents add selected files.
*
* @param commitAllFiles
* <code>true</code> if need to add selected files before commit, <code>false</code> otherwise
* Set list of remote branches to drop-down.
*/
void setCommitAllFiles(boolean commitAllFiles);
void setRemoteBranchesList(List<Branch> branches);

/** Returns <code>true</code> if need to amend the last commit, and <code>false</code> otherwise. */
/** Returns <code>true</code> if need to amend the last commit, and <code>false</code> otherwise */
boolean isAmend();

/**
* Set status of amend the last commit.
*
* @param isAmend
* <code>true</code> need to amend the last commit, <code>false</code> need to create new commit
*/
void setAmend(boolean isAmend);
/** Returns <code>true</code> if need to push after commit, and <code>false</code> otherwise */
boolean isPushAfterCommit();

/**
* Change the enable state of the commit button.
Expand All @@ -112,4 +98,9 @@ interface ActionDelegate {

/** Show dialog. */
void showDialog();
}

/**
* Initialize changed panel.
*/
void setChangedPanelView(ChangedPanelView changedPanelView);
}
Loading