While I was debugging a program in Java, I noticed that the same file was opened in two different tabs, one with the letter J near the icon inside the tab. (I know it is the same file since it came from the same path)
What is the difference between the two tabs? The contents are exactly the same.
(I’m new to Eclipse, sorry if my question is stupid :))
I tried to search in the web but I didn’t find an answer. Here is an image that shows the tabs:
Morover, when I edit one tab, a star appears next to the other tab indicating that it needs to be saved too. And when I save the changes, the two tabs changes.
If you right click on a
.javasource file in project explorer and sayOpen With > WindowBuilder Editor, you will get what you see on the left tab.If you open it with Java editor instead, you will get what you see on the right tab.
I should have known this sooner since I am working with WindowBuilder right now. The only difference between the editors is that the WindowBuilder version has tabs at the bottom allowing you to switch to “design” view.
I’m not sure why both tabs get opened. I’m guessing you were working in the WBPro tab, and when debugging, it opens a standard editor tab by default.
It makes sense that the “modified” symbol
*will appear on both tabs when changes are made in one tab, since it is after all the same source file, just visible in two editors simultaneously.