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 56828 - Netbeans does not get aware of the code change
Summary: Netbeans does not get aware of the code change
Status: RESOLVED DUPLICATE of bug 32882
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 08:27 UTC by paulhuang
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paulhuang 2005-03-23 08:27:15 UTC
Using Netbeans, I find something quite interesting:

I am tring to using part of the java package source code from the other project,
say using package a & b's source code from project 1 in project 2. I first
copied package a's source code dir into project 2, the Netbeans will quickly
report some errors as there is some dependency from package a to package b.
Realizing this, I then copy package b's source code dir into project 2 and then
expect the disappearance of the previous error messages. I wait and wait and
wait, but the error message still there, not willing to leave. 

What's wrong with this? I begin to doubt the IDE doesn't get aware that I've
already copied the required source code there. I then just add a blank line into
the source code where the error message hanging and then remove the newly added
line, and then all the error message go away!

I tried other similar cases, like class A use a function B.abc() while typo it
as B.abb(). I then go to class B, modifying the function abc() into abb(). Guess
what, the error message still there. I can not drive out the error messages
until I insert a blank line and remove the added line. 

To make a summary of these problems: Netbeans can not get aware of the relevant
code changes timely in certain cases and thus can not update the error/warning
messages accordingly. Or, the awareness can only be triggered when the
developers do some changes to the source code. This will really confuse the
developers!

I see this a great deficiency in Netbeans. The IDE should really be intelligent
enough to aware the context source code changes and update the error/warning
message accordingly. Otherwise, it'll misguide the developers, cost the
developers too much energy and time to find that there is nothing wrong with
his/her code, but the IDE is wrong. Such kind of confusion should really be avoided!
Comment 1 Milan Kubec 2005-03-23 09:10:32 UTC
You are right it really works this way. And it should be enhanced. But not P1 -
it's the way how it works since error underlines were introduced. I admint that
it's annoying, but I personally got used to it - and it's not good :-)

I'd suggest to keep *opened file* uptodate, it means to do periodical check even
if there were no change in the file, but just for the one opened file, and also
for any file that gets focused in editor. It cannot be that expensive.
Comment 2 Roman Strobl 2005-03-23 09:26:55 UTC
Milo and others: I have recently written a one-pager for this (used internally
for planning of features) - NbFeature1067. I agree with Milan that current
behaviour is "as designed", so strictly speaking it's not a DEFECT but it
seriously needs to be improved.
Comment 3 Martin Roskanin 2005-03-23 09:33:48 UTC
It should be a java module issue (java module creates error annotation, editor
just paints it), reassigning.
Comment 4 paulhuang 2005-03-23 09:48:24 UTC
I previously used Eclipse. They have already provide such intelligent awareness
capability. I suggest we just look at their source code and see what's their
solution. 
Comment 5 Milan Kubec 2005-03-23 11:12:59 UTC
I think that the check should also apply when there are compilation errors in
currently opened file. Because not every compilation error has to be fixed by
editing of the file with error in source editor. Another possible fixes are:
fixing another file, adding missing library, changing source level, etc.
Comment 6 Martin Matula 2005-03-23 14:52:12 UTC
This is a known issue - setting as duplicate, leaving the original issue as P3,
since it is really more an enhancement. Fixing it at this point would have
significant performance implications.

*** This issue has been marked as a duplicate of 32882 ***