How to see a list of new non-version controlled files in IntelliJ - intellij-idea

So I add new files to my project. At this point IntelliJ pops up a dialog asking me if I'd like to add these files to git/mercurial/svn etc.
I will always say No at this point because until I've fleshed the files out a little, perhaps got them to work with some context, perhaps decided to rename them, I'm not happy to add these new files to version control. Even if I can still rollback the 'add', I have to bare in mind the nuts and bolts of the underlying system. It's safer simply not to do it.
Now I'm ready to commit, I bring up the commit dialog box and the new files are nowhere to be found! If I go on a scouting expedition for them, I can add them individually from project files but this is error-prone.
How do I automatically get a list of all my new files which I previously delayed adding?

I found it, under the changes tab. I was looking for it only under the version control context menu from project files.

Related

How to get rid of 'People who change these files...' changelist in IntelliJ Ultimate

I'm on IntelliJ 2019.2.4 (Ultimate) I'm not sure of the version I upgraded from, but it was from 2018 for sure. I noticed this annoying changelist below my default changelist in a very click-baity way, and I can't find a setting to get rid of it. Trying to delete it prompts me to delete the actual file in that changelist, which I don't want to do. It's nothing I've set up, and seems to be something IntelliJ is doing automatically.
(For posterity/if the image dies, my screenshot shows my changelist with some files I changed in default, and then a second, unwanted changelist below that says 'People who change the files in the active changelist also change:
The node you see is not actually a changelist, and there are no changed files inside it. It lists files that, based on your project git history, are usually changed in the same commits as the files in the active changelist, and appear related to the changes you applied.
The purpose of this node is to suggest some files you might want to change and commit in addition to already modified files, so there is no need to amend or create a new commit with these changes later if the files do need to be modified as well.
If you don't want to see it, just disable the Show files related to the active changelist option under the Eye in the Local Changes toolbar. Disabling the ChangeReminder plugin would also work, but is unnecessary.

How to remove non-project files from refactorings in Idea?

For some reason when I try to do a rename refactor, idea picks up code that is not even remotely close to my project. Furthermore, this code is read-only and I can't edit it! And Non-Project Access dialog is almost mockingly "ultimate" in its options: I can only choose whether I want to edit the non-project files this time or I want to do this ALWAYS. No option to skip these files altogether.
I tried to add these folders as a content root and exclude them - it didn't help. And I can't remove them, since they actually don't show up as files in the refactor preview (they are not referenced anywhere in the project view either), only {m} functions/method do with no option to remove them.
So the refactor rightfully fails because it can't edit RO files. So how would I solve this?

IntelliJ - not asking if I want to save a file

I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation

Save Aptana Studio 3 project explorer state on close

I'm sure there is a simple option for this but I have as yet been unable to find it. Every time I close and reopen Aptana Studio 3 it collapses all the folders in the project explorer and I have to reopen them all, is there a way to get it to leave them open and save the project explorer's state when I close the program?
Thanks.
I cannot find any way to keep the state of the Project Explorer. However, using the App Explorer, the state of your open folder will be preserved. You can also try the "Navigator" which looks just like the Project Explorer, but appears to keep state. I will add the proviso to that: It kept state when I restarted aptana, but it also developed a GUI glitch where it appears to be scrolled to the right so I only see the right half of all of my file names and I cannot fix it, so this may not be a good option if you get the same glitch.
There is also a method which does not do quite what you ask, but may be a good fix for you anyway. If you click "Link with Editor" picture (two yellow arrows) in the Project Editor, it will automatically expand your project hierarchy to match whichever open file you have active. Since your files stay open when you close Aptana, this would keep the Project Explorer expanded to whatever you are looking at even on restart. See this question
You can also set up working sets for various parts of your code that are buried in the hierarchy and use the Project Explorer to show those working sets instead of you projects. This does not save state, but it does give you easy access to common parts of your code that may be deeply buried.
Hope one of these helps you.

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