public void bringDown() { // Mainly used when session goes away. io.closeInputOutput(); }
public void stopUpdatingLogViewer() { try{ ins.close(); filestream.close(); io.closeInputOutput(); io.setOutputVisible(false); } catch (IOException e){ Logger.getLogger(LogViewerSupport.class.getName()).log(Level.INFO, null, e); } }
/** */ public void addDisplayComponent(JSplitPane displayComp, InputOutput io) { assert EventQueue.isDispatchThread(); String key = displayComp.getToolTipText(); boolean alwaysOpenNewTab = NbPreferences.forModule(StatisticsPanel.class).getBoolean(StatisticsPanel.PROP_ALWAYS_OPEN_NEW_TAB, false); if (alwaysOpenNewTab) { int frequency = getFrequency(viewMap.keySet(), key); if (frequency > 0) { key = key.concat(" #").concat(Integer.toString(frequency)); //NOI18N displayComp.setToolTipText(key); } } JSplitPane prevComp = viewMap.put(key, displayComp); InputOutput prevIo = ioMap.put(key, io); if (alwaysOpenNewTab || prevComp == null){ addView(displayComp); }else{ replaceView(prevComp, displayComp); if (prevIo != null) { prevIo.closeInputOutput(); } } revalidate(); }
private void removeView(JSplitPane view) { // probably it's need to stop testing if in progress? if (view == null) { view = (JSplitPane) tabPane.getSelectedComponent(); if (view == null) { return; } } tabPane.remove(view); viewMap.remove(view.getToolTipText()); InputOutput io = ioMap.remove(view.getToolTipText()); if (io != null) { io.closeInputOutput(); } validate(); }
public void run() { String path = SvgcoreSettings.getDefault().getExternalEditorPath(); if (path == null || path.length() == 0 || !new File(path).exists()){ if (path == null || path.length() == 0){ DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( NbBundle.getMessage(Util.class, "ERR_SvgEditorNotSet", path), NotifyDescriptor.ERROR_MESSAGE)); //NOI18N } else { DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( NbBundle.getMessage(Util.class, "ERR_SvgEditor", path), NotifyDescriptor.ERROR_MESSAGE)); //NOI18N } io.closeInputOutput(); return; } io.getOut().println(NbBundle.getMessage(Util.class, "LBL_LaunchingFile", FileUtil.toFile(fo).toString())); //NOI18N NbProcessDescriptor descriptor = new NbProcessDescriptor( path, '\"' + FileUtil.toFile(fo).getAbsoluteFile().toString() + '\"'); //NOI18N try { Process p = descriptor.exec(); p.waitFor(); } catch (IOException ex) { ErrorManager.getDefault().notify(ErrorManager.WARNING, ex); } catch (InterruptedException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } finally { if (io != null){ io.closeInputOutput(); } } } }, io);
public NewTermComponent(IOTopComponent owner, int flags) { this.owner = owner; this.flags = flags; TermComponentFactory.ckFlags(flags); IOProvider iop = IOProvider.get("Terminal"); // NOI18N if (iop == null) { throw new UnsupportedOperationException("Terminal IO's not available"); // NOI18N } String tabTitle = null; // Use TC title io = iop.getIO(tabTitle, null, owner.ioContainer()); if (IOTerm.isSupported(io)) { term = (ActiveTerm) IOTerm.term(io); } else { io.closeInputOutput(); throw new UnsupportedOperationException("Terminal IO doesn't provide a Term"); // NOI18N } if (IOVisibility.isSupported(io)) IOVisibility.setClosable(io, false); }
if (!writable) { log.closeInputOutput();
profile.setBaseDir(buildDir); profile.setRunDir(buildDir); tab.closeInputOutput(); tab = IOProvider.get("Terminal").getIO(tabName, false); //NOI18N try {
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; }
/** Remove this server instance and stop it if it has been started from within the IDE */ public void remove() { DebuggerManager.getDebuggerManager().removeDebuggerListener(debuggerStateListener); stopIfStartedByIde(); // close the server io window if (getUrl() != null) { InputOutput io = UISupport.getServerIO(url); if (io != null && !io.isClosed()) { io.closeInputOutput(); } ServerRegistry.getInstance().removeServerInstance(getUrl()); } else { LOGGER.log(Level.WARNING, "Trying to remove {0}, but url is null", server != null ? server.getShortName() : null); } }
_tab.closeInputOutput(); // Close it... final InputOutput tab = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {
_tab.closeInputOutput(); // Close it... final InputOutput inputOutput = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {
_tab.closeInputOutput(); // Close it... final InputOutput tab = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {
_tab.closeInputOutput(); // Close it... final InputOutput tab = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {
_tab.closeInputOutput(); // Close it... final InputOutput tab = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {
_tab.closeInputOutput(); // Close it... InputOutput tab = IOProvider.getDefault().getIO(tabName, true); // Create a new ... try {