Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » No Console output when generating Javadoc within Eclipse
icon5.gif  No Console output when generating Javadoc within Eclipse [message #515171] Thu, 18 February 2010 00:04 Go to next message
Peter Granger is currently offline Peter Granger
Messages: 3
Registered: February 2010
Junior Member
As the subject line says: I am seeing no output to the Console view when I am generating JavaDoc from within Eclipse.

This is an intermittent problem I am seeing in multiple environments. I am running Eclipse 3.5 on a Windows XP Pro system, and Eclipse 3.4 on an Ubuntu 8.04 system. So, it doesn't seem to be specific to a single version of Eclipse, or a single OS.

I am able to generate Javadoc successfully. The problem is that usually, there is no output to the Eclipse Console view. This is not a big deal when everything works correctly, but obviously it would be a problem if there were failures in generating Javadoc.

I have tried twiddling with Eclipse and the Console view in various ways -- closing and reopening the view, closing and reopening Eclipse, closing and reopening the project for which I'm generating the Javadoc, it doesn't seem to matter. Sometimes I get Console output, sometimes not, and there doesn't seem to be any clear reason as to why it works sometimes and not others.

The steps I follow are pretty basic.

1. Select the project from the Package Explorer view
2. Select Project-->Generate Javadoc... from the menu
3. Go through the three tabs on the Javadoc wizard to select my project, libraries, output directory, etc.
4. Click "Finish" in the Javadoc wizard

The Javadoc output is created correctly in the specified destination directory. Occasionally the appropriate output appears in the Console view, but most of the time nothing appears.

The Console view simply says "No consoles to display at this time."

Does anyone have a solution for this problem? This apparent inconsistency has been driving me nuts for weeks now. Thank you.
icon7.gif  Re: No Console output when generating Javadoc within Eclipse [message #515729 is a reply to message #515171] Fri, 19 February 2010 23:31 Go to previous messageGo to next message
Peter Granger is currently offline Peter Granger
Messages: 3
Registered: February 2010
Junior Member
Okay, I continued my tweaking and twiddling, and I think I figured out the solution to this problem, or at least a simple workaround.

Follow these steps:

1. Close and reopen Eclipse. The Console view will have the "No consoles to display at this time." appearance.
2. Use the Javadoc wizard (Project-->Generate Javadoc...) to generate Javadoc, exactly once, for any project or collection of projects. (This trick does not work if you generate Javadoc more than once.) The details of the project(s) or Javadoc generation don't matter, up to and including whether the generation succeeds or fails. The appearance of the Console view is unchanged.
3. On the "Run" button on the toolbar, there is a small black down-arrow. Clicking this opens a "Run as..." context menu. It also causes a console to be created, which now displays the results of the previous Javadoc generation. It is not necessary to actually run anything; just clicking that button instantiates the Console.
4. After this, you can use the buttons in the Console view to "Remove All Terminated Launches" or "Clear Console" and subsequent generations of Javadoc will instantiate a Console correctly.
5. If the Console view has been closed, it will not necessarily automatically be re-opened when it is populated by the output of Javadoc generation. It may be populated by the output and remain hidden. To make sure the populated view is always shown, click the two buttons on the view for "Show Console When Standard Out Changes" and "Show Console When Standard Error Changes."

Now that we've found that the key is the "Run" button, we can get this down to just a couple simple steps.

1. Close and reopen Eclipse. The Console view will have the "No consoles to display at this time." appearance.
2. Move the cursor over the little black down-arrow next to the Run button. When you hover the cursor there, the "Run" tooltip will pop up.
3. Click the black down-arrow to expand the context menu. Do not run anything, just close the context menu by hitting Escape or clicking anywhere else.
4. Now generate any Javadoc for any projects, and (assuming the "Show Console When Standard Out Changes" and "Show Console When Standard Error Changes" buttons have previously been clicked), the Console will be instantiated and correctly populated with the output of the Javadoc generation.

This explains why it appeared to be an intermittent problem. Sometimes I had run an application prior to generating Javadoc, sometimes I hadn't. Since I was just trying to resolve this issue, the problem appeared to be getting worse, because I was almost always just generating Javadoc, and almost never running the applications.

I don't know whether this would actually be considered a bug or not. It seems that Eclipse doesn't get the message to instantiate a Console until the run button has been clicked, but once it has, even if nothing is actually run, anything producing Standard Error or Standard Out will have its output correctly directed to a Console. As long as I remember to click this button at the beginning of a session, before generating any Javadoc, it'll be okay.

[Updated on: Sat, 20 February 2010 16:35]

Report message to a moderator

Re: No Console output when generating Javadoc within Eclipse [message #804803 is a reply to message #515729] Thu, 23 February 2012 02:32 Go to previous messageGo to next message
Stepanus David Kurniawan is currently offline Stepanus David Kurniawan
Messages: 1
Registered: February 2012
Junior Member
Hi Peter,
I am using Ant builder in Eclipse Indigo SR1 and also found similar problems: sometimes the console not showing output.
Your trick solves the problem. Thanks Smile
IMHO, this should be reported as bug.
Re: No Console output when generating Javadoc within Eclipse [message #942918 is a reply to message #515729] Sun, 14 October 2012 01:58 Go to previous messageGo to next message
Oliver Coleman is currently offline Oliver Coleman
Messages: 2
Registered: October 2012
Junior Member
I've just encountered the same problem in Juno SR 1 (Build id: 20121004-1855). I'd never come across this problem in this or other versions, and I've been using Juno for months with no issue until this morning. This is definitely a bug. The work-around worked, thanks for posting it. Smile
Re: No Console output when generating Javadoc within Eclipse [message #943574 is a reply to message #942918] Sun, 14 October 2012 16:40 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
Please file a bug (e.g., against Platform/UI, also one of the Debug components could be to blame, I'm not sure) and report the link to the bug here,
Thanks.

For the records: I've recently seen a similar problem with a JUnit run, which makes me think its probably a general issue about console views, not just in this one use case.
Previous Topic:Eclipse and JavaCV
Next Topic:Publish failing for a Seam project
Goto Forum:
  


Current Time: Sun Sep 21 20:12:12 GMT 2014

Powered by FUDForum. Page generated in 0.01800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software