Home » Language IDEs » Java Development Tools (JDT) » No Console output when generating Javadoc within Eclipse
No Console output when generating Javadoc within Eclipse [message #515171] |
Thu, 18 February 2010 00:04 |
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.
|
|
|
Re: No Console output when generating Javadoc within Eclipse [message #515729 is a reply to message #515171] |
Fri, 19 February 2010 23:31 |
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
|
|
| | | |
Goto Forum:
Current Time: Fri Sep 20 12:31:54 GMT 2024
Powered by FUDForum. Page generated in 0.07174 seconds
|