本文整理了Java中org.openide.windows.OutputWriter.reset()
方法的一些代码示例,展示了OutputWriter.reset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputWriter.reset()
方法的具体详情如下:
包路径:org.openide.windows.OutputWriter
类名称:OutputWriter
方法名:reset
[英]Clear the output pane. Expect this method to be deprecated in a future release and an equivalent created in org.openide.windows.InputOutput. It is ambiguous what it means to reset stdout but not stderr, etc. For the current implementation, reset should be called on the stdout.
[中]清除输出窗格。预计这种方法在未来的版本中会被弃用,并在org中创建一个等效的版本。openide。窗户。输入输出。重置stdout而不是stderr等的含义不明确。对于当前的实现,应该在stdout上调用reset。
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
public void run() {
OutputWriter out = getLog().getOut();
if (writable) {
try {
out.reset();
} catch (IOException ex) {
// Ignore Exception
}
out.flush();
}
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-core
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);
}
});
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project
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;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync
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);
}
}
}
代码示例来源:origin: org.codehaus.mevenide/nb-project
reassignAdditionalContext(vals);
try {
io.getOut().reset();
io.getIn().reset();
} catch (IOException ex) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-glassfish-javaee
/**
* 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();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync
OutputWriter out = io.getOut();
try {
out.reset();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4
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;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81
/**
* 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;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-core
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
代码示例来源:origin: hmvictor/radar-netbeans
@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");
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
try {
log.getOut().reset();
} catch (IOException e) {
Mercurial.LOG.log(Level.SEVERE, null, e);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2
tab = IOProvider.get("Terminal").getIO(tabName, false); //NOI18N
try {
tab.getOut().reset();
} catch (IOException ex) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-ui
@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);
}
}
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync
/**
* 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);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
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;
}
代码示例来源:origin: org.codehaus.mevenide/nb-project
private void openLog(FileObject fo, String title, File testDir) {
try {
IOProvider.getDefault().getIO(title, false).getOut().reset();
} catch (Exception exc) {
ErrorManager.getDefault().notify(exc);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-tomcat5
io = UISupport.getServerIO(tomcatManager.getUri());
try {
io.getOut().reset();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-ui
io.getOut().reset();
} catch (IOException ex) {
LOGGER.log(Level.FINE, null, ex);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-ui
handle.start();
try {
io.getOut().reset();
io.select();
DockerAction facade = new DockerAction(tag.getImage().getInstance());
内容来源于网络,如有侵权,请联系作者删除!