// Path: src/com/karateca/jstoolbox/config/JsToolboxSettings.java
// public enum Property {
//   TestSuffix("com.karateca.jstoolbox.testSuffix", "-spec.js"),
//   FileSuffix("com.karateca.jstoolbox.fileSuffix", ".js"),
//   ViewSuffix("com.karateca.jstoolbox.viewSuffix", ".html"),
//   SearchUrl("com.karateca.jstoolbox.searchUrl",
//       "https://github.com/search?q={fileName}#L{line}"),
//   UseFilePath("com.karateca.jstoolbox.useFilePath", "false"),
//   FromPath("com.karateca.jstoolbox.fromPath", "");
// 
//   private final String property;
//   private final String defaultValue;
// 
//   private Property(String property, String defaultValue) {
//     this.property = property;
//     this.defaultValue = defaultValue;
//   }
// 
//   public String getProperty() {
//     return property;
//   }
// 
//   public String getDefaultValue() {
//     return defaultValue;
//   }
// }


import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.karateca.jstoolbox.config.JsToolboxSettings.Property;
package com.karateca.jstoolbox.config;




/**
 * @author Andres Dominguez.
 */
public class JsToolboxConfigurable implements Configurable {

  private ConfigurationView view;
  private final JsToolboxSettings settings;

  public JsToolboxConfigurable() {
    settings = new JsToolboxSettings();
  }

  @Nls
  @Override
  public String getDisplayName() {
    return "JS Toolbox";
  }

  @Nullable
  @Override
  public String getHelpTopic() {
    return "Configure the default settings for the JS Toolbox";
  }

  @Nullable
  @Override
  public JComponent createComponent() {
    if (view == null) {
      view = new ConfigurationView();
    }

    // Reset on click.
    view.getResetButton().addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent actionEvent) {
        view.setTestSuffix(
// Path: src/com/karateca/jstoolbox/config/JsToolboxSettings.java
// public enum Property {
//   TestSuffix("com.karateca.jstoolbox.testSuffix", "-spec.js"),
//   FileSuffix("com.karateca.jstoolbox.fileSuffix", ".js"),
//   ViewSuffix("com.karateca.jstoolbox.viewSuffix", ".html"),
//   SearchUrl("com.karateca.jstoolbox.searchUrl",
//       "https://github.com/search?q={fileName}#L{line}"),
//   UseFilePath("com.karateca.jstoolbox.useFilePath", "false"),
//   FromPath("com.karateca.jstoolbox.fromPath", "");
// 
//   private final String property;
//   private final String defaultValue;
// 
//   private Property(String property, String defaultValue) {
//     this.property = property;
//     this.defaultValue = defaultValue;
//   }
// 
//   public String getProperty() {
//     return property;
//   }
// 
//   public String getDefaultValue() {
//     return defaultValue;
//   }
// }


// Path: src/com/karateca/jstoolbox/config/JsToolboxConfigurable.java
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.karateca.jstoolbox.config.JsToolboxSettings.Property;

package com.karateca.jstoolbox.config;




/**
 * @author Andres Dominguez.
 */
public class JsToolboxConfigurable implements Configurable {

  private ConfigurationView view;
  private final JsToolboxSettings settings;

  public JsToolboxConfigurable() {
    settings = new JsToolboxSettings();
  }

  @Nls
  @Override
  public String getDisplayName() {
    return "JS Toolbox";
  }

  @Nullable
  @Override
  public String getHelpTopic() {
    return "Configure the default settings for the JS Toolbox";
  }

  @Nullable
  @Override
  public JComponent createComponent() {
    if (view == null) {
      view = new ConfigurationView();
    }

    // Reset on click.
    view.getResetButton().addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent actionEvent) {
        view.setTestSuffix(
            Property.TestSuffix.getDefaultValue());