Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Suggestion: for Template variables
Suggestion: for Template variables [message #95121] Mon, 09 March 2009 09:39 Go to next message
Eclipse UserFriend
Originally posted by: mnm.criion.net

If a variable is left unchanged and is not a php variable it should not
leave the name of the template variable.

Example:
debug(${variable},'${variable}:${user}:${file}:${comment}');

If the comment is left as-is it should not display the text 'comment'
but an empty string ''
Re: Suggestion: for Template variables [message #95154 is a reply to message #95121] Mon, 09 March 2009 16:16 Go to previous messageGo to next message
exceptione is currently offline exceptioneFriend
Messages: 96
Registered: July 2009
Member
Michael N. Madsen schreef:
> If a variable is left unchanged and is not a php variable it should not
> leave the name of the template variable.
>
> Example:
> debug(${variable},'${variable}:${user}:${file}:${comment}');
>
> If the comment is left as-is it should not display the text 'comment'
> but an empty string ''

I really don't understand what you mean. Could you give a more detailed
explanation of the desired behaviour?
Re: Suggestion: for Template variables [message #95169 is a reply to message #95154] Wed, 11 March 2009 08:31 Go to previous message
Eclipse UserFriend
Originally posted by: mnm.criion.net

When defining php templates we use template variables like $dollar for
the $-sign and so on. The template also supports custom variables simply
by ${custom}. These variables are left as text if they are not altered
when executing or calling a tempalte, say for(${dollar}${i}...). When
using the template in the above example the ${comment} if left as
${comment} would end up as "comment" in the php code.

So if I use the debug template:
debug(${variable},'${variable}:${user}:${file}:${comment}');

It would look like this:
debug($myvar,'$myvar:me:script:comment');

So I suggest that the template system replaces unchanged template
variables with an empty string:
debug($myvar,'$myvar:me:script:');

It is a very small thing I know but a nice-to-have for all us neat-freaks :)
Previous Topic:outline connection in new eclipse plugin
Next Topic:corrupt workspace, Eclipse hangs on exit
Goto Forum:
  


Current Time: Wed Feb 08 11:43:32 GMT 2023

Powered by FUDForum. Page generated in 0.01579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top