Eclipse:是否可以打开工作区中但不在项目中的文件?(Eclipse: Is it Possible to Open Files that are in a Workspace But Not i

编程入门 行业动态 更新时间:2024-10-28 05:15:01
Eclipse:是否可以打开工作区中但不在项目中的文件?(Eclipse: Is it Possible to Open Files that are in a Workspace But Not in a Project?)

我有一个文件夹层次结构,如下所示:

- workspace - some_folder + eclipse_project

是否可以在Eclipse的项目资源管理器中打开并查看层次结构,从“some_folder”开始,而不是“eclipse_project”。 如果是这样,这是如何实现的? 当我尝试导入时,Eclipse显然拒绝,因为外部文件夹中的文件已经在工作区中。

或者这与Eclipse和项目背后的原理相矛盾?

谢谢。

I have a folder hierarchy that looks like this:

- workspace - some_folder + eclipse_project

Is it possible to open and view the hierarchy in the project explorer of Eclipse beginning at "some_folder," instead of at "eclipse_project?" If so, how is this accomplished? When I try importing, Eclipse obviously refuses to because the files in the outer folder are already in the workspace.

Or does this contradict the principle behind Eclipse and projects?

Thanks.

最满意答案

或者这与Eclipse和项目背后的原理相矛盾?

是的,它确实。 “ 文件”菜单提供了允许您打开文件... ,但它是否受编辑器支持以及保留了多少功能完全取决于该编辑器。 有些人会失败。

作为一种变通方法,您可以创建一个新的 常规 - > 文件 ,展开向导的“ 高级”部分,并将新的工作空间文件设置为链接到真实文件的物理磁盘位置, 只要该位置不在在工作区的位置下的某种方式 。 请注意,即使是非常老的编辑也可能并不总是支持这一点。

在此处输入图像描述

Or does this contradict the principle behind Eclipse and projects?

Yes, it does. The File menu does offer to let you Open File..., but whether it's supported by an editor and how much functionality is retained is entirely up to that editor. Some will flat-out fail.

As a workaround, you can create a New General->File, expand the Advanced section of the wizard, and set the new in-workspace file to link to the real file's physical on-disk location, as long as that location is not in some way under the workspace's location. Note that even this may not always be supported by extremely old editors.

enter image description here

更多推荐

本文发布于:2023-08-04 13:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1415896.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区中   文件   项目   工作   Eclipse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!