/*
 * Copyright 2000-2013 JetBrains s.r.o.
 * Copyright 2014-2015 AS3Boyan
 * Copyright 2014-2014 Elias Ku
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.plugins.haxe.model.fixer;

import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiFile;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;

abstract public class HaxeFixer implements IntentionAction, Runnable {
  private String text;

  public HaxeFixer(String text) {
    this.text = text;
  }

  @Nls
  @NotNull
  @Override
  public String getText() {
    return this.text;
  }

  @Nls
  @NotNull
  @Override
  public String getFamilyName() {
    return "semantic";
  }

  @Override
  public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
    return true;
  }

  @Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    run();
  }

  @Override
  public boolean startInWriteAction() {
    return true;
  }

  abstract public void run();
}
@@ -100,16 +100,47 @@
 lias Ku%0A
+ * Copyright 2019 Eric Bishton%0A
  *%0A * Li
@@ -1129,84 +1129,598 @@
 %7B%0A  
-private String text;%0A%0A  public HaxeFixer(String text) %7B%0A    this.text = text
+@FunctionalInterface%0A  public interface IntentionCallback %7B%0A    void run();%0A  %7D%0A%0A  private static class CallbackFixer extends HaxeFixer %7B%0A    final private IntentionCallback callback;%0A    CallbackFixer(@NotNull String text, @NotNull IntentionCallback cb) %7B%0A      super(text);%0A      this.callback = cb;%0A    %7D%0A    @Override%0A    public void run() %7B%0A      callback.run();%0A    %7D%0A  %7D%0A%0A  private String text;%0A%0A  public HaxeFixer(String text) %7B%0A    this.text = text;%0A  %7D%0A%0A  public static HaxeFixer create(@NotNull String text, @NotNull IntentionCallback cb) %7B%0A    return new CallbackFixer(text, cb)
 ;%0A  

Add a fixer that uses a functional interface.