-
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
CHE-5339: Mark with color Git changed files in project explorer #5722
Conversation
package org.eclipse.che.ide.api.vcs; | ||
|
||
/** | ||
* Indicates that specified node has VCS status attribute. |
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.
specified node -> specified resource
and so on on the below javadoc
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.
done
@@ -211,6 +219,14 @@ public void addPart(@NotNull PartPresenter part) { | |||
|
|||
final EditorTab editorTab = tabItemFactory.createEditorPartButton(editorPart, this); | |||
|
|||
resourceManagerFactory.newResourceManager(appContext.getDevMachine()) |
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.
Instead of resourceManagerFactory.newResourceManager(appContext.getDevMachine()).getFile(file.getLocation())
use appContext.getWorkspaceRoot().getFile(file.getLocation())
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.
done
|
@sunix How about yellow color for unstaged files? |
Please adjust the colors to the one in the requirements https://cloud.githubusercontent.com/assets/1636769/26213265/b13531d4-3bf8-11e7-9516-8217c68a6af8.png It was yellow in the requirements. |
Missing docs update. |
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.
- Colors need to be changed
- Documentation PR needs to be provided
@slemeur I don't se a color for untracked files in your mockup, Is it OK to have next colors:
In progress 🙂 |
* @param color | ||
* color to set | ||
*/ | ||
void setTitleColor(String color); |
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.
Do you think it makes sense to specify the format of the color in the javadoc, like hash #000000 or color name like blue ?
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.
Yep. Any css valid color.
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.
done
Build # 3092 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3092/ to view the results. |
@slemeur what about these colors: added: #0a7700 ? |
private void initializeGitChangeWatcher() { | ||
requestTransmitter.newRequest() | ||
.endpointId("ws-agent") | ||
.methodName("track:git-change") |
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.
please, rename method to the "track/git-change" (this is our internal agreement)
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.
done
private void initializeGitIndexWatcher() { | ||
requestTransmitter.newRequest() | ||
.endpointId("ws-agent") | ||
.methodName("track:git-index") |
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.
ename method to the "track/git-index"
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.
done
@slemeur I will prepare a docs PR when we will choose file colours to have actual screenshots |
Build # 3094 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3094/ to view the results. |
Build # 3101 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3101/ to view the results. |
package org.eclipse.che.ide.api.vcs; | ||
|
||
/** | ||
* Indicates that specified resource has VCS status attribute. |
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.
Can you please elaborate on what it means to have VCS status attribute?
Does it mean that each file has VCS status if the project is under VCS?
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.
It means that the resource can store and return VCS status
.withBiConsumer(this::apply); | ||
} | ||
|
||
public void apply(String endpointId, GitChangeEventDto dto) { |
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.
Do you think it makes sense to decouple jsonrpc transport and GIT VCS status -> VCS status adaptation ?
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.
In current step we implement file colors only for git, so I think it is not bad to keep VCS status convertation logic inside Git changes transmitter.
The problem is that Git status command returns object that has lists of files for each status, but SVN status request returns just CLI output, so it is not clear, how to build a common Status converter (what common parameter it should receive).
I think this issue can be solved while implementig file colors for SVN.
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.
Thank you for the description, if @vparfonov is okay with it, let's leave it in current state.
Colors: added: #3CAC64 |
IMO we should reuse colors that exist and used already in the IDE:
|
@sunix +1. As for me(I have a protanopia), modified color is not readable. |
+1 on a darker yellow for light theme. |
The colours for the dark theme are great. |
@slemeur |
@slemeur We need to decide what to do with colorizing editor tabs. My proposal is to change colorizing editor tabs caused by java error/warning to colored wavy underlinings: |
Ok for the colors for the light theme. Your proposal for showing error/warning is fine - you'll differentiate the error/warning state with the wavy underlines' color? |
|
Build # 3327 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3327/ to view the results. |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/3333/ |
Build # 3351 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3351/ to view the results. |
Build # 3357 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3357/ to view the results. |
What does this PR do?
Mark with colour Git changed files in project explorer and editor's tabs:


What issues does this PR fix or reference?
#5339
Changelog
Colors project explorer files and editor tabs according to their git change state.
Release Notes
Colors project explorer files and editor tabs according to their git change state.
Docs PR
eclipse-che/che-docs#275