问题
I have a troubleshoot problem. My eclipse don't want open class in the package editor.
Error, what i'm having -

However, file opened with Open with->Text Editor. That's looks like a charm kinda. help please.
回答1:
I encountered this problem in my filename.xhtml
using Eclipse Mars.
I got it fixed by:
1. Right click on the offending file.
2. Choosing Open With -> Default Editor.
After this, everything went back to the way it was.
回答2:
Probably your File Association settings are messed up.
- Open Window -> Preferences -> General -> Editors -> File Associations.
- Check if the file type (*.java) is in the list.
- If it's in the list, make sure the correct editor is selected as default.
- If it's not in the list, add it and assicate it with the correct editor.
回答3:
Try:
- right click--> copy class
- go to desktop and paste
- back to eclipse right click delete the class
- copy and paste from desktop
Thats works for me.
回答4:
Had the same issue with .HTML files.
Despite my File Associations were correctly set, the following is a workaround that solved the problem:
- Right Click on the file of your project -> Open with
- Check other Internal Editor -> select the Editor of your choice (my case = HTML Editor)
- At the bottom, check "Use this editor for all ... files" + "Use it for all.."
回答5:
I had the same error and I fixed it by changing the workspace folder in Aptana: "General -> Startup and Shutdown -> Workspaces". I removed existing and added following one: "C:\Aptana_Studio\workplace" (instead of a workspace folder in my user profile).
JFYI: I found this error occurred after I've installed Eclipse for Java.
回答6:
I had the same error when I start my eclipse.
I fixed it by delete the .project file, and re-add the project to my workspace.
来源:https://stackoverflow.com/questions/18464912/eclipse-cannot-create-in-place-editor