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.

View | Details | Raw Unified | Return to bug 191639
Collapse All | Expand All

(-)a/o.n.bootstrap/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.bootstrap/1
2
OpenIDE-Module: org.netbeans.bootstrap/1
3
OpenIDE-Module-Specification-Version: 2.33
3
OpenIDE-Module-Specification-Version: 2.34
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/Bundle.properties
5
OpenIDE-Module-Recommends: org.netbeans.NetigsoFramework
5
OpenIDE-Module-Recommends: org.netbeans.NetigsoFramework
6
6
(-)a/o.n.core/src/org/netbeans/core/NbClipboard.java (-1 / +1 lines)
Lines 42-48 Link Here
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
44
45
package org.netbeans.core;
45
package org.netbeans;
46
46
47
import java.awt.AWTEvent;
47
import java.awt.AWTEvent;
48
import java.awt.Toolkit;
48
import java.awt.Toolkit;
(-)a/o.n.core/test/unit/src/org/netbeans/core/NbClipboardDelayedTest.java (-1 / +1 lines)
Lines 42-48 Link Here
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
44
45
package org.netbeans.core;
45
package org.netbeans;
46
46
47
import org.netbeans.junit.*;
47
import org.netbeans.junit.*;
48
import junit.textui.TestRunner;
48
import junit.textui.TestRunner;
(-)a/o.n.core/test/unit/src/org/netbeans/core/NbClipboardIsUsedByAlreadyInitializedComponentsTest.java (-3 / +1 lines)
Lines 42-48 Link Here
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
44
45
package org.netbeans.core;
45
package org.netbeans;
46
46
47
import java.awt.datatransfer.*;
47
import java.awt.datatransfer.*;
48
import java.io.IOException;
48
import java.io.IOException;
Lines 51-58 Link Here
51
import javax.swing.TransferHandler;
51
import javax.swing.TransferHandler;
52
import org.netbeans.junit.*;
52
import org.netbeans.junit.*;
53
import junit.textui.TestRunner;
53
import junit.textui.TestRunner;
54
import org.openide.filesystems.*;
55
import org.openide.loaders.*;
56
import org.openide.modules.ModuleInfo;
54
import org.openide.modules.ModuleInfo;
57
import org.openide.util.Lookup;
55
import org.openide.util.Lookup;
58
import org.openide.util.datatransfer.*;
56
import org.openide.util.datatransfer.*;
(-)a/o.n.core/test/unit/src/org/netbeans/core/NbClipboardIsUsedBySwingComponentsTest.java (-1 / +1 lines)
Lines 42-48 Link Here
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
44
45
package org.netbeans.core;
45
package org.netbeans;
46
46
47
import java.awt.datatransfer.ClipboardOwner;
47
import java.awt.datatransfer.ClipboardOwner;
48
import java.awt.datatransfer.StringSelection;
48
import java.awt.datatransfer.StringSelection;
(-)a/o.n.core/test/unit/src/org/netbeans/core/NbClipboardNativeTest.java (-1 / +1 lines)
Lines 42-48 Link Here
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
44
45
package org.netbeans.core;
45
package org.netbeans;
46
46
47
import java.awt.Toolkit;
47
import java.awt.Toolkit;
48
import java.awt.datatransfer.Clipboard;
48
import java.awt.datatransfer.Clipboard;
(-)a/o.n.core/test/unit/src/org/netbeans/core/NbClipboardTest.java (-19 / +11 lines)
Lines 41-47 Link Here
41
 * Version 2 license, then the option applies only if the new code is
41
 * Version 2 license, then the option applies only if the new code is
42
 * made subject to such option by the copyright holder.
42
 * made subject to such option by the copyright holder.
43
 */
43
 */
44
package org.netbeans.core;
44
package org.netbeans;
45
45
46
import java.awt.KeyboardFocusManager;
46
import java.awt.KeyboardFocusManager;
47
import java.awt.Window;
47
import java.awt.Window;
Lines 61-67 Link Here
61
import javax.swing.SwingUtilities;
61
import javax.swing.SwingUtilities;
62
import org.netbeans.junit.NbTestCase;
62
import org.netbeans.junit.NbTestCase;
63
import org.openide.util.Utilities;
63
import org.openide.util.Utilities;
64
import org.openide.windows.TopComponent;
65
64
66
/** Basic tests on NbClipboard
65
/** Basic tests on NbClipboard
67
 *
66
 *
Lines 111-136 Link Here
111
        class Safe implements Runnable {
110
        class Safe implements Runnable {
112
            WeakReference<Object> ref;
111
            WeakReference<Object> ref;
113
            Window w;
112
            Window w;
114
            TopComponent tc;
115
            
116
            
113
            
117
            public void beforeAWT() throws InterruptedException {
114
            public void beforeAWT() throws InterruptedException {
118
                NbClipboard ec = new NbClipboard();
115
                NbClipboard ec = new NbClipboard();
119
                
116
                
120
                tc = new TopComponent();
117
                w = new JFrame("Original frame");
121
                tc.open();
118
                w.pack();
122
                
119
                w.setVisible(true);
123
                for(;;) {
120
                w.toFront();
124
                    w = SwingUtilities.getWindowAncestor(tc);
121
                w.requestFocus();
125
                    if (w != null && w.isVisible()) {
122
                w.requestFocusInWindow();
126
                        break;
123
127
                    }
124
                w.setVisible(false);
128
                    Thread.sleep(100);
129
                }
130
                
131
                tc.close();
132
                w.dispose();
125
                w.dispose();
133
                
126
134
                // opening new frame shall clear all the AWT references to previous frame
127
                // opening new frame shall clear all the AWT references to previous frame
135
                JFrame f = new JFrame("Focus stealer");
128
                JFrame f = new JFrame("Focus stealer");
136
                f.setVisible(true);
129
                f.setVisible(true);
Lines 145-151 Link Here
145
                
138
                
146
                ref = new WeakReference<Object>(w);
139
                ref = new WeakReference<Object>(w);
147
                w = null;
140
                w = null;
148
                tc = null;
149
            }
141
            }
150
}
142
}
151
        
143
        
Lines 155-161 Link Here
155
        SwingUtilities.invokeAndWait(safe);
147
        SwingUtilities.invokeAndWait(safe);
156
        
148
        
157
        try {
149
        try {
158
            assertGC("Top component can disappear", safe.ref);
150
            assertGC("Original frame can disappear", safe.ref);
159
        } catch (junit.framework.AssertionFailedError ex) {
151
        } catch (junit.framework.AssertionFailedError ex) {
160
            if (ex.getMessage().indexOf("NbClipboard") >= 0) {
152
            if (ex.getMessage().indexOf("NbClipboard") >= 0) {
161
                throw ex;
153
                throw ex;
(-)a/o.n.core/manifest.mf (-1 / +1 lines)
Lines 4-7 Link Here
4
OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Essential-Module: true
6
AutoUpdate-Essential-Module: true
7
OpenIDE-Module-Specification-Version: 3.20
7
OpenIDE-Module-Specification-Version: 3.21
(-)a/o.n.core/nbproject/project.xml (-1 / +1 lines)
Lines 55-61 Link Here
55
                    <compile-dependency/>
55
                    <compile-dependency/>
56
                    <run-dependency>
56
                    <run-dependency>
57
                        <release-version>1</release-version>
57
                        <release-version>1</release-version>
58
                        <specification-version>2.12</specification-version>
58
                        <specification-version>2.34</specification-version>
59
                    </run-dependency>
59
                    </run-dependency>
60
                </dependency>
60
                </dependency>
61
                <dependency>
61
                <dependency>

Return to bug 191639