package pl.mn.ccsg.dialog;

import com.intellij.openapi.project.Project;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.beans.PropertyChangeListener;

/**
 * @author minidmnv
 */
public class GenerateStructurePanel extends JPanel {

    private JButton directoryChooserButton;
    private JTextField directoryTextArea;
    private JFileChooser pathChooser;
    private final Project project;
    private JLabel pathLabel;

    public GenerateStructurePanel(Project project) {
        this.project = project;
    }

    public void init() {
        initComponents();

        add(pathLabel);
        add(directoryTextArea);
        add(directoryChooserButton);
    }

    private void initComponents() {
        pathLabel = new JLabel("Path:");
        directoryTextArea = new JTextField(project.getBasePath(), 20);
        directoryChooserButton = new JButton("...");
        directoryChooserButton.setAction(directoryChooserAction);
    }

    private Action directoryChooserAction = new Action() {

        @Override
        public Object getValue(String key) {
            return null;
        }

        @Override
        public void putValue(String key, Object value) {

        }

        @Override
        public void setEnabled(boolean b) {

        }

        @Override
        public boolean isEnabled() {
            return false;
        }

        @Override
        public void addPropertyChangeListener(PropertyChangeListener listener) {

        }

        @Override
        public void removePropertyChangeListener(PropertyChangeListener listener) {

        }

        @Override
        public void actionPerformed(ActionEvent e) {

        }
    };

}

@@ -124,16 +124,54 @@
 nEvent;%0A
+import java.awt.event.ActionListener;%0A
 import j
@@ -957,17 +957,25 @@
 ton.
-set
+add
 Action
+Listener
 (dir
@@ -1021,16 +1021,24 @@
 e Action
+Listener
  directo
@@ -1059,668 +1059,66 @@
 n = 
-new Action() %7B%0A%0A        @Override%0A        public Object getValue(String key) %7B%0A            return null;%0A        %7D%0A%0A        @Override%0A        public void putValue(String key, Object value) %7B%0A%0A        %7D%0A%0A        @Override%0A        public void setEnabled(boolean b) %7B%0A%0A        %7D%0A%0A        @Override%0A        public boolean isEnabled() %7B%0A            return false;%0A        %7D%0A%0A        @Override%0A        public void addPropertyChangeListener(PropertyChangeListener listener) %7B%0A%0A        %7D%0A%0A        @Override%0A        public void removePropertyChangeListener(PropertyChangeListener listener) %7B%0A%0A        %7D%0A%0A        @Override%0A        public void actionPerformed(ActionEvent e
+e -%3E openPathChooser();%0A%0A    private void openPathChooser(
 ) %7B%0A
@@ -1126,20 +1126,9 @@
     
- 
-   %7D%0A    %7D;
+%7D
 %0A%0A%7D%0A

Change PathButton action to action listener