package org.antlr.intellij.plugin.configdialogs;

import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

public class ANTLRv4ProjectSettings implements SearchableConfigurable {

    private ConfigANTLRPerGrammar configurationForm;

    private final Project project;

    public ANTLRv4ProjectSettings(@NotNull Project project) {
        this.project = project;
    }

    @NotNull
    @Override
    public String getId() {
        return "ANTLR4ProjectSettings";
    }

    @Nls(capitalization = Nls.Capitalization.Title)
    @Override
    public String getDisplayName() {
        return "ANTLR4 Project Settings";
    }

    @Nullable
    @Override
    public JComponent createComponent() {
        configurationForm = new ConfigANTLRPerGrammar(project, ANTLRv4GrammarProperties.PROJECT_SETTINGS_PREFIX);
        return configurationForm.getRootPane();
    }

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

    @Override
    public void apply() {
        configurationForm.saveValues(project, ANTLRv4GrammarProperties.PROJECT_SETTINGS_PREFIX);
    }
}

@@ -809,24 +809,122 @@
 gs%22;%0A    %7D%0A%0A
+    @Nullable%0A    public String getHelpTopic() %7B%0A        return %22ANTLR4 Project Settings%22;%0A    %7D%0A%0A
     @Nullabl
@@ -1368,11 +1368,44 @@
 );%0A    %7D
+%0A%0A    public void reset() %7B%0A    %7D
 %0A%7D%0A

Add Intellij 2016 methods