Java Eclipse 无法创建就地编辑器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18464912/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Cannot create in-place editor
提问by
I have a troubleshoot problem. My eclipse don't want open class in the package editor.
我有一个故障排除问题。我的 eclipse 不想在包编辑器中打开类。
Error, what i'm having -
错误,我有什么 -
However, file opened with Open with->Text Editor. That's looks like a charm kinda. help please.
但是,文件使用打开方式-> 文本编辑器打开。这看起来有点像魅力。请帮忙。
回答by Christian Strempfer
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.
- 打开窗口 -> 首选项 -> 常规 -> 编辑器 -> 文件关联。
- 检查文件类型(*.java)是否在列表中。
- 如果它在列表中,请确保默认选择了正确的编辑器。
- 如果它不在列表中,请添加它并将其与正确的编辑器关联。
回答by ioan
Try:
尝试:
- right click--> copy class
- go to desktop and paste
- back to eclipse right click delete the class
- copy and paste from desktop
- 右键单击--> 复制类
- 转到桌面并粘贴
- 回到eclipse右键删除类
- 从桌面复制和粘贴
Thats works for me.
那对我有用。
回答by Maksym Ovsianikov
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).
我遇到了同样的错误,我通过更改 Aptana 中的工作区文件夹来修复它:“常规 -> 启动和关闭 -> 工作区”。我删除了现有的并添加了以下一个:“C:\Aptana_Studio\workplace”(而不是我的用户配置文件中的工作区文件夹)。
JFYI: I found this error occurred after I've installed Eclipse for Java.
JFYI:我发现这个错误发生在我安装了 Java 的 Eclipse 之后。
回答by hico
Had the same issue with .HTML files.
.HTML 文件也有同样的问题。
Despite my File Associations were correctly set, the following is a workaroundthat 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.."
- 右键单击您的项目文件 -> 打开方式
- 检查其他内部编辑器 -> 选择您选择的编辑器(我的案例 = HTML 编辑器)
- 在底部,选中“将此编辑器用于所有...文件”+“对所有文件使用它...”
回答by jpllosa
I encountered this problem in my filename.xhtml
using Eclipse Mars.
我在filename.xhtml
使用Eclipse Mars 时遇到了这个问题。
I got it fixed by:
我通过以下方式修复了它:
1.Right click on the offending file.
1.右键单击有问题的文件。
2.Choosing Open With -> Default Editor.
2.选择打开方式 -> 默认编辑器。
After this, everything went back to the way it was.
在这之后,一切又回到了原来的样子。
回答by Corning Sun
I had the same error when I start my eclipse.
I fixed it by delete the .projectfile, and re-add the project to my workspace.
当我开始我的日食时,我遇到了同样的错误。
我通过删除.project文件来修复它,并将项目重新添加到我的工作区。