| Summary: | Hierarchy confusion with two (or more) diagrams | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stefan Dimov <stefan.dimov> | ||||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | jdt-ui-inbox, petya.sabeva | ||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
Are these the exact steps, because I cannot reproduce the issue? Hi colleagues,
acctually I reproduced the issue with the simple java project.
Steps to reproduce:
1. Create one Java Project "TestProject1".
2. Create new class "test.TestClass" in it and add following method:
public void test(){}
3. In the "Project Explorer" view expand the project and select the method "test".
4. From its context menu choose "Refactor -> Rename..." and rename the method to "testMethod".
5. Without closing the java editor of the class, create a new Java Project "TestProject2" with class "test.testClass".
6. Add the same method:
public void test(){}
7. In the "Project Explorer" view select the "test" method under second java project and from its context menu choose "Refactor -> Rename...". Try to set the new method name to be "testMethod".
The same error dialog appears.
Not: This error appears only if the java editor of the two classes is opened.
After a little investigation, I've noticed that when the two java editors are opened, the "hierarchy" object, that is created in "doCheckFinalConditions" method of "RenameVirtualMethodProcessor" class, contains the two java projects "TestProject1" and "TestProject2" as "project region".
Thanks in advance...
So my question is is it a bug?
If yes, isn't it better to create the hierarchy by current project as project region. /I've attached a possible patch for this/.
Created attachment 181296 [details]
patch
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |
Created attachment 179020 [details] Error message screenshot Steps to reproduce: 1. Create JPA project 2. Open diagram 3. Create two entities in the diagram 4. Create 1-1 unidir rel from Entity1 to Entity2 5. Rename second entity with some name ("Company" for example) 6. Create another JPA project 7. Repeat steps from 2 to 5 for the second project Result: You will get an error message (see the screenshot)