Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

2020-12-16 Thread Andreas Reichel


On Thu, 2020-12-17 at 06:29 +0100, Geertjan Wielenga wrote:
> Do you need to use nb-javac?

Good Morning Geertjan.

Thank you for replying so fast.
I can run Netbeans 12.2 without that plugin of course, but somehow this
beats the purpose:

1) Netbeans urges the installation of this plugin every start (and I
always wondered, why it is not simply included)
2) Compile on Save requests this plugin
3) I actually do not care and just want an IDE with proper Syntax and
API Doc Helpers and Code Completion

I'd rather stick with Netbeans 12.1 if this plugin is failing. Just
thought that 12.2 was a stable release and was supposed to work.
I want to struggle with my own code, not with Netbeans please.

Best regards
Andreas


Re: print before take Scanner input not working

2020-12-16 Thread Laszlo Kishalmi

The build tool is important here.

I think you are experiencing: NETBEANS-4617

The fix for that is in 12.2: https://github.com/apache/netbeans/pull/2270

It is marked to be backported to NetBeans 12.0-u2


On 12/16/20 10:11 AM, Christopher C. Lanz wrote:

Hello,

For many years, and both with NetBeans and with just a terminal, I 
have used methods like this, to prompt the user to enter (say) an integer:


public static int inkeyInteger( String message ){

    System.out.print( message );
    Scanner console = new Scanner(System.in);
    return console.nextInt();

}

Now in NetBeans 12, this code fails - the message is not printed until 
after the user supplies data to the Scanner.


I have tried all the possible orderings of these 3 lines of code, and 
passing the Scanner, etc. etc. I have searched StackOverflow.


It can be worked around if I print the message before calling a method 
containing the scanner definition and next() call. This will require 
changing hundreds of method calls throughout a large program.


Is there a workaround or patch etc.?

Chris Lanz

Department of Computer Science

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 267 2407

315 268 1547


Nature and nature's laws lay hid in night:
God said, /Let Newton be!/ and all was light. (Pope)

It did not last: the Devil howling "Ho!
Let Einstein be!" restored the status quo. (Squire)




print before take Scanner input not working

2020-12-16 Thread Christopher C. Lanz
Hello,

For many years, and both with NetBeans and with just a terminal, I have used 
methods like this, to prompt the user to enter (say) an integer:

public static int inkeyInteger( String message ){

System.out.print( message );
Scanner console = new Scanner(System.in);
return console.nextInt();

}

Now in NetBeans 12, this code fails - the message is not printed until after 
the user supplies data to the Scanner.

I have tried all the possible orderings of these 3 lines of code, and passing 
the Scanner, etc. etc. I have searched StackOverflow.

It can be worked around if I print the message before calling a method 
containing the scanner definition and next() call. This will require changing 
hundreds of method calls throughout a large program.

Is there a workaround or patch etc.?


Chris Lanz

Department of Computer Science

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 267 2407

315 268 1547


Nature and nature's laws lay hid in night:
God said, Let Newton be! and all was light. (Pope)

It did not last: the Devil howling "Ho!
Let Einstein be!" restored the status quo. (Squire)



Does NetBeans install a Maven settings.xml?

2020-12-16 Thread Will Hartung
I was debugging a repository issue with a maven project, and noticed that
the pom based repository was being mirrored by Maven Central.

I found this section in my ~/.m2/settings.xml file:
  

  maven-central
  https://repo1.maven.org/maven2/

*,!eclipselink.repository,!jvnet-nexus-promoted,!netbeans.repository

  

Looking over the settings.xml file, it appears that this is entirely a
NetBeans construct. (I have no memory of tweaking settings.xml myself).

Does NB install/update a local settings.xml? When does it do this?


Localization issue with MenuBar(DataFolder) + declarative action registrations

2020-12-16 Thread Jerome Lelasseux
Hi
I use the menuBar(DataFolder) constructor to automatically build a MenuBar from 
actions registered in the layer.xml:

menuBar = new 
MenuBar(DataFolder.findFolder(FileUtil.getConfigFile("MyMenuBar")));

And below is an example of the ImportMix action in the "MixFile" submenu:

@ActionID(category = "MixConsole", id = 
"org.jjazz.ui.mixconsole.actions.importmix")
@ActionRegistration(displayName = "#CTL_ImportMix", lazy = true)
@ActionReferences(
    {
    @ActionReference(path = "MyMenuBar/MixFile", position = 200)
    })
public class ImportMix extends AbstractAction



This works well and I can localize the ImportMix action name. 

However how to localize the submenu name ?  ("MixFile" in the example)