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 50140 - Project missing resource dialog appears before main window
Summary: Project missing resource dialog appears before main window
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-10-08 01:14 UTC by _ tboudreau
Modified: 2005-09-15 12:31 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 _ tboudreau 2004-10-08 01:14:57 UTC
If a project resource is missing, the dialog for this appears long 
before the main window appears.  If you do not click it instantly, 
the AWT queue will be too busy, and so the dialog will be 
completely unresponsive - for a very long time, as it will not be 
usable until classpath scanning is complete.

Annoying to have a completely unresponsive dialog that sits 
there, and it definitely shouldn't appear during the splash 
screen.
Comment 1 Jesse Glick 2004-10-08 02:45:10 UTC
Are you referring to the broken references dialog, or something else?
Comment 2 _ tboudreau 2004-10-08 02:49:29 UTC
Broken references dialog
Comment 3 Petr Hrebejk 2004-10-08 11:24:33 UTC
In that case probably something for David.
Comment 4 _ tboudreau 2004-10-08 14:41:32 UTC
David, there are a few hacks you can do for this - 
WindowSystem.getDefault().getMainWindow().isShowing() or add a window listener 
(assuming this check runs after the window system at least starts initialization - otherwise 
it could get ugly - and you need to call getMainWindow() from the AWT thread), or worse 
hacks with Frame.getFrames() which won't have the thread restriction but who knows what 
they'll do.

Really we need some kind of better lifecycle handling - akin to unix runlevels, or at least 
some call like WindowSystem.runAfterMainWindowShown (Runnable foo).  Right now a lot 
of things try to do something just after the main window is shown, and it's pretty ugly 
(imagine classpath scanning, this dialog and the autoupdate auto-check all piled on top of 
each other - it can happen).
Comment 5 David Konecny 2004-10-11 08:47:39 UTC
I'm aware of that. It is triggered by project opening. Thanks for the
hints. I will look at that.
Comment 6 David Konecny 2004-10-12 13:43:16 UTC
There is no simple way how to fix this. I tried to listen on
WindowManager.getDefault().getMainWindow() and show message box after
main window is visible. The problem here is that MDR uses the same
listener to start their parsing progress bar and based on the order in
which listeners are notified it can happen that my message box is
shown with MDR progress bar as parent and result of that is that
closing of progress bar closes also my mesage box.

I know that current state is ugly but compared to the hacks I would
have to do it is better to leave it as it is.

Lowering to P4: everything works, it is just ugly.
Comment 7 Milan Kubec 2005-08-31 09:04:21 UTC
Dialog is still opened too early but it disapears without user interaction when
Main Window is displayed. IMO Broken Reference dialog should be opened after
Main Window and it should be displayed until user clicks Confirmation button. 
Raising prio to P3.
Comment 8 mslama 2005-08-31 09:28:06 UTC
In addition there is no separate progress dialog for code parsing (MDR) as it is
now part of main window. So there is no clash now.
Comment 9 mslama 2005-08-31 09:34:10 UTC
This should be definitely fixed as if issue #63060 will be fixed this dialog can
be displayed either at Metal L&F if License or Import dialog is not shown before
or in platform L&F (eg. Windows L&F on Windows) if License or Import dialog is
not shown. In addition currently this dialog disappears when Main window is shown.
Comment 10 Jesse Glick 2005-08-31 17:31:49 UTC
Wrong component.
Comment 11 Tomas Zezula 2005-09-15 12:31:45 UTC
Checking in nbproject/project.xml;
/cvs/java/project/nbproject/project.xml,v  <--  project.xml
new revision: 1.23; previous revision: 1.22
done
Checking in
src/org/netbeans/spi/java/project/support/ui/BrokenReferencesSupport.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/BrokenReferencesSupport.java,v
 <--  BrokenReferencesSupport.java
new revision: 1.15; previous revision: 1.14
done