Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is IntelliJ marking my file red despite no errors?

enter image description here

I'm integrated with VCS Perforce, and I confirmed that this is a file in my active changelist. I'm on IJ 12.1.4

like image 586
Siddhartha Avatar asked Sep 19 '13 18:09

Siddhartha


People also ask

Why is my file name Red in IntelliJ?

If you are referring to the file name being in red, that indicates there was a Version Control System (VCS) merge conflict (or the file was changed as part of two different change lists and has not yet been acknowledged). More info is available in the Help on the page: IntelliJ IDEA | Reference | Version Control Reference | File Status Highlights

How are files marked in IntelliJ IDEA?

In IntelliJ IDEA, each file is marked with a color according to its state in the version control you are using. In the editor, each line in a file is checked for its version control state and is marked with a color in the gutter.

How to change the color of a file in IntelliJ IDEA?

In IntelliJ IDEA, each file is marked with a color according to its state in the version control you are using. In the editor, each line in a file is checked for its version control state and is marked with a color in the left gutter area. You can customize the default colors in the Settings/Preferences dialog (Ctrl+Alt+S)

Why are some Java classes marked in red in project view?

I have some Java classes which are marked in red in project view, but IntelliJ IDEA shows no errors and it can run properly. What can be the problem? It means that the files exist locally, but are not in the repository, and are not scheduled for addition. With other words, the files are not under version control.


1 Answers

I found it! It's marked like that because I had done a p4 sync and the file had been changed since I had in my changelist, and so it needed a resolve..

IntelliJ should say what the problem is when hovering upon the file name.

like image 53
Siddhartha Avatar answered Sep 18 '22 00:09

Siddhartha