IDEA's variable name suggestions

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

Tom

评论操作 固定链接

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
评论操作 固定链接

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
评论操作 固定链接

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
评论操作 固定链接

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
评论操作 固定链接

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
评论操作 固定链接

let me guess... it's:

]]>

and

]]>

;)

0
评论操作 固定链接

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
评论操作 固定链接

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
评论操作 固定链接

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

0

请先登录再写评论。