- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Code templates for IDEA
Wed, 2011-12-28, 16:22
Dear all,has someone created or knows how to create live templates for most common scala collection methods, such as foreach, map, collect, and so on?
Best Regards
Edmondo
Best Regards
Edmondo
Wed, 2011-12-28, 20:31
#2
Re: Code templates for IDEA
The existing templates are of the form:
for (a <- bob) { doStuff(a) }
I think the OP is looking for stuff more like:
bob.foreach((a) => doStuff(a))
On Wed, Dec 28, 2011 at 1:26 PM, HamsterofDeath wrote:
> Am 28.12.2011 16:22, schrieb Edmondo Porcu:
>> Dear all,
>> has someone created or knows how to create live templates for most
>> common scala collection methods, such as foreach, map, collect, and so on?
>>
>> Best Regards
>>
>> Edmondo
> what exactly is the boilerplate you are trying to template away?
> anyway, you can take a look at the existing templates for for loops
Thu, 2011-12-29, 08:41
#3
Re: Code templates for IDEA
but you can easily modify them
Am 28.12.2011 20:27, schrieb Donald McLean:
> The existing templates are of the form:
>
> for (a <- bob) { doStuff(a) }
>
> I think the OP is looking for stuff more like:
>
> bob.foreach((a) => doStuff(a))
>
> On Wed, Dec 28, 2011 at 1:26 PM, HamsterofDeath wrote:
>> Am 28.12.2011 16:22, schrieb Edmondo Porcu:
>>> Dear all,
>>> has someone created or knows how to create live templates for most
>>> common scala collection methods, such as foreach, map, collect, and so on?
>>>
>>> Best Regards
>>>
>>> Edmondo
>> what exactly is the boilerplate you are trying to template away?
>> anyway, you can take a look at the existing templates for for loops
Thu, 2011-12-29, 09:11
#4
Re: Code templates for IDEA
On 2011, Dec 28, at 7:26 PM, HamsterofDeath wrote:
>> has someone created or knows how to create live templates for most
>> common scala collection methods, such as foreach, map, collect, and so on?
> what exactly is the boilerplate you are trying to template away?
> anyway, you can take a look at the existing templates for for loops
I don't know if cmd/ctrl-p (for show parameters) will help, but I find that helps a lot, personally.
yours
Geir
Thu, 2011-12-29, 09:31
#5
Re: Code templates for IDEA
I did it but and I created a template for foreach,
but it doesn't work as expected because:
- It doesn't guess or propose the transversable name- It doesn't propose the name of the temporary variable to store the current element
bEst Regards
2011/12/29 Geir Hedemark <geir.hedemark@gmail.com>
but it doesn't work as expected because:
- It doesn't guess or propose the transversable name- It doesn't propose the name of the temporary variable to store the current element
bEst Regards
2011/12/29 Geir Hedemark <geir.hedemark@gmail.com>
On 2011, Dec 28, at 7:26 PM, HamsterofDeath wrote:
>> has someone created or knows how to create live templates for most
>> common scala collection methods, such as foreach, map, collect, and so on?
> what exactly is the boilerplate you are trying to template away?
> anyway, you can take a look at the existing templates for for loops
I don't know if cmd/ctrl-p (for show parameters) will help, but I find that helps a lot, personally.
yours
Geir
Thu, 2011-12-29, 09:41
#6
Re: Code templates for IDEA
Am 29.12.2011 09:22, schrieb Edmondo Porcu:
press "edit variables" and take a look at the important parts you are probably missing
zBHkFfWsxrL0_saiBVG2uTQ [at] mail [dot] gmail [dot] com" type="cite">I did it but and I created a template for foreach,open original working template
but it doesn't work as expected because:
- It doesn't guess or propose the transversable name - It doesn't propose the name of the temporary variable to store the current element
bEst Regards
2011/12/29 Geir Hedemark <geir [dot] hedemark [at] gmail [dot] com" rel="nofollow">geir.hedemark@gmail.com>
On 2011, Dec 28, at 7:26 PM, HamsterofDeath wrote:
>> has someone created or knows how to create live templates for most
>> common scala collection methods, such as foreach, map, collect, and so on?
> what exactly is the boilerplate you are trying to template away?
> anyway, you can take a look at the existing templates for for loops
I don't know if cmd/ctrl-p (for show parameters) will help, but I find that helps a lot, personally.
yours
Geir
press "edit variables" and take a look at the important parts you are probably missing
Wed, 2012-01-11, 12:11
#7
Re: Code templates for IDEA
Dear All,
I actually discovered there are some Expressions for scala which you don't find in the list. I have found them investigating existing scala template.
Namely they are
scalaVariableOfType
suggestScalaVariableName
Do you have an idea of where one can find more details?
Best Regards
2011/12/29 HamsterofDeath <h-star@gmx.de>
I actually discovered there are some Expressions for scala which you don't find in the list. I have found them investigating existing scala template.
Namely they are
scalaVariableOfType
suggestScalaVariableName
Do you have an idea of where one can find more details?
Best Regards
2011/12/29 HamsterofDeath <h-star@gmx.de>
Am 29.12.2011 09:22, schrieb Edmondo Porcu:I did it but and I created a template for foreach,open original working template
but it doesn't work as expected because:
- It doesn't guess or propose the transversable name - It doesn't propose the name of the temporary variable to store the current element
bEst Regards
2011/12/29 Geir Hedemark <geir.hedemark@gmail.com>
On 2011, Dec 28, at 7:26 PM, HamsterofDeath wrote:
>> has someone created or knows how to create live templates for most
>> common scala collection methods, such as foreach, map, collect, and so on?
> what exactly is the boilerplate you are trying to template away?
> anyway, you can take a look at the existing templates for for loops
I don't know if cmd/ctrl-p (for show parameters) will help, but I find that helps a lot, personally.
yours
Geir
press "edit variables" and take a look at the important parts you are probably missing
Wed, 2012-01-11, 12:41
#8
Re: Code templates for IDEA
-------- Original-Nachricht --------
> Datum: Wed, 11 Jan 2012 12:10:28 +0100
> Von: Edmondo Porcu
> An: scala-user
> Betreff: Re: [scala-user] Code templates for IDEA
> Dear All,
> I actually discovered there are some Expressions for scala which you don't
> find in the list. I have found them investigating existing scala template.
>
> Namely they are
>
> scalaVariableOfType
>
> suggestScalaVariableName
>
> Do you have an idea of where one can find more details?
>
> Best Regards
>
> 2011/12/29 HamsterofDeath
>
> > Am 29.12.2011 09:22, schrieb Edmondo Porcu:
> >
> > I did it but and I created a template for foreach,
> >
> > but it doesn't work as expected because:
> >
> > - It doesn't guess or propose the transversable name
> > - It doesn't propose the name of the temporary variable to store the
> > current element
> >
> > bEst Regards
> >
> > 2011/12/29 Geir Hedemark
> >
> >> On 2011, Dec 28, at 7:26 PM, HamsterofDeath wrote:
> >> >> has someone created or knows how to create live templates for most
> >> >> common scala collection methods, such as foreach, map, collect, and
> so
> >> on?
> >> > what exactly is the boilerplate you are trying to template away?
> >> > anyway, you can take a look at the existing templates for for loops
> >>
> >> I don't know if cmd/ctrl-p (for show parameters) will help, but I find
> >> that helps a lot, personally.
> >>
> >> yours
> >> Geir
> >>
> >>
> > open original working template
> > press "edit variables" and take a look at the important parts you are
> > probably missing
> >
> >
> >
> >
Am 28.12.2011 16:22, schrieb Edmondo Porcu:
> Dear all,
> has someone created or knows how to create live templates for most
> common scala collection methods, such as foreach, map, collect, and so on?
>
> Best Regards
>
> Edmondo
what exactly is the boilerplate you are trying to template away?
anyway, you can take a look at the existing templates for for loops