Package com.intellij.ide.util

Examples of com.intellij.ide.util.TreeFileChooserDialog


      FileChooserFactory.getInstance().installFileCompletion(configFileTextField, descriptor, false, null);
      myConfigFileTextFieldWithBrowseButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          PsiFile initialPsiFile = getConfigFile(project);
          TreeFileChooserDialog fileChooser = new TreeFileChooserDialog(
            project,
            "Select JsTestDriver configuration file",
            initialPsiFile,
            JstdConfigFileType.INSTANCE,
            new TreeFileChooser.PsiFileFilter() {
              @Override
              public boolean accept(PsiFile psiFile) {
                return true;
              }
            },
            false,
            false
          );
          boolean jstdConfigFilesExists = JstdSettingsUtil.areJstdConfigFilesInProject(project);
          if (jstdConfigFilesExists) {
            fileChooser.selectSearchByNameTab();
          }
          fileChooser.showDialog();
          PsiFile psiFile = fileChooser.getSelectedFile();
          if (psiFile != null) {
            VirtualFile vFile = psiFile.getVirtualFile();
            if (vFile != null) {
              String path = FileUtil.toSystemDependentName(vFile.getPath());
              configFileTextField.setText(path);
View Full Code Here

TOP

Related Classes of com.intellij.ide.util.TreeFileChooserDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.