move to inner class incorrectly refactors text files

I moved a class to be an inner class. Refcatoring included text files but
was performed incorrectly

instead of peacetech.gao.usorg.jdo.AddressTypeImpl$AddressTypeOid

it produced

peacetech.gao.usorg.jdo.AddressTypeImpl.AddressTypeOid

which is not correct inner class name


5 comments

Hello Alex,

I moved a class to be an inner class. Refcatoring included text files
but was performed incorrectly

instead of peacetech.gao.usorg.jdo.AddressTypeImpl$AddressTypeOid

it produced

peacetech.gao.usorg.jdo.AddressTypeImpl.AddressTypeOid

which is not correct inner class name


JIRA request please?

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


0

Hm, that does depend on the type of the text file, doesn't it?
If the tool working on the text file works close to the byte code it may
use the '$' notation, but if it is closer to source code then the '.'-notation
is more correct.
For example the JLS, 8.1.3 "Inner Classes and Enclosing Instances" uses
this as an exammple: "WithDeepNesting.Nested.DeeplyNested"

Alex Roytman wrote:

I moved a class to be an inner class. Refcatoring included text files but
was performed incorrectly

instead of peacetech.gao.usorg.jdo.AddressTypeImpl$AddressTypeOid

it produced

peacetech.gao.usorg.jdo.AddressTypeImpl.AddressTypeOid

which is not correct inner class name

0


Good point Stephen, I was thinking about it as well. Not sure if there is
any good solution without knowing text file type.
Currently after such a refactoring (with "." instead of $) Idea does not
recognize inner class in subsequent refactorings (i.e. move outer class to a
different package) any more (works if $ is used)

I would also say that one of the most common cases of full class name being
in text file is for class loading or bytecode manipulation reasons. So in
theory, $ should be more useful

I added your comment to change request
http://www.jetbrains.net/jira/browse/SELENAMS-297

Alex

"Stephen Friedrich" <mail@gremlin.info> wrote in message
news:f51agr$ndj$1@is.intellij.net...

Hm, that does depend on the type of the text file, doesn't it?
If the tool working on the text file works close to the byte code it may
use the '$' notation, but if it is closer to source code then the
'.'-notation
is more correct.
For example the JLS, 8.1.3 "Inner Classes and Enclosing Instances" uses
this as an exammple: "WithDeepNesting.Nested.DeeplyNested"

>

Alex Roytman wrote:

>> I moved a class to be an inner class. Refcatoring included text files but
>> was performed incorrectly
>>
>> instead of peacetech.gao.usorg.jdo.AddressTypeImpl$AddressTypeOid
>>
>> it produced
>>
>> peacetech.gao.usorg.jdo.AddressTypeImpl.AddressTypeOid
>>
>> which is not correct inner class name


0

Hello Alex,

I added your comment to change request
http://www.jetbrains.net/jira/browse/SELENAMS-297


Please post JIRA items to IDEA: Feedback project (IDEA), rather than SELENAMS.

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


0

Sorry, did not notice I got wrong project

do you want me to create a copy in feedback project? (I created another
issue there as well)

Alex

"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:431b0f6630d1a8c97f48b421c430@news.jetbrains.com...

Hello Alex,

>
>> I added your comment to change request
>> http://www.jetbrains.net/jira/browse/SELENAMS-297
>

Please post JIRA items to IDEA: Feedback project (IDEA), rather than
SELENAMS.

>

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

>



0

Please sign in to leave a comment.