Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325437 - Hierarchy confusion with two (or more) diagrams
Summary: Hierarchy confusion with two (or more) diagrams
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 06:54 EDT by Stefan Dimov CLA
Modified: 2020-03-16 19:41 EDT (History)
2 users (show)

See Also:


Attachments
Error message screenshot (54.79 KB, image/jpeg)
2010-09-16 06:54 EDT, Stefan Dimov CLA
no flags Details
patch (2.65 KB, patch)
2010-10-20 10:49 EDT, Petya Sabeva CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dimov CLA 2010-09-16 06:54:59 EDT
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)
Comment 1 Petya Sabeva CLA 2010-10-04 09:25:25 EDT
Are these the exact steps, because I cannot reproduce the issue?
Comment 2 Petya Sabeva CLA 2010-10-20 10:49:34 EDT
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/.
Comment 3 Petya Sabeva CLA 2010-10-20 10:49:53 EDT
Created attachment 181296 [details]
patch
Comment 4 Eclipse Genie CLA 2020-03-16 19:41:16 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. 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.