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.
Build: NetBeans IDE 8.0.1 (Build 201408251540) VM: Java HotSpot(TM) 64-Bit Server VM, 24.65-b04, Java(TM) SE Runtime Environment, 1.7.0_67-b01 OS: Linux User Comments: petrk: - GUEST: rectangular selection and then I wanted delete those rows but maybe I invoked clipboard matteodg: Doing copy paste on a Java editor petrk: Deleted rectangular selection petrk: - GUEST: i was cut a code... petrk: Deleted square selection petrk: deleted rectangular area petrk: Deleted rectangular selection Stacktrace: java.lang.SecurityException: All swing access to clipboard should be redirected to ExClipboard at org.netbeans.TopSecurityManager.checkWhetherAccessedFromSwingTransfer(TopSecurityManager.java:757) at org.netbeans.TopSecurityManager.checkPermission(TopSecurityManager.java:501) at java.lang.SecurityManager.checkSystemClipboardAccess(SecurityManager.java:1390) at sun.awt.X11.XToolkit.getSystemSelection(XToolkit.java:1117) at org.netbeans.editor.BaseCaret.getSystemSelection(BaseCaret.java:864) at org.netbeans.editor.BaseCaret.updateSystemSelection(BaseCaret.java:855)
Created attachment 149950 [details] stacktrace
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=202787
The code in org.netbeans.editor.BaseCaret.getSystemSelection should be changed to use ExClipboard. If the direct access to system clipboard is desirable, then the check in TopSecurityManager needs to be updated. For example: --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -753,6 +753,9 @@ */ private void checkWhetherAccessedFromSwingTransfer () throws SecurityException { for (Class<?> c : getClassContext()) { + if (c.getName().equals("org.netbeans.editor.BaseCaret")) { // NOI18N + return; + } if (c.getName().equals("javax.swing.TransferHandler$TransferAction")) { throw new SecurityException ("All swing access to clipboard should be redirected to ExClipboard"); // NOI18N } passing to editor to decide and integrate.
Created attachment 153553 [details] stacktrace tried to cut a rectangular bloc k
*** Bug 252120 has been marked as a duplicate of this bug. ***
Created attachment 158389 [details] stacktrace paste Ctrl+Shift+D text
Fixed as suggested by Yarda since I did not find any better way. http://hg.netbeans.org/jet-main/rev/50990a2535ba
Integrated into 'main-silver', will be available in build *201602090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/50990a2535ba User: Miloslav Metelka <mmetelka@netbeans.org> Log: #Bug 247990 - SecurityException: All swing access to clipboard should be redirected to ExClipboard.