Error symbol not shown in Navigator view - java

I use Eclipse for java development:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 1
Build id: 20110916-0149
Currently the Navigator view does not show the small error symbol (white x on red background) if there is a syntax error within the file.
I tested this with a small java project with a single java class. An intentionally created syntax error lead to an entry in Problems view and an error symbol is shown in code view, in file tab and in Package Explorer, but not in Navigator view (neither file level nor folder level).
"Build automatically" is activated.
Any ideas how to display the error decorator also in Navigator view? Is it a bug maybe? Thanks!

Imo, that's a bug. It, actually, appeared with SR1. If you reinstall the vanilla Eclipse Indigo - the error decorator would come back. It would be great, if they'd fix it, as currently it's quite annoying...
EDIT: Oook, so, oficially, it's not a bug. The intended behaviour of the Navigator view is to not display any markers related to Java code validity. The previous (long standing) state of affairs was a bug, and was fixed by this bugfix: https://bugs.eclipse.org/bugs/show_bug.cgi?id=291498
Unfortunately (imo) this, apparently won't change as this bug report ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=364660 ) was closed with RESOLVED WONTFIX.
The official suggestion is to use either Package or Project Explorer views. From my attempts to live with Project Explorer it's still not as convinient as the Navigator was, although it can be tuned to be rather close to Navigator.
I've also tried to feed Eclipse 3.7.1 with the Navigator bundles from the previous 3.7.0 release. While I'm not 100% sure it's a good solution it worked for me.

I think this is the normal behavior. I don't think it can be modified.

I am still working with Eclipse Helios and observed the phenomenon (=no error indications) in package explorer (sic!) after removing all entries in the "problems & warnings view".
After removing the tab displaying the list of errors across all sources, the indicators reappeared again.
For me that's clearly a bug, though only a quite minor one...

Related

Sudden weird errors on a project

Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.It's weird because it shows that it has errors only in the window bar, and not in the Navigator. I don't have any Java errors, this is a valid project that was fine all the time:
Some of the errors on the error log of Eclipse:
JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure
Cannot connect to VM
File <SomeFile> has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Internal error
When I run an application from this project, I get a warning message but when I proceed, it works fine, but still. It's very disturbing and I'm not sure if it's harmless.
I tried to:
Restart Eclipse
Restart my machine
Clean projects and recompiling them.
Refresh projects
Pray
Nothing helped. What could be the problem? (I'm using Indigo Service Release 2)
The following nuclear option has desperation written all over it. But I have been where the OP has been with the Juno version of Eclipse.
Run a "Synchronize with Repository" and save all of your local updates to a different directory.
Delete the project. (Check the box to delete the contents on disk. Scary step, but that's OK, because you saved it in a different directory in the previous step, right?)
Read in a fresh project from the repository. It builds happily at this point.
Integrate your local updates.
Keep on praying.
Looks that one unused JAR was deleted, but for some reason, I didn't get errors in any file, even in the files that imports this JAR! So what I did was restoring this JAR, delete unused imports and deleted the JAR again.
I've found this error after two days of navigating on this project on each file.. This is weird that Eclipse didn't recognize that1 this is an error, and throw many unrelated errors such as:
Cannot connect to VM
File has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Is this a bug in Eclipse? (All errors and warnings are enabled!)
1 As seen in the image in the question..
A class from the list of imports for the file seems to have moved out or the jar file containing the class is missing.
Expand the imports section and check if you find some classes that are missing but have been imported.
Though it is a pain, sometimes the easiest solution is to back up all your projects (either in a repository or somewhere else on your computer) then uninstall and reinstall eclipse. No it's not fun, but it should reset eclipse so everything works again. The downfall though is that you have to reconfigure eclipse to any special settings you had/reinatall any extra functionality currently installed (eg. android add-on) and reconnect to any repositories you have. While punting isn't fun, it can be effective... I hope you don't have to resort to this though.
I have went through that problem a lot of times, and tried everything you tried. Rebuild, recompile, refresh, remove and add JDK, remove and reinstall Eclipse... nothing worked
The only thing I concluded is that the workspace metadata was corrupted.
What I did (every time it happened) was
Create an empty workspace
Import -> existing projects into worskpace
Mark the "copy projects" (else it will only link them)
Wait for the copy, and start working with the new workspace
If you work with SCM systems (Git, SVN, etc), making a full checkout will do the trick too, but the worskpace import will let you retrieve those changes you didn't get to commit (if any).
It's a little painful if you have somethings already set (like JDK names, servers, etc), but then I realized it was faster than keep searching how to fix the workspace
Regards!
PS : I've been working with Kepler lately, and everything works fine till now
Click Window -> Show View -> Other -> General -> Problems
This view will show you what is wrong.
Did you, by any chance, update your virtual machine outside of Eclipse? I can't help but feel that we're both missing a finer detail here. I just keep seeing "cannot connect to VM" and thinking that it's a major clue.
Have you tried running anything from the terminal? Does it work there?
If so, do you know where your current edition of Java is located? Is Eclipse looking somewhere else?
Is this exclusive to one project? Do you use any additional libraries to the JDK?
Maybe try this for Resource is out of sync with the file system error:
Right click project in Eclipse Package Explorer
Close Project.
Right click project in Eclipse Package Explorer
Open Project.
Other things not mentioned:
project properties > java build path, see if any of those tabs got changed, local file got moved? read/write permissions on some file you are linking to?
project properties > java compiler, see if workplace settings have changed? maybe under errors/warnings, you can systematically set them to 'ignore' until the error goes away to determine what type of error it is?
maybe update some of the eclipse plugins?
I saw something like this happening for a number of reasons. Mainly because of validation in files other Java source code. See if you are validating XML for instance.
Right click your project and chose Properties (Alt+Enter) and Validation to see the related configuration.
As for the danger, I lived with those marks for ages and nothing wrong ever happened.

Eclipse missing action Set

I have a problem while opening Eclipse. In the error log it says:
unable to find action set org.eclipse.wb.core.ui.actionset
org.eclipse.rse.core.search.searchActionSet
org.eclipse.rse.core.search.searchActionSet
org.eclipse.mylyn.doc.actionSet
org.eclipse.mylyn.context.ui.actionSet
I'm using Eclipse juno(version 4.2) and my ADT is version20 and Java 1.6
Do you have any idea what I am supposed to do?
In general this is a leftover from something you have uninstalled. To get rid of the error, close Eclipse, find the workbench.xml (XML) and workbench.xmi (XMI) files in either the
.metadata\.plugins\org.eclipse.ui.workbench\
or
.metadata\.plugins\org.eclipse.e4.workbench\
directories within your workspace and remove ALL corresponding lines (search for the package name you see in the message).
I think that this can happen when features are removed from Eclipse and a workspace is not properly updated. Create a new workspace, import all your projects, and delete the old workspace.
I went to the run configurations for the RCP app I had (created using EMF) and I checked the radio box under the Run--> configurations... dialog to "Clear workspace" before running. This fixed the issue about the missing ActionSets. I tried to find the references to the missing ActionSets per the above method and that did not fix the bug (there were no references to the missing ActionSets in the workbench.xml or workbench.xmi files. I am using Kepler SR2 on Mac OS X 10.9.2.
I had this problem due to a particular view (although I'm not sure what caused it in the first place). I simply closed the view and restarted Eclipse - problem solved!

Source code navigation and JavaDoc bug in Eclipse Indigo

I have a problem with Eclipse Indigo regarding library source code. When I open a library class (e.g. from the JDK, but also from some other included libraries, such as Guava), either using the Open Type dialogue or simply through Ctrl+ click on the class name or some of its methods, once in a while (not always) something breaks.
Don't get me wrong, the source is always displayed without any problem (either JDK source shipped with the JDK itself or Guava source downloaded by Maven). What actually stops to work:
When I open the Quick Outline popup in that given class using Ctrl + O, the list of methods and fields displays normally, but when I click on any of them, Eclipse doesn't move the view on it as it should. Also Ctrl + clicking any of the methods or fields of that class in my code doesn't bring me directly to it, but simply at the top of the source file.
When I hover over that said class or its methods, no JavaDoc appears in the popup as you can see in the attached image. I am in the HashSet class, the source is clearly there, but it isn't displayed in the popup.
I found out that this can be fixed by opening the Outline View and briefly clicking through the class's methods and fields. After a few clicks, Eclipse catches on and starts to work correctly, but only for this one class, not for all which are broken in this way at the moment.
Has anybody met this kind of bug? Is it tracked at Eclipse Bugzilla? Thanks in advance for any advice.
For completeness, this is my configuration:
Windows 7 Professional x64
Oracle JDK 1.7 Update 2 32b
Eclipse Indigo for Java EE Developers 32b
your issue #2 may be resolved by following these steps :
Go to http://java.sun.com/j2se/1.5.0/download.jsp and choose to
download the JDK 5.0 Source Code.
For JDK 5.0, select Download(SCSL source).
Download JDK (SCSL) 5.0 (1.5.0). This will give you a file jdk-1_5_0-src.scsl.zip. You do not need to unzip this file; Eclipse likes it the way it is.
In Eclipse, go to Projects -> Properties -> Java Build Path -> Libraries and expand JRE System Library [jre 1.5.0], then rt.jar. Select Source attachment and click Edit...
Select the above zip file. and Finish by exiting the dialog boxes.
source
Hope this helps..
Sounds like wrong sources are attached to the libs inside Eclipse.
I had similar symptoms in a project where a class exist in both: inside a lib and in the project's src folder. Same canonical class name, but different implementations.
I would recommend to verify (or reinstall) your JDK-Installation and re-configurating it in Eclipse.
Hitting Ctrl+Shift+T and typing HashSet and taking a screenshot of that window may help here, too.
To answer my own question, I didn't find out how to solve the problem in Indigo, but updating to Juno fixed it.

Errors in Eclipse for no reason

I'm building an Android app.
I worked today on my app, and suddenly I saw that all the projects in the workspace are marked with an error. I don't know what caused it, and I can't find explanation of the error anywhere.
I'm using Helios with Windows 7. I even tried downloading Eclipse again but it didn't help.
Today I tried to integrate Facebook with my app. Their tutorial required me to try to get a hesh key from a keystore. In the process I added an Environment Variable named JAVA_HOME, and pointed it to the JDK.
I don't know if it's the cause of my problem, but I think it might be related.
I really don't know what to do.
Thanks!
Try this. In eclipse, go to Project --> Clean --> Select "clean all projects". This should rebuild all projects.
Try cleaning your android project. I get problems with Eclipse sometime, and if I clean the project, it fixes it.
Find the "Problems" view. That will give you more details. Post the description of the problems, we can get more information.
click Window -> Show View -> Problems
Typically, the problem is with a resource you've recently added to your project (drawable, assets, raw, etc.)
Some things to check are:
Invalid XML files
Invalid 9-patch images (outer 1-pixel border must be full black or transparent)
Typically, just start by removing a resource, then cleaning your project (Project > Clean). If the errors go away, that resource is your problem. If not, continue this process until the error DOES go away. Start with the most recent resources you've added, naturally.
i solved error or all project showing errors this way.... close eclipse.
then Right Click on eclipse shortcut-->open file location-->open command widows there and type "eclipse.exe -clean" eclipse the starts..and in my case errors were gone...hope it helps

Why is the Problems view in Eclipse not showing all of my errors?

I am using Eclipse 3.4 Ganymede, and in my project there are several Java files that have compile errors. There's a red line at the error point when I open one of these files, but Eclipse doesn't show that there's a problem with the file at the project level.
Is there a property that needs to be set for that to happen? Why wouldn't all of my errors be shown in the Problems view?
The project level shows the state of the classes on disk and not in memory.
In other words you can have plenty of compilation errors in your classes as you edit them, but the version on disk is not influenced until you save.
A quick way to synchronize is to use Ctrl-Alt-S which saves all edited files to disk.
You don't need to set any specific property. In the menu, select Windows -> Show View -> Problems and it will open the problems view for you, showing all errors/warnings in your current workspace.

Categories

Resources