Open egit code comparison in floating tab rather than splitscreen - eclipse

When using Eclipse (Mars), I often use the Git staging view maximized. When I double click on an entry, I want the comparison view floating over the maximized view.
This is how I do it:
Go to Git staging view.
Maximize it (Ctrl+M).
Git staging fills the screen.
Double click on entry.
Compare current and index view starts in a splitscreen, pushing Git staging to the lower third of the screen.
Set focus to Git staging view.
Press Ctrl+M again.
Original Layout restored.
Press Ctrl+M yet again.
Git staging fills the screen.
Double click on entry again.
Compare current and index view starts in an overlay.
Is there any way to configure Eclipse in order to avoid having to go through steps 5 to 11?

It seems that the comparison editor forcely opens in a splitscreen every time it gets started and can be shown in a floating tab when it's only getting updated.
Thus, a workaround is to get into the habit of not closing it and keeping it opened in the back all the time.

Related

Explorer icon showing the git changes count in VS Code

As shown in the below image the Explore icon has the badge showing the count of my git changes.
I don't know how this happened some how unexpectedly I did something and this behaviour started.
How do I fix it and get the default behaviour of the git icon showing the changes count?
You accidentally moved the SOURCE CONTROL View to the Explorer bar.
Is this view not present in the SCM Bar?
I have tried to do it with the mouse but could not recreate. It created a new SCM icon in the Activity Bar with 1 view.
To move all the views to the default position execute command: View: Reset View locations
That Explorer icon badge is supposed to show the number of unsaved files with changes - it doesn't show the number of git changes except coincidentally.
I don't think the Explorer unsaved files count badge can be turned off. You can change its color or opacity but that would affect all badges (like the scm badge).
Thanks to this answer the GIF attached in answer was able to help me to fix the issue.
I just dragged the Source Control to the sidebar and it worked.

How to get rid of an empty panel in Visual Studio Code

I'm trying out Visual Studio Code. Yesterday, I opened a file outside of the git directory I was working in. I eventually moved and renamed the file and somewhere along the line, I ended up with the empty panel shown in the attached screenshot. I tried clicking every GUI element and every menu item and I could not get rid of it. I could close that file and it would go away, but once I re-opened it, it would come back, so it seemed to be associated specifically with that file.
I could split the view and add more tabs, but there was no way to get rid of it. I selected view > editor layout > single many times and it would not go away. All I could do was make it smaller by dragging the vertical divider.
This morning, I closed it and re-opened it, and it was gone. Unfortunately, despite trying to reproduce the steps that lead to that empty panel, I could not make that panel show up again.
Does anyone know what that panel was, why it was appearing with that file, and how to make it go away if it happens again?
That file basically shows you all the edits you've made since you last saved the file in git. By clicking on the source control button on the activity bar on the left side you can view your changes on the files you're working on. You can't actually edit it, it just shows the changes you've made.
To actually open the file and edit it you can either go back to the top left button called explorer on the activity bar or click on the little file button next to the name of the file (next to the + sign and the arrow).
Checkout this video by vscode which explains it

VSCode SCM tab suddenly disappeared

I must have pressed a wrong combination of keys with my crooked fingers which caused the version control tab to disappear from the sidebar.
Then I found source control tab somewhere in VSCode, dragged it into the sidebar, it shows the changes, however, the icon is completely different and also it doesn't show the number of current changes.
What happened?
In the below screenshot the yellow icon is what I have for SCM now.
Thanks 🤞
I had to use the View: Reset View Locations command to solve this problem in Visual Studio Code version 1.47 (macOS - Catalina).
To do this, just press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux/Windows), type workbench.action.resetViewLocations, then press Enter.
Release notes - May 2020 (version 1.46)
As #rioV8 commented - what solved it for me was to right click on the icon and click "Reset Location"
I am not sure what you actually dragged to the activity bar vscode is really modular in this way; hard to say without being there, but you can re-enable SCM button.
Even if you use the short cut to open the source control view (CTRL + SHIFT + G, it will disappear again after you focus out of it (when it's not enabled).
To re-enable it, right-click anywhere on the Activity Bar and select 'Source Control'
From version 1.46 it is now possible to drag and drop panels and views
If a panel/view is not in a spot you want and you want it back in its original place you can Right Click on the panel/view header and choose Reset Location.
Try right clicking on the bar and you should see a menu like the one below
recheck the source control and the icon should appear.
For people who applied the methods above but still could not see the source control panel where you could jump to editted files quickly but only the side bar, here is the way you can fix it:
After you have got the source control panel appeared, right click any available tabs you have inside the panel, such as commits, file history, branches etc. Then make sure you chose the Source Control.
If the "Source Control" panel is not on the side/activity bar or dissapeared for some reason, you check it on the "Explorer" panel. If you don't see it on the Explorer list, you can find it on the top right menu of the explorer panel. You can just check it and then it appears on the Explorer panel list.
Then you can just drag the Source Control panel and drop it on the side/activity bar. It gets back to its original place.
Finally!!!
As of vscode v1.75 you can reset all the view locations from the Layout Control button near the upper right:

Intellij - How to compare two commits with each other? [duplicate]

You probably know this window where you can see the diffs between a commit to ONE commit older.
Do you know how can I see exactly the same comparison, but between a commit and a previous commit which is not necessarily ONE before the current one.
I know that I can do it per one file, but I want to do it for the whole project.
You can select any number of commits in the git log window (using shift/ctrl and click or cursor keys) and the right-hand pane will show the cumulated differences.
In IntelliJ, there is no command or action to compare exact revisions, unfortunately.
Here are couple related requests:
https://youtrack.jetbrains.com/issue/IDEA-125616 and https://youtrack.jetbrains.com/issue/IDEA-100431
However, there is a way to see what has changed between two commits. To do so you need to go to the Version control - Log tab and select the entire range between wanted commits (e.g select the later commit, then scroll down to the older commit and click on it with Shift). In the right pane showing changed files you will see all the changes.
Another way to do it:
Open the 1: Project panel
Right-click your project's root folder
Select Git → Show History from the menu
This opens up a completely different view of the git log, where you can do exactly what you'd expect to be able to from the main (9: Version Control) git log... namely:
Select (only!) two commits
Click Compare
From the pop-up dialog that appears, you can select any file and press Ctrl-/Cmd-D (or right-click and select the only menu item) to see the changes.
Unfortunately, there doesn't seem to be any way to "pin" that view to your workspace, though it hovers on top as long as you need it.
Hopefully one day JetBrains will create a "best of both worlds" merged version of these UIs, so we can just compare stuff from the main Version Control log. To add to the list of JetBrains tickets for this issue listed in another answer... the oldest one appears to be https://youtrack.jetbrains.com/issue/IDEA-86480
Also in CLion (I think in other JetBrains IDE-s it's the same):
open VCS log
filter VCS log via other branch (e.g., personal/sherstennikov/krt-23941)
top n commits must be the range on other branch we want to diff against current branch
select other branch HEAD with left click
right click on it
select in menu 'Branch ' (e.g.: Branch 'personal/sherstennikov/krt-23941')
expand via arrow on the right and click 'Compare with Current'
you get a window (see pic) 'Comparing with in root '
top left pane contains range of commits from other-branch
bottom left pane contains log of current-branch
right pane contains list-of-files-which-differ between commit/several-selected-commits (if range selected, list of files is cumulative) in other-branch and HEAD (or maybe selection) in current-branch
now you can click on file in right pane to get it's diff between selected versions in a separate window (let's call it file-diff-between-other-and-current-window)
10.also in file-diff-between-other-and-current-window right on the left of unified/side-by-side viewer selector, there's a control to switch between files in the aforementioned list-of-files-which-differ

eclipse perspective messed up, reset not helping

I somehow messed up my perspective then I clicked reset perspective. This gives me back the package manager on the left. problems/javadoc/declarations on the bottom. Task list and outline as 2 separate windows on the right and a big empty space in the middle where the code is supposed to be. When I open up some code it ends up in the bottom window and there's that big hole where the code window used to go. I can drag and drop the code into that empty space, but when I try to drag the code window bigger to fill up the entire space it won't let me past a certain point. I'm left with a gap above the coding window that's bothering me. It seems Eclipse is leaving that space for me to drag other perspectives into, however dragging more perspectives into that empty space doesn't make it go away, it's still the same size. How do I get rid of this space?
Close eclipse if it's open
Navigate to your workspace folder
Further navigate down into .metadata then .plugins (These are hidden files, use terminal or look up how to show hidden files in your OS)
Delete the org.eclipse.e4.workbench folder
Restart Eclipse
If it still doesn't look right click Window > New Window
If it still isn't fixed please let me know in the comments (it might be time to reinstall Eclipse)