Reputation: 1481
Whenever I'm just typing some code in Eclipse, and I click on the Error lightbulb on the gray ribbon area, my code just runs away from me, and I have to close the file and re-open it to see my code again. Can someone help me figure out how to STOP this? Thanks
Upvotes: 4
Views: 2402
Reputation: 36
Under any condition you could just click on the java file under the name of class you created it appers like that Src Default package "Name" .java
Upvotes: 0
Reputation: 1481
I may have fixed this issue.
Going to the Eclipse settings, and to
Java > Editor
Uncheck the box "Only show the selected Java element."
This seems to fix the problem.
Upvotes: 3
Reputation: 3459
Please follow these steps (I am running eclipse on MAC) to fix XML problems. You later commented it was a java file but actually java files are okay with me.
Upvotes: 1
Reputation: 8477
You could be accidentally invoking code folding.
Does your editor show you something like this?
The red arrow (added for emphasis) points to a minus sign in a circle. When you hover over the area underneath the minus sign, a vertical bar is drawn from the minus sign to the bottom of the code block, of which the minus sign is next to the top line.
If you (perhaps accidentally) single-click on the minus sign or double-click on the vertical bar, then the whole block of code collapses and only the first line is shown. The minus sign changes to a plus sign. Clicking on the plus sign expands your code again.
Upvotes: 0