简体   繁体   English

为什么 Eclipse Java Package Explorer 在某些类上显示问号?

[英]Why does Eclipse Java Package Explorer show question mark on some classes?

In the Eclipse Helios Java Package Explorer, I see the Java class icons display a small question mark to the right of the 'J', something like [J?].在 Eclipse Helios Java Package Explorer 中,我看到 Java 类图标在“J”的右侧显示一个小问号,类似于 [J?]。 This icon is shown on each class within one package in my project, but I cannot find an explanation for this in the documentation.这个图标显示在我项目中一个包内的每个类上,但我在文档中找不到对此的解释。

在此处输入图片说明

At some point I expect them to disappear and be replaced with small orange rectangles.在某些时候,我希望它们会消失并被小的橙色矩形取代。 (Of which I'm also not certain of their meaning, but less worried of their connotation.) I suppose this question points to a larger one, are any of these icons defined together somewhere? (其中我也不确定它们的含义,但不太担心它们的含义。)我想这个问题指向一个更大的问题,这些图标中的任何一个是否在某处一起定义?

It means the class is not yet added to the repository.这意味着该类尚未添加到存储库中。

If your project was checked-out (most probably a CVS project) and you added a new class file, it will have the ?如果您的项目已被检出(很可能是 CVS 项目)并且您添加了一个新的类文件,它将具有? icon.图标。

For other CVS Label Decorations, check http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm对于其他 CVS 标签装饰,请查看http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm

With some version-control plug-ins, it means that the local file has not yet been shared with the version-control repository.对于某些版本控制插件,这意味着本地文件尚未与版本控制存储库共享 (In my install, this includes plug-ins for CVS and git, but not Perforce.) (在我的安装中,这包括 CVS 和 git 的插件,但不包括 Perforce。)

You can sometimes see a list of these decorations in the plug-in's preferences under Team/X/Label Decorations , where X describes the version-control system.您有时可以在Team/X/Label Decorations下的插件首选项中看到这些装饰的列表,其中 X 描述版本控制系统。

For example, for CVS, the list looks like this:例如,对于 CVS,列表如下所示:

在此处输入图片说明

These adornments are added to the object icons provided by Eclipse.这些装饰被添加到 Eclipse 提供的对象图标中。 For example, here's a table of icons for the Java development environment .例如,这里有一个Java 开发环境的图标表

It sounds like you're using Subclipse;听起来您正在使用 Subclipse; is that correct?那是对的吗? If so, there's a great list of decorators and their descriptions at this answer by Tim Stone.如果是这样,那么在 Tim Stone 的这个答案中有很多装饰者及其描述。

Here's the relevant snippet for your case:这是您案例的相关片段:

未版本化文件 - A file not under version control. - 不受版本控制的文件。 These are typically new files that you have not committed to the repository yet.这些通常是您尚未提交到存储库的新文件。
同步文件 - A file with no local changes. - 没有本地更改的文件。

those icons are a way of Egit to show you status of the current file/folder in git.这些图标是 Egit 的一种方式,用于显示 git 中当前文件/文件夹的状态。 You might want to check this out:你可能想看看这个:

描述 Egit 的 Eclipse 图标的图像

  • dirty (folder) - At least one file below the folder is dirty;(文件夹)——文件夹下至少有一个文件是脏的; that means that it has changes in the working tree that are neither in the index nor in the repository.这意味着它在工作树中发生了既不在索引中也不在存储库中的更改。
  • tracked - The resource is known to the Git repository.已跟踪- Git 存储库已知资源。 untracked - The resource is not known to the Git repository.未跟踪 - Git 存储库不知道该资源。
  • ignored - The resource is ignored by the Git team provider.忽略- 资源被 Git 团队提供者忽略。 Here only the preference settings under Team -> Ignored Resources and the "derived" flag are relevant.这里只有 Team -> Ignored Resources 下的首选项设置和“派生”标志是相关的。 The .gitignore file is not taken into account.不考虑 .gitignore 文件。
  • dirty - The resource has changes in the working tree that are neither in the index nor in the repository.- 资源在工作树中发生了变化,既不在索引中也不在存储库中。
  • staged - The resource has changes which are added to the index.已暂存- 资源已添加到索引中的更改。 Not that adding to the index is possible at the moment only on the commit dialog on the context menu of a resource.目前仅在资源上下文菜单上的提交对话框中添加到索引是不可能的。
  • partially-staged - The resource has changes which are added to the index and additionally changes in the working tree that are neither in the index nor in the repository.部分暂存- 资源具有添加到索引中的更改以及工作树中既不在索引中也不在存储库中的其他更改。
  • added - The resource is not yet tracked by but added to the Git repository.添加- 资源尚未被 跟踪,但已添加到 Git 存储库。
  • removed - The resource is staged for removal from the Git repository.已删除- 资源已暂存以从 Git 存储库中删除。
  • conflict - A merge conflict exists for the file.冲突- 文件存在合并冲突。
  • assume-valid - The resource has the "assume unchanged" flag.假设有效- 资源具有“假设未更改”标志。 This means that Git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell Git when you change the working tree file.这意味着 Git 停止检查工作树文件是否有可能的修改,因此您需要手动取消设置该位以在您更改工作树文件时通知 Git。 This setting can be switched on with the menu action Team->Assume unchanged (or on the command line with git update-index--assume-unchanged).此设置可以通过菜单操作 Team->Assume 保持不变(或在命令行上使用 git update-index--assume-unchanged 开启)。

In a enabled project the small question mark (?) indicates that your file is not yet added to the SVN repository.在启用项目中,小问号 (?) 表示您的文件尚未添加到 SVN 存储库中。

The small orange rectangle is an indication that your file is committed in the repository.橙色小矩形表示您的文件已在存储库中提交。

An asterisk (*) indicates a local change.星号 (*) 表示本地更改。

this is because your project has been linked to a git-hub repository, and the file having question mark on it, is not been added yet.这是因为您的项目已链接到 git-hub 存储库,并且尚未添加带有问号的文件。 if you want to remove this sign you will have to add this file to git-hub repository.如果要删除此标志,则必须将此文件添加到 git-hub 存储库。

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

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