[jbosstools-issues] [JBoss JIRA] (JBIDE-18524) Avoid using multiple IDocuments when opening an FTL file

Peter Palaga (JIRA) issues at jboss.org
Tue Oct 7 03:06:13 EDT 2014


Peter Palaga created JBIDE-18524:
------------------------------------

             Summary: Avoid using multiple IDocuments when opening an FTL file
                 Key: JBIDE-18524
                 URL: https://issues.jboss.org/browse/JBIDE-18524
             Project: Tools (JBoss Tools)
          Issue Type: Task
          Components: freemarker
    Affects Versions: 4.2.0.CR2
            Reporter: Peter Palaga
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jbosstools-issues mailing list