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 151106 - Suites (and modules) unaware of broken references
Summary: Suites (and modules) unaware of broken references
Status: RESOLVED DUPLICATE of bug 61227
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmichalsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-23 10:01 UTC by ivan
Modified: 2008-10-23 12:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
SuiteRefBugSuite.zip (24.50 KB, application/octet-stream)
2008-10-23 11:20 UTC, ivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2008-10-23 10:01:43 UTC
If project B depends on project A and project A gets moved/renamed outside of
the IDE, upon reload project B is marked as having broken references
and the Fix References(?) action and dialog aids in resolving these.

However, the same doesn't extend to suite projects. 
And sometimes even B's broken references don't manifest themselves in the UI.

For example, create a suite and two NB module projects under it, A and B.
Create a couple of dummy classes.
Make B depend on A and call A from B to make the dependency real.
Now exit the IDE. 
'mv' (rename) A to C.
Restart IDE. 

It will load the suite and B but naturally won't load A.
Now, often B will be marked as having problems with references
and you will get a popup telling you to use the project action
ResolveReferences.

I started filing this bug initially because the suite
wouldn't get marked as having reference problems, even though it's
nproject/project.properties has a reference to A. An attempt
to build the suite just gives an obscure build error.

But as I played with a trivial testcase (attached) I noticed that
even B isn't always marked as a project with broken references, even
though it's nbproject/project.xml still refers to A. So
building it also gives obscure error messages.

So whether a project, regular or suite, is marked as having broken references
seems rather unpredictable.

I've attached a directory, SuiteRefBugSuite. It's a suite with two
sub-projects A and B. Load it as is, get it to build.
Then exit the IDE, and rename A to C. Restart the IDE and
witness what I described above.
Comment 1 Jana Maleckova 2008-10-23 10:46:45 UTC
reassign to j2se project for evaluation
Comment 2 Jan Lahoda 2008-10-23 10:53:48 UTC
The report seems to talk about NetBeans module projects, not sure why it was assigned to java/j2seproject.
Comment 3 ivan 2008-10-23 11:13:37 UTC
One interesting effect of this seems to be that various nbproject
files might end up accumulating references to all kinds of old stuff.
These references just sit there.

I only became aware of this because I had to go an manually fix up old
references (see IZ 151116) and found some _really_ old references, which
of course made the job of fixing things up much harder.
Comment 4 ivan 2008-10-23 11:20:34 UTC
Created attachment 72528 [details]
SuiteRefBugSuite.zip
Comment 5 rmichalsky 2008-10-23 12:13:38 UTC
You are referring to two different kinds of projects. While J2SE projects handle broken references correctly, it is not
implemented for NB Module projects (neither for NB Module Suite projects) yet - see duplicate issue. Hopefully this will
get into 7.0.

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