Bug 50858 - Javadoc IProblem constant not defined
Summary: Javadoc IProblem constant not defined
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-29 10:34 EST by Martin Aeschlimann CLA
Modified: 2004-02-11 11:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-01-29 10:34:02 EST
20040129

- Turn on the Javadoc problems. In the following code is 'Socket' not resolvable
- The problem Id is: TypeRelated + Javadoc + 2

Can you add a constant for this?

public class AA {
	
	/**
	 * @see Socket
	 */
	public void foo(Vector ddddd, Vector vd) {
		Map map;
	}
}
Comment 1 Martin Aeschlimann CLA 2004-01-29 13:44:36 EST
same problem with 
IProblem.NotVisibleType + IProblem.Javadoc
IProblem.AmbiguousType + IProblem.Javadoc:
Comment 2 Frederic Fusier CLA 2004-01-29 15:51:14 EST
There are many other possibilities:
// Javadoc implicit IDs for deprecatedField(...)
case IProblem.Javadoc | IProblem.UsingDeprecatedField:
// Javadoc implicit IDs for deprecatedMethod(...)
case IProblem.Javadoc | IProblem.UsingDeprecatedConstructor:
case IProblem.Javadoc | IProblem.UsingDeprecatedMethod:
// Javadoc implicit IDs for deprecatedType(...)
case IProblem.Javadoc | IProblem.UsingDeprecatedType:
// Javadoc implicit IDs for invalidField(...)
case IProblem.Javadoc | IProblem.UndefinedField:
case IProblem.Javadoc | IProblem.NotVisibleField:
case IProblem.Javadoc | IProblem.AmbiguousField:
// Javadoc implicit IDs for invalidConstructor(...)
case IProblem.Javadoc | IProblem.UndefinedConstructor:
case IProblem.Javadoc | IProblem.NotVisibleConstructor:
// Javadoc implicit IDs for invalidMethod(...)
case IProblem.Javadoc | IProblem.UndefinedMethod:
case IProblem.Javadoc | IProblem.NotVisibleMethod:
case IProblem.Javadoc | IProblem.ParameterMismatch:
// Javadoc implicit IDs for invalidType(...)
case IProblem.Javadoc | IProblem.UndefinedType:
case IProblem.Javadoc | IProblem.NotVisibleType:
// Javadoc implicit IDs for errorNoMethodFor(...)
case IProblem.Javadoc | IProblem.NoMessageSendOnArrayType:
case IProblem.Javadoc | IProblem.NoMessageSendOnBaseType:

That's why we decided not to create specific constants but just a 
javadoc "flavor". Why can't you use these values as this?
Comment 3 Frederic Fusier CLA 2004-01-29 16:34:53 EST
Here are proposed constants which would be added to 
org.eclipse.jdt.core.dom.TagElement:

	/**
	 * Constants for well know javadoc tag names.
	 */
	public static final String TAG_DEPRECATED = "@deprecated"; //$NON-NLS-1$
	public static final String TAG_PARAM = "@param"; //$NON-NLS-1$
	public static final String TAG_RETURN = "@return"; //$NON-NLS-1$
	public static final String TAG_THROWS = "@throws"; //$NON-NLS-1$
	public static final String TAG_EXCEPTION = "@exception"; //$NON-NLS-1$
	public static final String TAG_SEE = "@see"; //$NON-NLS-1$
	public static final String TAG_LINK = "@link"; //$NON-NLS-1$
	public static final String TAG_LINKPLAIN = "@linkplain"; //$NON-NLS-1$
	public static final String TAG_INHERITDOC = "@inheritDoc"; //$NON-NLS-1$

Everybody agree on names?
Comment 4 Frederic Fusier CLA 2004-01-29 16:36:16 EST
Forget previous comment, it was on wrong bug...
Comment 5 Martin Aeschlimann CLA 2004-01-30 03:57:16 EST
The advantage of having all the constants is to have an idea what can show up.
Comment 6 Frederic Fusier CLA 2004-01-30 07:31:11 EST
Initially that was not possible as we used standard ProblemReporter methods and 
added the javadoc "flavor" when javadoc bit was set on AST node.

We changed this while implementing new javadoc options. With these new options 
problem reporting can depend on conditions which are specific to javadoc 
compiler settings, so it was not possible to continue to use standard methods.

Then, new specific methods were created for each possible javadoc problem and 
we can now create specific constants as well...
Comment 7 Frederic Fusier CLA 2004-01-30 07:31:48 EST
Philippe, do you agree?
Comment 8 Philipe Mulet CLA 2004-01-30 10:43:34 EST
Agreed
Comment 9 Frederic Fusier CLA 2004-02-04 14:24:10 EST
Following constants have been created in IProblem interface:
	/*
	 * ID for field errors in Javadoc
	 */
	/** @since 3.0 */
	int JavadocUndefinedField = Javadoc + Internal + 488;
	/** @since 3.0 */
	int JavadocNotVisibleField = Javadoc + Internal + 489;
	/** @since 3.0 */
	int JavadocAmbiguousField = Javadoc + Internal + 490;
	/** @since 3.0 */
	int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
	/*
	 * IDs for constructor errors in Javadoc
	 */
	/** @since 3.0 */
	int JavadocUndefinedConstructor = Javadoc + Internal + 492;
	/** @since 3.0 */
	int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
	/** @since 3.0 */
	int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
	/** @since 3.0 */
	int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
	/*
	 * IDs for method errors in Javadoc
	 */
	/** @since 3.0 */
	int JavadocUndefinedMethod = Javadoc + Internal + 496;
	/** @since 3.0 */
	int JavadocNotVisibleMethod = Javadoc + Internal + 497;
	/** @since 3.0 */
	int JavadocAmbiguousMethod = Javadoc + Internal + 498;
	/** @since 3.0 */
	int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
	/** @since 3.0 */
	int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
	/** @since 3.0 */
	int JavadocParameterMismatch = Javadoc + Internal + 501;
	/** @since 3.0 */
	int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
	/*
	 * IDs for type errors in Javadoc
	 */
	/** @since 3.0 */
	int JavadocUndefinedType = Javadoc + Internal + 503;
	/** @since 3.0 */
	int JavadocNotVisibleType = Javadoc + Internal + 504;
	/** @since 3.0 */
	int JavadocAmbiguousType = Javadoc + Internal + 505;
	/** @since 3.0 */
	int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
	/** @since 3.0 */
	int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;

Note that new value for Javadoc prefix:
	/** @since 3.0 */
	int JavadocMessagePrefix = Internal + 509;

Comment 10 David Audel CLA 2004-02-11 11:54:03 EST
Verified for 3.0M7