Java Sources Strings table

<P><FONT SIZE=2 FACE="Arial">My Java Sources strings are not being expanded correctly in new source files.</FONT>

</P>

<P><FONT SIZE=2 FACE="Arial">In my project, I have changed the value of the "USER" string to my full name and defined a new string, "EMAIL". Several times I have created a new Java class (using the Class template) and the strings have not been expanded correctly. I have edited the template so the author tag reads "@author __USER__, __EMAIL__". __USER__ has been expanded to my default Windows user name, and __EMAIL__ has not been expanded at all. So I have gone to the Options dialog to check my settings, and sure enough, there they are. Then I have created another class the same way to make sure I'm not going crazy, and the strings have been correctly expanded. As I said, I've gone through this several times.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">This is a new behavior as of the 3.4 betas. Anyone else seeing this?</FONT>

</P>

<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>

</P>

<P><FONT SIZE=2 FACE="Arial">-Andy</FONT>

</P>

[1288 byte] By [EWU] at [2007-11-25 16:51:20]
# 1

Andrew DeTorres (EWU) wrote:

> In my project, I have changed the value of the "USER" string to my full

> name and defined a new string, "EMAIL". [snip]So I

> have gone to the Options dialog to check my settings, and sure enough,

> there they are. Then I have created another class the same way to make

> sure I'm not going crazy, and the strings have been correctly expanded.

> As I said, I've gone through this several times.

I think these substitutions are project-specific, perhaps you have been

creating new projects?

-Jesse

--

Jesse Glick <mailto:jesse.glick@sun.com> x22801

NetBeans, Open APIs <http://www.netbeans.org/>

Glick,Jesse at 2007-7-2 23:50:37 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 2

<P><FONT SIZE=2>What I described is within one project. So, the first time (after a restart?) that I create a new class from the Class template, it looks like it uses the default substitutions (the global values?). I can see that the settings for the current project have been modified (by looking in the Options dialog). Then when I create another class, I get the correct substitutions.</FONT></P>

<P><FONT SIZE=2>...Ok. I just did a little experiment. I hadn't created a new class today since starting NetBeans (current set up: Windows NT, JDK 1.4.1beta, NetBeans 3.4RC1). I created Test1.java (I always use right-click->New->Java Classes->Class in Explorer for this). Wrong substitutions. Next I created Test2.java. Wrong substitutions. Next I opened the Options dialog and created Test3.java. Wrong substitutions. Next I selected the Editing->Java Sources node. At this point, I can partially see my settings in the right side of the Options dialog. I created Test4.java. Correct substitutions. As I create more classes, the substitutions continue to be correct.</FONT></P>

<P><FONT SIZE=2>-Andy</FONT>

</P>

<P><FONT SIZE=2>--Original Message--</FONT>


<FONT SIZE=2>From: Jesse Glick [<A HREF="mailto:jesse.glick@sun.com">mailto:jesse.glick@sun.com</A>]</ FONT>


<FONT SIZE=2>Sent: Tuesday, August 06, 2002 11:16 AM</FONT>


<FONT SIZE=2>To: nbusers@netbeans.org</FONT>


<FONT SIZE=2>Subject: Re: Java Sources Strings table</FONT>

</P>


<P><FONT SIZE=2>Andrew DeTorres (EWU) wrote:</FONT>


<FONT SIZE=2>> In my project, I have changed the value of the "USER" string to my full </FONT>


<FONT SIZE=2>> name and defined a new string, "EMAIL". [snip] So I</FONT>


<FONT SIZE=2>> have gone to the Options dialog to check my settings, and sure enough, </FONT>


<FONT SIZE=2>> there they are. Then I have created another class the same way to make </FONT>


<FONT SIZE=2>> sure I'm not going crazy, and the strings have been correctly expanded. </FONT>


<FONT SIZE=2>> As I said, I've gone through this several times.</FONT>

</P>

<P><FONT SIZE=2>I think these substitutions are project-specific, perhaps you have been </FONT>


<FONT SIZE=2>creating new projects?</FONT>

</P>

<P><FONT SIZE=2>-Jesse</FONT>

</P>

<P><FONT SIZE=2>-- </FONT>


<FONT SIZE=2>Jesse Glick <<A HREF="mailto:jesse.glick@sun.com">mailto:jesse.glick@sun.com</A>> x22801</FONT>


<FONT SIZE=2>NetBeans, Open APIs <<A HREF="http://www.netbeans.org/" TARGET="_blank">http://www.netbeans.org/</A>></FONT>

</P>

EWU at 2007-7-2 23:50:37 > top of Java-index,Archived Forums,Sun ONE Studio 4...
# 3

Andrew DeTorres (EWU) wrote:

> ...Ok. I just did a little experiment. I hadn't created a new class

> today since starting NetBeans (current set up: Windows NT, JDK

> 1.4.1beta, NetBeans 3.4RC1). I created Test1.java (I always use

> right-click->New->Java Classes->Class in Explorer for this). Wrong

> substitutions. Next I created Test2.java. Wrong substitutions. Next I

> opened the Options dialog and created Test3.java. Wrong substitutions.

> Next I selected the Editing->Java Sources node. At this point, I can

> partially see my settings in the right side of the Options dialog. I

> created Test4.java. Correct substitutions. As I create more classes,

> the substitutions continue to be correct.

Definitely a bug. I can't reproduce it though; the substs work fine for

me after a restart without opening Options. I suggest you file a bug,

but you may need to provide really explicit steps to reproduce: starting

with a fresh user directory and walking through every step.

-Jesse

--

Jesse Glick <mailto:jesse.glick@sun.com> x22801

NetBeans, Open APIs <http://www.netbeans.org/>

Glick,Jesse at 2007-7-2 23:50:37 > top of Java-index,Archived Forums,Sun ONE Studio 4...