This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235050 - Compilation error not shown in the java editor
Summary: Compilation error not shown in the java editor
Status: RESOLVED DUPLICATE of bug 240371
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Linux
: P1 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 20:01 UTC by adithyank
Modified: 2014-02-12 15:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot for no compilation error (177.82 KB, image/png)
2013-08-26 20:01 UTC, adithyank
Details
screenshot showing compilation error after opening the action items top component (146.58 KB, image/png)
2013-08-26 20:04 UTC, adithyank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adithyank 2013-08-26 20:01:34 UTC
Created attachment 139268 [details]
screenshot for no compilation error

Product Version = NetBeans IDE Dev (Build 201308092300)
Operating System = Linux version 2.6.32-358.14.1.el6.i686 running on i386
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) Client VM 23.25-b01

Small program. See the attachment. Following compilation error should have been shown

1. main() method returning boolean value
2. no import for Console class
Comment 1 adithyank 2013-08-26 20:03:35 UTC
After this, I clicked the "Action items" menu. After refreshing all the indices, the compilation errors have been shown in the editor.

This behaviour is not for all the classes.
Comment 2 adithyank 2013-08-26 20:04:49 UTC
Created attachment 139269 [details]
screenshot showing compilation error after opening the action items top component

attached screenshot showing compilation error after opening the action items top component
Comment 3 Dusan Balek 2013-08-27 08:25:16 UTC
Are you able to reproduce the problem on your side? If so, could you please provide the exact steps to reproduce? Thanks.
BTW, haven't you used the Move refactoring before the problem appeared (see bug #199357)?
Comment 4 adithyank 2013-08-29 11:10:10 UTC
What I did : 

1. I copied the full main method from another class to this class
2. Then, "Import classes" window came, I clicked ok. But, the window did not disappear
3. I then clicked cancel to close that window
4. Now, there was no import statements that came to my code automatically. At this same time, the editor did not show the compilation error also.

But now, when I repeated the same sequence, this issue did not come !
Comment 5 Dusan Balek 2013-08-29 11:43:33 UTC
ServerStarter.java is marked as newly created on the first screenshot. Was it created by copying some of the existing files or was it created using "New" from template?
Comment 6 adithyank 2013-08-29 11:49:42 UTC
ServerStarter is a newly created class by right click -> new > java class.

But, my concern was with ConsoleTester. Not with ServerStarter.
I copied the main method from ConsoleAuthorizer and pasted it in the ConsoleTester.

Have I answered your question?
Comment 7 adithyank 2013-08-31 11:49:54 UTC
Today, I wrote code in a new Java class that was created by right clicking the package > new java class.

When I keep typing the code, the compilation errors are not shown. Only after opening the "Action items" top component, the compilation errors are shown in the editor.

But, the tab title, red color icon is visible indicating there is/are compilation error(s).

So, there is some issue definitely there. But, it is not always coming.
Comment 8 markiewb 2013-11-14 14:35:09 UTC
Related to https://netbeans.org/bugzilla/show_bug.cgi?id=235958 ?
Comment 9 adithyank 2014-02-04 21:09:38 UTC
I am encountering this issue very frequently.
When compilation error is shown in a line and If I modify the line to correct the error, the editor tab title is not hiding the red colored symbol.

I am forced to close the editor tab and open the file again to hide the red colored symbol from the title bar.

I feel this is very critical issue during coding...
Hence changing the criticality of the issue to P2 and version to 8.0

The build that I am using now is given below

Product Version: NetBeans IDE Dev (Build 201402020001)
Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b63
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b121
System: Linux version 2.6.32-431.3.1.el6.i686 running on i386; UTF-8; en_US (nb)
User directory: /root/.netbeans/dev
Cache directory: /root/.cache/netbeans/dev
Comment 10 Jiri Prox 2014-02-05 06:41:24 UTC
@adithyank

> When compilation error is shown in a line and If I modify the line to
> correct the error, the editor tab title is not hiding the red colored symbol.
> 

Do you save the file after the error is fixed?
Comment 11 adithyank 2014-02-05 13:30:31 UTC
Yes. I saved. After that the red colored symbol is disappearing from the left side line margin (some times not). But, not disappearing from editor tab title and right side navigation bar.

If I close that editor tab and reopen, this red symbol is not found in editor tab title and right side navigation bar.
Comment 12 Dusan Balek 2014-02-12 15:23:57 UTC
Couple of reproducible test cases described in #240371.

*** This bug has been marked as a duplicate of bug 240371 ***