public void run() { OutputWriter out = getLog().getOut(); if (writable) { try { out.reset(); } catch (IOException ex) { // Ignore Exception } out.flush(); } } });
public void showLogViewer() throws IOException{ shouldStop = false; io = IOProvider.getDefault().getIO(ioName, false); io.getOut().reset(); io.select(); filestream = new FileInputStream(fileName); ins = new BufferedReader(new InputStreamReader(filestream)); RP.post(new Runnable() { @Override public void run() { init(); task.schedule(0); } }); }
public static InputOutput getRemoteLog(String displayName, boolean select) { InputOutput io = IOProvider.getDefault().getIO(NbBundle.getMessage(Command.class, "LBL_RemoteLog", displayName), false); if (select) { io.select(); } try { io.getOut().reset(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } return io; }
public static void clearErrors(boolean delayed) { if (delayed) { clearErrors = true; } else { OutputWriter out = getOutputWriter(); try { out.reset(); } catch (IOException ioe) { // This is lame - our own output window shouldn't // throw IO exceptions! ErrorManager.getDefault().notify(ioe); } } }
reassignAdditionalContext(vals); try { io.getOut().reset(); io.getIn().reset(); } catch (IOException ex) {
/** * Creates and starts a new instance of Hk2Logger * * @param uri the uri of the server */ private Hk2Logger(String uri) { io = UISupport.getServerIO(uri); if (io == null) { return; // finish, it looks like this server instance has been unregistered } // clear the old output try { io.getOut().reset(); } catch (IOException ioe) { // no op } io.select(); }
OutputWriter out = io.getOut(); try { out.reset();
private InputOutput openConsole() { InputOutput io = UISupport.getServerIO(dm.getUrl()); if (io == null) { return null; // finish, it looks like this server instance has been unregistered } // clear the old output try { io.getOut().reset(); } catch (IOException ioe) { // no op } io.select(); return io; }
/** * display the log viewer dialog * @param forced reset view if true, otherwise refresh * @return The output window * @throws java.io.IOException encountered issue while doing a reset on the stdout */ public InputOutput showLogViewer(boolean forced) throws IOException{ io = UISupport.getServerIO(url); working = true; if (forced &&(io.isClosed())){ initRingerDone=false; io.getOut().reset(); } io.select(); return io; }
public void run() { final int MAX_LINES = 10000; String line; shouldStop = io.isClosed(); if (!shouldStop) { try { if (lines >= MAX_LINES) { io.getOut().reset(); lines = ring.output(); } // end of if (lines >= MAX_LINES) while ((line = ins.readLine()) != null) { if ((line = ring.add(line)) != null) { io.getOut().println(line); lines++; } // end of if ((line = ring.add(line)) != null) } }catch (IOException e) { Logger.getLogger(LogViewerSupport.class.getName()).log(Level.INFO, null, e); } task.schedule(10000); } else { ///System.out.println("end of infinite loop for log viewer\n\n\n\n"); stopUpdatingLogViewer(); } } /* display the log viewer dialog
@Override protected void init() { SonarIssuesTopComponent sonarTopComponent = (SonarIssuesTopComponent) WindowManager.getDefault().findTopComponent("SonarIssuesTopComponent"); sonarTopComponent.setSummaryOptions(new SummaryOptions<>(Severity.getType(), Collections.emptyList())); sonarTopComponent.resetState(); stopAction.setEnabled(true); if(io == null) { io = IOProvider.getDefault().getIO("Sonar-runner", true, new Action[]{stopAction}, IOContainer.getDefault()); } try { io.getOut().reset(); io.getErr().reset(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } io.select(); io.getOut().println("Starting sonar-runner"); }
try { log.getOut().reset(); } catch (IOException e) { Mercurial.LOG.log(Level.SEVERE, null, e);
tab = IOProvider.get("Terminal").getIO(tabName, false); //NOI18N try { tab.getOut().reset(); } catch (IOException ex) {
@Override public void run() { try { DockerAction facade = new DockerAction(container.getInstance()); ActionChunkedResult result = facade.logs(container); try { logIO.getInputOutput().getOut().reset(); } catch (IOException ex) { LOGGER.log(Level.FINE, null, ex); } logIO.connect(result); logIO.getInputOutput().select(); } catch (DockerException ex) { if (handler != null) { handler.handleException(ex); } else { LOGGER.log(Level.WARNING, null, ex); } } } });
/** * Display the given error message to the user. The optional listener argument * (pass in null if not applicable) will make the line hyperlinked and the * listener is invoked to process any user clicks. * @param message The string to be displayed to the user * @param listener null, or a listener to be notified when the user clicks * the linked message */ private static void displayError(String message, OutputListener listener) { OutputWriter out = getOutputWriter(); try { if (clearErrors) { out.reset(); clearErrors = false; } if (listener == null) { // #107754 Now the null is not accepted as a listener. listener = new DummyOutputListener(); } // Write the error message to the output tab: out.println(message, listener); } catch (IOException ioe) { // This is lame - our own output window shouldn't throw IO exceptions! ErrorManager.getDefault().notify(ioe); } }
private static InputOutput getTab(String name, boolean reuse) { InputOutput tab; if (reuse) { tab = IOProvider.getDefault().getIO(name, false); // This will (sometimes!) find an existing one. tab.closeInputOutput(); // Close it... } tab = IOProvider.getDefault().getIO(name, true); // Create a new ... try { tab.getOut().reset(); } catch (IOException ex) { } tab.select(); return tab; }
private void openLog(FileObject fo, String title, File testDir) { try { IOProvider.getDefault().getIO(title, false).getOut().reset(); } catch (Exception exc) { ErrorManager.getDefault().notify(exc);
io = UISupport.getServerIO(tomcatManager.getUri()); try { io.getOut().reset();
io.getOut().reset(); } catch (IOException ex) { LOGGER.log(Level.FINE, null, ex);
handle.start(); try { io.getOut().reset(); io.select(); DockerAction facade = new DockerAction(tag.getImage().getInstance());