Re: How to run/debug Integration Test class from contextual menu?

2022-01-17 Thread Arnaud bourree
Hi,

Here it is my first contribution to NetBeans:
https://github.com/apache/netbeans/pull/3470
Maybe to late for NB13.

Regardes

Arnaud

Le jeu. 13 janv. 2022 à 15:40, Arnaud bourree  a
écrit :

> Again thanks you William
>
> I said that custom action cannot provide workaround : that's false
>
> Here is workaround to run all tests from on integration test class:
>
>1. right click in editor of you integration test file
>2. select "Run Maven >" then "Goals..."
>3. as Goals, enter "integration-test" or "verify", I select verify
>because I expect post-integration-test to be run after test
>4. as Properties, enter like in integration-test default action:
>test=DummyToSkipUnitTests
>failIfNoTests=false
>it.test=${packageClassName}
>5. check "Remember as" and enter a name, I choose "Run IT test"
>
> Et voila, tests of your integration test class run.
> Thanks to point 5, now, you can run an integration test class by selectin
> "Run IT test" at point 2.
>
> At the end, you should have in nbactions.xml file in your project on
> action likes:
> 
> CUSTOM-Run IT test
> Run IT test
> false
> 
> verify
> 
> 
> DummyYoSkipUnitTests
> false
> ${packageClassName}
> 
> 
>
> Regards,
>
> Arnaud
>
> Le jeu. 13 janv. 2022 à 14:04, Arnaud bourree 
> a écrit :
>
>> Thank you William.
>>
>> I never use Gradle, I suppose you are right.
>>
>> With Maven's project, we can also add custom actions,That could be a good
>> workaround.
>> But actions are not contextual actions such as "Test File" or "Run
>> Focused Test Method", they work at project level not file level, or I don't
>> understand how they work.
>>
>> Regards,
>>
>> Arnaud
>>
>> Le jeu. 13 janv. 2022 à 00:48, * William  a
>> écrit :
>>
>>> Hi Arnaud,
>>>
>>> I am able to run integration tests from the netbeans project tree using
>>> Gradle, may be there is something similar with Maven.  Under each project
>>> you want to use a Gradle task you can set-=up an entry in the project's "
>>> gradle.properties" file, so:
>>>
>>> ##  Netbeans Actions
>>> ##
>>> ##* Gradle tasks
>>> ##
>>> action.custom-1=intTest
>>> action.custom-1.args=--configure-on-demand -w -x check intTest
>>> action.custom-2=intTest_debug
>>> action.custom-2.args=--configure-on-demand -w -x check intTest
>>> --debug-jvm
>>>
>>> I am not sure if there is a Gradle plugin required to achieve this
>>> though, it just worked when I did it after reading a stackoverflow post.
>>>
>>> It is well worth checking for a Maven equivalent to the custom actions.
>>> Another approach is to convert from Maven to Gradle which has a learning
>>> curve of course.
>>>
>>> Good luck there.  I'm for any thing that advances testing.
>>>
>>> --
>>> aloha,
>>>  \_w_/
>>>  ___
>>>
>>> On Tue, 4 Jan 2022 at 23:44, Arnaud bourree 
>>> wrote:
>>>
 Hello,

 I use Netbeans 12.6 on Windows server 2016 with OpenJDK 11 and Maven
 3.6.3

 I've some integration tests written with JUnit that Maven knows how to
 launch with failsafe.
 I'd like to run integration tests like unitary tests from Netbeans.
 I saw that there are project actions "Integration test file" and "Debug
 integration test".
 I expect Netbeans to propose to me something like "Test Integration
 File" instead of "Test File" on JUnit tests matching failsafe configuration
 : it doesn't.

 I didn't find any web pages explaining how to nor any limitation?

 Any idea how to?

 Regards,

 Arnaud

>>>
>>>


Re: [C/C++] Unable to install and use clangd protocol server

2022-01-17 Thread Bradley Willcott

Try the following:

NB: Tools -> Plugins -> Settings:
Activate: Netbeans 8.2 Plugin Portal

Switch to -> Updates:
Click on: [Check for Updates]

Switch to -> Available Plugins:
Install: "C/C++" plugin

Hope this helps.
Brad.

On 18/1/22 05:17, slipbits wrote:


NB 12.5
Windows 7
Cygwin

I'm trying to host all my C/C++ projects on Netbeans (because I like 
NB) and am having some difficulty. NB tools->options->C/C++ requires 
either a ccls or clangd 
protocol server. 
I downloaded clangd 
 for windows 
 
as a zip file and then extracted clangd-index-server-monitor.exe, 
clangd-index-server.exe. clangd-indexer.exe to my cygwin /bin 
directory. Then, in turn, I changed the C/C++ "clangd Location" to 
each of  the files (/bin/). In all cases I was then unable 
to modify my project file (below).


How can I get some functionality out of NB w/C/C++?  I know, I know, 
I've asked this question before, and the answer was something like 
File->New Project->C/C++ etc. Then enter the compile and build 
commands. But no previous guidance on clangd, although there was 
guidance on using the NB 8.2 plugin for C/C++ (which is not listed as 
available in NB 12.5). So, I'm stumped.


= project code =

/*
 * Click 
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt 
to change this license
 * Click 
nbfs://nbhost/SystemFileSystem/Templates/cpplite/CPPTemplate.cpp to 
edit this template

 */
int main(int argc, char* argv[]) {
   exit 1;
}





Re: Why model.clear not working?

2022-01-17 Thread Brad K.

Not sure if this question is appropriate for this mailing list, but...

At the beginning of btnDispSavCurrActionPerformed, you call 
"storeAllAccountInfoinArrayList" ... this happens EVERY TIME you click 
this button. So the underlying list grows every time you click on the 
button.


Since this appears to be an initializer, its probably better
to put this someplace where it only executes once.

BK

On 1/17/2022 5:58 PM, Zulfi Khan wrote:

Subject:
Why model.clear not working?
From:
Zulfi Khan 
Date:
1/17/2022, 5:58 PM

To:
NetBeans Mailing List 

Delivered-To:
zel...@gmail.com
Received:
by 2002:a05:7000:7948:0:0:0:0 with SMTP id r8csp3039488maz; Mon, 17 Jan 
2022 15:59:30 -0800 (PST)

X-Google-Smtp-Source:
ABdhPJz9cl6hpTPLbGlBENtrVobyOwc7tZa7eJoKzBGOgQhCujaPaictLNtsRLdZo1306Hcx0Zge
X-Received:
by 2002:a05:620a:2942:: with SMTP id n2mr16340301qkp.340.1642463970609; 
Mon, 17 Jan 2022 15:59:30 -0800 (PST)

ARC-Seal:
i=1; a=rsa-sha256; t=1642463970; cv=none; d=google.com; s=arc-20160816; 
b=WWGRRWAPLjRbIa+rwCN4uqDuVlKjpOSdUcF0k2LaBYF/MQFdv0t9GrqyWL2vD+Qys9 
gKAxn8LwY3TeaH0NwHXQhqy5Clm87UVAYNtEdtPG4F5WRDbQ0kHki9J+RRRz0JHwTVFH 
eJIOslrZUGYFsQ0uKXLaFSUPYA5fo1y6ob4DyMDxsMLxcaK71OdM0hoonSpqRmLZUuPW 
/PasFgMNMVxuv+9wAqIYSAH1P1FEiYZMtlLnoKPrThI/C5PxcFkg+m5hvmgRe3G6WbPE 
FO08dBfxBhEX66VVWyy7ipEs7o/icaSFSrUnrWxL5bapL1rJU+e2WZ0i5D2b7mzZLSzp dRGQ==

ARC-Message-Signature:
i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 
h=references:mime-version:subject:message-id:to:from:date 
:delivered-to:list-id:list-post:list-unsubscribe:list-help 
:precedence:mailing-list; 
bh=rYKmbLQK3wkpZ/mE6HfBx1qpSGjS8F1+/TYhJp38t94=; 
b=WFz23UEmtb4c1y9Y/OcLOyL5UayzbNHHWa1Ok7UYL8rnum91XbhgM9e5FVlO3dO0m+ 
vEXqT9kCSCC+UGjsfWNZ6c1+siNAkB9pHqRAevgpsedB1Q+aJHJ/zcZ3UzXxlvH8 
MZkNWaFzt3sCMHnyg/8veEtkJRUNpU7eEWFAk82s3YvRSTpCjsUm5prGGz73EQnw7tR3 
tLIfX0Q77surcp20mpAQZboZBy270TRbgsa9RYjOJkCmebgWhSkRGXEFBrG2lKC1NsWv 
7C01e5jsJgTi/MeDzWP1Lbw/MvG632dZtE8MMUlt16TSWH/fKE/1YBUOvSF6s4dKX8xX 7cPg==

ARC-Authentication-Results:
i=1; mx.google.com; spf=pass (google.com: domain of 
users-return-8464-zelmak=gmail@netbeans.apache.org designates 
3.227.148.255 as permitted sender) 
smtp.mailfrom="users-return-8464-zelmak=gmail@netbeans.apache.org"

Return-Path:

Received:
from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org. 
[3.227.148.255]) by mx.google.com with ESMTPS id 
c9si4700991qtd.56.2022.01.17.15.59.30 for  
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 
2022 15:59:30 -0800 (PST)

Received-SPF:
pass (google.com: domain of 
users-return-8464-zelmak=gmail@netbeans.apache.org designates 
3.227.148.255 as permitted sender) client-ip=3.227.148.255;

Authentication-Results:
mx.google.com; spf=pass (google.com: domain of 
users-return-8464-zelmak=gmail@netbeans.apache.org designates 
3.227.148.255 as permitted sender) 
smtp.mailfrom="users-return-8464-zelmak=gmail@netbeans.apache.org"

Received:
from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by 
mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) 
with SMTP id 959B8404F3 for ; Mon, 17 Jan 2022 
23:59:27 + (UTC)

Received:
(qmail 66331 invoked by uid 500); 17 Jan 2022 23:59:26 -
Mailing-List:
contact users-h...@netbeans.apache.org; run by ezmlm
Precedence:
bulk
List-Help:

List-Unsubscribe:

List-Post:

List-Id:

Delivered-To:
mailing list users@netbeans.apache.org
Received:
(qmail 66321 invoked by uid 99); 17 Jan 2022 23:59:26 -
Received:
from spamproc1-he-fi.apache.org (HELO spamproc1-he-fi.apache.org) 
(95.217.134.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 
2022 23:59:26 +

Received:
from localhost (localhost [127.0.0.1]) by spamproc1-he-fi.apache.org 
(ASF Mail Server at spamproc1-he-fi.apache.org) with ESMTP id 90288C0556 
for ; Mon, 17 Jan 2022 23:59:25 + (UTC)

X-Virus-Scanned:
Debian amavisd-new at spamproc1-he-fi.apache.org
X-Spam-Flag:
NO
X-Spam-Score:
0.249
X-Spam-Status:
No, score=0.249 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, 
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 
FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=0.2, 
RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 
autolearn=disabled

Authentication-Results:
spamproc1-he-fi.apache.org (amavisd-new); dkim=pass (2048-bit key) 
header.d=yahoo.com

Received:
from mx1-he-de.apache.org ([116.203.227.195]) by localhost 
(spamproc1-he-fi.apache.org [95.217.134.168]) (amavisd-new, port 10024) 
with ESMTP id w5L4ppckx7oO for ; Mon, 17 Jan 
2022 23:59:24 + (UTC)

Received-SPF:
Pass (mailfrom) identity=mailfrom; client-ip=66.163.189.147; 
helo=sonic314-21.consmr.mail.ne1.yahoo.com; 
envelope-from=zulfi6...@yahoo.com; receiver=

Received:
from sonic314-21.consmr.mail.ne1.yahoo.com 
(sonic314-21.consmr.mail.ne1.yahoo.com [66.163.189.147]) by 

Why model.clear not working?

2022-01-17 Thread Zulfi Khan
Hi,I am doing model .clear but still, listbox holds duplicate entries. I have 
problem in the function: 

 private void btnDispSavCurrActionPerformed(java.awt.event.ActionEvent evt)

Following is my JFrame derived class, Somebody please guide me.
Zulfi.



package com.mycompany.inher2rbuttarrlist2;

import java.util.ArrayList;
import javax.swing.ButtonGroup;
import javax.swing.DefaultListModel;

/**
 *
 * @author zulfi
 */
public class RButtArrListJFrame extends javax.swing.JFrame {
    ArrayList al_allAcc = new ArrayList<>();
    //ArrayList al_sav = new ArrayList();
    DefaultListModel  model = new DefaultListModel();
    Account acc1 = new Account(200.0, 100, "SSUET1", 's');
    Account acc2 = new Account(300.0, 101, "SSUET2", 's');
    Account acc3 = new Account(400.0, 102, "SSUET3", 's');
    Account acc4 = new Account(500.0, 103, "SSUET4", 'c');
    Account acc5 = new Account(600.0, 104, "SSUET5", 'c'); 
    ButtonGroup group = new ButtonGroup();
    /**
 * Creates new form RButtArrListJFrame
 */
    public RButtArrListJFrame() {
    initComponents();
    group.add(currAccRadBtn);
    group.add(savAccRadBtn);
    }
    
    void storeAllAccountInfoinArrayList(){
    //https://www.delftstack.com/howto/java/adding-objects-to-arraylist/
    al_allAcc.add(acc1);
    al_allAcc.add(acc2);
    al_allAcc.add(acc3);
    al_allAcc.add(acc4);
    al_allAcc.add(acc5);
    }
    /**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
    @SuppressWarnings("unchecked")
    //  
     
    private void initComponents() {

    btnDispSavCurr = new javax.swing.JButton();
    btnDispAll = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList<>();
    savAccRadBtn = new javax.swing.JRadioButton();
    currAccRadBtn = new javax.swing.JRadioButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    btnDispSavCurr.setText("Display Info Saving or Current");
    btnDispSavCurr.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btnDispSavCurrActionPerformed(evt);
    }
    });

    btnDispAll.setText("Display All Accounts");
    btnDispAll.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btnDispAllActionPerformed(evt);
    }
    });

    jScrollPane1.setViewportView(jList1);

    savAccRadBtn.setText("Saving Account");

    currAccRadBtn.setText("Current Account");

    javax.swing.GroupLayout layout = new 
javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, 
layout.createSequentialGroup()
    
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, 
layout.createSequentialGroup()
    .addGap(81, 81, 81)
    .addComponent(btnDispSavCurr)
    
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 143, 
Short.MAX_VALUE)
    .addComponent(btnDispAll, 
javax.swing.GroupLayout.PREFERRED_SIZE, 144, 
javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(layout.createSequentialGroup()
    .addGap(64, 64, 64)
    
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(savAccRadBtn)
    .addComponent(currAccRadBtn))
    
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jScrollPane1, 
javax.swing.GroupLayout.PREFERRED_SIZE, 152, 
javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addGap(49, 49, 49))
    );
    layout.setVerticalGroup(
    
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(34, 34, 34)
    
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(btnDispSavCurr)
    .addComponent(btnDispAll))
    
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
   

[C/C++] Unable to install and use clangd protocol server

2022-01-17 Thread slipbits

NB 12.5
Windows 7
Cygwin

I'm trying to host all my C/C++ projects on Netbeans (because I like NB) 
and am having some difficulty. NB tools->options->C/C++ requires either 
a ccls or clangd 
protocol server. I 
downloaded clangd  
for windows 
 
as a zip file and then extracted clangd-index-server-monitor.exe, 
clangd-index-server.exe. clangd-indexer.exe to my cygwin /bin directory. 
Then, in turn, I changed the C/C++ "clangd Location" to each of  the 
files (/bin/). In all cases I was then unable to modify my 
project file (below).


How can I get some functionality out of NB w/C/C++?  I know, I know, 
I've asked this question before, and the answer was something like 
File->New Project->C/C++ etc. Then enter the compile and build commands. 
But no previous guidance on clangd, although there was guidance on using 
the NB 8.2 plugin for C/C++ (which is not listed as available in NB 
12.5). So, I'm stumped.


= project code =

/*
 * Click 
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to 
change this license
 * Click 
nbfs://nbhost/SystemFileSystem/Templates/cpplite/CPPTemplate.cpp to edit 
this template

 */
int main(int argc, char* argv[]) {
   exit 1;
}




Re: Blank Terminal window on M1 Mac with Netbeans 12.5

2022-01-17 Thread antonio

Pretty cool!

The basic idea is to run the "buildall.sh" at [1], see where it fails 
(probably some #include's, etc.), fix it, build a binary and add the 
generated dylib? to the binary in the "external" directory.


Please let me know if you need help, or if you want me to install you a 
bitcoin miner in your brand new box.


Kind regards,
Antonio


[1]
https://github.com/apache/netbeans/tree/master/ide/dlight.nativeexecution/tools

[2]
https://github.com/apache/netbeans/blob/master/ide/dlight.nativeexecution/external/exechlp-1.0-license.txt


On 17/01/2022 17:15, Neil C Smith wrote:

I've just invested in an M1 mac mini for testing purposes so will also
try and have a look at this.


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

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



Re: Blank Terminal window on M1 Mac with Netbeans 12.5

2022-01-17 Thread antonio

Pretty cool!

The basic idea is to run the "buildall.sh" at [1], see where it fails 
(probably some #include's, etc.), build a binary and add the generated 
dylib? to the binary in the "external" directory.


Please let me know if you need help, or if you want me to install you a 
bitcoin miner in your brand new box.


Kind regards,
Antonio


[1]
https://github.com/apache/netbeans/tree/master/ide/dlight.nativeexecution/tools

[2]
https://github.com/apache/netbeans/blob/master/ide/dlight.nativeexecution/external/exechlp-1.0-license.txt


On 17/01/2022 17:15, Neil C Smith wrote:

I've just invested in an M1 mac mini for testing purposes so will also
try and have a look at this.


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

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



Re: Blank Terminal window on M1 Mac with Netbeans 12.5

2022-01-17 Thread Tim Mullé
Hi Neil,

I copied the info over to https://github.com/apache/netbeans/issues/3467 


Let me know if there is any other info you need

Thanks everyone..



> On Jan 17, 2022, at 11:15 AM, Neil C Smith  wrote:
> 
> On Mon, 17 Jan 2022 at 07:57, antonio  wrote:
>> Thanks for your report!
>> 
>> It seems we're not contemplating the new M1 Apple computers. Since not
>> all of us have access to one of these,
> 
> I've just invested in an M1 mac mini for testing purposes so will also
> try and have a look at this.
> 
>> would you please add the
>> following to this ticket?
> 
> Yes, I know it's a pain, but could you possibly copy over to
> https://github.com/apache/netbeans/issues/new/choose ?
> 
> We're currently in the process of migrating issue tracking to GitHub,
> initially for the NetBeans 13 release candidates.  This would be a
> good one to at least see if we can get a fix in for 13.
> 
> Best wishes,
> 
> Neil
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 



Re: Blank Terminal window on M1 Mac with Netbeans 12.5

2022-01-17 Thread Neil C Smith
On Mon, 17 Jan 2022 at 07:57, antonio  wrote:
> Thanks for your report!
>
> It seems we're not contemplating the new M1 Apple computers. Since not
> all of us have access to one of these,

I've just invested in an M1 mac mini for testing purposes so will also
try and have a look at this.

> would you please add the
> following to this ticket?

Yes, I know it's a pain, but could you possibly copy over to
https://github.com/apache/netbeans/issues/new/choose ?

We're currently in the process of migrating issue tracking to GitHub,
initially for the NetBeans 13 release candidates.  This would be a
good one to at least see if we can get a fix in for 13.

Best wishes,

Neil

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

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