public InputOutput createIO(IOContainer ioContainer) { inOut = IOProvider.getDefault().getIO("test-results", null, ioContainer); //NOI18N return inOut; }
private static InputOutput getInputOutput() { return IOProvider.getDefault().getIO(NbBundle.getMessage(Util.class, "LBL_Output"), false); } private static OutputWriter getOutputWriter() {
/** * Gets IOProvider of selected name or delegates to getDefault() if none was found. * @param name ID of provider * @return the instance corresponding to provided name or default instance if not found * @since 1.15 */ public static IOProvider get(String name) { Collection<? extends IOProvider> res = Lookup.getDefault().lookupAll(IOProvider.class); for (IOProvider iop : res) { if (iop.getName().equals(name)) { return iop; } } return getDefault(); }
private static void createOutput() { if(io == null) { io = IOProvider.getDefault().getIO("Information", true); } io.select(); }
@Override public InputOutput createNewTab(final String tabName) { return IOProvider.getDefault().getIO(tabName, getActions(currentEvent.getActionName())); } };
private static CachedInputOutput createInputOutput(String originalDisplayName, List<Action> actions) { synchronized (InputOutputCache.class) { String displayName = getNonActiveDisplayName(originalDisplayName); InputOutput io; if (actions != null && !actions.isEmpty()) { io = IOProvider.getDefault().getIO(displayName, actions.toArray(new Action[actions.size()])); //rerunAction.setParent(io); } else { io = IOProvider.getDefault().getIO(displayName, true); } ACTIVE_DISPLAY_NAMES.add(displayName); return new CachedInputOutput(io, displayName, actions); } }
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 RemoteIndexTransferListener(RepositoryInfo info) { this.info = info; if (debug) { io = IOProvider.getDefault().getIO(NbBundle.getMessage(RemoteIndexTransferListener.class, "LBL_Transfer_TAG")//NII18N + (info.getName()), true); writer = io.getOut(); } }
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; }
@Override public InputOutput createNewTab(final String tabName) { IOProvider ioProvider = IOProvider.get("Terminal"); // NOI18N if (ioProvider == null) { ioProvider = IOProvider.getDefault(); } return ioProvider.getIO(tabName, getActions(currentEvent.getActionName())); } };
public OutputHandler() { io = IOProvider.getDefault().getIO("Log", true); outputWriter = io.getOut(); formatter = new MsgFormatter(); }
@NbBundle.Messages({ "# {0} - container id", "LBL_LogInputOutput=Log {0}" }) private static LogConnect getLogInputOutput(DockerContainer container) { synchronized (LOGS) { LogConnect connect = LOGS.get(container); if (connect == null) { InputOutput io = IOProvider.getDefault().getIO( Bundle.LBL_LogInputOutput(container.getShortId()), true); connect = new LogConnect(io); LOGS.put(container, connect); } return connect; } }
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 OutputTraceWriter(Object parser) { super(parser); final CsmFile mainFile; if (parser instanceof CppParserActionImpl) { mainFile = ((CppParserActionImpl) parser).getMainFile(); } else { mainFile = null; } if (mainFile == null) { io = IOProvider.getDefault().getIO("Trace actions", false); // NOI18N } else { io = IOProvider.getDefault().getIO("Trace actions "+ CndPathUtilities.getBaseName(mainFile.getAbsolutePath().toString()), false); // NOI18N } io.select(); out = io.getOut(); //out.close(); }
InputOutput io = IOProvider.getDefault().getIO(NbBundle.getMessage(MarkupUnit.class, "WindowTitle"), false); OutputWriter out = io.getOut(); try {
public static void launchExternalEditor(final FileObject fo){ assert fo != null : "File object is null"; final InputOutput io = IOProvider.getDefault().getIO(NbBundle.getMessage(Util.class, "LBL_EditedSvgFile", fo.getName()), false); //NOI18N ExecutionEngine.getDefault().execute(NbBundle.getMessage(Util.class, "LBL_SvgEditor"), new Runnable() { //NOI18N public void run() {
public RepositoryIndexerListener(NexusIndexer nexusIndexer, IndexingContext indexingContext, boolean createZip) { this.indexingContext = indexingContext; this.nexusIndexer = nexusIndexer; this.createZip = createZip; ri = RepositoryPreferences.getInstance().getRepositoryInfoById(indexingContext.getId()); if (debug) { io = IOProvider.getDefault().getIO("Indexing " +(ri!=null? ri.getName():indexingContext.getId()), true); writer = io.getOut(); } }
@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"); }
private ExecutionDescriptor getDescriptor(Runnable postTask) { return new ExecutionDescriptor() .inputOutput(IOProvider.getDefault().getIO(Bundle.Sass_compile(), false)) .inputVisible(false) .frontWindow(false) .frontWindowOnError(CssPrepOptions.getInstance().getSassOutputOnError()) .noReset(true) .showProgress(true) .postExecution(postTask); }
private ExecutionDescriptor getDescriptor(Runnable postTask) { return new ExecutionDescriptor() .inputOutput(IOProvider.getDefault().getIO(Bundle.Less_compile(), false)) .inputVisible(false) .frontWindow(false) .frontWindowOnError(CssPrepOptions.getInstance().getLessOutputOnError()) .noReset(true) .showProgress(true) .postExecution(postTask); }