Community
Participate
Working Groups
Created attachment 281419 [details] Screenshot of outdated references and search results I just used Refactor->Rename... on a class for the first time, and while it let me change the class's name, no magic followed. Ignoring the file name issue (already tracked in ticket #467760), the 7 existing references were left unchanged. Most of these are just in PHPDoc tags, but one is an instanciation which - as can be seen in the attached screenshot - is now understandably broken (and correctly detected as erroneous). The class's new name is "NaadAdnaInfo". It was "NaadAdnaEntry" before. This project's code is private, but I could create a test case if this is difficult to reproduce. This affects PDT 7.0.0 running on Windows 8.
Hum, on closer look, it looks like this is not a "defect" but a design bug. If I click the arrow at the right of the "Enter new name, press Enter to refactor" tooltip which appears, I can ask to update references, and that seems to work. I would expect such an update to be done by default, or at least, to be warned if it is not.
In same way it working with java. Ctr shift r, by default run simple inline edit generated based on occurence finder, if press esc, only visible changes will be commited to buffer (very usable on simple field renames), but if you click enter magic will begin. PDT and other plugins will calculate potential changes. I’m afraid you might be affected by CA. You saw assist popup and just press esc.
Thanks Dawid, (In reply to Dawid Pakula from comment #2) > In same way it working with java. Ctr shift r, by default run simple inline > edit generated based on occurence finder, if press esc, only visible changes > will be commited to buffer (very usable on simple field renames), but if you > click enter magic will begin. PDT and other plugins will calculate potential > changes. I do not think I understand your comment. Are you speaking about "Open Resource"? > I’m afraid you might be affected by CA. You saw assist popup and just press > esc. I did not press the Escape key. I pressed the Enter key.
(In reply to Filipus Klutiero from comment #3) > I do not think I understand your comment. Are you speaking about "Open > Resource"? No, about another refactoring mode (simple in-place). you din't use it :P > > > I’m afraid you might be affected by CA. You saw assist popup and just press > > esc. > > I did not press the Escape key. I pressed the Enter key. OK I made couple tests: 1. "Update textual occurrences in comments and strings" is disabled by default as in JDT and its ok but 2. "Update textual occurrences in comments and strings" is not saved after first use 3. "Update textual occurrences in comments and strings" is required to correctly update @see, @param, @var and other PHPDoc and this is also wrong! First issue (point 2) should be simple to fix but second it's a little bigger task. For example see bug 536759. In short another PDT nightmare: PHPDoc support and relation to rest features 1. Declaration AST node haven't real reference to it's comment. Compiler AST have IPHPDocAwareDeclaration, but it's ignored during traverse, DOM AST haven't such relation completely 2. IMember (IType, IMethod, IField) havent reference to PHPDoc like in JDT/JSDT to source 3. IMember ISourceReference never cover it's documentation (mentioned bug 536759) 4. Due this: 1. TI (TypeInference) aften scan all comments backwards 2. OccurenceFinder ignore PHPDoc 3. Hover on PHPDoc (@return, @return ...) ignore namespace We again can prepare ton of workarounds/baypasses/adapters/proxies but sooner/later we have to switch to own model (for example handle bug 531023) and/or make DLTK really extandable ;)
(In reply to Dawid Pakula from comment #4) > (In reply to Filipus Klutiero from comment #3) > > I do not think I understand your comment. Are you speaking about "Open > > Resource"? > No, about another refactoring mode (simple in-place). you din't use it :P I'm afraid I do not know that mode. Pressing the R key while holding Ctrl and Shift brings up an "Open Resource" dialog on my Eclipse install.
(In reply to Filipus Klutiero from comment #5) > (In reply to Dawid Pakula from comment #4) > > (In reply to Filipus Klutiero from comment #3) > > > I do not think I understand your comment. Are you speaking about "Open > > > Resource"? > > No, about another refactoring mode (simple in-place). you din't use it :P > > I'm afraid I do not know that mode. Pressing the R key while holding Ctrl > and Shift brings up an "Open Resource" dialog on my Eclipse install. Arghh I mean simple cmd/ctrl+alt+r and after modify simple click "esc" rather than enter. If you double click cmd/ctrl+alt+r you will see rename dialog without touch arrow.
(In reply to Dawid Pakula from comment #6) > (In reply to Filipus Klutiero from comment #5) > > (In reply to Dawid Pakula from comment #4) > > > (In reply to Filipus Klutiero from comment #3) > > > > I do not think I understand your comment. Are you speaking about "Open > > > > Resource"? > > > No, about another refactoring mode (simple in-place). you din't use it :P > > > > I'm afraid I do not know that mode. Pressing the R key while holding Ctrl > > and Shift brings up an "Open Resource" dialog on my Eclipse install. > > Arghh I mean simple cmd/ctrl+alt+r and after modify simple click "esc" > rather than enter. I use Eclipse on Windows. Pressing the R key while holding Ctrl and Alt, changing the name then pressing Escape does no visible magic. > If you double click cmd/ctrl+alt+r you will see rename dialog without touch > arrow. I do not understand what you mean by "double click cmd/ctrl+alt+r".