Community
Participate
Working Groups
The various places where we open a compare editor should be able to utilize rename detection.
Added to compare with ancestor in history: https://git.eclipse.org/r/12791
Nice! UI comments: * The renamed file is shown in grey if the history was filtered (e.g. to the file or folder). That's caused by the DiffEntry being created by RenameDetector not having the marks. Could be fixed by using the marks from the dst in DiffEntry.pair. * Where is the rename decoration icon from? I'm wondering if there is an existing icon in Eclipse somewhere with this meaning. Maybe something with an arrow? * It would be nice if one could see the old name in the table. Maybe it could be added at the end, something like "foo.txt (renamed from bar.txt)"? Or as a tooltip?
(In reply to comment #2) > * The renamed file is shown in grey if the history was filtered (e.g. to the > file or folder). That's caused by the DiffEntry being created by > RenameDetector not having the marks. Could be fixed by using the marks from > the dst in DiffEntry.pair. Pushed JGit change for this: https://git.eclipse.org/r/12969
(In reply to comment #2) > Nice! UI comments: > > * The renamed file is shown in grey if the history was filtered (e.g. to the > file or folder). That's caused by the DiffEntry being created by > RenameDetector not having the marks. Could be fixed by using the marks from > the dst in DiffEntry.pair. > > * Where is the rename decoration icon from? I'm wondering if there is an > existing icon in Eclipse somewhere with this meaning. Maybe something with > an arrow? I modified to something else, more like what you see when you do label editing. > * It would be nice if one could see the old name in the table. Maybe it > could be added at the end, something like "foo.txt (renamed from bar.txt)"? > Or as a tooltip? Tooltip or gittish style path/{added/}name. Doing this nicely, along with the names in the compare UI, requires a lot more code and some thinking. The patch I submitted is trivial in comparison. I suggest that is a future patch (possible 3.0, but not necessarily).
Created attachment 231227 [details] alternative proposal for rename overlay icon
(In reply to comment #4) > (In reply to comment #2) > > Nice! UI comments: > > > > * The renamed file is shown in grey if the history was filtered (e.g. to the > > file or folder). That's caused by the DiffEntry being created by > > RenameDetector not having the marks. Could be fixed by using the marks from > > the dst in DiffEntry.pair. > > > > * Where is the rename decoration icon from? I'm wondering if there is an > > existing icon in Eclipse somewhere with this meaning. Maybe something with > > an arrow? > > I modified to something else, more like what you see when you do label > editing. Looks better but still hard to read e.g. when overlayed to the Java source file icon. I attached another proposal which I feel is a bit easier to read. > > * It would be nice if one could see the old name in the table. Maybe it > > could be added at the end, something like "foo.txt (renamed from bar.txt)"? > > Or as a tooltip? > > Tooltip or gittish style path/{added/}name. Doing this nicely, along with > the names in the compare UI, requires a lot more code and some thinking. The > patch I submitted is trivial in comparison. I suggest that is a future patch > (possible 3.0, but not necessarily). I agree
(In reply to comment #6) > Looks better but still hard to read e.g. when overlayed to the Java source > file icon. I attached another proposal which I feel is a bit easier to read. Looks better. Is there a specific reason it shows an "e"? Maybe an "r" (for rename) would be better? And why is the cursor red? Red is usually a warning color. How about a more neutral blue?
Created attachment 231247 [details] tooltip for renamed files > > > * It would be nice if one could see the old name in the table. Maybe it > > > could be added at the end, something like "foo.txt (renamed from bar.txt)"? > > > Or as a tooltip? > > > > Tooltip or gittish style path/{added/}name. Doing this nicely, along with > > the names in the compare UI, requires a lot more code and some thinking. The > > patch I submitted is trivial in comparison. I suggest that is a future patch > > (possible 3.0, but not necessarily). > > I agree Showing tooltip is actually pretty easy, I attached a patch (on top of patch set 3). I think we should include this for 3.0.
(In reply to comment #8) > Created attachment 231247 [details] > tooltip for renamed files Something wrong with Gerrit? Make it a patch on top of mine.
(In reply to comment #7) > (In reply to comment #6) > > Looks better but still hard to read e.g. when overlayed to the Java source > > file icon. I attached another proposal which I feel is a bit easier to read. > > Looks better. Is there a specific reason it shows an "e"? Maybe an "r" (for > rename) would be better? e is a character which is still easy to read with a tiny font size, will try "r" > And why is the cursor red? Red is usually a warning color. How about a more > neutral blue? I picked red since it's more easy to spot near the blue-ish "J" icon used for Java sources, will try other colors.
(In reply to comment #9) > (In reply to comment #8) > > Created attachment 231247 [details] > > tooltip for renamed files > > Something wrong with Gerrit? Make it a patch on top of mine. No, just wasn't sure because there are other changes depending on it already. Done: https://git.eclipse.org/r/13019
Created attachment 231252 [details] smaller version of JDT's correction_rename.gif In JDT UI, we sometimes use this arrow for quick fix proposals: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/plain/org.eclipse.jdt.ui/icons/full/obj16/correction_rename.gif It is used e.g. when there's a spelling error in a comment or when a public class has a name that doesn't match the .java file name. We currently only use this as object icon, but here's a smaller version that could also be used as an overlay.
(In reply to comment #12) > Created attachment 231252 [details] > smaller version of JDT's correction_rename.gif I like it, because it's an arrow and visually simple. What I'm not sure about is the color, it's a lighter green than the "added" overlay (+). Maybe it should be the same green, or another color to increase the difference (blue, yellow)?
Created attachment 231269 [details] staged_added_lighter.gif Yeah, the staged_added.gif is a bit dark, also if you compare it to the add.gif icon. When I squash add.gif, then I get this version, which doesn't use exactly the same colors as comment 12, but IMO blends in well and looks better than the original.
(In reply to comment #12) > Created attachment 231252 [details] > smaller version of JDT's correction_rename.gif > > In JDT UI, we sometimes use this arrow for quick fix proposals: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/plain/org.eclipse.jdt.ui/ > icons/full/obj16/correction_rename.gif > > It is used e.g. when there's a spelling error in a comment or when a public > class has a name that doesn't match the .java file name. > > We currently only use this as object icon, but here's a smaller version that > could also be used as an overlay. looks good to me, I'd leave the add overlay with the darker green then it's easier to differentiate it from the rename icon
(In reply to comment #12) > Created attachment 231252 [details] > smaller version of JDT's correction_rename.gif My first reaction was: nooooo, but then I tried it and like it. Can we use it without CQ or something?
(In reply to comment #16) > (In reply to comment #12) > > Created attachment 231252 [details] > > smaller version of JDT's correction_rename.gif > > My first reaction was: nooooo, but then I tried it and like it. Can we use > it without CQ or something? I think we can use it without CQ since it comes from JDT which is an Eclipse project as well and it's also licensed under EPL. According to the IP poster [1] reuse of Eclipse project which went through release review is ok. [1] http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf
Yes, it's completely IP-clean, including my manual shrinking to make it fit the 8x8 restriction for overlays. And if it helps: 1. I authored 100% of this contribution 2. I have the rights to donate the content to Eclipse 3. I contribute the content under the EPL 4. Bad processes make me mad, see https://bugs.eclipse.org/381105
Thanks, I ammended the patch
merged as e3141e7f1c03b97a143ffbf4778ccbd577dcffb6 and 31cfaea7ff140e93133e47fd7f36750670261feb
Reopened because the following JGit change should also be merged for 3.0: https://git.eclipse.org/r/12969 (Or am I the only one using the History view filtered to project/resource?)
> https://git.eclipse.org/r/12969 Merged