简体   繁体   English

Eclipse无法创建就地编辑器

[英]Eclipse Cannot create in-place editor

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. 但是,使用Open with-> Text Editor打开文件。 That's looks like a charm kinda. 这看起来像是一种魅力。 help please. 请帮忙。

I encountered this problem in my filename.xhtml using Eclipse Mars . 我在使用Eclipse Mars的 filename.xhtml遇到了这个问题。

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. 在此之后,一切都恢复了原样。

Probably your File Association settings are messed up. 可能你的文件关联设置搞砸了。

  1. Open Window -> Preferences -> General -> Editors -> File Associations. 打开窗口 - >首选项 - >常规 - >编辑器 - >文件关联。
  2. Check if the file type (*.java) is in the list. 检查文件类型(* .java)是否在列表中。
    1. If it's in the list, make sure the correct editor is selected as default. 如果它在列表中,请确保选择正确的编辑器作为默认编辑器。
    2. If it's not in the list, add it and assicate it with the correct editor. 如果它不在列表中,请添加它并使用正确的编辑器进行处理。

Try: 尝试:

  1. right click--> copy class 右键单击 - >复制类
  2. go to desktop and paste 转到桌面并粘贴
  3. back to eclipse right click delete the class 回到eclipse右键单击删除该类
  4. copy and paste from desktop 从桌面复制和粘贴

Thats works for me. 这对我有用。

Had the same issue with .HTML files. 与.HTML文件有同样的问题。

Despite my File Associations were correctly set, the following is a workaround that solved the problem: 尽管我的文件关联被正确设定,下面是解决该问题的解决方法

  1. Right Click on the file of your project -> Open with 右键单击项目文件 - >打开方式
  2. Check other Internal Editor -> select the Editor of your choice (my case = HTML Editor) 检查其他内部编辑器 - >选择您选择的编辑器(我的情况= HTML编辑器)
  3. At the bottom, check " Use this editor for all ... files " + " Use it for all.. " 在底部,选中“ 将此编辑器用于所有...文件 ”+“ 将其用于所有...

I had the same error and I fixed it by changing the workspace folder in Aptana: "General -> Startup and Shutdown -> Workspaces". 我有同样的错误,我通过更改Aptana中的工作区文件夹来修复它:“常规 - >启动和关闭 - >工作区”。 I removed existing and added following one: "C:\\Aptana_Studio\\workplace" (instead of a workspace folder in my user profile). 我删除了现有的并添加了以下一个:“C:\\ Aptana_Studio \\ workplace”(而不是我的用户配置文件中的工作区文件夹)。

JFYI: I found this error occurred after I've installed Eclipse for Java. JFYI:我发现在安装Eclipse for Java之后发生了这个错误。

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. 我通过删除.project文件来修复它,并将项目重新添加到我的工作区。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM