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 195249

Summary: Broken References alert dialog should include button to show Resolve Reference dialog
Product: java Reporter: Jesse Glick <jglick>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Severity: normal CC: dkonecny, johnjullion, jrojcek, mmirilovic, musilt2, pjiricka
Priority: P1 Keywords: API, UI
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 195942    
Bug Blocks: 195849    

Description Jesse Glick 2011-02-09 20:12:59 UTC
BrokenReferencesAlertPanel should have some UI to show BrokenReferencesCustomizer in its place, or to directly resolve problems (esp. DEFINABLE_LIBRARY). Currently the user has to close the alert dialog and then locate the context menu item, which is cumbersome. Bug #195206 is related.

Would require an API change since BrokenReferencesSupport.showAlert lacks the parameters needed by showCustomizer.
Comment 1 Tomas Zezula 2011-02-10 07:47:37 UTC
Agree, should I do it to 7.0?
Comment 2 Marian Mirilovic 2011-02-10 08:23:35 UTC
(In reply to comment #1)
> Agree, should I do it to 7.0?

Yes, please do it.
Comment 3 Tomas Zezula 2011-02-10 14:31:09 UTC
Comment 4 Tomas Zezula 2011-02-10 15:23:20 UTC
The API change is simple. I've already done it.
The question is the UI design of the panel. The panel shows just once for all broken projects, but the fixing of references is project sensitive. Should it provide list of broken projects with Fix button opening the BrokenRefCustomizer or should it be a tree or should it just try the automatic fix using the LibraryDefiner?
Comment 5 Petr Jiricka 2011-02-10 16:15:40 UTC
> try the automatic fix using the LibraryDefiner?

Are you saying that this would allow us to fix the JUnit case without adding complicated UI? I personally would rather see a simple/minimalistic UI that fixes the JUnit case, than a complicated UI that fixes everything.
Comment 6 Tomas Zezula 2011-02-10 16:32:39 UTC
Yes. But If you have 2 projects one missing junit, second missing junit and for example bcel. You press "Fix broken references" it will magically fix the first project and junit from second one while keeping the second broken. But not sure what is better. Jano, have you got an opinion about this?
Comment 7 jrojcek 2011-02-11 11:11:32 UTC
Yesterday I started redesigning the current warning for Broken References to show all the broken references in all projects. Essentially, I wanted to merge the warning with Resolve Broken References dialog and in order to do it, it had to contain all projects with broken references.

I haven't finished it yet and it seems like a too big change for 7.0. If you feel like we can do this for 7.0, I'll try to finish the design.

I proposed a simple version that would simply open the first project with reference problems (if there are multiple such projects). My understanding is that if it downloads the JUnit library, all projects with the same reference problem to JUnit library will get fixed automatically. See the proposal (scroll to Open Project):
Comment 8 Tomas Zezula 2011-02-11 13:08:42 UTC
Jano, if we find some "simpler" solution for NB 7.0 the complete rewrite of broken references can be done in current + 1. For NB 7.0 I would prefer something smaller than complete redesign.
Comment 9 Tomas Zezula 2011-02-14 15:59:41 UTC
David designed the following UI:
The "Resolve" button will show the BrokenRefrencePanel where all broken refs from all open project will be merged. The dialog will show the project names for each entry. When a reference will be resolved the UI will be refreshed.
Comment 10 jrojcek 2011-02-14 16:54:13 UTC
Tomasi, what you described sounds good to me. Just to make sure I understand. The list is grouped by broken references, each item also displaying names of projects where the actual reference is broken. Correct?

If you have something ready to look at, please send me screenshots. I would like to review it. Thanks!
Comment 11 jrojcek 2011-02-15 13:11:22 UTC
Note that I added a mockup of the Resolve Reference Problems into the JUnit License Issue spec. Scroll to the Open Project section:
Comment 12 Tomas Zezula 2011-03-07 17:22:05 UTC
Fixed jet-main cf78fe647c19