Bug 144866 - [assist][javadoc] Wrong completion inside @value tag
Summary: [assist][javadoc] Wrong completion inside @value tag
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-01 07:50 EDT by Frederic Fusier CLA
Modified: 2006-09-11 13:32 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (5.11 KB, patch)
2006-06-02 09:18 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2006-06-01 07:50:18 EDT
Using 3.2 RC6 but should exist since the first javadoc code assist JDT/Core implementation...

If I complete inside an inline @value tag, then complete tag template is always proposed instead of the reference.

Example:
public class X {
  public static int EXAMPLE = 0;
  /**
   * This method uses {@value EX|} when
   * implementation will be finished...
   */
  public void foo() {
  }
}

Completion at <|> position will give following proposals:
{@link EXAMPLE}
{@value EXAMPLE}

Although we should have only:
EXAMPLE

Note that it works well with @link inline tag...
Comment 1 Frederic Fusier CLA 2006-06-02 07:20:34 EDT
Note that example was not correct, it should be instead:
public class X {
  public static int EXAMPLE = 0;
  /**
   * This method uses {@value #EX|} when
   * implementation will be finished...
   */
  public void foo() {
  }
}

Note also that 1.4 compliance is needed to see the problem. Completion proposal is correct with 1.5 compliance...

@value inline tag accepts a reference only since 1.5. That's why javadoc completion wrongly assumes that user was completing in text and propose the entire inline tag.
Comment 2 Frederic Fusier CLA 2006-06-02 09:18:10 EDT
Created attachment 43346 [details]
Proposed patch

Fix is really simple: do not set CompletionOnJavadoc.TEXT bit to completionNode flag when inline tag has started...
Comment 3 Frederic Fusier CLA 2006-06-02 09:22:12 EDT
Patch released in TARGET_321 stream
Comment 4 Frederic Fusier CLA 2006-06-12 06:16:44 EDT
Released for 3.2.1
Released for 3.3 M1 while merging TARGET_321 in HEAD
Comment 5 Frederic Fusier CLA 2006-08-04 12:13:13 EDT
Verified for 3.3 M1 using build I20060804-0010.
Comment 6 Dani Megert CLA 2006-08-10 03:46:35 EDT
You might want to revist this, see also comments in bug 153399.
Comment 7 Olivier Thomann CLA 2006-09-11 13:32:57 EDT
Verified for 3.2.1 using build M20060908-1655.