IDEA's variable name suggestions

How to tell IDEA, that all exceptions should be named "ex" in a try
catch block?

Tom

9 comments
Comment actions Permalink

actually, i would like it to be a configurable option, since i prefer
'exception'..


"Thomas Singer" <idea@regnis.de> wrote in message
news:3dae7a3e.8517898@news.intellij.net...

How to tell IDEA, that all exceptions should be named "ex" in a try
catch block?

>

Tom



0
Comment actions Permalink

You can add the following XML snippet to your code style .xml file
(config/codestyle folder) and edit the name.

]]>

--
Best regards,
Mike Aizatsky.
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


0
Comment actions Permalink

Thank you very much.

Maybe this should become a part in IDEA's tip list? I doubt, that it
will be able to implement a tab for this in IDE settings within
Ariadna.

Tom


On Thu, 17 Oct 2002 20:10:53 +0400, "Mike Aizatsky"
<mike@intellij.com> wrote:

You can add the following XML snippet to your code style .xml file
(config/codestyle folder) and edit the name.

<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair type="int" name="i" />
<pair type="byte" name="b" />
<pair type="char" name="c" />
<pair type="long" name="l" />
<pair type="short" name="i" />
<pair type="boolean" name="b" />
<pair type="double" name="v" />
<pair type="float" name="v" />
<pair type="java.lang.Object" name="o" />
<pair type="java.lang.String" name="s" />
<pair type="*Exception" name="e" />
<pair type="*Event" name="event" />
</value>
</option>

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


0
Comment actions Permalink

awesome, thanks!

"Mike Aizatsky" <mike@intellij.com> wrote in message
news:aomned$gr6$1@is.intellij.net...

You can add the following XML snippet to your code style .xml file
(config/codestyle folder) and edit the name.

>

<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair type="int" name="i" />
<pair type="byte" name="b" />
<pair type="char" name="c" />
<pair type="long" name="l" />
<pair type="short" name="i" />
<pair type="boolean" name="b" />
<pair type="double" name="v" />
<pair type="float" name="v" />
<pair type="java.lang.Object" name="o" />
<pair type="java.lang.String" name="s" />
<pair type="*Exception" name="e" />
<pair type="*Event" name="event" />
</value>
</option>

>

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>


0
Comment actions Permalink

Hi,

I'd like a NullPointerException to be named "npe", and a
IllegalArgumentException "iae".

What's the syntax to do that?

;)

tt

"Mike Aizatsky" <mike@intellij.com> wrote in message
news:aomned$gr6$1@is.intellij.net...

You can add the following XML snippet to your code style .xml file
(config/codestyle folder) and edit the name.

>

<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair type="int" name="i" />
<pair type="byte" name="b" />
<pair type="char" name="c" />
<pair type="long" name="l" />
<pair type="short" name="i" />
<pair type="boolean" name="b" />
<pair type="double" name="v" />
<pair type="float" name="v" />
<pair type="java.lang.Object" name="o" />
<pair type="java.lang.String" name="s" />
<pair type="*Exception" name="e" />
<pair type="*Event" name="event" />
</value>
</option>

>

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>


0
Comment actions Permalink

let me guess... it's:

]]>

and

]]>

;)

0
Comment actions Permalink

I second this request as this also the naming convention I, and my
organization, uses.

pUnk wrote:

Hi,

I'd like a NullPointerException to be named "npe", and a
IllegalArgumentException "iae".

What's the syntax to do that?

;)

tt


0
Comment actions Permalink

I guess
...
... will do the job. But options in the UI would be better. Tom On Sun, 20 Oct 2002 18:15:28 +0200, "pUnk" ]]> wrote:

Hi,

I'd like a NullPointerException to be named "npe", and a
IllegalArgumentException "iae".

What's the syntax to do that?

;)

tt

"Mike Aizatsky" <mike@intellij.com> wrote in message
news:aomned$gr6$1@is.intellij.net...

You can add the following XML snippet to your code style .xml file
(config/codestyle folder) and edit the name.

>

<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair type="int" name="i" />
<pair type="byte" name="b" />
<pair type="char" name="c" />
<pair type="long" name="l" />
<pair type="short" name="i" />
<pair type="boolean" name="b" />
<pair type="double" name="v" />
<pair type="float" name="v" />
<pair type="java.lang.Object" name="o" />
<pair type="java.lang.String" name="s" />
<pair type="*Exception" name="e" />
<pair type="*Event" name="event" />
</value>
</option>

>

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>



0
Comment actions Permalink

Is there a way for ctrl-o and ctrl-i to pick up these variable mappings?

0

Please sign in to leave a comment.