Re: Programatic way to save content of an Output Console?
Jean-Marc Borer <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CADAUzbmBytxxxGCLcAJGZeu00NzqQTfFOkRxFbp0Kx30B-ZLQQ@mail.gmail.com> |
- Have your module be a friend module to output2, Hardly possible - Have an implementation dependency on output2 Its the way to go. I do it often to hack into hidden but very useful features provided in the NBP and its clusters - Find a way to invoke the code reflectively I wouldn't recommend that On Thu, Jun 23, 2016 at 10:42 PM, marceloaleks <[email protected]> wrote: > > 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 ! > > > > >