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

6

118

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?

Cran answered 29/11, 2010 at 19:4 Comment(0)
S
148

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

Sava answered 29/11, 2010 at 19:17 Comment(1)
Aw, yes! Thanks, this answered my question. I've committed the package and class to CVS and the question marks are gone.Cran
I
30

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.

Inaudible answered 29/11, 2010 at 19:19 Comment(2)
This indeed provides me with a list of all the icons. Thank you!Cran
Couldn't find this by doing search in eclipse help. The help pages on Label decorations just give general info and link to the Preferences page for enabling/disabling specific ones, without showing what they look like visually.Aftergrowth
C
24

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.

Consuelaconsuelo answered 29/11, 2010 at 19:46 Comment(1)
I'm using the CVS repository explorer (not sure if that uses Subclipse), but yes, this is a great list. Thanks!Cran
T
8

In a 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.

Tensiometer answered 29/11, 2010 at 19:18 Comment(0)
S
7

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).
Suttles answered 7/4, 2015 at 21:15 Comment(0)
G
2

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.

Glantz answered 19/1, 2016 at 9:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.