?? reference.vm
字號:
#*@test reference.vmThis template is used for Velocity regression testing.If you alter this template make sure you change thecorresponding comparison file so that the regression test doesn't fail incorrectly.*##set($_foo = "bar")$_foo#if ($_foo.equals("bar")) \$_foo equals "bar" : $_foo#endLate introspection :$vector.firstElement().length()More stupid reference escaping ...When it does exist in the context :#set($foo = "foo")$foo\$foo\$!foo$\!foo$\\!foo\$\!fooAnd when it doesn't :$bar\$bar\$!bar (because it's just text...)$\!foo$\\!foo$\\\!foo$\\\\!foo\\$\!fooMisc tests :[$foo.bar]Test lower case property names $provider.Title$provider.title#foreach($i in $provider.vector) $i#end#foreach($i in $provider.Vector) $i#endNow test if we can use lowercase for propertes in set#set($oldtitle = $provider.title)Was : $oldtitle#set($provider.title = "geir")Now : $provider.title#set($provider.title = $oldtitle)Back : $provider.titleTest what was a bug :#set($b = 'boy')#set($c = 'cat')$b${c}.java${b}${c}.javaMore tests :$provider.title$$provider.title#$provider.title$foo.bar#if( $foo ) ($bar) #endTest boolean introspection isFoo()#if( $boolobj.boolean == true ) Correct#else Wrong#end#if ( $boolobj.notboolean == true ) Wrong#else Correct#end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -