public VssRootConfigurable()

in src/com/intellij/vssSupport/ui/VssRootConfigurable.java [32:69]


  public VssRootConfigurable( final VcsDirectoryMapping mapping, final Project project )
  {
    myMapping = mapping;
    this.project = project;

    //  Add custom editor so that we can control the shallow validness of the
    //  string describing the vss project path.
    BasicComboBoxEditor editor = new BasicComboBoxEditor(){
      {
        editor.getDocument().addDocumentListener( new DocumentAdapter() {
          protected void textChanged(final DocumentEvent e)
          {
            btnTest.setEnabled( validProject() );
          }
        });
      }
    };
    myComboBox1.setEditor( editor );

    btnTest.addActionListener(new ActionListener() {
      public void actionPerformed( ActionEvent e )
      {
        List<VcsException> errors = new ArrayList<>();
        VssCommandAbstract cmd = new CPCommand( project, errors );
        cmd.execute();
        if( errors.size() == 0 )
          Messages.showInfoMessage( project, VssBundle.message( "message.project.valid" ), VssBundle.message( "message.title.check.status" ) );
        else
          Messages.showErrorDialog( project, VssBundle.message( "message.project.not.valid" ), VssBundle.message( "message.title.check.status" ) );
      }
    });

    VssRootSettings rootSettings = (VssRootSettings) mapping.getRootSettings();
    if (rootSettings != null)
      myComboBox1.setSelectedItem( rootSettings.getVssProject() );

    btnTest.setEnabled( validProject() );
  }