Intellij no longer showing "Compare" and "Compare with Local" in VCS tab - intellij-idea

I have been using the various compare options frequently but now they do not appear in any project. Restarting intellij has not resolved the issue.
Has anyone else run into this and discovered a solution? Note in the following screenshot:
( a ) The Compare with Local is not shown
( b ) The git options should come up immediately : not in a nested popup.
Update For those who wonder about Compare with local wrt VCS (/git):here ya go..

Diff with local seems to provide the same behavior as Compare with local. To access that feature I had to add keystroke to the Keyamp.
It is beyond strange that the above behavior / problems just suddently popped up. I went ahead and nuked the project and rebuilt it- but no help

The screenshot has all the Compare options in there.
Not sure, but probably you mean the IDEA-171150 issue.
UPD. Compare with local is the action of FileHistory, and it is still there, e.g. for Subversion History
Local changes tab never had this, Git Log and new Git History do not have such now. It is now called Diff with local.
It is not possible to assign a shortcut for the Show Diff with local at the moment, unfortunately. There is a request opened to allow choosing the default behavior: https://youtrack.jetbrains.com/issue/IDEA-82019

Related

Intellij Idea: Override and update local changes

Is there a way to override/replace the local changes from the version controls (like svn, CVS)? In Eclipse, I can right click on the project->team->synchornize.. then it shows all changes comparing to the repository. Then, If I need to override the file, "update and override" option is there. Correspondingly, Is there such a way to replace local changes in a class or a package with one click in IntelliJ Idea?
(I found a way to compare incoming changes, then I had to get one by one changes to my local class files) . I use IntelliJ Idea community edition 15
For single file you can follow below steps :
a) Right click on file
b) Git ---> Show History
c) It will show a window in which you can see the history of changes, select a commit,right click on it. Select Get.
Link : https://intellij-support.jetbrains.com/hc/en-us/community/posts/207743285/comments/207412185
If I understand the question right, I think you need to revert your local changes then update from the remote. You can do this at a class or package level, or on the whole project.
I think it is going to be an two way process.
Revert the changes (Ctrl+Alt+Z).
Update the project (Ctrl+T).
Choose the project(if you have multiple files changed), right click -> GIT -> Compare with branch(select the branch which you want to override your changes) -> it will show the differences it detected -> click "Get" icon, it prompts "Some files were locally modified" -> choose "Overwrite Modified Files"
But sometimes it doesn't work well.
Another simple but dangerous way is to use git command:
git fetch --all
git reset --hard origin/master
(Then all your local change will be lost)

Intellij undo history size, not much?

I like to be able to undo basically several hours of work in a file. I am unsure how to configure this.
In IntelliJ settings, the clipboard settings I have tried with are 999 and 9999 and 99999 but it still too short on undos.
How can I increase this?
In Intellij settings the clipboard settings I have tried with are 999 and 9999 and 99999 but it still too short on undos.
I've failed to see what "clipboard settings" have to do with the "undo limit" (or with "undo" at all). Care to explain?
Local History is definitely the way to go here as it works across sessions, files, and whole folders -- you can undo very complex operations in one click (e.g. replace/refactor in multiple files).
In any case: if Local History is to complex or you are a hardcore person who prefers to hit Ctrl + Z quite a few times in a row instead of few clicks with Local History, you can increase undo limit (which is 100 steps by default). For that:
Open Registry (Help | Find Action... and type registry)
Find undo.documentUndoLimit entry and set your limit to a higher number (e.g. 1000).
P.S.
IDE restart may be required.
Actually, based on JetBrains Docs, for changing undo limit you should act just like below steps:
click Help on the top menu:
Click on Find Action:
Type Registry and open first result:
On the opened window file undo.documentUndoLimit and undo.globalUndoLimit and change it to number what you want.
HINT: After change you should close your JetBrains IDE and open it again.
The "Maximum number of contents to keep in clipboard" setting has nothing to do with undos.
In fact, there is no configurable "undo history size" setting in IntelliJ. See this support issue:
For rolling back complex code changes gone awry, a far better option is to use the local history.
Local History is available under the menu "VCS" -> "Local History" -> "Show History". The feature is explained as:
IntelliJ IDEA tracks any changes you make to your source files or any other file, as well as the changes that affect a directory’s content and structure. This feature will protect you from any accidental losses or modifications, even if made by other applications outside IntelliJ IDEA. Setting version labels is also available. Any time you can inspect the history of either a particular file or directory and rollback to any of its previous versions.

Refactor rename broken in Intellij IDEA

Somehow, I managed to break my refactoring capabilities in Intellij IDEA 12. I have somehow disabled it for my project. Renaming a member through Shift+F6 doesn't work. The inline edit box is not drawn, nothing happens.
I know of the refactoring settings in Settings -> Editor, Enable in-place mode and Preselect old name are both checked.
It has to be some kind of project setting. I checked by creating a test project, adding some member and renaming it, which works perfectly.
What setting am I looking for? Or could my project be broken?
There is no way to turn refactoring off in the settings. My guess is that the project's cache/indexes are corrupted. I had a case once where refactoring, especially renames, stopped working. A re-index solved it for me. Go to File >Invalidate Caches, invalidate your caches, restart IDEA, and let IDEA re-index the project (progress is shown in the bottom status bar right of center). Then try the refactoring.
If that does not solve it, take a look in the logs (Help > Show Log) and see if there is any indication in there as to the cause of the issue.
Fo all the MacOS users, do not forget to access Settings -> Keyboard and turn on the flag for the option Use all F1, F2, etc. keys as standard function keys. E.g.:
Otherwise IntelliJ will not get the focus to use the F4 key.
Following step worked for me:
From your IDE, go to: Preferences -> Project Structure -> Add Content Root, then select the folder you want to use.
None of the above steps worked for me in IDEA 2021.2.4 (Ultimate Edition). I got the following error message when trying to rename a file and its usages:
Cannot perform refactoring. Selected file is not located inside the project.
Instead, I had to create a new module.
File > Project Structure > Modules > Add (+) > Import module > Select <root_folder_of_your_project>
This reindexed the whole project, which took a couple of minutes, and restored the Refactor > Rename functionality.
waite for some time it can be due to running Indexing

Jdeveloper run configurations missing in version 11.1.2.2.0

Just wondering if anyone else has experienced problems with JDeveloper 11.1.2.2.0 and run configuration options that appear when you click the dropdown next to the run and debug buttons?
In previous versions I always had several options available - for starting the client/server/etc. However in this version I do not always get the dropdown unless I click into a different project, then click back into the project I want to run. If anyone has discovered a more permanent fix for this I would love to hear about it.
Many thanks
This is a bug I also stumbled upon. Only other thing you can try is to use the run menu and check if you see the options in there.
I personally use trick you already know (switching projects).

Submit Eclipse Project on Perforce

I have a noob Perforce question. I got my perforce plug-in on Eclipse working(for both Java and C).
I have no problems "opening" my perforce stored projects on Eclipse.
Scenario 1:
Whenever I want to change code, I open the project on Eclipse and right-click on it and go to "team" and check out, make changes and then submit. Works fine. But even after that I see a tick mark(indicating check-out) on my perforce screen.
Scenario 2:
I just open perforce code as Eclipse project and make changes(If read only, it prompts and asks if i have to allow write and I say yes). I make changes and save. It doesnt ask for submit. Also if I now open the code on Perforce screen, I already see the new changes made.
Scenario 3:
Just on a Perforce screen, if I check a file out and don't make any changes, I obviously dont want to submit as there are no changes. In this case, how can i "disable" check-out so that my fellow programmers dont think i'm working on it??
Scenario3:
So here are 2 ways i consider a good usage of the plugin:
Use Revert Unchanged Files:
Before you begin development of a feature, checkout the entire tree/branch that your changes will be concentrated around in future. You can do this by right-click the relevant package in package explorer. Once you want to submit, Project->Right-click->Team->Revert Unchanged Files. Now, you can submit your changelist.
This approach stands very useful if you know you will be editing a lot of files or replacing files.
Ofcourse, others can see that you have checked out the files.
Enable Auto checkout:
Incase you are going to make few changes, you should enable autocheckout. This will checkout the file when you begin to make edits. Eclipse->Preferences->Team->Perforce->Enable support for workbench edit..
detailed explainations here. Its a good idea to have this enabled always as it checks out on demand.
However, this does not monitor the filesystem so and code/libs you replace outside of eclipse are not checked out.
For Scenario 3, you can change a workspace option to prevent submitting unchanged files:
SubmitOptions: reverttunchanged
If you have a file checked out (open for edit), others will be able to see that. I guess I'm not clear on why you check a file out if you don't intend to modify it?
If you are going to setup this way and are also using the desktop client, I recommend the following steps in the desktop client:
1.) Open your desktop Perforce client
2.) Click “Connection” on the global menu
3.) Select “Edit Current Workspace…”
4.) Under the “Advanced” tab select “allwrite”
5.) Click Apply, then OK