Summary: | [rename] Eclipse fails to rename a method in a Java project that transitively depends on the project that declares this method | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stas Negara <snegara2> | ||||||
Component: | UI | Assignee: | Markus Keller <markus.kell.r> | ||||||
Status: | NEW --- | QA Contact: | |||||||
Severity: | minor | ||||||||
Priority: | P3 | CC: | daniel_megert, deepakazad, markus.kell.r, nchen, reprogrammer, satyam.kandula, snegara2 | ||||||
Version: | 3.7 | ||||||||
Target Milestone: | --- | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Whiteboard: | stalebug | ||||||||
Attachments: |
|
Description
Stas Negara
2011-07-07 23:12:27 EDT
Created attachment 199332 [details]
Three Java projects that reveal the described problem.
Please note that the above scenario works correctly for plugins, i.e. method m will be correctly renamed in all plugins, including the transitively dependent pluginC. To reproduce the problem, please create Java projects (not plugins): projectA, projectB, projectC. The rest of the steps is the same. You can import these projects from the attached archive and try to rename method m in class A to reproduce this problem.
Created attachment 207413 [details] Plugin projects to reproduce the problem (In reply to comment #1) > Please note that the above scenario works correctly for plugins, i.e. method m > will be correctly renamed in all plugins, including the transitively dependent > pluginC. Not true. The problem also happens with the attached plugin projects. - Searching for 'All Occurrences' of 'A.m()' via Search dialog in both cases - Java projects and Plugin projects - does not finds the match in C. - Removing the overridden method 'm()' from B results in a compile error in both cases. The refactoring works perfectly when all three classes - A,B,C - are in one project. Satyam, is this a bug in JDT/Core search? Markus, is this a bug in the refactoring? It depends on how you setup the project and the plug-ins (manifest). If you let C see A in some way (either by requiring A or by letting B export A), then the rename works. However, it should also work without that. Looks like a bug in our refactoring code. Note that if we first replace A.m() with A.f() and then rename B.m(), it correctly updates C.someMethod(). Markus, please take a look. . 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. 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. 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. |