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 44323 - Missing dependent projects dealt with badly
Summary: Missing dependent projects dealt with badly
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 41537
  Show dependency tree
 
Reported: 2004-06-04 01:01 UTC by David-john Burrowes
Modified: 2007-09-26 09:14 UTC (History)
1 user (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 David-john Burrowes 2004-06-04 01:01:03 UTC
1) Make project A dependent on project B (e.g. put
B on the compiling sources classpath).
2) Close both A and B
3) Delete B
4) open A via the "open project..." menu item

The dependency doesn't show up in the open dialog,
doesn't show up in the General page of the
properties, and there's no warning to the user
that there's something missing.  However, the
project is still listed in the compiling sources
classpath.

One time I did this, I got an exception, as listed
below.

java.util.ConcurrentModificationException
	at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:448)
	at
java.util.AbstractList$Itr.next(AbstractList.java:419)
	at
org.netbeans.modules.project.ui.OpenProjectList$RecentProjectList.getProjects(OpenProjectList.java:502)
	at
org.netbeans.modules.project.ui.OpenProjectList.getRecentProjects(OpenProjectList.java:213)
	at
org.netbeans.modules.project.ui.actions.RecentProjects.createSubMenu(RecentProjects.java:76)
	at
org.netbeans.modules.project.ui.actions.RecentProjects.propertyChange(RecentProjects.java:103)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252)
	at
org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:144)
	at
org.netbeans.modules.project.ui.actions.OpenProject.actionPerformed(OpenProject.java:68)
	at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
	at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at
javax.swing.AbstractButton.doClick(AbstractButton.java:289)
	at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
	at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
	at
java.awt.Component.processMouseEvent(Component.java:5100)
	at
java.awt.Component.processEvent(Component.java:4897)
	at
java.awt.Container.processEvent(Container.java:1569)
	at
java.awt.Component.dispatchEventImpl(Component.java:3615)
	at
java.awt.Container.dispatchEventImpl(Container.java:1627)
	at
java.awt.Component.dispatchEvent(Component.java:3477)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
	at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
	at
java.awt.Container.dispatchEventImpl(Container.java:1613)
	at
java.awt.Window.dispatchEventImpl(Window.java:1606)
	at
java.awt.Component.dispatchEvent(Component.java:3477)
[catch] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Comment 1 Jesse Glick 2004-06-04 02:26:26 UTC
David K., can you reproduce this? There should be broken references
support.

David John, what build are you using? The CME you report was supposed
to have been fixed a while back.
Comment 2 David Konecny 2004-06-04 12:17:12 UTC
I believe DJ is right and there is such a bug. I will fix that.

As for the CME: file separate issue if you still have that problem in
latest build.
Comment 3 David Konecny 2004-06-04 15:19:44 UTC
Jesse, I have question about showing broken dependencies in Open
Project chooser. If subproject does not exist it is not returned by
SubprojectProvider and that's why it is not shown there. How this
should work? Should SubprojectProvider return also projects which
cannot be found? The ProjectChooserAccessory is in project/ui module
so you cannot workaround the problem by interpreting raw references -
that's how I'm solving similar problem in project properties now.

Perhaps Open Project can show only existing subprojects and broken
reference support/project properties will mark/show everything?
Comment 4 Jesse Glick 2004-06-04 15:41:06 UTC
"Perhaps Open Project can show only existing subprojects and broken
reference support/project properties will mark/show everything?" -
yes. Naturally SubprojectProvider cannot list nonexistent subprojects.
Comment 5 David Konecny 2004-06-08 14:28:07 UTC
Fixed in:
src/org/netbeans/modules/java/project/BrokenReferencesModel.java
new revision: 1.9; previous revision: 1.8

Project B will not be shown in Open Project dialog, but will be
reported as broken reference during the project open. As part of issue
42781 I will fix also how project B is presented in Project
Properties: it will be prefixed with text "missing project: " or
something like that.