NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Customize Java FX Project Template in NetBeans v8

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
helasz



Joined: 20 Mar 2017
Posts: 2

PostPosted: Mon Mar 20, 2017 12:01 pm    Post subject: Customize Java FX Project Template in NetBeans v8 Reply with quote

Hi All,

I would like to create a Java FX Project Template (that works) which shows the same wizard as the original 'New Project' (I miss here several options).

I managed to create a Java FX Project Template following the official Howto,
but the resulting Wizard does not show all the options the original wizard for 'New Project/Java FX Application' has. I miss most of all the 'Create
Application Class' option. I guess I would need to alter the WizardIterator
so that the original 'Java FX Application' wizard appear, but I did not
manage (see below) to figure it out how to.

What I did so far:

a) search on the internet and found only the following - loosely related - articles which did not answer my question:

1) Hack Your Own Custom NetBeans Project Templates
https://dzone.com/articles/hack-your-own-custom-project-t
-> https://platform.netbeans.org/tutorials/60/nbm-projectsamples.html

the above description is for NetBeans v6, I did not manage to adapt to my case with
NetBeans v8.2 (with JDK 1.8 ).

2) Creating a Better Java Class Wizard
https://blogs.oracle.com/geertjan/entry/creating_a_better_java_class

here again it speaks about layout.xml, which I do not have (maybe again some
changed API issue)

b) ask on nbusers@netbeans.org
no answer after more than a week.

Any help would be appreciated,

helasz
Back to top
geertjan



Joined: 22 Jan 2014
Posts: 958

PostPosted: Tue Mar 21, 2017 12:10 pm    Post subject: Customize Java FX Project Template in NetBeans v8 Reply with quote

Drop me a mail, maybe we can figure out what you need via Skype and work
on the plugin you're trying to create together.

Thanks,

Geertjan


On 20-3-2017 13:01, helasz wrote:
Quote:
Hi All,

I would like to create a Java FX Project Template (that works) which shows the same wizard as the original 'New Project' (I miss here several options).

I managed to create a Java FX Project Template following the official Howto,
but the resulting Wizard does not show all the options the original wizard for 'New Project/Java FX Application' has. I miss most of all the 'Create
Application Class' option. I guess I would need to alter the WizardIterator
so that the original 'Java FX Application' wizard appear, but I did not
manage (see below) to figure it out how to.

What I did so far:

a) search on the internet and found only the following - loosely related - articles which did not answer my question:

1) Hack Your Own Custom NetBeans Project Templates
https://dzone.com/articles/hack-your-own-custom-project-t
-> https://platform.netbeans.org/tutorials/60/nbm-projectsamples.html

the above description is for NetBeans v6, I did not manage to adapt to my case with
NetBeans v8.2 (with JDK 1.8 ).

2) Creating a Better Java Class Wizard
https://blogs.oracle.com/geertjan/entry/creating_a_better_java_class

here again it speaks about layout.xml, which I do not have (maybe again some
changed API issue)

b) ask on address-removed
no answer after more than a week.

Any help would be appreciated,

helasz



Back to top
helasz



Joined: 20 Mar 2017
Posts: 2

PostPosted: Thu Mar 23, 2017 7:39 am    Post subject: more explanation (+source code) Reply with quote

Thanks geertjan!

In the attached compressed file you will find two further compressed files:

1) multipleUI.zip
this is the complete source of the Java FX Application which I would like to turn into a Project Template.

2) muiPanelVisual.zip
These are the two files I guess I need to customize in the resulting project template. I can post if necessary the whole template project Netbeans 8.2 did create for me (2 MB compressed file)

I think I need to carry out two tasks here:

a) change strings (Application class name, package name, some of the folder names) wherever they appear in the source files (among them in build.xml, test packages, etc.) -> I guess this might be done with a sort of linux' sed command, but there might be more convenient alternatives I am not aware of

b) create (alter the original) folder structure of the new project accordingly

I would probably be able to code these two tasks in Java, but I am sure somebody has already done that before (better than me), so I would prefer to use a code which has been tested.

I have a Skype account but I have not used it for a couple of years, so I need to revisit installation, settings, etc. I will be able t ouse it out of working time (from 17:00 to 21:00 pm CE)

Thanks,
helasz



sampleTemplate.zip
 Description:
Complete source code in question

Download
 Filename:  sampleTemplate.zip
 Filesize:  56.91 KB
 Downloaded:  7 Time(s)

Back to top
geertjan



Joined: 22 Jan 2014
Posts: 958

PostPosted: Thu Mar 23, 2017 9:06 pm    Post subject: Customize Java FX Project Template in NetBeans v8 Reply with quote

OK, let's discuss it on Skype.

Geertjan


On 23-3-2017 8:39, helasz wrote:
Quote:
Thanks geertjan!

In the attached compressed file you will find two further compressed files:

1) multipleUI.zip
this is the complete source of the Java FX Application which I would like to turn into a Project Template.

2) muiPanelVisual.zip
These are the two files I guess I need to customize in the resulting project template. I can post if necessary the whole template project Netbeans 8.2 did create for me (2 MB compressed file)

I think I need to carry out two tasks here:

a) change strings (Application class name, package name, some of the folder names) wherever they appear in the source files (among them in build.xml, test packages, etc.) -> I guess this might be done with a sort of linux' sed command, but there might be more convenient alternatives I am not aware of

b) create (alter the original) folder structure of the new project accordingly

I would probably be able to code these two tasks in Java, but I am sure somebody has already done that before (better than me), so I would prefer to use a code which has been tested.

I have a Skype account but I have not used it for a couple of years, so I need to revisit installation, settings, etc. I will be able t ouse it out of working time (from 17:00 to 21:00 pm CE)

Thanks,
helasz




Attachments:
http://forums.netbeans.org//files/sampletemplate_376.zip
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo