GEN-LAST:event_sendFilters
495972
private void menuValidateBodyActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_menuValidateBodyActionPerformed
		final MappingValidationDialog outputField = new MappingValidationDialog(mappingsTree);

		outputField.setLocationRelativeTo(getParent());
		Runnable action = () -> {
            canceled = false;
            final List path = mappingList.getSelectedValuesList();
            if (path == null) {
                JOptionPane.showMessageDialog(MappingManagerPanel.this, "Select at least one mapping");
                return;
            }
            outputField.addText("Validating " + path.size() + " SQL queries.\n", outputField.NORMAL);
            for (int i = 0; i < path.size(); i++) {
                SQLPPTriplesMap o = (SQLPPTriplesMap) path.get(i);
                String id = o.getId();
                outputField.addText("  id: '" + id + "'... ", outputField.NORMAL);
                OntopSQLCredentialConfiguration config = OntopSQLCredentialConfiguration.defaultBuilder()
                        .properties(DataSource2PropertiesConvertor.convert(selectedSource))
                        .build();
                validator = new SQLSourceQueryValidator(config.getSettings(), o.getSourceQuery());
                long timestart = System.nanoTime();

                if (canceled) {
                    return;
                }
                if (validator.validate()) {
                    long timestop = System.nanoTime();
                    String output = " valid  \n";
                    outputField.addText("Time to query: " + ((timestop - timestart) / 1000) + " ns. Result: ", outputField.NORMAL);
                    outputField.addText(output, outputField.VALID);
                } else {
                    long timestop = System.nanoTime();
                    String output = " invalid Reason: " + validator.getReason().getMessage() + " \n";
                    outputField.addText("Time to query: " + ((timestop - timestart) / 1000) + " ns. Result: ", outputField.NORMAL);
                    outputField.addText(output, outputField.CRITICAL_ERROR);
                }

                if (canceled) {
                    return;
                }
            }
            outputField.setVisible(true);
        };
		validatorThread = new Thread(action);
		validatorThread.start();

		Thread cancelThread = new Thread(() -> {
            while (!outputField.closed) {
                try {
                    Thread.currentThread();
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            if (validatorThread.isAlive()) {
                try {
                    Thread.currentThread();
                    Thread.sleep(250);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                try {
                    canceled = true;
                    if(validator !=null) {
                        validator.cancelValidation();
                    }
                } catch (SQLException e) {
                    e.printStackTrace();
                }
            }
        });
		cancelThread.start();

	}
596640
private synchronized void chkShowAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkShowAllActionPerformed
    	Runnable runner = new Runnable(){
    		public void run(){
    			if (chkShowAll.isSelected()) {
    				fetchSizeCache = getFetchSize();
    				txtFetchSize.setText(0+"");
    				txtFetchSize.setEditable(false);
    			} else {
    				txtFetchSize.setText(fetchSizeCache+"");
    				txtFetchSize.setEditable(true);
    			}
    		}
    	};
    	SwingUtilities.invokeLater(runner);
    }
1015826
function _handleEditFilter(e) {
        var filterSets  = PreferencesManager.get("fileFilters") || [],
            filterIndex = $(e.target).parent().data("index") - FIRST_FILTER_INDEX;

        // Don't let the click bubble upward.
        e.stopPropagation();

        // Close the dropdown first before opening the edit filter dialog
        // so that it will restore focus to the DOM element that has focus
        // prior to opening it.
        _picker.closeDropdown();

        editFilter(filterSets[filterIndex], filterIndex);
    }
574170
private void directoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_directoryButtonActionPerformed
        // Select save directory
        JFileChooser chooser = new JFileChooser();
        chooser.setDialogTitle("Directory Select");
        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        chooser.setAcceptAllFileFilterUsed(false);
        if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
            folderField.setText(chooser.getSelectedFile().getAbsolutePath()
                    + File.separator);
        }
    }
639407
def make_event_filter(self, filter_key, filter_value):
        """"""
        event_filter = EventFilter(
            self.event_name,
            self.event,
            {filter_key: filter_value},
            from_block=self.from_block,
            to_block=self.to_block
        )
        event_filter.set_poll_interval(0.5)
        return event_filter
547711
private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSaveActionPerformed
    final File home = new File(System.getProperty("user.home")); //NOI18N
    final File toSave = new FileChooserBuilder("user-home-dir").
        setTitle(java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.saveTitle")).
        addFileFilter(TEXT_FILE_FILTER).setFileFilter(TEXT_FILE_FILTER).
        setFilesOnly(true).
        setDefaultWorkingDirectory(home).
        showSaveDialog();
    if (toSave != null) {
      try {
        final String text = getText();
        FileUtils.writeStringToFile(toSave, text, "UTF-8"); //NOI18N
      }
      catch (Exception ex) {
        LOGGER.error("Error during text file saving", ex); //NOI18N
        NbUtils.msgError(null, java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.msgError"));
      }
    }
  }
1061994
public function onPreSend(FilterPreSendEvent $event): void
    {
        foreach ($this->registry->getTransportFilters() as $filter) {
            if ($filter->supports($event->getTransport(), $event->getMessage(), $event->getMailRendered())) {
                $filter->filter($event->getTransport(), $event->getMessage(), $event->getMailRendered());
            }
        }
    }
1164837
private synchronized void cmdSaveChangesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonSaveActionPerformed
		final String query = queryTextPane.getText();
		if (!currentId.isEmpty()) {
			if (!currentGroup.isEmpty()) {
				qc.addQuery(query, currentId, currentGroup);
			} else {
				qc.addQuery(query, currentId);
			}
		} else {
			JOptionPane.showMessageDialog(QueryInterfacePanel.this,
					"Please select first the query node that you would like to update",
					"Warning",
					JOptionPane.WARNING_MESSAGE);
		}	
	}
533321
private void buttonLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLoadActionPerformed
    final File home = new File(System.getProperty("user.home")); //NOI18N
    final File toOpen = new FileChooserBuilder("user-home-dir"). //NOI18N
        setTitle(java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonLoadActionPerformed.title")).
        addFileFilter(TEXT_FILE_FILTER).setFileFilter(TEXT_FILE_FILTER).
        setFilesOnly(true).
        setDefaultWorkingDirectory(home).
        showOpenDialog();
    if (toOpen != null) {
      try {
        final String text = FileUtils.readFileToString(toOpen, "UTF-8"); //NOI18N
        setText(text);
      }
      catch (Exception ex) {
        LOGGER.error("Error during text file loading", ex); //NOI18N
        NbUtils.msgError(null, java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonLoadActionPerformed.msgError"));
      }
    }
  }
120099
def re(self, event_property, value):
        
        c = self.copy()
        c.filters.append(filters.RE(event_property, value))
        return c
1032548
private void buttonImportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImportSettingsActionPerformed

        BaseFileChooser fileChooser = new BaseFileChooser();
        fileChooser.setAcceptAllFileFilterUsed(true);
        fileChooser.addChoosableFileFilter(new FileExtensionFilter("txt"));
        if(lastfile!=null)
            fileChooser.setSelectedFile(new File(lastfile));
        if (fileChooser.showOpenDialog(this.buttonImportSettings) == BaseFileChooser.APPROVE_OPTION) {
            lastfile = fileChooser.getSelectedFile().getPath();
            loadOptionsFromFile(fileChooser.getSelectedFile().getPath());
        }
    }
521172
private void jButtonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed
        parent.setText(getParamsString());
        getAssociatedDialog().dispose();
    }
1203306
private boolean filter(Event event) {
        if (null == filters) return false;

        for (EventFilter filter : filters) {
            if (filter.filter(event)) {
                return true;
            }
        }
        return false;
    }
380121
private void buttonExportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExportSettingsActionPerformed
    File file = DialogProviderManager.getInstance().getDialogProvider().msgSaveFileDialog(null, "exportSettings", "Export settings", lastExportedSettingsFile, true, new PropertiesFileFilter(), "Save");
    if (file != null) {
      lastExportedSettingsFile = file;
      if (!file.getName().toLowerCase(Locale.ENGLISH).endsWith(".properties")) {
        final Boolean addExt = DialogProviderManager.getInstance().getDialogProvider().msgConfirmYesNoCancel(null, "Add extension", "Add '.properties' extension?");
        if (addExt == null) {
          return;
        }
        if (addExt) {
          file = new File(file.getAbsolutePath() + ".properties");
        }
      }

      if (file.exists() && !DialogProviderManager.getInstance().getDialogProvider().msgConfirmOkCancel(null, "Override file", String.format("File %s exists, to override it?", file.getName()))) {
        return;
      }

      final PropertiesPreferences prefs = new PropertiesPreferences("NB MindMap plugin");
      final MindMapPanelConfig cfg = store(prefs, new MindMapPanelConfig(), false);
      cfg.saveTo(prefs);
      try {
        FileUtils.write(file, prefs.toString(), "UTF-8");
      } catch (final Exception ex) {
        LOGGER.error("Can't export settings", ex);
        DialogProviderManager.getInstance().getDialogProvider().msgError(null, "Can't export settings [" + ex.getMessage() + ']');
      }
    }
  }
165279
def stream_events(self, filter: Callable[[Event], bool] = None, *, max_queue_size: int = 0):
        """"""
        return stream_events([self], filter, max_queue_size=max_queue_size)
514826
def filter_events(cls, client, event_data):
        """"""

        for event in cls.events:
            # try event filters
            if event.matches(client, event_data):
                yield event
720537
private void cbDynamicProxyActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_cbDynamicProxyActionPerformed
  {//GEN-HEADEREND:event_cbDynamicProxyActionPerformed
    // Add your handling code here:
    aTable.setDynamicProxy(this.cbDynamicProxy.isSelected());
  }