You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "rkeen-siemens (via GitHub)" <gi...@apache.org> on 2023/05/25 16:19:15 UTC

[GitHub] [netbeans] rkeen-siemens commented on pull request #5989: #5987: Use the currently active dialog as the presenter parent

rkeen-siemens commented on PR #5989:
URL: https://github.com/apache/netbeans/pull/5989#issuecomment-1563178530

   > shouldn't the same logic be used for `DialogDescriptor` above?
   
   It certainly could. I was constraining my fix to the area that was causing the issue in my case.
   
   > We've also got slightly different logic in `createDialog()`, not to mention in utilities. Feels like some of this could be consolidated?
   
   I can look at consolidating the logic.
   
   > The logic for `isLeaf()` feels wrong too, and potentially prone to the same problem? If any modal dialog is active, and another modal dialog is being opened, then shouldn't it always have the existing modal as a parent?
   
   I am not really familiar with the need for the `NbPresenter.currentModalDialog` field. It looks like [`ProfilerDialogs`](https://github.com/apache/netbeans/blob/master/profiler/profiler/src/org/netbeans/modules/profiler/impl/ProfilerDialogs.java) is the only place that sets `leaf` to anything other than the default, although it was originally put in place to address [Bugzilla #53525](https://bz.apache.org/netbeans/show_bug.cgi?id=53525). I'm inclined to remove the `currentModalDialog` field and just keep the existing `instanceof` check on the active window.
   
   We could also simplify the `Frame` vs. `Window` logic by adding constructor overloads that take `Window` since `JDialog` now has an equivalent overload (as of Java 6) which I assume was not available 20 years ago when the original `NbPresenter` constructors were created.
   
   I'll add some changes in additional commits (which I can squash before merging if desired).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists