private void showWarning(boolean selected) { if (warningShown) { return; } if (selected) { NotifyDescriptor descriptor = new NotifyDescriptor.Message( NbBundle.getMessage(PhpDebuggerPanel.class, "MSG_WatchesAndEval"), NotifyDescriptor.WARNING_MESSAGE); DialogDisplayer.getDefault().notifyLater(descriptor); warningShown = true; } }
private static void warnUser(String title, String message) { DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor( message, title, NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.WARNING_MESSAGE, new Object[] {NotifyDescriptor.OK_OPTION}, NotifyDescriptor.OK_OPTION)); }
private void showErrorDialog(String message) { if (message != null) { NotifyDescriptor.Message e = new NotifyDescriptor.Message( message, NotifyDescriptor.WARNING_MESSAGE); DialogDisplayer.getDefault().notifyLater(e); } }
@Override public void notifyErrorLater(String msg) { DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE)); }
private static void notifyError (final String title, final String message) { NotifyDescriptor nd = new NotifyDescriptor(message, title, NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.ERROR_MESSAGE, new Object[] {NotifyDescriptor.OK_OPTION}, NotifyDescriptor.OK_OPTION); DialogDisplayer.getDefault().notifyLater(nd); }
private void showFailures(Set<FileObject> files) { if (files.isEmpty()) { return; } StringBuilder sb = new StringBuilder(50); for (FileObject file : files) { sb.append(file.getNameExt()); sb.append("\n"); // NOI18N } DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message( NbBundle.getMessage(CreateTestsAction.class, "MSG_TestNotGenerated", sb.toString()), NotifyDescriptor.WARNING_MESSAGE)); }
private static void notifyProblem(Exception e, String key) { String msg = NbBundle.getMessage(CloneableEditorSupport.class, key, e.getLocalizedMessage()); Exceptions.attachLocalizedMessage(e, msg); DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Exception(e)); }
@Override public void actionPerformed(ActionEvent e) { if (!CsmRefactoringUtils.REFACTORING_EXTRA) { return; } String error = doPerform(); if (error != null) { String errorText = NbBundle.getMessage(HintAction.class, error); NotifyDescriptor nd = new NotifyDescriptor.Message(errorText, NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notifyLater(nd); } }
@Override public void run() { if (!goToView()) { DialogDisplayer.getDefault().notifyLater(new DialogDescriptor.Message(NbBundle.getMessage(GoToViewAction.class, "MSG_ViewNotFound"))); } } });
@Override public void run() { if (!goToAction()) { DialogDisplayer.getDefault().notifyLater(new DialogDescriptor.Message(NbBundle.getMessage(GoToActionAction.class, "MSG_ActionNotFound"))); } } });
@Override protected void perform(CsmContext context) { String error = doPerformAction(context); if (error != null) { String errorText = NbBundle.getMessage(IntroduceAction.class, error); NotifyDescriptor nd = new NotifyDescriptor.Message(errorText, NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notifyLater(nd); } }
@NbBundle.Messages("ConfigActionSelenium.phpunit.missing=PHPUnit support is not installed (use Tools > Plugins).") private void informUser() { DialogDisplayer.getDefault().notifyLater( new NotifyDescriptor.Message(Bundle.ConfigActionSelenium_phpunit_missing(), NotifyDescriptor.INFORMATION_MESSAGE)); }
public static void error( String msg, Throwable thrown) { log(Level.SEVERE, msg, thrown); NotifyDescriptor.Exception e = new NotifyDescriptor.Exception(thrown); DialogDisplayer.getDefault().notifyLater(e); }
/** * Warn that search text would be invalid. */ @NbBundle.Messages({ "MSG_INVALID_SEARCH_TEST=Search text is too long." }) private void warnAboutInvalidText() { NotifyDescriptor nd = new NotifyDescriptor.Message( Bundle.MSG_INVALID_SEARCH_TEST(), NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notifyLater(nd); } }
public void showBrokenAlert(Project project) { ProjectInformation pi = ProjectUtils.getInformation(project); String projectName = null; if(pi !=null) projectName = pi.getDisplayName(); NotifyDescriptor alert = new NotifyDescriptor.Message( NbBundle.getMessage(WebServicesSupport.class, "ERR_NoJaxrpcPluginFound", projectName), NotifyDescriptor.WARNING_MESSAGE); DialogDisplayer.getDefault().notifyLater(alert); } }
@NbBundle.Messages({ "# {0} - project name", "CopySupport.warn.invalidSources=<html>Source Files of project \"{0}\" do not exist, file changes are not propagated to the server.<br><br>" + "Use \"Resolve Project Problems...\" action to repair the project." }) private void warnInvalidSourceRoot() { NotifyDescriptor descriptor = new NotifyDescriptor.Message( Bundle.CopySupport_warn_invalidSources(project.getName()), NotifyDescriptor.WARNING_MESSAGE); DialogDisplayer.getDefault().notifyLater(descriptor); }
static void notifyError(String error) { NotifyDescriptor nd = new NotifyDescriptor.Message(error, NotifyDescriptor.Message.ERROR_MESSAGE); DialogDisplayer.getDefault().notifyLater(nd); StatusDisplayer.getDefault().setStatusText(error); }
public void run () { String lckFile = ".LCK" + context.getDataObject ().getPrimaryFile ().getNameExt () + "~"; // NOI18N DialogDisplayer.getDefault ().notifyLater (new NotifyDescriptor.Message ( NbBundle.getMessage (CodeResolver.class, "CodeResolver.locked", lckFile) // NOI18N )); } });
private void handleIOEFromReload(IOException e) { Project project = FileOwnerQuery.getOwner(getProjectsConfigurationFile()); String projectDisplayName = project != null ? ProjectUtils.getInformation(project).getDisplayName() : "???"; //NOI18N String msg = String.format("An error found in the configuration file %s in the project %s: %s", getProjectsConfigurationFile().getNameExt(), projectDisplayName, e.getMessage()); NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.INFORMATION_MESSAGE); DialogDisplayer.getDefault().notifyLater(d); }
public static DataSourceInfo getDsInfo(String dsName) { ProjectDataSourceManager projectDataSourceManager = new ProjectDataSourceManager(CurrentProject.getInstance().getOpenedProject()); RequestedJdbcResource jdbcResource = null; jdbcResource = projectDataSourceManager.getDataSourceWithName(dsName); if (jdbcResource == null) { DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(DesignTimeDataSourceHelper.class, "MSG_NameNotFoundMessage"), NotifyDescriptor.INFORMATION_MESSAGE)); return null; } return new DataSourceInfo(dsName, jdbcResource.getDriverClassName(), jdbcResource.getUrl(), null, jdbcResource.getUsername(), jdbcResource.getPassword()); }