package com.chrisfolger.needsmoredojo.intellij.configurable;

import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;

import javax.swing.*;

public class DojoSettingsConfigurable implements Configurable {
    private JComponent myComponent;
    private JButton autoDetect;
    private JPanel myPanel;
    private TextFieldWithBrowseButton projectSourcesText;
    private TextFieldWithBrowseButton dojoSourcesText;

    public String getDisplayName() {
        return "Needs More Dojo";
    }

    public boolean isModified() {
        return true;
    }

    public JComponent createComponent() {
        myComponent = (JComponent) myPanel;
        return myComponent;

    }

    public Icon getIcon() {
        return null;

    }

    public void apply() {
    }

    public void disposeUIResources() {

    }

    public String getHelpTopic() {
        return "";
    }

    public void reset() {

    }


}

@@ -55,16 +55,149 @@
 rable;%0A%0A
+import com.intellij.openapi.fileChooser.FileChooserDescriptor;%0Aimport com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;%0A
 import c
@@ -238,16 +238,16 @@
 urable;%0A
-
 import c
@@ -816,24 +816,485 @@
 t) myPanel;%0A
+        FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();%0A%0A        projectSourcesText.addBrowseFolderListener(%22Project Sources%22, %22Select the root of your project sources to support certain features of Needs More Dojo%22, null, descriptor);%0A        dojoSourcesText.addBrowseFolderListener(%22Dojo Sources%22, %22Select the root of the dojo library sources to support certain features of Needs More Dojo%22, null, descriptor);%0A
         retu
@@ -1309,17 +1309,16 @@
 ponent;%0A
-%0A
     %7D%0A%0A 

add listeners