Programatic way to save content of an Output Console?

"marceloaleks" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
markiewb wrote:
> Hej Glenn,
> 
> get the lines of the output writer and persist them yourself!
> 
> That is the way it is done in the "Save As"-action: https://github.com/JSansalone/NetBeansIDE/blob/master/core.output2/src/org/netbeans/core/output2/OutputTab.java#L442 (https://github.com/JSansalone/NetBeansIDE/blob/master/core.output2/src/org/netbeans/core/output2/OutputTab.java#L442)
> 
> 
> 
> 
> With kind regards, markiewb
> 
> 
> 
> 2016-06-14 14:33 GMT+02:00 glenn_david <address-removed (address-removed)>:
> 
> > I am using the org.openide.windows.InputOutput class for an "Output Console" in my application. From the UI the "Save As" feature is supported from a pop-up menu. I have so far found no way to programmatically save the contents of the Output Console to a text file.
> > 
> > Does anyone already know how to do this? This is for the NetBeans 8.1
> > Thanks
> > 
> > 
> > 
> > 
> > 
> 


I agree with Markiewb, the easiest way would be wrap the class and make some buffering to get the contents when needed.

Good lucky !
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.