You must provide fileFilter, idFolderStart and title to invoke it!
323557
@Override
  public void showAndChoose(IConsumer<File> consumer) {
    this.consumer = consumer;
    initSrvNodeFile();
    Intent activityTreeIntent = new Intent(activity, ActivityTreeChooser.class);
    activityTreeIntent.putExtra(FragmentNodes.ARG_ID_NODE_SRVNODES, new String[]{idFolderStart, idSrvGetNodeFile, idCommand, title});
    activity.startActivityForResult(activityTreeIntent, REQUEST_NODE_FILE);
  }
1336995
def do_newfilter(self, subcmd, opts):
        
        from mdlib.filterprocessor import RULES
        print(RULES, file=self.stdout)
746349
private void initFilters() {
        ditaWriterFilter = new DitaWriterFilter();
        ditaWriterFilter.setLogger(logger);
        ditaWriterFilter.setJob(job);
        ditaWriterFilter.setEntityResolver(reader.getEntityResolver());

        topicFragmentFilter = new TopicFragmentFilter(ATTRIBUTE_NAME_CONREF, ATTRIBUTE_NAME_CONREFEND);

        tempFileNameScheme.setBaseDir(job.getInputDir());
    }
588943
public void start() throws Exception {
        baseFilterFactory = new DefaultFilterFactory(bundleContext, filterClass, priority, applicationName, initParams);
        baseFilterFactory.register();
    }
114716
def eventFilter( self, object, event ):
        
        if ( object == self._filepathEdit and \
             self._filepathEdit.isReadOnly() and \
             event.type() == event.MouseButtonPress and \
             event.button() == Qt.LeftButton ):
            self.pickFilepath()
            
        return False
852014
def invoke(self):
        
        # flush to ensure external process can see flags as they currently
        # are, and write flags (flush releases lock)
        unitdata.kv().flush()
        subprocess.check_call([self._filepath, '--invoke', self._test_output], env=os.environ)
888374
private void handleDirectory(final Predicate<String> filter, final File rootDir, final List<String> discoveredFiles)
    {
        try
        {
            new DirectoryWalker<String>()
            {
                private Path startDir;

                public void walk() throws IOException
                {
                    this.startDir = rootDir.toPath();
                    this.walk(rootDir, discoveredFiles);
                }

                @Override
                protected void handleFile(File file, int depth, Collection<String> discoveredFiles) throws IOException
                {
                    String newPath = startDir.relativize(file.toPath()).toString();
                    if (filter.accept(newPath))
                        discoveredFiles.add(newPath);
                }

            }.walk();
        }
        catch (IOException ex)
        {
            LOG.log(Level.SEVERE, "Error reading Furnace addon directory", ex);
        }
    }
283853
protected function init()
    {
        if(!\extension_loaded('inotify'))
        {
            throw new \RuntimeException('the extension inotify is not installed');
        }
        $this->handler = \inotify_init();
        stream_set_blocking($this->handler, 0);

        $this->excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $this->excludePaths));
        foreach($this->includePaths as $path)
        {
            \inotify_add_watch($this->handler, $path, $this->mask);
            $directory = new \RecursiveDirectoryIterator($path, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO);
            $iterator = new \RecursiveIteratorIterator($directory);
            if('' === $this->excludeRule)
            {
                foreach($iterator as $fileName => $fileInfo)
                {
                    $filePath = dirname($fileName);
                    if(!isset($this->paths[$filePath]))
                    {
                        $this->paths[$filePath] = \inotify_add_watch($this->handler, $filePath, $this->mask);
                    }
                }
            }
            else
            {
                $rule = "/^(?!{$this->excludeRule}).+$/i";
                $regex = new \RegexIterator($iterator, $rule, \RecursiveRegexIterator::GET_MATCH);
                foreach ($regex as $item)
                {
                    $filePath = dirname($item[0]);
                    if(!isset($this->paths[$filePath]))
                    {
                        $this->paths[$filePath] = \inotify_add_watch($this->handler, $filePath, $this->mask);
                    }
                }
            }
        }
    }
414016
private void menuNewFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNewFileActionPerformed
    File currentFolder = this.explorerTree.getCurrentFocusedFolder();
    if (currentFolder == null) {
      currentFolder = this.explorerTree.findFirstProjectFolder();
    }

    final JFileChooser fileChooser = new JFileChooser(currentFolder);
    fileChooser.setDialogTitle("New file");

    class Filter extends FileFilter {

      final String extension;
      final String description;

      Filter(@Nonnull final String extension, @Nonnull final String description) {
        this.extension = '.' + extension;
        this.description = description;
      }

      @Override
      public boolean accept(@Nonnull final File f) {
        return f.isDirectory() || f.getName().toLowerCase(Locale.ENGLISH).endsWith(this.extension);
      }

      @Override
      @Nonnull
      public String getDescription() {
        return this.description;
      }
    }

    fileChooser.setAcceptAllFileFilterUsed(false);
    final Filter filerMindMap = new Filter("mmd", "Mind Map file (*.mmd)");
    final Filter filerText = new Filter("txt", "Text file (*.txt)");
    final Filter filerPuml = new Filter("puml", "PantUML file (*.puml)");

    fileChooser.addChoosableFileFilter(filerMindMap);
    fileChooser.addChoosableFileFilter(filerText);
    fileChooser.addChoosableFileFilter(filerPuml);

    fileChooser.setFileFilter(filerMindMap);

    if (fileChooser.showDialog(this, "Create") == JFileChooser.APPROVE_OPTION) {
      final Filter choosenFilter = (Filter) fileChooser.getFileFilter();
      File selectedFile = fileChooser.getSelectedFile();

      if (!selectedFile.getName().contains(".")) {
        selectedFile = new File(selectedFile.getParent(), selectedFile.getName() + choosenFilter.extension);
      }

      final String text;

      if (choosenFilter == filerMindMap) {
        final MindMap model = new MindMap(null, true);
        model.setAttribute("showJumps", "true"); //NOI18N
        final Topic root = model.getRoot();
        if (root != null) {
          root.setText("Root"); //NOI18N
        }

        try {
          text = model.write(new StringWriter()).toString();
        } catch (IOException ex) {
          throw new Error("Unexpected error", ex);
        }
      } else if (choosenFilter == filerPuml) {
        final String nextLine = GetUtils.ensureNonNull(System.getProperty("line.separator"), "\n");
        text = "@startuml " + nextLine + nextLine + "@enduml";
      } else {
        text = "";
      }

      try {
        org.apache.commons.io.FileUtils.write(selectedFile, text, "UTF-8");
        this.explorerTree.addFileIfPossible(selectedFile, true);
      } catch (IOException ex) {
        LOGGER.error("Can't create file : " + selectedFile);
        JOptionPane.showMessageDialog(this, "Can't create file", "Error", JOptionPane.ERROR_MESSAGE);
      }
    }
  }
775599
private AFTPClient actionListDir() throws PageException, IOException {
	required("name", name);
	required("directory", directory);

	AFTPClient client = getClient();
	FTPFile[] files = client.listFiles(directory);
	if (files == null) files = new FTPFile[0];

	pageContext.setVariable(name, toQuery(files, "ftp", directory, client.getRemoteAddress().getHostName()));
	writeCfftp(client);
	return client;
    }
428
function invoke() {
        parent::invoke();

        $result = true;

        // Set own core attributes
        $this->does_generate = ACTION_NONE;

        // These are always here
        global $CFG, $XMLDB;

        // Do the job, setting result as needed

        // Get the dir containing the file
        $dirpath = required_param('dir', PARAM_PATH);
        $dirpath = $CFG->dirroot . $dirpath;

        // Get the original dir and delete some elements
        if (!empty($XMLDB->dbdirs)) {
            if (isset($XMLDB->dbdirs[$dirpath])) {
                $dbdir = $XMLDB->dbdirs[$dirpath];
                if ($dbdir) {
                    unset($dbdir->xml_file);
                    unset($dbdir->xml_loaded);
                    unset($dbdir->xml_changed);
                    unset($dbdir->xml_exists);
                    unset($dbdir->xml_writeable);
                }
            }
        }
        // Get the edited dir and delete it completely
        if (!empty($XMLDB->editeddirs)) {
            if (isset($XMLDB->editeddirs[$dirpath])) {
                unset($XMLDB->editeddirs[$dirpath]);
            }
        }

        // Launch postaction if exists (leave this here!)
        if ($this->getPostAction() && $result) {
            return $this->launch($this->getPostAction());
        }

        // Return ok if arrived here
        return $result;
    }
597942
private static void init(List<File> list, File dir, Filter filter)
    {
        File[] files = dir.listFiles();
        for (int i = 0; i < files.length; i++)
        {
            if (files[i].isDirectory())
            {
                init(list, files[i], filter);
            }
            else
            {
                if (filter == null || filter.accepts(files[i].getAbsolutePath()))
                {
                    list.add(files[i]);
                }
            }
        }
    }
491076
protected void setFileFilter()
   {
      String[] extensions = m_model.getExtensions();
      for (String extension : extensions)
      {
         m_fileChooser.setFileFilter(new FileNameExtensionFilter(extension.toUpperCase() + " Files", extension));
      }
      m_fileChooser.setFileFilter(new FileNameExtensionFilter("Project Files", m_model.getExtensions()));
   }
1136077
function invokeOnComplete(slinkerOptions) {
    if (typeof slinkerOptions.onComplete === 'function' && slinkerOptions.modules.length === symlinksCreated.length) {
        slinkerOptions.onComplete();
    }
}
917584
public void initialise(File[] files, ClassLoader loader) throws MalformedURLException {
        _loader= loader;
        
        // TODO: remove this debugging stuff
        _filters= new LinkedList<IFilter>();
        _filters.add(new IgnoreFilter());
        _filters.add(new ServiceFilter());
//        _filters.add(new AgentElementFilter());
//        _filters.add(new NodeFilter());
//        _filters.add(new AgentFilter());
        
        // initialise enumerators
        _classEnumerations= new LinkedList<Enumeration<Class<?>>>();
        for(File current : files) {
            if(current.isDirectory()) {
                _classEnumerations.add(new DirectoryClassEnumerator(current, _loader));
            } else {
                _classEnumerations.add(new ArchiveClassEnumerator(current, _loader));
            }
        }
    }
1324485
public Boolean invoke(File propertiesFile, VirtualChannel channel) throws IOException, InterruptedException {
        if (!propertiesFile.exists()) {
            throw new AbortException("Couldn't find properties file: " + propertiesFile.getAbsolutePath());
        }
        PropertiesTransformer transformer = new PropertiesTransformer(propertiesFile, versionsByName);
        return transformer.transform();
    }
83655
static File openFileDialog(Frame frame, FileFilter fileFilter) {
    return openFileDialog(frame, fileFilter, null);
  }