@Override public void run() { try { if (saveReport(html, destinationFolder)) { StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(SimpleHTMLReport.class, "SimpleHTMLReport.status.saveSuccess", destinationFolder.getName())); }else{ StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(SimpleHTMLReport.class, "SimpleHTMLReport.status.saveError", destinationFolder.getName())); } } catch (IOException e) { Exceptions.printStackTrace(e); } } }, "SaveReportTask");
public void clearDropMatch() { // currentMatched = null; currentMatchedComponentRootElement = null; webform.getManager().highlight(null, null); if (StatusDisplayer.getDefault().getStatusText() == lastMessage) { StatusDisplayer.getDefault().setStatusText(""); } lastMessage = null; }
@Override protected void finalize() throws Throwable { if( text == getStatusText() ) setStatusText(""); } };
private Notification notify( String text, Priority priority ) { int importance = 1; switch( priority ) { case HIGH: importance = 100; break; case NORMAL: importance = 50; break; case LOW: case SILENT: importance = 1; break; } Message msg = StatusDisplayer.getDefault().setStatusText( text, importance ); return new NotificationImpl(msg); } }
public String getStatusText() { return StatusDisplayer.getDefault().getStatusText(); }
@Override public void run() { //Get the current workspace and set it to the exporter Workspace currentWorkspace = Lookup.getDefault().lookup(ProjectController.class).getCurrentWorkspace(); exporter.setWorkspace(currentWorkspace); //Execute export cancelled = !exporter.execute(); //If not cancelled, write a status line message if (!cancelled) { StatusDisplayer.getDefault().setStatusText("Export to SQLite database completed"); } } });
@NbBundle.Messages({ "# {0} - copied ID", "MSG_StatusCopyToClipboard=Copy to Clipboard: {0}", "MSG_CouldNotCopy=Could not copy the ID"}) @Override protected void performAction(Node[] activatedNodes) { assert activatedNodes.length == 1; DockerEntity idProvider = activatedNodes[0].getLookup().lookup(DockerEntity.class); if (idProvider != null) { Clipboard clipboard = getClipboard(); if (clipboard != null) { try { clipboard.setContents(new StringSelection(idProvider.getId()), null); StatusDisplayer.getDefault().setStatusText(Bundle.MSG_StatusCopyToClipboard(idProvider.getId())); } catch (IllegalStateException ex) { StatusDisplayer.getDefault().setStatusText(Bundle.MSG_CouldNotCopy()); } } } }
@NbBundle.Messages({ "OpeningSourceMsg=Opening source for class {0}", "NoSourceFoundMessage=No source found for class {0}" }) private static void openSourceImpl(final Lookup.Provider project, final String className, final String methodName, final String signature, final int line) { // *** logging stuff *** ProfilerLogger.debug("Open Source: Project: " + project); // NOI18N ProfilerLogger.debug("Open Source: Class name: " + className); // NOI18N ProfilerLogger.debug("Open Source: Method name: " + methodName); // NOI18N ProfilerLogger.debug("Open Source: Method sig: " + signature); // NOI18N Collection<? extends GoToSourceProvider> implementations = Lookup.getDefault().lookupAll(GoToSourceProvider.class); String st = Bundle.OpeningSourceMsg(className); final String finalStatusText = st + " ..."; // NOI18N StatusDisplayer.getDefault().setStatusText(finalStatusText); for(GoToSourceProvider impl : implementations) { try { if (impl.openSource(project, className, methodName, signature, line)) return; } catch (Exception e) { ProfilerLogger.log(e); } } ProfilerDialogs.displayError(Bundle.NoSourceFoundMessage(className)); }
private void showUrl() { if (url != null) { org.openide.awt.StatusDisplayer.getDefault().setStatusText( NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser")); HtmlBrowser.URLDisplayer.getDefault().showURL(url); } }
if( importance <= 0 ) throw new IllegalArgumentException("Invalid importance value: " + importance); setStatusText(text); return new Message() { public void clear(int timeInMillis) {
public void addChangeListener(ChangeListener l) { StatusDisplayer.getDefault().addChangeListener(l); }
/** Get the default Rave status displayer. * @return the default Rave instance */ public static synchronized StatusDisplayer_RAVE getRaveDefault() { if (INSTANCE == null) { StatusDisplayer sd = StatusDisplayer.getDefault(); if(sd instanceof StatusDisplayer_RAVE) { INSTANCE = (StatusDisplayer_RAVE)sd; } else { INSTANCE = new Trivial(); } } return INSTANCE; }
/** * Sets the clipboard context in textual-format. * * @param content */ @Messages({ "# {0} - copied file path", "CTL_Status_CopyToClipboardSingle=Copy to Clipboard: {0}", "# {0} - number of copied paths", "CTL_Status_CopyToClipboardMulti={0} paths were copied to clipboard" }) private void setClipboardContents(String content, int items) { Clipboard clipboard = Lookup.getDefault().lookup(ExClipboard.class); if (clipboard == null) { clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); } if (clipboard != null) { String statusText = items > 1 ? Bundle.CTL_Status_CopyToClipboardMulti(items) : Bundle.CTL_Status_CopyToClipboardSingle(content); StatusDisplayer.getDefault().setStatusText(statusText); clipboard.setContents(new StringSelection(content), null); } } }
@Override public void actionPerformed(ActionEvent e) { final StatusDisplayer stDisp = StatusDisplayer.getDefault(); Project p = Utils.getActiveProject(); if (!(p instanceof NbMavenProjectImpl)) { String mex = "No maven project to restart!"; stDisp.setStatusText(mex); logger.info(mex); return; M2ConfigProvider cp = proj.getLookup().lookup(M2ConfigProvider.class); SpringBootService sbs = proj.getLookup().lookup(SpringBootService.class); if (cp != null && sbs != null) { boolean enabled = sbs.hasPomDependency("spring-boot-devtools"); pw.close(); sb.append("Spring Boot application restart triggered"); stDisp.setStatusText(sb.toString()); logger.info(sb.toString()); logger.log(FINE, "Timestamp written in {0}", f.getAbsolutePath()); stDisp.setStatusText(sb.toString()); logger.warning(sb.toString()); stDisp.setStatusText(sb.toString()); logger.info(sb.toString());
@NbBundle.Messages({ "OpeningFileMsg=Opening source file {0}", "OpenFileFailsMessage=File \"{0}\" does not exist or the offset \"{1}\" is out of range" }) private static void openFileImpl(FileObject srcFile, int offset) { // *** logging stuff *** ProfilerLogger.debug("Open Source: FileObject: " + srcFile); // NOI18N ProfilerLogger.debug("Open Source: Offset: " + offset); // NOI18N Collection<? extends GoToSourceProvider> implementations = Lookup.getDefault().lookupAll(GoToSourceProvider.class); String st = Bundle.OpeningFileMsg(srcFile.getName()); final String finalStatusText = st + " ..."; // NOI18N StatusDisplayer.getDefault().setStatusText(finalStatusText); for(GoToSourceProvider impl : implementations) { try { if (impl.openFile(srcFile, offset)) return; } catch (Exception e) { ProfilerLogger.log(e); } } ProfilerDialogs.displayError(Bundle.OpenFileFailsMessage(srcFile.getName(), offset)); } }
/** This method repairs Node Delegate (usually after changing document by property editor) */ protected void repairNode(){ // PENDING: set the icon in Node // ((DataNode)getNodeDelegate()).setIconBase (getIconBaseForValidDocument()); org.openide.awt.StatusDisplayer.getDefault().setStatusText(""); // NOI18N /* if (inOut!=null) { inOut.closeInputOutput(); errorAnnotation.detach(); }*/ }
protected boolean preJump(Document doc, JTextComponent target, int offset, String msgKey, HyperlinkType type) { if (doc == null || target == null || offset < 0 || offset > doc.getLength()) { return false; } jumpToken = getToken(doc, offset); if (!isValidToken(jumpToken, type)) { return false; } //String name = jumpToken.text().toString(); StringBuilder buf = new StringBuilder(jumpToken.text()); String name = buf.toString(); String msg = NbBundle.getBundle(CsmCompletionUtils.class).getString(msgKey); //NOI18N msg = MessageFormat.format(msg, new Object[]{name}); org.openide.awt.StatusDisplayer.getDefault().setStatusText(msg);//NOI18N return true; }
StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(TestOutputListenerProvider.class, "MSG_CannotFollowLink1")); return; Project prj = FileOwnerQuery.getOwner(outDir); if (prj != null) { NbMavenProject nbprj = prj.getLookup().lookup(org.codehaus.mevenide.netbeans.NbMavenProject.class); File testDir = new File(nbprj.getOriginalMavenProject().getBuild().getTestSourceDirectory()); } else { LOG.info("Cannot find report path " + outputDir + testname + ".txt to follow link in Output Window."); //NOI18N StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(TestOutputListenerProvider.class, "MSG_CannotFollowLink2"));
public void actionPerformed(ActionEvent evt) { if (type == TYPE_JSP) { String newStartPage = JsfProjectUtils.setStartPage(fo); String msg = newStartPage != null ? NbBundle.getMessage(SetStartPageAction.class, "MSG_StartPageChanged") + " " + newStartPage : NbBundle.getMessage(SetStartPageAction.class, "MSG_NoStartPage"); StatusDisplayer.getDefault().setStatusText(msg); } }
model.endTransaction(); } catch (IllegalStateException ex) { StatusDisplayer.getDefault().setStatusText("Cannot write to the model: " + ex.getMessage(), StatusDisplayer.IMPORTANCE_ERROR_HIGHLIGHT); EditorCookie ed = dobj.getLookup().lookup(EditorCookie.class); SaveCookie sv = dobj.getLookup().lookup(SaveCookie.class); if (sv != null) { sv.save();