NetBeans Forums

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

Project Sample plugin devt: templating?

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



Joined: 02 Nov 2016
Posts: 3

PostPosted: Wed Nov 02, 2016 9:55 pm    Post subject: Project Sample plugin devt: templating? Reply with quote

Hi,

I am creating a netbeans plugin in order to allow users to create a java project according to a given structure, using a given set of libs and so on...

I've followed the NetBeans Project Sample Module Tutorial and the base is there and working.

But now I would want to go further and to use templating in order to, for instance, update the default class name to the name of the project (set in the wizard)...

But I can't find any documentation on how to do this. Is it even possible to use freemarker for such tasks, the same way as it is possible for File Template as described in File Template Module Tutorial?

Thanks in advance,

Note: if it is not the right place to post such topic related to third party plugin development, please redirect me to the right one Wink
Back to top
geertjan



Joined: 22 Jan 2014
Posts: 978

PostPosted: Fri Nov 04, 2016 11:44 am    Post subject: Project Sample plugin devt: templating? Reply with quote

This should still work:

https://blogs.oracle.com/geertjan/entry/extension_to_extended_java_project

https://blogs.oracle.com/geertjan/entry/extension_to_extended_java_project1

Gj

On 2-11-2016 22:55, djey wrote:
Quote:
Hi,

I am creating a netbeans plugin in order to allow users to create a java project according to a given structure, using a given set of libs and so on...

I've followed the NetBeans Project Sample Module Tutorial and the base is there and working.

But now I would want to go further and to use templating in order to, for instance, update the default class name to the name of the project (set in the wizard)...

But I can't find any documentation on how to do this. Is it even possible to use freemarker for such tasks, the same way as it is possible for File Template as described in File Template Module Tutorial?

Thanks in advance,



Back to top
djey



Joined: 02 Nov 2016
Posts: 3

PostPosted: Tue Nov 08, 2016 10:23 pm    Post subject: Reply with quote

Perfect! I finally manage to have the time to test this post ideas, now it works greatly. I can create exactly the .java file I want.

Thanks!
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