Re: 12.4 Can we fix cut and paste before release?

2021-05-14 Thread Scott Palmer
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:

  2021-05-14T18:41:49
  1621032109778
  2512
  org.netbeans.ui.actions.editor
  500
  26
  UI_ACTION_EDITOR
  UI_ACTION_EDITOR
  

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=]

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=]

org.netbeans.editor.BaseKit$PasteAction[paste-from-clipboard]
  org.netbeans.editor.BaseKit$PasteAction@6479cfd5
  paste-from-clipboard



Regards,

Scott


On Wed, May 12, 2021 at 4:25 PM Scott Palmer  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.(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  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...
>

[VOTE] Release Apache NetBeans 12.4 (vote candidate 1)

2021-05-14 Thread Geertjan Wielenga
Dear community,

This is our first voting candidate for the 12.4 release of Apache NetBeans.
Please note all requirements below for validating sources and convenience
binaries before voting.

Apache NetBeans 12.4 constitutes all clusters in the Apache NetBeans Git
repository, which together provide the NetBeans Platform (i.e., the
underlying application framework), as well as all the modules that provide
the Java SE, Java EE, PHP, JavaScript and Groovy features of Apache
NetBeans.

Build artifacts are available here:
https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.4/vc1
https://dist.apache.org/repos/dist/dev/netbeans/netbeans-platform/12.4/v1

They were built by the Jenkins pipeline:
https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release124/22/

We are primarily voting on:
https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.4/vc1/netbeans-12.4-source.zip

SHA512:
f8ee78d9ccba513234f855fc516bf251746eb030f6c747239b0db3da2f32932dc9431898fc334a22ebb25f4caec58c292b04d261736bc8de4eb6ead585dffc04

KEYS file:
https://downloads.apache.org/netbeans/KEYS

Associated with the primary source item we have, generated with the
pipeline mentioned above:

-- under https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.4/vc1
binaries associated with the source
netbeans-12.4-bin.zip
as well as update content under nbms folder

-- under
https://dist.apache.org/repos/dist/dev/netbeans/netbeans-platform/12.4/vc1
you will find the platform cluster build
netbeans-platform-12.4-bin.zip
netbeans-platform-12.4-source.zip

Release specific wiki page:
https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+12.4



Voting Requirements

Before voting +1 you are required to download the signed source code
package, compile it as provided, and test the resulting executable on your
own platform, along with also verifying that the package meets the
requirements of the ASF policy on releases - see:

http://www.apache.org/legal/release-policy.html#management

In particular, you should (at least) follow these steps.

1. Download the artefact to be voted on and unzip it.

2. Check that the artefact does not contain any jar files, except for:
 -
platform/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar
 - enterprise/glassfish.common/test/unit/data/nottaDir-4_1_2.jar
 - enterprise/glassfish.common/test/unit/data/subdir/nottaDir-5.0.jar
 - enterprise/payara.common/test/unit/data/nottaDir-4_1_2.jar
 - enterprise/payara.common/test/unit/data/subdir/nottaDir-5.0.jar
 which are only jars by their name

3. Verify the cryptographic signatures, the NOTICE and LICENSE file

4. Build it using the README provided by the artifact.

5. Look in nbbuild/netbeans for the NetBeans installation created by the
build process and try running it.

In addition to checking the sources, you should check the associated
convenience binary zips and nbms at the artifact links above. As well as
checking any artifact functions correctly, you should check that it has
been correctly signed by a PMC member, and that the source being voted on
is sufficient to build the relevant binary.

Separate votes will be held on other convenience binaries, including
installers and Maven artifacts. Those will be dependent on this vote
passing.

This vote is going to be open at least 72 hours, vote with +1, 0, and -1 as
usual. (Please justify -1)

Please mark your vote with (binding) only if you're an Apache NetBeans PMC
member to help with voting admin.

Only respond if you are going to vote, i.e., this is NOT a discussion
thread.

NetBeans 12.4 will be released if and when this vote passes.

Thank you to all contributors for all your hard work!

Geertjan and Neil
Release Managers for Apache NetBeans 12.4


Re: [DISCUSS] CND, cnd.antlr & cnd.apt on top of Antlrv4?

2021-05-14 Thread antonio

Hi John,

Did you git pull first? This changes quickly! :-).

Thanks,
Antonio

El 14/5/21 a las 15:50, John Kostaras escribió:

  Hallo Antonio,

so, basically the error is that it cannot handle escape characters, e.g. \".


Here are some tests:

Syntax error on 7613:20 token recognition error at: '"   wrote:


Thanks John,

I'll be adding assorted compiler-specific cases at [1].

Kind regards,
Antonio


[1]

https://github.com/vieiro/cnd.nextapt/blob/master/cnd.apt.antlr4/src/test/resources/org/netbeans/modules/cnd/nextapt/antlr4/c/regressions.c

On 11/05/2021 17:41, John Kostaras wrote:

#define  CMPLX(__real,__imag) \
  _Pragma("clang diagnostic push") \
*_Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \*
  (double _Complex){(__real),(__imag)} \
  _Pragma("clang diagnostic pop")

line 59 being the highlighted one.

After pulling, building, re-running: java -Dlexer.print=false -jar
target/cnd.apt.antlr4-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/include

I get

-- /usr/include/complex.h --
Syntax error on 59:12 token recognition error at: '"clang diagnostic
ignored \"'
Please report this error on the dev mailing list, including the line

where

the error happeened.%n



On Mon, 10 May 2021 at 23:58, antonio  wrote:


Hi John,

Thanks for the report! It seems we weren't lexing '#error' yet (that's
probably what is on line 59 in "/usr/include/complex.h", right?
Otherwise send me the line 59).

The newest version should detect #error properly (and also checks for
ends of directives, and *.hpp/*.cpp).

Talking about antlr4, it seems the AST is analyzed using the visitor
pattern (that approach is also used in libclang) but NetBeans <= 8.2
expects the whole AST in memory, so it seems we have a long refactoring
road ahead (all this after successfully migrating the CXXParser.g to
antlr4, which reads >3300 lines long).

In parallel I'm giving libclang [1] a run. It seems quite powerful (it
provides completion, precompiled headers, reparsing, diagnostics, AST)
but it may require an extra +30Mb download on Windows (linux users may
apt-get install libclang, though). More on this in a few days.

Thanks again,
Antonio

[1]
https://clang.llvm.org/doxygen/group__CINDEX.html

El 10/5/21 a las 21:39, John Kostaras escribió:

+1 cnd.nextapt

java -Dlexer.print=false -jar
target/cnd.apt.antlr4-1.0-SNAPSHOT-jar-with-dependencies.jar

/usr/include


-- /usr/include/complex.h --
Syntax error on 59:12 token recognition error at: '"clang diagnostic
ignored \"'

Will also take a look. Thanks Antonio. Great initiative.

P.S. I guess .hpp/.cpp files are next?


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

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








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

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








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

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





Re: [DISCUSS] CND, cnd.antlr & cnd.apt on top of Antlrv4?

2021-05-14 Thread John Kostaras
 Hallo Antonio,

so, basically the error is that it cannot handle escape characters, e.g. \".


Here are some tests:

Syntax error on 7613:20 token recognition error at: '"   wrote:

> Thanks John,
>
> I'll be adding assorted compiler-specific cases at [1].
>
> Kind regards,
> Antonio
>
>
> [1]
>
> https://github.com/vieiro/cnd.nextapt/blob/master/cnd.apt.antlr4/src/test/resources/org/netbeans/modules/cnd/nextapt/antlr4/c/regressions.c
>
> On 11/05/2021 17:41, John Kostaras wrote:
> > #define  CMPLX(__real,__imag) \
> >  _Pragma("clang diagnostic push") \
> > *_Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \*
> >  (double _Complex){(__real),(__imag)} \
> >  _Pragma("clang diagnostic pop")
> >
> > line 59 being the highlighted one.
> >
> > After pulling, building, re-running: java -Dlexer.print=false -jar
> > target/cnd.apt.antlr4-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/include
> >
> > I get
> >
> > -- /usr/include/complex.h --
> > Syntax error on 59:12 token recognition error at: '"clang diagnostic
> > ignored \"'
> > Please report this error on the dev mailing list, including the line
> where
> > the error happeened.%n
> >
> >
> >
> > On Mon, 10 May 2021 at 23:58, antonio  wrote:
> >
> >> Hi John,
> >>
> >> Thanks for the report! It seems we weren't lexing '#error' yet (that's
> >> probably what is on line 59 in "/usr/include/complex.h", right?
> >> Otherwise send me the line 59).
> >>
> >> The newest version should detect #error properly (and also checks for
> >> ends of directives, and *.hpp/*.cpp).
> >>
> >> Talking about antlr4, it seems the AST is analyzed using the visitor
> >> pattern (that approach is also used in libclang) but NetBeans <= 8.2
> >> expects the whole AST in memory, so it seems we have a long refactoring
> >> road ahead (all this after successfully migrating the CXXParser.g to
> >> antlr4, which reads >3300 lines long).
> >>
> >> In parallel I'm giving libclang [1] a run. It seems quite powerful (it
> >> provides completion, precompiled headers, reparsing, diagnostics, AST)
> >> but it may require an extra +30Mb download on Windows (linux users may
> >> apt-get install libclang, though). More on this in a few days.
> >>
> >> Thanks again,
> >> Antonio
> >>
> >> [1]
> >> https://clang.llvm.org/doxygen/group__CINDEX.html
> >>
> >> El 10/5/21 a las 21:39, John Kostaras escribió:
> >>> +1 cnd.nextapt
> >>>
> >>> java -Dlexer.print=false -jar
> >>> target/cnd.apt.antlr4-1.0-SNAPSHOT-jar-with-dependencies.jar
> /usr/include
> >>> 
> >>> -- /usr/include/complex.h --
> >>> Syntax error on 59:12 token recognition error at: '"clang diagnostic
> >>> ignored \"'
> >>>
> >>> Will also take a look. Thanks Antonio. Great initiative.
> >>>
> >>> P.S. I guess .hpp/.cpp files are next?
> >>
> >> -
> >> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> >> For additional commands, e-mail: dev-h...@netbeans.apache.org
> >>
> >> For further information about the NetBeans mailing lists, visit:
> >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>
> >>
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>


Re: How to test code changes in NetBeans source

2021-05-14 Thread Svata Dedic

Dne 13. 05. 21 v 18:36 Laszlo Kishalmi napsal(a):
What I need to know is how do you test any changed code? I can't 
believe it is necessary to rebuild the app every time that would 
surely take too long and possibly not very informative. For my system 
it varies between 25 to 30 minutes. So when you change a 
class/module/cluster what do you do to see if it works correctly or 
needs more modifications.




- patch small changes during debugging using Debug | Apply Code Changes 
to patch the code immediately within the running application. Cannot 
change class structure/method signatures and has some other limitations. 
Use Debug | Stack > Pop topmost call to reexecute the changed method 
(though done for you in most cases).


- set Main Project to the module you're changing. Upon run, only that 
module (+ its necessary dependencies, if not built already) are 
compiled. Takes a few seconds + the time to boot the application.


- when chaning layer registrations, make Clean & Rebuild of the affected 
module. If you suspect something is stale in the running app, erase 
nbbuild/testuserdir/var/cache directory (or its part relevant to what 
you suspect was improperly cached).


... and when satisfied, write tests (if possible) to make sure you 
covered the corner cases too and ensure that the Travis shouts loud if 
someone breaks your new functionality in the future :)


-S.

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

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