Add Property module functionality in trunk

With this check in the Add Property module's functionality is available in trunk. Thanks to Jan Lahoda. The functionality is available through the Add Property popup menu in the Generate Code (Alt+Insert) popup menu in Java Editor.
 

Comments:

I've been using your Add Property plugin for some time now and was happy to see they included it in the 6.1 release. Only downside is now: I had a great template I was using with the add property plugin, but now I can't seem to find the template to replace nowhere... Is there a reason other beans-templates show up and yours doesn't?

Posted by Jan Vansteenkiste on May 26, 2008 at 09:28 PM PDT #

I know. The internal templates used by NetBeans are not yet customizable :( However, there is a unsupported way to make this work. You should do this only if you know what you are doing. Here goes...

Copy your template to:

config/org.netbeans.modules.java.codestyle/AddProperty.freemarker

under your NetBeans userdir. You can see what the userdir is, in the IDE's About dialog.

The above works because of the way the NetBeans template registration mechanism works (stacked layers) - whereby the userdir/config/\*\* is the topmost layer. So basically you are overriding the NetBeans template by doing this.

For your reference the original template lives at

beans/src/org/netbeans/modules/beans/resources/templates/AddProperty.freemarker

in the NetBeans source tree ( http://hg.netbeans.org/main ). Make sure your template uses the same freemarker variables as those used in the original template.

Please do not file a bug resulting from this unsupported mechanism :)

Posted by Sandip on May 27, 2008 at 01:03 AM PDT #

Thanks for the information.
I already fixed it in a less conventional (configurable) way.
I just replaced the template in the beans-module jar file. I already had a pretty good one (added some code folding and personal markup preference) from using the add-property plugin. Seems to still do the job just fine.

Posted by Jan Vansteenkiste on May 27, 2008 at 05:56 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

sandipchitale

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today