netbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Palmer <swpal...@gmail.com>
Subject Re: 12.4 Can we fix cut and paste before release?
Date Thu, 10 Jun 2021 05:28:48 GMT
That seems to be related to the old Java Applets which run in a sandbox.  It would not account
for why Netbeans, which doesn’t run in a sandbox, starts out with Cut & Paste that works
without editing the default java policy until it suddenly doesn’t.

Scott

> On Jun 6, 2021, at 4:49 PM, Eric Bresie <ebresie@gmail.com> wrote:
> 
> Don’t suppose something like this would help
> 
> http://www.shodor.org/interactivate/resources/InstructionsCopyPaste
> 
> 
>> On Fri, May 14, 2021 at 5:45 PM Scott Palmer <swpalmer@gmail.com> wrote:
>> 
>> So even with the  -J-Dnetbeans.slow.system.clipboard.hack=false setting in
>> netbeans.conf it still fails.
>> :-(
>> NB 12.4-rc3
>> JDK 16 (Zulu 16.0.1)
>> Win 10
>> 
>> My netbeans.conf file contains
>> -J-Dnetbeans.slow.system.clipboard.hack=false
>> -J-Dorg.netbeans.core.NbClipboard=-1
>> 
>> My attempts to paste from the system clipboard instead are pasting the last
>> thing copied inside a NetBeans editor.
>> There are no events added to the messages log when I paste.
>> uigestures just shows:
>> <record>
>>  <date>2021-05-14T18:41:49</date>
>>  <millis>1621032109778</millis>
>>  <sequence>2512</sequence>
>>  <logger>org.netbeans.ui.actions.editor</logger>
>>  <level>500</level>
>>  <thread>26</thread>
>>  <message>UI_ACTION_EDITOR</message>
>>  <key>UI_ACTION_EDITOR</key>
>>  <catalog>&lt;null&gt;</catalog>
>> 
>> 
>> <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+V,when=1621032109777,modifiers=Ctrl]
>> on
>> 
>> org.openide.text.QuietEditorPane[,0,0,1657x9742,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.formdev.flatlaf.ui.FlatMarginBorder@3890976b
>> 
>> ,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=187,g=187,b=187],disabledTextColor=javax.swing.plaf.ColorUIResource[r=136,g=136,b=136],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],selectionColor=javax.swing.plaf.ColorUIResource[r=75,g=110,b=175],kit=org.netbeans.modules.xml.text.syntax.XMLKit@2f695bbb
>> ,typeHandlers=]</param>
>> 
>> 
>> <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+V,when=1621032109777,modifiers=Ctrl]
>> on
>> 
>> org.openide.text.QuietEditorPane[,0,0,1657x9742,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.formdev.flatlaf.ui.FlatMarginBorder@3890976b
>> 
>> ,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=187,g=187,b=187],disabledTextColor=javax.swing.plaf.ColorUIResource[r=136,g=136,b=136],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],selectionColor=javax.swing.plaf.ColorUIResource[r=75,g=110,b=175],kit=org.netbeans.modules.xml.text.syntax.XMLKit@2f695bbb
>> ,typeHandlers=]</param>
>> 
>> 
>> <param>org.netbeans.editor.BaseKit$PasteAction[paste-from-clipboard]</param>
>>  <param>org.netbeans.editor.BaseKit$PasteAction@6479cfd5</param>
>>  <param>paste-from-clipboard</param>
>> </record>
>> 
>> 
>> Regards,
>> 
>> Scott
>> 
>> 
>>> On Wed, May 12, 2021 at 4:25 PM Scott Palmer <swpalmer@gmail.com> wrote:
>>> 
>>> Saw this in the logs.  i'm running with
>>> -J-Dnetbeans.slow.system.clipboard.hack=false
>>> 
>>> INFO [org.netbeans.NbClipboard]: System clipboard not available.
>>> java.lang.IllegalStateException: cannot open system clipboard
>>>    at java.desktop/sun.awt.windows.WClipboard.openClipboard(Native
>> Method)
>>> 
>>>    at
>> java.desktop/sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:77)
>>> 
>>>    at
>> java.desktop/sun.awt.datatransfer.SunClipboard.getContents(SunClipboard.java:138)
>>> [catch] at org.netbeans.NbClipboard.getContents(NbClipboard.java:206)
>>> 
>>>    at
>> org.netbeans.modules.editor.impl.actions.clipboardhistory.ClipboardHistory.clipboardChanged(ClipboardHistory.java:110)
>>> 
>>>    at
>> org.openide.util.datatransfer.ExClipboard.fireClipboardChange(ExClipboard.java:72)
>>>    at org.netbeans.NbClipboard.fireChange(NbClipboard.java:326)
>>>    at org.netbeans.NbClipboard.flavorsChanged(NbClipboard.java:318)
>>> 
>>>    at
>> java.desktop/sun.awt.datatransfer.SunClipboard.lambda$checkChange$2(SunClipboard.java:435)
>>> 
>>>    at
>> java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
>>> 
>>>    at
>> java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
>>>    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
>>>    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
>>> 
>>>    at
>> java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
>>> 
>>>    at
>> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
>>>    at
>> java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
>>> 
>>>    at
>> org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
>>> 
>>>    at
>> java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
>>> 
>>> I don't know why there would be an issue opening the system clipboard.
>>> Cut and paste is working between apps at the moment.
>>> 
>>> Scott
>>> 
>>> On Wed, May 12, 2021 at 11:29 AM Scott Palmer <swpalmer@gmail.com>
>> wrote:
>>> 
>>>> Nevermind my request for a disable flag, sorry I'm tired.. forgot the
>> old
>>>> bug database mentioned
>>>> -J-Dnetbeans.slow.system.clipboard.hack=false
>>>> 
>>>> trying that...
>>>> 
>>>> On Wed, May 12, 2021 at 11:22 AM Scott Palmer <swpalmer@gmail.com>
>> wrote:
>>>> 
>>>>> If there is something more I can do please let me know...  I've tried
>> to
>>>>> get any relevant logs (I can't find anything interesting).
>>>>> This basic feature not working is driving me mad.  Can we perhaps
>>>>> just get a flag to disable any old workarounds and just always use the
>>>>> system clipboard?
>>>>> 
>>>>> Scott
>>>>> 
>>>>> On Thu, Apr 29, 2021 at 3:47 PM Scott Palmer <swpalmer@gmail.com>
>> wrote:
>>>>> 
>>>>>> So I've set this in my netbeans.conf file, but I don't notice anything
>>>>>> that stands out in the logging.  Which file would it be in
>> messages.log or
>>>>>> uigestures?
>>>>>> There is nothing relevant in messages.log and uigestures just shows
>>>>>> that a paste was attempted - even though the wrong content was pasted
>> (last
>>>>>> thing copied from within Netbeans rather than what is on the system
>>>>>> clipboard).
>>>>>> 
>>>>>> This is the record form uigestures:
>>>>>> 
>>>>>> <record>
>>>>>>  <date>2021-04-29T11:30:43</date>
>>>>>>  <millis>1619710243434</millis>
>>>>>>  <sequence>1644</sequence>
>>>>>>  <logger>org.netbeans.ui.actions.editor</logger>
>>>>>>  <level>500</level>
>>>>>>  <thread>26</thread>
>>>>>>  <message>UI_ACTION_EDITOR</message>
>>>>>>  <key>UI_ACTION_EDITOR</key>
>>>>>>  <catalog>&lt;null&gt;</catalog>
>>>>>> 
>>>>>> 
>> <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+V,when=1619710243434,modifiers=Ctrl]
>>>>>> on
>>>>>> 
>> org.openide.text.QuietEditorPane[,0,0,1300x11788,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.formdev.flatlaf.ui.FlatMarginBorder@74a6a46d
>>>>>> 
>> ,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=187,g=187,b=187],disabledTextColor=javax.swing.plaf.ColorUIResource[r=136,g=136,b=136],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],selectionColor=javax.swing.plaf.ColorUIResource[r=75,g=110,b=175],kit=org.netbeans.modules.editor.java.JavaKit@3c33afe2
>>>>>> ,typeHandlers=]</param>
>>>>>> 
>>>>>> 
>> <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+V,when=1619710243434,modifiers=Ctrl]
>>>>>> on
>>>>>> 
>> org.openide.text.QuietEditorPane[,0,0,1300x11788,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=com.formdev.flatlaf.ui.FlatMarginBorder@74a6a46d
>>>>>> 
>> ,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=187,g=187,b=187],disabledTextColor=javax.swing.plaf.ColorUIResource[r=136,g=136,b=136],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=187,g=187,b=187],selectionColor=javax.swing.plaf.ColorUIResource[r=75,g=110,b=175],kit=org.netbeans.modules.editor.java.JavaKit@3c33afe2
>>>>>> ,typeHandlers=]</param>
>>>>>> 
>>>>>> 
>> <param>org.netbeans.editor.BaseKit$PasteAction[paste-from-clipboard]</param>
>>>>>>  <param>org.netbeans.editor.BaseKit$PasteAction@70200aee</param>
>>>>>>  <param>paste-from-clipboard</param>
>>>>>> </record>
>>>>>> 
>>>>>> Regards,
>>>>>> 
>>>>>> Scott
>>>>>> 
>>>>>> On Thu, Apr 8, 2021 at 4:20 PM Geertjan Wielenga
>>>>>> <geertjan.wielenga@googlemail.com.invalid> wrote:
>>>>>> 
>>>>>>> As stated there: “ Please run with logging enabled
>>>>>>> (-J-Dorg.netbeans.core.NbClipboard=-1) and attach the
>>>>>>> 
>>>>>>> part of log that records what happened during the broken situation.”
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> 
>>>>>>> Gj
>>>>>>> 
>>>>>>> On Thu, 8 Apr 2021 at 22:12, Scott Palmer <swpalmer@gmail.com>
>> wrote:
>>>>>>> 
>>>>>>>> The discussion on this old bug seems to be most relevant:
>>>>>>>> 
>>>>>>>> https://bz.apache.org/netbeans//show_bug.cgi?id=41098
>>>>>>>> 
>>>>>>>> Over 16 years ago this was apparently a JDK issue. (People
were
>>>>>>> using JDK
>>>>>>>> 1.4 at the time.)
>>>>>>>> See  Comment 21 <
>>>>>>> https://bz.apache.org/netbeans//show_bug.cgi?id=41098#c21
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> I suspect the workaround (which never really worked properly)
isn’t
>>>>>>>> required anymore.
>>>>>>>> 
>>>>>>>> Scott
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> On Apr 8, 2021, at 4:06 PM, Scott Palmer <swpalmer@gmail.com>
>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>> Both directions to/from a NetBeans editor to/from something
>>>>>>> outside.
>>>>>>>> Not consistent, but frequent enough - multiple times a week.
>>>>>>>>> 
>>>>>>>>> It seems when this occurs it is like the NetBeans editor
has a
>>>>>>> private
>>>>>>>> clipboard.  Pasting outside NetBEans pastes the last thing
copied
>>>>>>> outside
>>>>>>>> of NetBeans.  Pasting within a NetBeans editor pastes the
last
>> thing
>>>>>>> copied
>>>>>>>> from a NetBeans editor.
>>>>>>>>> 
>>>>>>>>> Very frustrating when you are trying to copy to an email
or a
>>>>>>> remote
>>>>>>>> desktop session, or between stack overflow etc...
>>>>>>>>> 
>>>>>>>>> Scott
>>>>>>>>> 
>>>>>>>>>> On Apr 8, 2021, at 3:59 PM, Geertjan Wielenga
>>>>>>>> <geertjan.wielenga@googlemail.com.INVALID <mailto:
>>>>>>>> geertjan.wielenga@googlemail.com.INVALID>> wrote:
>>>>>>>>>> 
>>>>>>>>>> It’s 100% about copying text from any NetBeans
editor to
>> somewhere
>>>>>>>> outside
>>>>>>>>>> NetBeans? Or also the reverse? Consistently or sporadically?
>>>>>>>>>> 
>>>>>>>>>> Gj
>>>>>>>>>> 
>>>>>>>>>> On Thu, 8 Apr 2021 at 21:57, Scott Palmer <swpalmer@gmail.com
>>>>>>> <mailto:
>>>>>>>> swpalmer@gmail.com>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> Windows 10
>>>>>>>>>>> JDK 8 through 16
>>>>>>>>>>> 
>>>>>>>>>>> See prior discussion here:
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>> http://mail-archives.apache.org/mod_mbox/netbeans-dev/202102.mbox/%3c21FB7D82-E02C-4A4F-8BD7-605615CC5E3E@gmail.com%3e
>>>>>>>> <
>>>>>>>> 
>>>>>>> 
>> http://mail-archives.apache.org/mod_mbox/netbeans-dev/202102.mbox/%3c21FB7D82-E02C-4A4F-8BD7-605615CC5E3E@gmail.com%3e
>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> It seems many of us are just used to Copy and
Paste not working
>>>>>>>> properly
>>>>>>>>>>> and we have various strategies to work around
it.  It shouldn’t
>>>>>>> be
>>>>>>>> that way.
>>>>>>>>>>> 
>>>>>>>>>>> Scott
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>> On Apr 7, 2021, at 1:15 PM, Geertjan Wielenga
>>>>>>>>>>> <geertjan.wielenga@googlemail.com.INVALID>
wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> Operating system, JDK version, please...
>>>>>>>>>>>> 
>>>>>>>>>>>> Gj
>>>>>>>>>>>> 
>>>>>>>>>>>> On Wed, Apr 7, 2021 at 7:13 PM Scott Palmer
<
>> swpalmer@gmail.com
>>>>>>>> <mailto:swpalmer@gmail.com> <mailto:
>>>>>>>>>>> swpalmer@gmail.com>> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> I know it probably is the same as before,
but today it seems
>>>>>>> worse in
>>>>>>>>>>> 12.4
>>>>>>>>>>>>> beta 2 than it was in 12.3.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Cut and paste is such basic functionality
that when it
>> doesn’t
>>>>>>> work
>>>>>>>> it
>>>>>>>>>>> is
>>>>>>>>>>>>> a major source of frustration.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Today I have been fighting cut and paste
not working with
>>>>>>> NetBeans
>>>>>>>> 12.4
>>>>>>>>>>>>> beta 2 for a few hours.  Jumping through
hoops to cut some
>>>>>>> text out
>>>>>>>> of a
>>>>>>>>>>>>> NetBeans editor and paste it into something
else is not how I
>>>>>>> wanted
>>>>>>>> to
>>>>>>>>>>>>> spend my morning.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> This was discussed briefly in early February
(see thread
>>>>>>> “System
>>>>>>>>>>> Clipboard
>>>>>>>>>>>>> Issues”)
>>>>>>>>>>>>> 
>>>>>>>>>>>>> It is has been reported here
>>>>>>>>>>>>> https://issues.apache.org/jira/browse/NETBEANS-2159
<
>>>>>>>> https://issues.apache.org/jira/browse/NETBEANS-2159> <
>>>>>>>>>>>>> https://issues.apache.org/jira/browse/NETBEANS-2159
<
>>>>>>>>>>> https://issues.apache.org/jira/browse/NETBEANS-2159>>
>>>>>>>>>>>>> Though that description is perhaps incomplete.
 Both copying
>>>>>>> from
>>>>>>>>>>> NetBeans
>>>>>>>>>>>>> and pasting to NetBeans are affected.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> If you are doing cut and paste entirely
within NetBeans you
>>>>>>> may not
>>>>>>>> see
>>>>>>>>>>>>> the issue. It is only when you want to
cut and paste between
>>>>>>> NetBeans
>>>>>>>>>>> and
>>>>>>>>>>>>> an external program that it fails.  And
it fails very
>>>>>>> frequently in
>>>>>>>> that
>>>>>>>>>>>>> case.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> The sense I got was that NetBeans was
trying to work around a
>>>>>>> bug in
>>>>>>>> the
>>>>>>>>>>>>> JRE by using it’s own private clipboard.
 I suspect the
>>>>>>> original JRE
>>>>>>>>>>> issue
>>>>>>>>>>>>> is long gone and NetBeans is just creating
more problems with
>>>>>>> an
>>>>>>>> awkward
>>>>>>>>>>>>> workaround for a problem that isn’t
there.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Scott
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>> 
> -- 
> Eric Bresie
> ebresie@gmail.com

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

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




Mime
View raw message