Re: Programatic way to save content of an Output Console?

geertjan wielenga <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>
http://bits.netbeans.org/dev/javadoc/org-netbeans-api-io/org/netbeans/api/io/package-summary.html

Gj

On 16-6-2016 15:36, glenn_david wrote:
> 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
>>>
>>>
>>>
>>>
>>>
>
>
>
>
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.