• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Live templates to do sysout with method name and its params

 
Ranch Hand
Posts: 94
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In intelli, I am trying to create a live template that prints the method name and parameters passed to it.
In live templates, I have added
in template text, and
I have used Expression methodName() for METHOD and methodParameters() for PARAMETERS.

When I am using this template, it is wrapping method parameters in square brackets. I am wondering if there is a way to not get the square brackets.
input:
actual:
expected:  

Also, if I wanted to cover multiple parameters scenario too.
livetemplate-mout.png
livetemplate to print method arguments
livetemplate to print method arguments
 
Greenhorn
Posts: 7
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to remove the square brackets from the Default value you have provided.

Instead of this:
   
Use this:
   
 
Bhaskar Bantupalli
Ranch Hand
Posts: 94
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

remove the square brackets from the Default value


Didn't work
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic