Community
Participate
Working Groups
Eclipse 3.1M5 I'm using ASTParser to parse the java file below. Problem is ASTParser is not returning the javadoc for my interface. The following code returns null. node.getJavadoc(); // where node is the interface declaration node What I found is that if I put a blank line between the interface declaration and the next javadoc (see below) public interface IOptionalTask extends ITask { /** * Optional task status constant then everything works. Here's the java file: /****************************************************************************** * * Copyright (c) 2004, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - Initial API and implementation ******************************************************************************* / package org.eclipse.wst.server.core; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; /** * An optional task. * * [issue: EY It is not clear to me that when this task will be run. Is this task be used for * both the server task and the module task? Will the place where the * task is being run depends on the server, e.g. the TDC tasks for the v6 server should be run * after the server is started the modules are added to the server; however, the EJB deploy task * makes more sense to be run before adding the project to the server.] * * @since 1.0 */ public interface IOptionalTask extends ITask { /** * Optional task status constant (value 0) indicating that the task * should not be run. * * @see #getStatus() */ public static final int TASK_UNNECESSARY = 0; /** * Optional task status constant (value 1) indicating that the task * is completed. * * @see #getStatus() */ public static final int TASK_COMPLETED = 1; /** * Optional task status constant (value 2) indicating that the task * is ready to be run. * * @see #getStatus() */ public static final int TASK_READY = 2; /** * Optional task status constant (value 3) indicating that the task * should be selected to be run by default. * * @see #getStatus() */ public static final int TASK_PREFERRED = 3; /** * Optional task status constant (value 4) indicating that the task * must be run. * * @see #getStatus() */ public static final int TASK_MANDATORY = 4; /** * Returns the status of this task. * * issue: EY Should this status can return any of the TASK_XXX? The TASK_XXX looks * like a mix of status, e.g. for TASK_COMPLETED and TASK_READY. The other TASK_XXX * look like a nature of the task, e.g. TASK_UNNECESSARY, TASK_PREFERRED, TASK_MANDATORY. * Is this being used for both status and deciding whether the task should be shown? * * @return one of the status of the task (<code>TASK_XXX</code>) * constants declared on {@link IOptionalTask} * @since 1.0 */ public int getStatus(); /** * Returns the order (index/priority) of the task that will be run. The task with * a smaller order value will be run before the task with a bigger order value. * For tasks that have the same order value, the order of running those task are * not guaranteed. * * @return the order (index/priority) of the task that will be run. */ public int getOrder(); }
Same question as for bug 88200: does the Javadoc appears in ASTView tree or not?
I believe javadoc is showing up correctly. There is a javadoc node inside the type declaration node.
*** Bug 88185 has been marked as a duplicate of this bug. ***
As said in bug 88200, I cannot reproduce your problem using your visitor. I've tested with last integration build and M5, both results are correct. Any other hint to help me to reproduce?
Please reopen while provindg requested info and if you find a reproduceable test case, thanks
Verified with RC3.