Menu

#863 Initial file template content not transferred for special cases

None
closed-migrated
nobody
IntelliJ (27)
5
2018-03-27
2015-12-29
No

IntelliJ can create with initial content (e.g. Java files with public class ... already written) based on a template engine. Unfortunately it inserts the content in the file before adding DocumentListeners, so we currently intercept them with a FileSystemChangeListener that listens for just-created files.

So far I assumed this happens in one pass: Create the file, fill it with template.

Apparently sometimes there is a second pass: Create the file, fill it with template, remove unused lines.

The 2nd case happens for example when creating a java class in the default package - in the first pass it will get a package header line

package PACKAGE_NAME

in the second pass this will disappear.

I think this is a minor issue since it can be solved by InconsistencyRecovery and probably does not happen so often, so I'll postpone a solution here.

Discussion

  • tobous

    tobous - 2018-03-22

    The initial workaround does not work correctly. See #889.

     
  • tobous

    tobous - 2018-03-27
    • Status: open --> closed-migrated
     

Log in to post a comment.