getChildAttributes not called when pressing Enter?

Hello. I'm working on Dmitry Jemerov's Python plugin formatter. It looks like
when I press Enter, getChildAttributes is never called (but getSpacing is called
for every pair of adjacent elements). Am I doing something wrong?

Thanks

4 comments

It gets called only when no formatter block present to the end of the line.

Keith Lea wrote:

Hello. I'm working on Dmitry Jemerov's Python plugin formatter. It looks
like when I press Enter, getChildAttributes is never called (but
getSpacing is called for every pair of adjacent elements). Am I doing
something wrong?

Thanks



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Okay, I was hoping your answer would help me to track down a strange bug but it
looks like I'm still stuck. My getSpacing method always returns null. However,
when I press Enter, IDEA inserts three newlines, and places the cursor at the
start of the first line. I don't think there is a formatter block at the end of
the line, anyway, so I think getChildAttributes should be called. Do you have
ideas about what I should do?

Maxim Mossienko wrote:

It gets called only when no formatter block present to the end of the line.

Keith Lea wrote:

>> Hello. I'm working on Dmitry Jemerov's Python plugin formatter. It
>> looks like when I press Enter, getChildAttributes is never called (but
>> getSpacing is called for every pair of adjacent elements). Am I doing
>> something wrong?
>>
>> Thanks

0

What was the solution to the three newlines problem? I'm seeing the same thing.

0

I haven't solved the problem. For now my language lives without a
formatter, mostly for this reason.

Charles Wise wrote:

What was the solution to the three newlines problem? I'm seeing the same thing.

0

Please sign in to leave a comment.