Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-22656

Related tag background becomes misplaced when typing


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.4.1.AM2
    • None
    • freemarker
    • None
    • devex #117 July 2016

      When you put the cursor inside an FTL tag, like <#if ...>, the background color of related tags, like <#else> and </#if>, is changed. The problem is that if now you start typing into a such background-colored tag, the offsets of the colored sections after it will become outdated, and so they start to drift left from under the tag. This is because the up to date offsets only become available after the reconciling thread has finished, but the background coloring logic is called directly in the keydown handler. I'm not familiar with plugin development, but I suspect this is architecturally wrong. Perhaps the reconciler should send some kind of event when it's done, and if the editor content is still in the state for which the reconciling was ran, only then should the old background coloring be removed and the new one is added.

            alexeykazakov Alexey Kazakov
            ddekany Daniel Dekany (Inactive)
            0 Vote for this issue
            2 Start watching this issue