10 comments

Hi Jens,

IDE Settings -> File Templates
IDE Settings -> Live Templates

Regards, Denis

0

Hi Denis,
This is great for the very basic stuff such as classes and interfaces, but where can I edit the rest?

Specifically - I want to change the templates for generating methods and event handlers for Actionscript/Flex (Alt + Enter)

J

0

bump...

(Need an answer to this one. Anyone?)

0

Hello Jens,

The generation of methods and event handlers in the current version is not
based on editable templates, so you can't modify how the code is generated.

This is great for the very basic stuff such as classes and interfaces,
but where can I edit the rest?
Specifically - I want to change the templates for generating methods
and event handlers for Actionscript/Flex (Alt + Enter)


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ah. ok. This is a little unfortunate as some of these features generate wrong code. For example - when I generate a static member (Actionscript project), I'll have to navigate to the start of the sentence and type in "public " every time.

There's a few other issues like this that are a little annoying. Would be great to be able to edit these as well!

J

0

Hello Jens,

If the action generates invalid code, the right thing to do is to file a
bug report at http://youtrack.jetbrains.net/ so that the actions would be
fixed for everyone, not to customize the templates. :)

Ah. ok. This is a little unfortunate as some of these features
generate wrong code. For example - when I generate a static member
(Actionscript project), I'll have to navigate to the start of the
sentence and type in "public " every time.

There's a few other issues like this that are a little annoying. Would
be great to be able to edit these as well!


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

ok, will do so for the ones that are incorrect.

Some are also a matter of preference such as that for a generated event handler I want:
private function something(e:Event)

rather than the more verbose:
private function something(event:Event)

J

0

(bump)

Agreed, there are matters of preference which I think should be taken into account for code generation.  I for one prefer my event methods to be protected as opposed to private and considering code generation is a time saving technique, there is wasted time on changing this each time I generate a method.

S

0

Hello Jens,

when I generate a static member (Actionscript project), I'll have to navigate to the start of the sentence and type in "public " every time.

New member of public class should get 'public' access modifier, otherwise it will be made explicitly 'internal'. Fix will be available with the next EAP build.

Some are also a matter of preference such as that for a generated event handler I want: private function something(e:Event) rather than the more verbose: private function something(event:Event)

Please watch/vote http://youtrack.jetbrains.net/issue/IDEA-59172

Regards,
Kirill

0

Please sign in to leave a comment.