Words in Eclipse editor is gone - java

So i don't know how this happened but this is what it's looks like right now. That long vertical line is blinking, so i think it's supposed to be the caret?
Only one line shown up :(
Until now, i haven't installed any plugins and stuff for Eclipse. Maybe it's something to do with shortcuts? Help me please?
p.s. All the text is still there, tested it by copy and paste it to notepad. Run perfectly with no errors and this only occur in this single workspace.

I would recommend you open the Windows menu and select Reset Perspective, barring any view settings you really don't want to have to reconfigure.

Related

How to enable quick fix in eclipse

How to enable quick fix while hover over error in eclipse?
Currently it looks like this, so I can't import by using this popup
So, I want it to be like this:
I already restarted few times my eclipse, also I followed instructions how to check: Windows > Preferences > Java > Editor > Content Assist > Advanced
But nothing helped...
So, the point is how to enable quick fix just by hovering over the error, I don-t want't to use Ctrl+1 or Edit > Quick Fix every time.
I am a beginner so I don't know whether it might help or not
I had the similar problem
I wanted to see the quick fix available when the cursor is on the error(red line)
(underlined blue words so that I can click and quickly fix or change what is necessary)
The problem was the something I installed from eclipse marketplace("dark theme devStyle")
I didn't know how to change the background color and I thought I needed that dark theme devStyle to change color. So I simply unintalled it and the problem solved. Also I deleted the metadata folder in the workspace to make a default setting.
I had a similar issue after installing Dark theme devstyle from eclipse market place.
The solution for me was to power off my PC and turn it back on again and It worked.

Eclipse file doesn't appear in commit

I have a large Eclipse project with a git repository and with multiple files, and today a class stopped behaving properly: when edited the > sign doesn't appear in front of the file's name, and the file's icon has this blue tick I never saw before. I also tried deleting the file and recreating it (and then pasting all the code it had), but to no avail.
Here's what the file looks like:
Did I accidentally press a hotkey that did this? I also recently started using Eclipse's task system, so maybe it is linked?
Thanks for any help
Looks like you somehow marked it as assume-valid. Check the documentation and try this fix to mark it as No Assume unchanged:
This setting can be switched on with the menu action Team > Assume unchanged and switched back with the menu action Team > No Assume unchanged.

Eclipse code not indent properly in git

I write code in eclipse and indent it properly there. It also looks fine in Eclipse. But when I push that code in github(I am using bitbucket) and then go to git. I see that in github(I am using bitbucket) the indentation is totally messed up.
Any solution for this.
You probably have a mixture of tabs and spaces and the tab stop settings (number of spaces that equals one tab) in git (did you mean GitHub) are different than what you have set in Eclipse.
You can use http://git-scm.com/docs/gitattributes to tweak these settings.
.java text diff=java trailing-space space-before-tab -indent-with-non-tab

Can't view source in eclipse debug perspective

I was moving around the arrangement of windows in the debug perspective. Afterwards, no matter which .java files I had open in the Java perspective, only the source file with the main method would be open in the debug perspective and I couldn't figure out how to see the other source files.
Then, I accidently closed the main source file and now I don't see any source code in my debug perspective.
If I go to Window -> New Editor, or if I double click on Main.java from the navigator, nothing happens.
I reset the perspective to default and in the editor, it says "No editor descriptor for id org.eclipse.ui.internal.emptyEditorTab"
try this based on this link,
Closing eclipse and removing .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
from your workspace, if you aware of another error, cut and paste to another location..
YOU CAN POST YOUR BUG TO THAT LINK
IF YOU FEEL THAT THAT BUG DOES NOT REPRESENT YOUR PROBLEM.. ^^
FEEL FREE TO DO IT, THEY WILL HEAR YOU..
if you still want to worked with eclipse, re-install again, import your code. It worked against me. happy coding.. ^^
I cut the file workbench.xmi --> C:\User\workspace.metadata.plugins\workbench.xmi
Now the eclipse is running without the Error!
Delete workbench.xmi, it worked for me.

Eclipse errors in comment

Using Eclipse I comment out errors as temporary solution.
Every once and a while these errors remain sticky (no way to get the errors away even when code is removed by commenting (comment color confirms the comment)
Save/clean/rebuild/restart of eclipse ... nothing helps any more but a painstaking recreation of the project file by file .... can anyone give me a tip ?
The error text is often removed module can not be resolved, variable can not be resolved
this as only error where the use of the variable is completely removed!
I've the most recent eclipse version but had it with previous versions as well
Thanks in advance, This can save me day's of useless work.
Please try this:
What I usually do is I cut the entire document/file and paste it.
I am using Helios Service Release 1
Ctrl+A, Ctrl+C and then Ctrl+V.
It fixes the problem for me. I hope it does the same for you.
Cheers.
Just go to the problems list where the error/problem is listed and delete the entry, then it should also disappear from the editor.
- Go to the Problems Tab at the bottom of the IDE.
- Remove all the Error and Warning Entries.
- At last Clean the Project.
Try clicking right mouse button and select the option "spelling check". I´ve realised I have this errors when I write comments in my native lenguage, not in english.
I had similar error. The problem in my case was disabled autobuild in Eclipse. (Project > Build Automatically)
click on the comment being where error is shown. Click on "Disable spell check"

Categories