package com.welovecoding.netbeans.plugin.editorconfig.hook;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.api.project.Project;
import org.netbeans.spi.project.LookupProvider;
import org.openide.util.Lookup;
import org.openide.util.lookup.Lookups;

/**
 * Project types supported by NetBeans IDE:
 * https://platform.netbeans.org/tutorials/nbm-projectextension.html
 */
@LookupProvider.Registration(projectType = {
  "org-netbeans-modules-ant-freeform",
  "org-netbeans-modules-j2ee-archiveproject",
  "org-netbeans-modules-j2ee-clientproject",
  "org-netbeans-modules-j2ee-earproject",
  "org-netbeans-modules-j2ee-ejbjarproject",
  "org-netbeans-modules-java-j2seproject",
  "org-netbeans-modules-maven",
  "org-netbeans-modules-web-clientproject", // HTML5 project
  "org-netbeans-modules-web-project"
})
/**
 * Listener for newly opened Projects.
 */
public class EditorConfigHookLookup implements LookupProvider {

  private static final Logger LOG = Logger.getLogger(EditorConfigHookLookup.class.getName());

  @Override
  public Lookup createAdditionalLookup(Lookup lookup) {
    final Project project = lookup.lookup(Project.class);
    String projectName = project.getProjectDirectory().getName();

    LOG.log(Level.INFO, "Setup hooks for: {0}", projectName);

    return Lookups.fixed(new EditorConfigProjectOpenedHook(project));
  }

}

@@ -447,16 +447,20 @@
 ype = %7B%0A
+  //
   %22org-n
@@ -490,16 +490,20 @@
 eform%22,%0A
+  //
   %22org-n
@@ -532,32 +532,36 @@
 rchiveproject%22,%0A
+  //
   %22org-netbeans-
@@ -581,32 +581,36 @@
 clientproject%22,%0A
+  //
   %22org-netbeans-
@@ -627,32 +627,36 @@
 ee-earproject%22,%0A
+  //
   %22org-netbeans-
@@ -676,32 +676,36 @@
 ejbjarproject%22,%0A
+  //
   %22org-netbeans-
@@ -731,16 +731,20 @@
 oject%22,%0A
+  //
   %22org-n
@@ -828,16 +828,18 @@
 project%0A
+//
   %22org-n

Apply hook only to HTML5 projects.