[nbusers] Re: Problem with Netbeans RCP Output window

  • From: Javier Ortiz < >
  • To: " " < >
  • Subject: [nbusers] Re: Problem with Netbeans RCP Output window
  • Date: Fri, 29 Mar 2013 14:10:05 +0000
  • Accept-language: en-US

Give my plug-in a try: 
http://plugins.netbeans.org/plugin/39695/output-handler ;

I already walked this path already. Hopefully it is useful!

If you still don't get what you want, you might not be running that process 
on a separate thread that might be causing the issue all together. Take a 
look at the first chapter of my book: 
http://wiki.netbeans.org/BookNBPlatformCookbookCH01 hopefully it takes you on ;
the right path in this case.

---------------------------------- 
Javier A. Ortiz Bultrón 
Senior Software Quality Engineer
ArthroCare Corporation
Office 512.358.5996
7000 West William Cannon Drive
Building One
Austin, Texas 78735


-----Original Message-----
From: toomuchguy 
[mailto: ]
 
Sent: Thursday, March 28, 2013 10:56 PM
To: 

Subject: [nbusers] Problem with Netbeans RCP Output window

Hi,
   I've been stuck on this problem since yesterday and would like some inputs 
from the experts on this forum.

Env:  Netbeans RCP 7.0.1, JDK 1.6 64-bit, Windows 7 Prof 64-bit

I've been trying to append interim Progress messages to the Output Window 
while a time consuming task runs in the background. This is similar to the 
Netbenas IDE appends messages to the output windows when i click on 
build/compile/run etc. The problem is the messages get displayed only after 
the long running task is complete. The output window doesn't get interim 
updates even though some of the messages are logged even before the task 
starts. 

I've tried all possible options including IOProvider, IOColorLines, directly 
write the Output window's stream, using RequestProcessor but nothign seems to 
be working. The following is my function that logs message to the Output 
window. i call this function before, during and after the long running task. 
The messages however show up in 1 shot at the end of the task.


Code:
public static void logMessage(LogLevelEnums.LogLevel level, String msg)
     {
        InputOutput outputWindow = 
IOProvider.getDefault().getIO("Compiler",false);
        outputWindow.select();

        try
         {
             if ((msg != null) && (msg.compareToIgnoreCase("") != 0))
             {
                 if (level == LogLevelEnums.LogLevel.DEBUG)
                 {
                     IOColorLines.println(outputWindow, msg, Color.BLACK);
                     
                 }
                 else if (level == LogLevelEnums.LogLevel.WARNING)
                 {
                     IOColorLines.println(outputWindow, msg, Color.YELLOW);
                 }
                 else if (level == LogLevelEnums.LogLevel.ERROR)
                 {
                     IOColorLines.println(outputWindow, msg, Color.RED);
                 }
                 else if (level == LogLevelEnums.LogLevel.INFORMATION)
                 {
                     IOColorLines.println(outputWindow, msg, Color.BLACK);
                     //outputWindow.getOut().println (msg);
                 }
                 else if (level == LogLevelEnums.LogLevel.HYPERLINK)
                 {
                     IOColorLines.println(outputWindow, msg, Color.BLUE);
                     //URLDisplayer.getDefault().showURL(new URL(msg));
                     //HypLinkOpenDirListener listener = new 
HypLinkOpenDirListener("",false); 
                     //IOColorLines.println(outputWindow, msg,listener,false, 
Color.BLUE);
                 }
                 else if (level == LogLevelEnums.LogLevel.IMPORTANT)
                 {
                     IOColorLines.println(outputWindow, msg,Color.BLUE);
                 }
             }
         }
         catch (Exception ex)
         {
             ex.printStackTrace();
         }
      }


     
Would appreciate any help
Thanks
toomuchguy




************
The information contained in this email and any attachments is the property 
of ArthroCare Corporation or one of its subsidiaries, and may  be 
confidential.  It is for the sole use of the intended recipient(s).  If a) 
you are not an intended recipient or an authorized representative of an 
intended recipient or b) you have received this in error, you are hereby 
notified that any review, dissemination, distribution or copying of this 
transmittal and any attachments is strictly prohibited. If you have received 
this transmittal in error, please notify the sender immediately and then 
delete this message, including any attachments.



[nbusers] Problem with Netbeans RCP Output window

toomuchguy 03/29/2013

[nbusers] Re: Problem with Netbeans RCP Output window

Javier Ortiz 03/29/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close