-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add ability to switch between files in Git Diff widget #5965
Merged
Changes from 34 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2318d28
CHE-5892: Temporary state
mmorhun 28ea7d4
CHE-5892: Use an object to hold git diff data
mmorhun 5814596
CHE-5892: Draft solution.
mmorhun 9f7d30c
Merge branch 'master' into CHE-5892
mmorhun 88bc819
CHE-5892: Fix build and tests
mmorhun a3e2c7c
CHE-5892: Fix inverted comparation type
mmorhun e27895c
CHE-5892: Fix comparation between revisions
mmorhun 72fb977
CHE-5892: Small refactor in ComparePresenter
mmorhun 347b2e0
CHE-5892: Fix Save Changes button
mmorhun 638153b
CHE-5892: Remove unnecessary imports
mmorhun 9f18acd
CHE-5892: Small fixes
mmorhun 3cd740e
CHE-5892: Rename ChangedItems
mmorhun f22b649
CHE-5892: Fix compare with deleted file bug.
mmorhun 2f82bec
License format
mmorhun d148050
License Format
mmorhun 5d8744a
CHE-5892: Add AlteredFiles test
mmorhun 6f3ea37
CHE-5892: Code cleanup
mmorhun 241dca7
CHE-5892: Add additional check in AlteredFiles constructor
mmorhun a1eac87
Merge branch 'master' into CHE-5892
mmorhun 18ed447
Merge branch 'master' into CHE-5892
mmorhun 5a6d745
CHE-5892: Fix constraint mistake
mmorhun e1bb8f4
CHE-5892: Generalize showCompareForCurrentFile in ComparePresenter. B…
mmorhun c50272a
CHE-5892: Code cleanup
mmorhun 69715a6
CHE-5892: Code cleanup
mmorhun 96fed94
CHE-5892: Add missing new line
mmorhun 436dc59
CHE-5892: Code cleanup
mmorhun 286339c
Apply new code style
mmorhun e5208f5
Merge master
mmorhun d121a3d
Fix build
mmorhun cd6f922
Add ability to align a button left
mmorhun 89ad74e
CHE-5892: Add current diff number in the widget title
mmorhun 65204e0
CHE-5892: Fix formatting
mmorhun c4c0cdf
Merge branch 'master' into CHE-5892
mmorhun bea914d
Draft. Move git diff widget from iframe to IDE
mmorhun 21619ad
CHE-5892: Fix build
mmorhun eaa74c5
Prevent jumping to non-existing diff with hotkeys
mmorhun 2a1147e
CHE-5892: Temporary state. Moving git diff grom iframe to IDE
mmorhun 7195d82
Merge branch 'master' into CHE-5892
mmorhun e2b5c84
CHE-5892: Move git diff widget from iframe to IDE
mmorhun 0bd2dd9
CHE-5892: code clean up
mmorhun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/button/ButtonAlignment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) 2012-2017 Red Hat, Inc. | ||
* 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: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.che.ide.ui.button; | ||
|
||
/** | ||
* Describes button alignment in a horizontal container. | ||
* | ||
* @author Mykola Morhun | ||
*/ | ||
public enum ButtonAlignment { | ||
LEFT, | ||
RIGHT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...n-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/NextDiffAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2012-2017 Red Hat, Inc. | ||
* 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: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.che.ide.ext.git.client.action; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Singleton; | ||
import org.eclipse.che.ide.api.action.Action; | ||
import org.eclipse.che.ide.api.action.ActionEvent; | ||
import org.eclipse.che.ide.ext.git.client.compare.ComparePresenter; | ||
|
||
/** @author Mykola Morhun */ | ||
@Singleton | ||
public class NextDiffAction extends Action { | ||
|
||
private final ComparePresenter comparePresenter; | ||
|
||
@Inject | ||
public NextDiffAction(ComparePresenter comparePresenter) { | ||
this.comparePresenter = comparePresenter; | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
if (comparePresenter.isShown()) { | ||
comparePresenter.onNextDiffClicked(); | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...t-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/action/PreviousDiffAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2012-2017 Red Hat, Inc. | ||
* 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: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.che.ide.ext.git.client.action; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Singleton; | ||
import org.eclipse.che.ide.api.action.Action; | ||
import org.eclipse.che.ide.api.action.ActionEvent; | ||
import org.eclipse.che.ide.ext.git.client.compare.ComparePresenter; | ||
|
||
/** @author Mykola Morhun */ | ||
@Singleton | ||
public class PreviousDiffAction extends Action { | ||
|
||
private final ComparePresenter comparePresenter; | ||
|
||
@Inject | ||
public PreviousDiffAction(ComparePresenter comparePresenter) { | ||
super(null, null); | ||
this.comparePresenter = comparePresenter; | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
if (comparePresenter.isShown()) { | ||
comparePresenter.onPreviousDiffClicked(); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add default statement or replace with if..else