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

JavaEclipseHelios

Java Problem Overview


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?]. This icon is shown on each class within one package in my project, but I cannot find an explanation for this in the documentation.

enter image description here

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?

Java Solutions


Solution 1 - Java

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 ? 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

Solution 2 - Java

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.)

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.

For example, for CVS, the list looks like this:

enter image description here

These adornments are added to the object icons provided by Eclipse. For example, here's a table of icons for the Java development environment.

Solution 3 - Java

It sounds like you're using Subclipse; is that correct? If so, there's a great list of decorators and their descriptions at this answer by Tim Stone.

Here's the relevant snippet for your case:
> Unversioned File - A file not under version control. These are typically new files that you have not committed to the repository yet.
Synchronized File - A file with no local changes.

Solution 4 - Java

In a [tag:SVN] enabled project the small question mark (?) indicates that your file is not yet added to the SVN repository.

The small orange rectangle is an indication that your file is committed in the repository.

An asterisk (*) indicates a local change.

Solution 5 - Java

those icons are a way of Egit to show you status of the current file/folder in git. You might want to check this out:

image describing Eclipse icons for Egit

  • 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. untracked - The resource is not known to the Git repository.

  • ignored - The resource is ignored by the Git team provider. Here only the preference settings under Team -> Ignored Resources and the "derived" flag are relevant. The .gitignore file is not taken into account.

  • 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.

  • removed - The resource is staged for removal from the Git repository.

  • 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. This setting can be switched on with the menu action Team->Assume unchanged (or on the command line with git update-index--assume-unchanged).

Solution 6 - Java

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. if you want to remove this sign you will have to add this file to git-hub repository.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondfdumaresqView Question on Stackoverflow
Solution 1 - JavaAleks FelipeView Answer on Stackoverflow
Solution 2 - JavaAndy ThomasView Answer on Stackoverflow
Solution 3 - JavaPopsView Answer on Stackoverflow
Solution 4 - JavaLachezar BalevView Answer on Stackoverflow
Solution 5 - JavaCommonSenseCodeView Answer on Stackoverflow
Solution 6 - JavaMuhammad Aamir KhanView Answer on Stackoverflow