Bug 535549 - Eclipse Oxygen not showing compile errors unless project is built
Summary: Eclipse Oxygen not showing compile errors unless project is built
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.3   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-05 06:23 EDT by Ayaskant Swain CLA
Modified: 2022-07-19 12:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayaskant Swain CLA 2018-06-05 06:23:42 EDT
I have installed eclipse Java EE IDE for Web Developers (version 4.7.3a) on my Mac OS High Sierra recently.

I am seeing an unusual behavior in this version of eclipse. This version of eclipse does not show me errors in the IDE in red color on syntax errors or on missing import of classes in my java source code files. It shows those compile errors only after building the project wither manually or by enabling the auto build feature (Project -> Build Automatically).

I do not see this issue in eclipse version Neon on my same laptop. The correct behavior should be to see eclipse complain in red color underlining the syntax error.

example : HttpServletRespons reponse = null;

Here HttpServletRespons syntax is incorrect as the last letter "e" is missing form the spelling.

Similarly expecting errors on missing import for a class that is referred in the code.

example :  

public class MyServlet extends HttpServlet {
....
....
....
}

Here HttpServlet class has not been imported from import javax.servlet.http.* package, so the IDE should complain about it.
Comment 1 Ayaskant Swain CLA 2018-06-05 06:25:12 EDT
Oxygen Eclipse shows error only when i build the project
Comment 2 Stephan Herrmann CLA 2018-06-05 08:25:28 EDT
(In reply to Ayaskant Swain from comment #0)
> [...] The
> correct behavior should be to see eclipse complain in red color underlining
> the syntax error.
> 
> example : HttpServletRespons reponse = null;
> 
> Here HttpServletRespons syntax is incorrect as the last letter "e" is
> missing form the spelling.

That's not a syntax error, but an unresolvable type name :)

Could you please try a real syntax error, e.g., by misspelling any Java keyword?


Other things to look at:
- what natures are defined on the project?

- what exact version of plugin org.eclipse.jdt.core is installed?

- are Java files opened using the correct path?
  E.g., in nested Maven projects, ensure that the .java file is found in the
  leaf project, not its parent. You can check this by looking at the icon of
  the Java editor: if the "J" is fully painted, you're OK, if the "J" is shown
  as an outline the file is not on its project's classpath.

- any related entries in the Errors view / log file?
Comment 3 Eclipse Genie CLA 2020-07-18 12:27:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2022-07-19 12:45:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.