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

Avoid using multiple IDocuments when opening an FTL file

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 4.3.0.Beta1
    • 4.2.0.CR2
    • freemarker
    • None

      This is a matter of effectiveness and getting in line with what is usual in other plugins:

      (1) In the FreeMarker Editor constructor, we currently create a per-Editor instance of DocumentProvider. Editor}}s should rather use a single {{DocumentProvider hosted in Plugin. This is how it is done in many other editors, see e.g. AntEditor.initializeEditor(), PropertiesFileEditor.initializeEditor(), ClassFileEditor(), etc.

      (2) Editor.init(IEditorSite, IEditorInput) is called twice from FreemarkerMultiPageEditor when opening an FTL file. This causes e.g. partitioning twice. Steps to verify: put a breakpoint on AbstractTextEditor.init(IEditorSite, IEditorInput) and open an FTL file. NOT OK: the breakpoint gets hit twice, ECPECTED: the breakpoint should be visited once only.

            nivologd@gmail.com Denis Golovin (Inactive)
            ppalaga Peter Palaga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: