[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.tmf] Re: semantic indention as in python

Hi Karra,

Sorry for the late feedback. I was off.

Thanks for your great work. It does exactly what is needed.

I just identified a small bug. When I delete the line break between a line and a following line with higher indent level, and then reinsert it again, your code miss the tabs inserted by the auto indent of the editor.

So then at that moment the validation is positive despite there are too many tabs. And when I delete the auto inserted tabs it shows an indent error.

original text:
line1
   line2
       line3
       line4

delete line break:
line1
   line2        line3
       line4

re-insert line break brings auto indent (no validation error:
line1
   line2
           line3
       line4

remove auto-inserted tab (shows validation error mark)
line1
   line2
       line3
       line4

I could not really find the cause of the problem in your code. Actually I am not sure it is a bug. Maybe it should be called a missing work around for a strange behavior of another editor component.

And just an minor wish for improvement: How could I read the tab with from the editor preferences to replace your hard coded 4?

br
m