Programatic way to save content of an Output Console?
"glenn_david" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Mark,
Thanks for the reply. I have tried to do this but even after adding "Output Window" as a dependency of my module I can still not import the classes (OutWriter, NbWriter) required for the following line:
OutWriter outWriter = ((NbWriter) instrOutputTab.getOut()).out();
outWriter.getLines();
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
> >
> >
> >
> >
> >
>