GEN-LAST:event_tfPackageNameFocusLost
545570
private void tfPackageNameActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_tfPackageNameActionPerformed
    {//GEN-HEADEREND:event_tfPackageNameActionPerformed
        // Commit on ENTER
        aTable.setPackageName(tfPackageName.getText());
    }
1041530
function handleInputFocus(target, event) {
        if (spec.templating.isEditInput(target)) {
            var fileId = spec.templating.getFileId(target),
                status = spec.onGetUploadStatus(fileId);

            if (status === qq.status.SUBMITTED) {
                spec.log(qq.format("Detected valid filename input focus event on file '{}', ID: {}.", spec.onGetName(fileId), fileId));
                inheritedInternalApi.handleFilenameEdit(fileId, target);
            }
        }
    }
937995
function stopPackage(packageName, cb) {
   var packageRuntime = packageRuntimes[packageName];

   if (isUndefined(packageRuntime) || isUndefined(packageRuntime.process)) {
      cb();
      return;
   }

   if (!isUndefined(packageRuntime.killTimer)) {
      cb(new Error('already attempting to stop package ' + packageName));
      return;
   }

   if (!isUndefined(packageRuntime.startupTimer)) {
      clearTimeout(packageRuntime.startupTimer);
      packageRuntime.startupTimer = null;
   }

   packageRuntime.killedCallback = cb;
   packageRuntime.killTimer = setTimeout(function() {
      packageRuntime.killedCallback = null; 
      packageRuntime.killTimer = null;
      cb(new Error('unable to stop package ' + packageName));
   }, killTimout * 1000);

   packageRuntime.process.kill();
}
855985
private void cmdFontFamilyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdFontFamilyActionPerformed
    	FontChooser2 fe = new FontChooser2(cmdFontFamily, DisposableOBDAPreferences.OBDAPREFS_FONTFAMILY, DisposableOBDAPreferences.OBDAPREFS_FONTSIZE, DisposableOBDAPreferences.OBDAPREFS_ISBOLD);
    }
9433
private void tfJavaFieldNameFocusLost(java.awt.event.FocusEvent evt)//GEN-FIRST:event_tfJavaFieldNameFocusLost
    {//GEN-HEADEREND:event_tfJavaFieldNameFocusLost
        // Commit value if focus is lost
        aRelation.setFieldName(tfJavaFieldName.getText());
    }
190943
private void listFoundFilesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_listFoundFilesMouseClicked
    if (evt.getClickCount()>1 && !evt.isPopupTrigger() && this.listFoundFiles.getSelectedIndex()>=0) {
      UiUtils.closeCurrentDialogWithResult(this, this.dialogOkObject);
    }
  }
224830
private void menuEditCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuEditCopyActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null && title.getProvider().doesSupportCutCopyPaste()) {
      title.getProvider().doCopy();
    }
    updateMenuItemsForProvider(title == null ? null : title.getProvider());
  }
1313683
Event createFailedEvent(Throwable t) {
        synchronized (terminated) {
            if (terminated.get()) {
                return null;
            }
            if (setState(State.FAILED)) {
                installer.removeWabFromEligibleForCollisionResolution(this);
                installer.attemptRedeployOfPreviouslyCollidedContextPath(this.wabContextPath);
                return createEvent(State.FAILED, t, null, null);
            }
        }
        return null;
    }
982259
private void tfClassNameActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_tfClassNameActionPerformed
    {//GEN-HEADEREND:event_tfClassNameActionPerformed
        // Commit on ENTER
        aTable.setClassName(tfClassName.getText());
    }
750457
function genLogsAndFile(model, pkg, tdef, deployUnit) {
    var descMeta = tdef.findMetaDataByID('description');
    var desc = chalk.gray.italic('-none-');
    if (descMeta) {
      if (descMeta.value.length > 50) {
        desc = descMeta.value.substr(0, 50) + '...';
      } else {
        desc = descMeta.value;
      }
    }

    console.log(chalk.yellow('TypeDefinition'));
    console.log('     ' + chalk.gray('namespace ') + pkg);
    console.log('     ' + chalk.gray('name      ') + tdef.name);
    console.log('     ' + chalk.gray('version   ') + tdef.version);
    console.log('     ' + chalk.gray('desc      ') + desc);
    console.log();

    if (tdef.dictionaryType) {
      // dictionary logging
      var dicTable = new Table({
        head: [chalk.yellow('Dictionary'), chalk.cyan('Datatype'), chalk.cyan('Default value'), chalk.cyan('Optional?'), chalk.cyan('Fragmented?')]
      });
      tdef.dictionaryType.attributes.array.forEach(function (attr) {
        dicTable.push([
          attr.name,
          attr.datatype,
          attr.defaultValue ? attr.defaultValue : chalk.gray.italic('-none-'),
          attr.optional ? chalk.green('✔'):chalk.yellow('✘'),
          attr.fragmentDependant ? chalk.green('✔'):chalk.yellow('✘')
        ]);
      });
      if (dicTable.length > 0) {
        console.log(dicTable.toString());
      }
    }

    if (tdef.provided) {
      // inputs port logging
      var inputs = tdef.provided.array.map(function (port) {
        return chalk.white(port.name);
      });
      if (inputs.length > 0) {
        var inputsTable = new Table({
          head: [chalk.yellow('Inputs')].concat(inputs)
        });
        console.log(inputsTable.toString());
      }
    }
    if (tdef.required) {
      // outputs port logging
      var outputs = tdef.required.array.map(function (port) {
        return chalk.white(port.name);
      });
      if (outputs.length > 0) {
        var outputsTable = new Table({
          head: [chalk.yellow('Outputs')].concat(outputs)
        });
        console.log(outputsTable.toString());
      }
    }

    console.log();
    console.log(chalk.yellow('DeployUnit'));
    console.log('     ' + chalk.gray('hashcode  ') + deployUnit.hashcode);
    console.log('     ' + chalk.gray('name      ') + deployUnit.name);
    console.log('     ' + chalk.gray('version   ') + deployUnit.version);
    console.log('     ' + chalk.gray('platform  ') + deployUnit.findFiltersByID('platform').value);

    if (!quiet) {
      process.stdout.write((!quiet ? '\n' : '') + chalk.green('Model generation done'));
    }

    var factory = new kevoree.factory.DefaultKevoreeFactory(),
      jsonSerializer = factory.createJSONSerializer(),
      filepath = path.resolve(dirPath, 'kevlib.json'),
      prettyModel = JSON.stringify(JSON.parse(jsonSerializer.serialize(model)), null, 4);

    fs.writeFile(filepath, prettyModel, function (err) {
      if (err) {
        errHandler(err);
      } else {
        if (!quiet) {
          console.log('\nModel saved at %s', path.relative(process.cwd(), filepath));
        }
        callback();
      }
    });
  }
311
function getMessageFromPackage(messageType, type, callback) {
  var packageName = getPackageNameFromMessageType(messageType);
  var messageName = getMessageNameFromMessageType(messageType);
  packages.findPackage(packageName, function(error, directory) {
    var filePath;
    filePath = path.join(directory, type, messageName + '.' + type);
    getMessageFromFile(messageType, filePath, type, callback);
  });
}
782832
private void trackingStopMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trackingStopMenuItemActionPerformed
        if (trackingWorker != null) {
            trackingWorker.cancel();
        } else {
            assert(false);
        }
    }
221115
private void txtBorderWidthFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtBorderWidthFocusLost
        // TODO: the name (and label?) of this text box no longer matches its purpose
        if (txtBorderWidth.getText().matches("[0-9]+")) {
            quietZoneHorizontal = Integer.parseInt(txtBorderWidth.getText());
            encodeData();
        } else {
            txtBorderWidth.setText(String.valueOf(quietZoneHorizontal));
        }
    }
1123679
def file_name(self, event):
        
        name = os.path.basename(event.src_path)
        name = name.replace(".yaml", "")
        name = name.replace(".yml", "")

        return name
937494
private void menuOpenFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuOpenFileActionPerformed
    final File file = DialogProviderManager.getInstance().getDialogProvider().msgOpenFileDialog(null, "open-file", "Open file", null, true, MMDEditor.MMD_FILE_FILTER, "Open");
    if (file != null) {
      if (openFileAsTab(file, -1)) {
        try {
          FileHistoryManager.getInstance().registerOpenedProject(file);
        } catch (IOException ex) {
          LOGGER.error("Can't register last opened file", ex); //NOI18N
        }
      }
    }
  }
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);
      }
    }
  }
242643
def closeEvent(self, event):
        
        dirty_widgets = []
        for w in self.widgets(include_clones=False):
            if w.dirty:
                dirty_widgets.append(w)
        filenames = []
        for w in dirty_widgets:
            if os.path.exists(w.file.path):
                filenames.append(w.file.path)
            else:
                filenames.append(w.documentTitle())
        if len(filenames) == 0:
            self.close_all()
            return
        dlg = DlgUnsavedFiles(self, files=filenames)
        if dlg.exec_() == dlg.Accepted:
            if not dlg.discarded:
                for item in dlg.listWidget.selectedItems():
                    filename = item.text()
                    widget = None
                    for widget in dirty_widgets:
                        if widget.file.path == filename or \
                                widget.documentTitle() == filename:
                            break
                    tw = widget.parent_tab_widget
                    tw.save_widget(widget)
                    tw.remove_tab(tw.indexOf(widget))
            self.close_all()
        else:
            event.ignore()