Re:Re: RE: Netbeans IDE 12.6/JavaFX 17/Java 11

2022-01-19 Thread 王东华
The tutorial is for Java Ant Application, we can integrate JavaFX in Netbeans 
Java Ant Application.
Now, we can not integrated JavaFX for Netbeans Platform Application
















在 2022-01-19 21:50:47,"Jean-Marc Borer"  写道:

Have a look here. There is a JavaFX tutorial. 
https://netbeans.apache.org/kb/docs/java/index.html



On Fri, Jan 14, 2022 at 11:08 AM wdh_456  wrote:

Thank you very much, I will try this way.







发自我的小米手机
在 Giovanni Dal Maso ,2022年1月14日 下午6:05写道:


We had similar problems and in the end it was better to switch to maven.

Just create your Netbeans Platform Application using “Java with Maven” > 
“NetBeans Application” and add JavaFX as a maven dependency to the module that 
requires it.

 

For example, add the following to the  inside the pom.xml of the 
NB Module:



org.openjfx

javafx-controls

17.0.1





org.openjfx

javafx-fxml

17.0.1





org.openjfx

javafx-swing

17.0.1



 

HTH

 

 

From:王东华 
Sent: giovedì 13 gennaio 2022 09:26
To:users@netbeans.apache.org
Subject: Netbeans IDE 12.6/JavaFX 17/Java 11

 

Dear,

Our development environment: Netbeans IDE 12.6, JavaFX 17, Java 11

I have create a Netbeans Platform Application and want to use JavaFX,

I have add JavaFX jar into the wrapped jars, and there are no compile error for 
JavaFX in Netbeans IDE,

However, when I run the application, IDE will show following exception:

java.lang.RuntimeException: No toolkit found

at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)

at 
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)

at 
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)

at javafx.embed.swing.JFXPanel.lambda$initFx$1(JFXPanel.java:225)

[catch] at java.base/java.lang.Thread.run(Thread.java:829)

And I don't know how to add -module-path and --add-modules for Netbeans 
Platform Application

 

 

- 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: [C/C++] Unable to install and use clangd protocol server

2022-01-19 Thread slipbits

NB 12.5
Win-7-64
cygwin
gcc v11 installed under cygwin
clang v8.0.1 installed under cygwin
clangd v13.0.0 installed under Win-7

Hi (and sorry for being a pest);

I'm still having difficulty.

1. clang/clangd downloaded and installed. (no issue)
2. Tools->Option->C/C++->ccls configuration changed to clangd location.
   (no issue)
3. Tools->Option->C/C++->code assistance->C++ Compiler changed to the
   current location of the include libraries. (issue).
4. Compile fails to find . I have verified that this file
   exists and is in the C++ paths in Step 3.
5. Right click on ->Build and found 4 entries;
   Configuration Name, Build, Clean, and Run. All were empty. David
   said to put the include directories here. Does this mean that the
   include directories are inserted directly, as in Step 3 above, or
   does the gcc build parameters have to be used. I have inserted all
   of the directories in Step 3 into Build w/wo gcc link prefixes
   without good effect.
6. What purpose does Step 3 have if the include files are not used in
   the compile. I could understand that the Step 3 includes are for all
   builds and the Step 5 includes are for project specific needs, but I
   can't get either to work.

OK. What am I getting wrong. Are my assumptions  incorrect (Step 3/6) or 
is there something that I'm missing (probably), or both (most likely). 
Do I have to install NB 12.6 (it's on my todo list so this really isn't 
an issue).


thanks
art

=== code ===
#include 

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

On 1/18/2022 11:29 AM, slipbits wrote:

Thanks;

After I followed Bradley Willcott's directions I returned to 
Tools->Options->C/C++ and found that it (now) contained linkages to 
clang, not clangd. Before this change the C/C++ options where for ccls 
and clangd, not clang. You are probably correct in that I downloaded 
the indexer, but I think that NB should change to 'clangd' to 'clang' 
to clear up any confusion, not to say that I won't continued to be 
confused.


art

On 1/18/2022 9:33 AM, antonio wrote:

Hi there,

The "clangd for Windows" does not have any "clangd-index-server.exe", 
nor "clangd-indexer.exe", just a "clangd.exe". You've probably 
downloaded the indexer, not the clangd.


Just unzip clangd zip file somewhere in a directory in your disk. If 
you have this directory in your PATH then NetBeans should find it for 
you. Otherwise you'll have to add it manually (say 
"C:\Users\whatever\clang\bin\clangd.exe).


Cheers,
Antonio



On 17/01/2022 22:17, slipbits wrote:
'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).


H



-
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



-
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


(Linux) installer: default value of netbeans_jdkhome

2022-01-19 Thread Mitch Claborn
It would be helpful if the Linux installer would read the value of 
netbeans.con (netbeans_jdkhome) from the previously installed version 
and use that as the default in the installer dialog.

--

Mitch

-
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: RE: Netbeans IDE 12.6/JavaFX 17/Java 11

2022-01-19 Thread Jean-Marc Borer
Have a look here. There is a JavaFX tutorial.
https://netbeans.apache.org/kb/docs/java/index.html

On Fri, Jan 14, 2022 at 11:08 AM wdh_456  wrote:

> Thank you very much, I will try this way.
>
>
>
> 发自我的小米手机
> 在 Giovanni Dal Maso ,2022年1月14日 下午6:05写道:
>
> We had similar problems and in the end it was better to switch to maven.
>
> Just create your Netbeans Platform Application using “Java with Maven” >
> “NetBeans Application” and add JavaFX as a maven dependency to the module
> that requires it.
>
>
>
> For example, add the following to the  inside the pom.xml of
> the NB Module:
>
> 
>
> org.openjfx
>
> javafx-controls
>
> 17.0.1
>
> 
>
> 
>
> org.openjfx
>
> javafx-fxml
>
> 17.0.1
>
> 
>
> 
>
> org.openjfx
>
> javafx-swing
>
> 17.0.1
>
> 
>
>
>
> HTH
>
>
>
>
>
> *From:* 王东华 
> *Sent:* giovedì 13 gennaio 2022 09:26
> *To:* users@netbeans.apache.org
> *Subject:* Netbeans IDE 12.6/JavaFX 17/Java 11
>
>
>
> Dear,
>
> Our development environment: Netbeans IDE 12.6, JavaFX 17, Java 11
>
> I have create a Netbeans Platform Application and want to use JavaFX,
>
> I have add JavaFX jar into the wrapped jars, and there are no compile
> error for JavaFX in Netbeans IDE,
>
> However, when I run the application, IDE will show following exception:
>
> java.lang.RuntimeException: No toolkit found
>
> at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)
>
> at
> com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
>
> at
> com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
>
> at
> javafx.embed.swing.JFXPanel.lambda$initFx$1(JFXPanel.java:225)
>
> [catch] at java.base/java.lang.Thread.run(Thread.java:829)
>
> And I don't know how to add -module-path and --add-modules for Netbeans
> Platform Application
>
>
>
>
>
> - 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


How to find the TopComponent(s) editor(s) for a DataLoader file

2022-01-19 Thread Jean-Marc Borer
Hi there,

I am struggling how to get access to the TopComponent of a file editor from
MultidataDataObject.

I register a multi view editor for that object type and now have all the
default cookies installed. However, I want to selette the source editor
view on "Edit" acion and the visual view on "Open".

So I did:

public RosterDataObject(FileObject pf, MultiFileLoader loader) throws
DataObjectExistsException, IOException {
super(pf, loader);
registerEditor("text/roster+xml", true);
getCookieSet().add(new OpenCookie() {
@Override
public void open() {
EditorCookie ec =
getCookieSet().getCookie(EditorCookie.class);
((CloneableEditorSupport)ec).
ec.open();
// TC is now supposed to be open and activated so we get it
TopComponent activated =
WindowManager.getDefault().getRegistry().getActivated();
MultiViewHandler mvh =
MultiViews.findMultiViewHandler(activated);
for (MultiViewPerspective perspective :
mvh.getPerspectives()) {
if
(RosterVisualElement.ID.equals(perspective.preferredID())) {
mvh.requestActive(perspective);
}
System.err.println(perspective);
}
}
});
}

However, the problem is that I open the editor twice and I am not sure the
latter one is actually the active one.