Bug 491700 - Rename in workspace does not update matching Javadoc reference
Summary: Rename in workspace does not update matching Javadoc reference
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 8
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 09:37 EDT by Stephanie Swiderski CLA
Modified: 2023-05-30 01:44 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephanie Swiderski CLA 2016-04-14 09:37:22 EDT

    
Comment 1 Stephanie Swiderski CLA 2016-04-14 09:43:46 EDT
In the following example renaming foo will present two linked ui areas for 
the foo in the declaration of foo and in the wrong @see reference.
After confirmation with return the changes at the @see reference will disappear.
Expectation: no linked UI for wrong @see reference.

/**
 * Breaking example
 */
package basic;

public class TestArea {
	
	
	public void foo() {  // Try to rename foo

	}
	
	/**
	 * @see TestArea#foo   this foo reference will have linked ui 
	 */
	public void fooOther() {

	}

}
Comment 2 Jay Arthanareeswaran CLA 2016-04-14 10:02:39 EDT
Moving to UI for investigation. This might very well be a problem in core, but we will need some inputs as to what's going wrong in case.
Comment 3 Dani Megert CLA 2016-04-15 08:42:40 EDT
Those references do match.
Comment 4 Jay Arthanareeswaran CLA 2016-04-15 10:19:28 EDT
(In reply to Dani Megert from comment #3)
> Those references do match.

The issue I see is when renamed, the reference in Javadoc doesn't change. Is that expected?
Comment 5 Dani Megert CLA 2016-04-15 10:26:12 EDT
(In reply to Jay Arthanareeswaran from comment #4)
> (In reply to Dani Megert from comment #3)
> > Those references do match.
> 
> The issue I see is when renamed, the reference in Javadoc doesn't change. Is
> that expected?

Well, the problem is that the bug has a wrong summary and is not precise. The reference match and that is correct. There are two different rename commands. One for the file and one for the workspace. The latter seems to fail.
Comment 6 Stephanie Swiderski CLA 2016-04-15 10:56:21 EDT
Actually I think the match is not correct 
since the reference is pointing to a field like:

public int foo;


If this field is added to the example the match does not any longer occur
and the linked UI is not drawn.
Comment 7 Dani Megert CLA 2016-04-15 11:06:23 EDT
(In reply to Stephanie Swiderski from comment #6)
> Actually I think the match is not correct 
> since the reference is pointing to a field like:

Nope, this is valid Javadoc for methods, e.g. if you don't want to restrict the Javadoc @see to a specific signature of #foo.

There will be a problem for rename if there's more than one foo in the same file.
Comment 8 Stephanie Swiderski CLA 2016-04-15 11:10:55 EDT
By Java Doc documentation:
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#tag

@see class#field

is different to 

@see class#method()

and so I expect that renaming TestArea#foo()
would not touch the comment
/**
 * @see TestArea#foo   this foo reference will have linked ui 
 */
Comment 9 Stephanie Swiderski CLA 2016-04-15 11:13:39 EDT
Ok my mistake:
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see
Here is desribed what you meant.
Comment 10 Stephanie Swiderski CLA 2016-04-15 11:23:35 EDT
Then (In reply to Dani Megert from comment #7)
> (In reply to Stephanie Swiderski from comment #6)
> > Actually I think the match is not correct 
> > since the reference is pointing to a field like:
> 
> Nope, this is valid Javadoc for methods, e.g. if you don't want to restrict
> the Javadoc @see to a specific signature of #foo.
> 
> There will be a problem for rename if there's more than one foo in the same
> file.

Maybe close this bug an reopen a different one for the failing rename command.
I started the rename with rename refactoring hotkey and cursor on foo().
Comment 11 Dani Megert CLA 2016-04-15 11:24:59 EDT
(In reply to Stephanie Swiderski from comment #10)
> Then (In reply to Dani Megert from comment #7)
> > (In reply to Stephanie Swiderski from comment #6)
> > > Actually I think the match is not correct 
> > > since the reference is pointing to a field like:
> > 
> > Nope, this is valid Javadoc for methods, e.g. if you don't want to restrict
> > the Javadoc @see to a specific signature of #foo.
> > 
> > There will be a problem for rename if there's more than one foo in the same
> > file.
> 
> Maybe close this bug an reopen a different one for the failing rename
> command.
> I started the rename with rename refactoring hotkey and cursor on foo().

It's fine - we can use that for the workspace rename.
Comment 12 Eclipse Genie CLA 2019-05-17 05:02:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 13 Dani Megert CLA 2019-05-30 11:28:59 EDT
Still an issue using 4.12 M3.
Comment 14 Eclipse Genie CLA 2021-05-21 16:37:30 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 15 Eclipse Genie CLA 2023-05-30 01:44:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.