org.netbeans.modules.php.api.util.UiUtils Java Examples
The following examples show how to use
org.netbeans.modules.php.api.util.UiUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PhpUnit.java From netbeans with Apache License 2.0 | 6 votes |
@NbBundle.Messages({ "# {0} - project name", "PhpUnit.run.title=PHPUnit ({0})", }) @CheckForNull private PhpExecutable getExecutable(PhpModule phpModule) { FileObject sourceDirectory = phpModule.getSourceDirectory(); if (sourceDirectory == null) { org.netbeans.modules.php.phpunit.ui.UiUtils.warnNoSources(phpModule.getDisplayName()); return null; } return new PhpExecutable(phpUnitPath) .optionsSubcategory(PhpUnitOptionsPanelController.OPTIONS_SUB_PATH) .displayName(Bundle.PhpUnit_run_title(phpModule.getDisplayName())); }
Example #2
Source File: PhpUnit.java From netbeans with Apache License 2.0 | 6 votes |
@CheckForNull public static PhpUnit getForPhpModule(PhpModule phpModule, boolean showCustomizer) { if (validatePhpModule(phpModule) != null) { if (showCustomizer) { UiUtils.invalidScriptProvided(phpModule, PhpUnitCustomizer.IDENTIFIER, null); } return null; } // phpunit String path; if (PhpUnitPreferences.isPhpUnitEnabled(phpModule)) { // custom phpunit path = PhpUnitPreferences.getPhpUnitPath(phpModule); } else { // default phpunit String error = validateDefault(); if (error != null) { if (showCustomizer) { UiUtils.invalidScriptProvided(error, PhpUnitOptionsPanelController.OPTIONS_SUB_PATH); } return null; } path = PhpUnitOptions.getInstance().getPhpUnitPath(); } return new PhpUnit(path); }
Example #3
Source File: GenerateDocumentationActionFactory.java From netbeans with Apache License 2.0 | 6 votes |
@Override public void actionPerformed(ActionEvent e) { if (phpModule.isBroken()) { // broken project UiUtils.warnBrokenProject(phpModule); return; } RP.post(new Runnable() { @Override public void run() { LifecycleManager.getDefault().saveAll(); if (remember) { // remember curent provider docProvider.notifyEnabled(phpModule, true); } docProvider.generateDocumentation(phpModule); } }); }
Example #4
Source File: TestCreator.java From netbeans with Apache License 2.0 | 6 votes |
public CreateTestsResult createTests(List<FileObject> files, Map<String, Object> configurationPanelProperties) { final Set<FileObject> failed = new HashSet<>(); final Set<FileObject> succeeded = new HashSet<>(); Pair<GenerateCommand, String> commandSuite = Pair.of((GenerateCommand) configurationPanelProperties.get(GENERATE_COMMAND_PARAM), (String) configurationPanelProperties.get(SUITE_PARAM)); if (commandSuite.first() != null && commandSuite.second() != null) { try { Codecept codeception = Codecept.getForPhpModule(phpModule, true); if (codeception != null) { for (FileObject fo : files) { generateTest(codeception, phpModule, fo, commandSuite, failed, succeeded); } } } catch (ExecutionException ex) { LOGGER.log(Level.INFO, null, ex); UiUtils.processExecutionException(ex, CodeceptionOptionsPanelController.OPTIONS_SUB_PATH); } } return new CreateTestsResult(succeeded, failed); }
Example #5
Source File: Atoum.java From netbeans with Apache License 2.0 | 6 votes |
@CheckForNull public static Atoum getForPhpModule(PhpModule phpModule, boolean showCustomizer) { if (validatePhpModule(phpModule) != null) { if (showCustomizer) { UiUtils.invalidScriptProvided(phpModule, AtoumCustomizer.IDENTIFIER, null); } return null; } // atoum String path; if (AtoumPreferences.isAtoumEnabled(phpModule)) { // custom atoum path = AtoumPreferences.getAtoumPath(phpModule); } else { // default atoum String error = validateDefault(); if (error != null) { if (showCustomizer) { UiUtils.invalidScriptProvided(error, AtoumOptionsPanelController.OPTIONS_SUB_PATH); } return null; } path = AtoumOptions.getInstance().getAtoumPath(); } return new Atoum(path); }
Example #6
Source File: GoToTest.java From netbeans with Apache License 2.0 | 6 votes |
private LocationResult findOpposite0(FileObject fo) { PhpProject project = PhpProjectUtils.getPhpProject(fo); if (project == null) { // XXX what to do now?? LOGGER.log(Level.INFO, "PHP project was not found for file {0}", fo); return null; } if (PhpProjectValidator.isFatallyBroken(project)) { UiUtils.warnBrokenProject(project.getPhpModule()); return null; } if (CommandUtils.isUnderTests(project, fo, false)) { return findSource(project, fo); } else if (CommandUtils.isUnderSources(project, fo)) { return findTest(project, fo); } return null; }
Example #7
Source File: FileRunner.java From netbeans with Apache License 2.0 | 6 votes |
ExecutionDescriptor getDescriptor(Runnable postExecution) { ExecutionDescriptor descriptor = PhpExecutable.DEFAULT_EXECUTION_DESCRIPTOR .charset(Charset.forName(getEncoding())) .controllable(true) .optionsPath(UiUtils.OPTIONS_PATH) .outConvertorFactory(PHP_LINE_CONVERTOR_FACTORY); if (!getPhpOptions().isOpenResultInOutputWindow()) { descriptor = descriptor.inputOutput(InputOutput.NULL) .frontWindow(false) .frontWindowOnError(false); } if (postExecution != null) { descriptor = descriptor.postExecution(postExecution); } return descriptor; }
Example #8
Source File: PhpExecutable.java From netbeans with Apache License 2.0 | 6 votes |
@CheckForNull private Future<Integer> runInternal(ExecutionDescriptor executionDescriptor, ExecutionDescriptor.InputProcessorFactory2 outProcessorFactory, boolean debug) { Parameters.notNull("executionDescriptor", executionDescriptor); // NOI18N String error; if (validationHandler == null) { error = PhpExecutableValidator.validateCommand(executable, executableName); } else { error = PhpExecutableValidator.validateCommand(executable, validationHandler); } if (error != null) { if (warnUser) { // optionsSubcategory should be taken from executionDescriptor (unfortunately not possible) UiUtils.invalidScriptProvided(error, optionsSubcategory); } return null; } ProcessBuilder processBuilder = getProcessBuilder(debug); if (processBuilder == null) { return null; } executionDescriptor = getExecutionDescriptor(executionDescriptor, outProcessorFactory); return ExecutionService.newService(processBuilder, executionDescriptor, getDisplayName()).run(); }
Example #9
Source File: FileRunner.java From netbeans with Apache License 2.0 | 6 votes |
@NbBundle.Messages({ "# {0} - project or file name", "FileRunner.debug.displayName=Debug ({0})", }) public void debug() { RP.post(new Runnable() { @Override public void run() { PhpExecutable executable = getExecutable(Bundle.FileRunner_debug_displayName(getDisplayName())); try { executable.debug(FileUtil.toFileObject(file), getDescriptor(getPostExecution(executable))); } catch (ExecutionException ex) { UiUtils.processExecutionException(ex); } } }); }
Example #10
Source File: Doctrine2CommandSupport.java From netbeans with Apache License 2.0 | 6 votes |
@Override protected List<FrameworkCommand> getFrameworkCommandsInternal() { Doctrine2Script doctrine2; try { doctrine2 = Doctrine2Script.getDefault(); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), Doctrine2OptionsPanelController.OPTIONS_SUBPATH); return null; } List<Doctrine2CommandVO> commandsVO = doctrine2.getCommands(phpModule); if (commandsVO == null) { // some error return null; } List<FrameworkCommand> commands = new ArrayList<>(commandsVO.size()); for (Doctrine2CommandVO command : commandsVO) { commands.add(new Doctrine2Command(command.getCommand(), command.getDescription(), command.getHelp())); } return commands; }
Example #11
Source File: CodeceptionOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "CodeceptionOptionsPanel.codeception.search.title=Codecept files", "CodeceptionOptionsPanel.codeception.search.files=&Codecept files:", "CodeceptionOptionsPanel.codeception.search.pleaseWaitPart=Codecept files", "CodeceptionOptionsPanel.codeception.search.notFound=No Codecept files found." }) private void searchButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed String codeception = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(Codecept.SCRIPT_NAME, Codecept.SCRIPT_NAME_LONG, Codecept.SCRIPT_NAME_PHAR); } @Override public String getWindowTitle() { return Bundle.CodeceptionOptionsPanel_codeception_search_title(); } @Override public String getListTitle() { return Bundle.CodeceptionOptionsPanel_codeception_search_files(); } @Override public String getPleaseWaitPart() { return Bundle.CodeceptionOptionsPanel_codeception_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.CodeceptionOptionsPanel_codeception_search_notFound(); } }); if (codeception != null) { codeceptionTextField.setText(codeception); } }
Example #12
Source File: BaseComposerAction.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages("BaseComposerAction.error.composer.notValid=Composer is not valid.") @Override public final void actionPerformed(ActionEvent e) { PhpModule phpModule = PhpModule.Factory.inferPhpModule(); if (phpModule == null) { return; } try { runCommand(phpModule); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(Bundle.BaseComposerAction_error_composer_notValid(), ComposerOptionsPanelController.OPTIONS_SUBPATH); } }
Example #13
Source File: CakePHP3FrameworkCommandSupport.java From cakephp3-netbeans with Apache License 2.0 | 5 votes |
@Override public void runCommand(CommandDescriptor commandDescriptor, Runnable postExecution) { String[] commands = commandDescriptor.getFrameworkCommand().getCommands(); String[] commandParams = commandDescriptor.getCommandParams(); List<String> params = new ArrayList<>(commands.length + commandParams.length); params.addAll(Arrays.asList(commands)); params.addAll(Arrays.asList(commandParams)); try { Cake3Script.forPhpModule(phpModule, false).runCommand(phpModule, params, postExecution); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), getOptionsPath()); } }
Example #14
Source File: TesterOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "TesterOptionsPanel.tester.search.title=Nette Tester files", "TesterOptionsPanel.tester.search.files=&Nette Tester files:", "TesterOptionsPanel.tester.search.pleaseWaitPart=Nette Tester files", "TesterOptionsPanel.tester.search.notFound=No Nette Tester files found." }) private void searchTesterButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_searchTesterButtonActionPerformed String tester = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(Tester.TESTER_FILE_NAME); } @Override public String getWindowTitle() { return Bundle.TesterOptionsPanel_tester_search_title(); } @Override public String getListTitle() { return Bundle.TesterOptionsPanel_tester_search_files(); } @Override public String getPleaseWaitPart() { return Bundle.TesterOptionsPanel_tester_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.TesterOptionsPanel_tester_search_notFound(); } }); if (tester != null) { testerPathTextField.setText(tester); } }
Example #15
Source File: BaseCodeceptionAction.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages("BaseCodeceptionAction.error.codeception.notValid=Codeception is not valid.") @Override public final void actionPerformed(ActionEvent e) { try { runCommand(); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(Bundle.BaseCodeceptionAction_error_codeception_notValid(), CodeceptionOptionsPanelController.OPTIONS_SUB_PATH); } }
Example #16
Source File: CodeSnifferOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "CodeSnifferOptionsPanel.search.title=Code Sniffer scripts", "CodeSnifferOptionsPanel.search.scripts=Co&de Sniffer scripts:", "CodeSnifferOptionsPanel.search.pleaseWaitPart=Code Sniffer scripts", "CodeSnifferOptionsPanel.search.notFound=No Code Sniffer scripts found." }) private void codeSnifferSearchButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_codeSnifferSearchButtonActionPerformed String codeSniffer = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(CodeSniffer.NAME, CodeSniffer.LONG_NAME); } @Override public String getWindowTitle() { return Bundle.CodeSnifferOptionsPanel_search_title(); } @Override public String getListTitle() { return Bundle.CodeSnifferOptionsPanel_search_scripts(); } @Override public String getPleaseWaitPart() { return Bundle.CodeSnifferOptionsPanel_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.CodeSnifferOptionsPanel_search_notFound(); } }); if (codeSniffer != null) { codeSnifferTextField.setText(codeSniffer); } }
Example #17
Source File: Codecept.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "# {0} - project name", "Codecept.displayName=Codecept ({0})", }) @CheckForNull private PhpExecutable getExecutable(PhpModule phpModule) { FileObject sourceDirectory = phpModule.getSourceDirectory(); if (sourceDirectory == null) { org.netbeans.modules.php.codeception.ui.UiUtils.warnNoSources(phpModule.getDisplayName()); return null; } return new PhpExecutable(codeceptPath) .optionsSubcategory(CodeceptionOptionsPanelController.OPTIONS_SUB_PATH) .displayName(Bundle.Codecept_displayName(phpModule.getDisplayName())); }
Example #18
Source File: DependenciesPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages("DependenciesPanel.error.composer.notValid=Composer is not valid.") @CheckForNull Composer getComposer() { try { return Composer.getDefault(); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(Bundle.DependenciesPanel_error_composer_notValid(), ComposerOptionsPanelController.OPTIONS_SUBPATH); } return null; }
Example #19
Source File: AddDependencyPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages("AddDependencyPanel.error.composer.notValid=Composer is not valid.") @CheckForNull Composer getComposer() { try { return Composer.getDefault(); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(Bundle.AddDependencyPanel_error_composer_notValid(), ComposerOptionsPanelController.OPTIONS_SUBPATH); } return null; }
Example #20
Source File: ZendCommand.java From netbeans with Apache License 2.0 | 5 votes |
@Override protected String getHelpInternal() { PhpModule module = phpModule.get(); if (module == null) { return ""; // NOI18N } try { return ZendScript.getDefault().getHelp(module, Arrays.<String>asList(getCommands())); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), ZendScript.getOptionsSubPath()); } return ""; // NOI18N }
Example #21
Source File: ApiGenOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "ApiGenOptionsPanel.search.scripts.title=ApiGen scripts", "ApiGenOptionsPanel.search.scripts=&ApiGen scripts:", "ApiGenOptionsPanel.search.scripts.pleaseWaitPart=ApiGen scripts", "ApiGenOptionsPanel.search.scripts.notFound=No ApiGen scripts found." }) private void searchButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed String script = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(ApiGenScript.SCRIPT_NAME, ApiGenScript.SCRIPT_NAME_LONG); } @Override public String getWindowTitle() { return Bundle.ApiGenOptionsPanel_search_scripts_title(); } @Override public String getListTitle() { return Bundle.ApiGenOptionsPanel_search_scripts(); } @Override public String getPleaseWaitPart() { return Bundle.ApiGenOptionsPanel_search_scripts_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.ApiGenOptionsPanel_search_scripts_notFound(); } }); if (script != null) { apiGenTextField.setText(script); } }
Example #22
Source File: ApiGenProvider.java From netbeans with Apache License 2.0 | 5 votes |
@Override public void generateDocumentation(PhpModule phpModule) { try { ApiGenScript.getDefault().generateDocumentation(phpModule); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), ApiGenOptionsPanelController.OPTIONS_SUBPATH); } }
Example #23
Source File: PHPStanOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "PHPStanOptionsPanel.search.title=PHPStan scripts", "PHPStanOptionsPanel.search.scripts=PHPStan scripts:", "PHPStanOptionsPanel.search.pleaseWaitPart=PHPStan scripts", "PHPStanOptionsPanel.search.notFound=No PHPStan scripts found." }) private void phpStanSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_phpStanSearchButtonActionPerformed String phpStan = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(PHPStan.NAME, PHPStan.LONG_NAME); } @Override public String getWindowTitle() { return Bundle.PHPStanOptionsPanel_search_title(); } @Override public String getListTitle() { return Bundle.PHPStanOptionsPanel_search_scripts(); } @Override public String getPleaseWaitPart() { return Bundle.PHPStanOptionsPanel_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.PHPStanOptionsPanel_search_notFound(); } }); if (phpStan != null) { phpStanTextField.setText(phpStan); } }
Example #24
Source File: Cake3Command.java From cakephp3-netbeans with Apache License 2.0 | 5 votes |
@Override protected String getHelpInternal() { PhpModule module = phpModule.get(); if (module == null) { return ""; // NOI18N } try { return Cake3Script.forPhpModule(module, false).getHelp(module, getCommands()); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), UiUtils.FRAMEWORKS_AND_TOOLS_OPTIONS_PATH); } return ""; // NOI18N }
Example #25
Source File: SymfonyCommandSupport.java From netbeans with Apache License 2.0 | 5 votes |
@Override protected List<FrameworkCommand> getFrameworkCommandsInternal() { try { return SymfonyScript.forPhpModule(phpModule, true).getCommands(phpModule); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), SymfonyScript.OPTIONS_SUB_PATH); } return null; }
Example #26
Source File: CodingStandardsFixerOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "CodingStandardsFixerOptionsPanel.search.title=Coding Standards Fixer scripts", "CodingStandardsFixerOptionsPanel.search.scripts=Coding Standards Fixer scripts:", "CodingStandardsFixerOptionsPanel.search.pleaseWaitPart=Coding Standards Fixer scripts", "CodingStandardsFixerOptionsPanel.search.notFound=No Coding Standards Fixer scripts found." }) private void codingStandardsFixerSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_codingStandardsFixerSearchButtonActionPerformed String codingStandardsFixer = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(CodingStandardsFixer.NAME, CodingStandardsFixer.LONG_NAME); } @Override public String getWindowTitle() { return Bundle.CodingStandardsFixerOptionsPanel_search_title(); } @Override public String getListTitle() { return Bundle.CodingStandardsFixerOptionsPanel_search_scripts(); } @Override public String getPleaseWaitPart() { return Bundle.CodingStandardsFixerOptionsPanel_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.CodingStandardsFixerOptionsPanel_search_notFound(); } }); if (codingStandardsFixer != null) { codingStandardsFixerTextField.setText(codingStandardsFixer); } }
Example #27
Source File: ZendOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
private void searchButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed String zendScript = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(ZendScript.SCRIPT_NAME, ZendScript.SCRIPT_NAME_LONG); } @Override public String getWindowTitle() { return NbBundle.getMessage(ZendOptionsPanel.class, "LBL_ZendScriptsTitle"); } @Override public String getListTitle() { return NbBundle.getMessage(ZendOptionsPanel.class, "LBL_ZendScripts"); } @Override public String getPleaseWaitPart() { return NbBundle.getMessage(ZendOptionsPanel.class, "LBL_ZendScriptsPleaseWaitPart"); } @Override public String getNoItemsFound() { return NbBundle.getMessage(ZendOptionsPanel.class, "LBL_NoZendScriptsFound"); } }); if (zendScript != null) { zendTextField.setText(zendScript); } }
Example #28
Source File: ZendCommandSupport.java From netbeans with Apache License 2.0 | 5 votes |
@Override protected List<FrameworkCommand> getFrameworkCommandsInternal() { try { return ZendScript.getDefault().getCommands(phpModule); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), ZendScript.getOptionsSubPath()); } return null; }
Example #29
Source File: ZendCommandSupport.java From netbeans with Apache License 2.0 | 5 votes |
@Override public void runCommand(CommandDescriptor commandDescriptor, Runnable postExecution) { String[] commands = commandDescriptor.getFrameworkCommand().getCommands(); String[] commandParams = commandDescriptor.getCommandParams(); List<String> params = new ArrayList<>(commands.length + commandParams.length); params.addAll(Arrays.asList(commands)); params.addAll(Arrays.asList(commandParams)); try { ZendScript.getDefault().runCommand(phpModule, params, postExecution); } catch (InvalidPhpExecutableException ex) { UiUtils.invalidScriptProvided(ex.getLocalizedMessage(), ZendScript.getOptionsSubPath()); } }
Example #30
Source File: PhpUnitOptionsPanel.java From netbeans with Apache License 2.0 | 5 votes |
@NbBundle.Messages({ "PhpUnitOptionsPanel.skelGen.search.title=Skeleton Generator scripts", "PhpUnitOptionsPanel.skelGen.search.scripts=&Skeleton Generator scripts:", "PhpUnitOptionsPanel.skelGen.search.pleaseWaitPart=Skeleton Generator scripts", "PhpUnitOptionsPanel.skelGen.search.notFound=No Skeleton Generator scripts found." }) private void skelGenSearchButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_skelGenSearchButtonActionPerformed String skelGen = UiUtils.SearchWindow.search(new UiUtils.SearchWindow.SearchWindowSupport() { @Override public List<String> detect() { return FileUtils.findFileOnUsersPath(SkeletonGenerator.SCRIPT_NAME, SkeletonGenerator.SCRIPT_NAME_LONG, SkeletonGenerator.SCRIPT_NAME_PHAR); } @Override public String getWindowTitle() { return Bundle.PhpUnitOptionsPanel_skelGen_search_title(); } @Override public String getListTitle() { return Bundle.PhpUnitOptionsPanel_skelGen_search_scripts(); } @Override public String getPleaseWaitPart() { return Bundle.PhpUnitOptionsPanel_skelGen_search_pleaseWaitPart(); } @Override public String getNoItemsFound() { return Bundle.PhpUnitOptionsPanel_skelGen_search_notFound(); } }); if (skelGen != null) { skelGenTextField.setText(skelGen); } }