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.
The primary motivation for this issue is an analogy of issue 40693 in JDeveloper. JDeveloper would like to reuse our hacks around NbClipboard to solve their clipboard problems. The jdev-nb environment allows to reuse NetBeans modules in JDeveloper. Unfortunately, NbClipboard class resides in o.n.core module that is not included in jdev-nb by now. This module is too heavyweight to include just because of NbClipboard. Therefore, I suggest to move NbClipboard into another module. A good candidate seems to be o.n.bootstrap (thanks Yarda for this idea) that contains TopSecurityManager that plays an essential role in NbClipboard-related hacks. Note that NbClipboard is a standalone class that itself is not part of API. No code references this class directly, it is used indirectly as Clipboard or ExClipboard service. Hence, the suggested move should be harmless.
Created attachment 102800 [details] Patch with the suggested changes
maybe you still want to wait for the frame to be really isShowing. As far as I know setVisible does not make the window immediately visible: - for(;;) { - w = SwingUtilities.getWindowAncestor(tc); - if (w != null && w.isVisible()) { - break; - } - Thread.sleep(100); - }
[JG01] Logger.getLogger should use NbClipboard.class to get the new package name. This should also be a constant.
> maybe you still want to wait for the frame to be really isShowing. > As far as I know setVisible does not make the window immediately visible: isVisible() == isShowing() for frames/windows. So, there is no need to wait. > [JG01] Logger.getLogger should use NbClipboard.class to get the new package > name. This should also be a constant. Sure. I overlooked that logger code contains hardcored package name. So, the additional changes in NbClipboard are: - private Logger log; + private static final Logger log = Logger.getLogger(NbClipboard.class.getName()); NbClipboard( Clipboard systemClipboard ) { super("NBClipboard"); // NOI18N this.systemClipboard = systemClipboard; - log = Logger.getLogger("org.netbeans.core.NbClipboard"); // NOI18N
Thank you for the review. I will integrate the changes tomorrow.
Moved: http://hg.netbeans.org/core-main/rev/705c1173f585
(In reply to comment #6) > Moved: http://hg.netbeans.org/core-main/rev/705c1173f585 Will it be transplanted to Beta branch?