Bug 81155 - False temporary problems reported when using different class name in CU
Summary: False temporary problems reported when using different class name in CU
Status: VERIFIED DUPLICATE of bug 32505
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-15 09:51 EST by Christof Marti CLA
Modified: 2007-04-02 07:35 EDT (History)
0 users

See Also:


Attachments
Project and steps to reproduce (3.00 KB, application/octet-stream)
2004-12-15 10:59 EST, Christof Marti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christof Marti CLA 2004-12-15 09:51:18 EST
I200412142000

- open a Messages CU
- change getString() to getString1() (just by inserting the character 1)
- save and build
- open another CU that references getString()
- try Ctrl-Click in that second CU (does not work)
- change getString1() back to getString() in the first CU
- save and build
- try Ctrl-Click in the seconde CU
-> does not work, which is unexpected
Comment 1 Dani Megert CLA 2004-12-15 10:16:41 EST
Addition from Christof: Ctrl+Click to be applied on NLS key.

Just went through this and it worked. Christof please reopen with more details
steps or a sample project.
Comment 2 Christof Marti CLA 2004-12-15 10:35:11 EST
- open JavaTextMessages from o.e.jdt.ui
- change getString() declaration to getString1()
- save and build
- open ExperimentalProposal
- navigate to compile error
- ctrl-click on nls key
-> does not work - expected
- in JavaTextMessages change getString1() back to getString()
- save and build
- in ExperimentalProposal ctrl-click on nls key
-> does not work - unexpected
Comment 3 Dani Megert CLA 2004-12-15 10:48:14 EST
Can still not reproduce (Christof witnessed).
Keeping open and waiting for more details from Christof.
Comment 4 Christof Marti CLA 2004-12-15 10:59:56 EST
Created attachment 16647 [details]
Project and steps to reproduce

- start with a new workspace
- close welcome view :-)
- open Java perspective
- create new 'Test' project with all default options
- import attached project from archive with all default options
- open SomeMessages.java
- change getString() to getString1()
- save
- open Test.java
-> ctrl-click on nls key does not work - expected
- in SomeMessages.java change getString1() back to getString()
- save
-> ctrl-click on nls key in Test.java does not work - unexpected
Comment 5 Dani Megert CLA 2004-12-15 11:16:02 EST
Mmh. Needs to be investigated.
Comment 6 Dani Megert CLA 2005-02-01 09:18:48 EST
This is not related to nls tooling but is a bug in JCore. The key is actually
that your class is called SearchMessages (package visible) and your file is
called SearchMessage.java (no 's' at the end).

Here's a smaller test case that illustrates the problem:
1. create a Java project
2. create CU X.java in package test (leave it open):
	package test;
	class Y {
		void foo() {}
	}
3. create class UseY in package test:
	package test;
	public class UseY {
		void use() {
			Y y= new Y();
			y.foo();
		}
	}
4. observe: no compile errors no temporary problems in editor
5. close both editors
6. open UseY
==> temporary error is shown: "Y cannot resolve to a type"
7. open CU X.java and switch back to UseY
==> temporary error goes away

Resetting priortity and target milestone since the PR is moved to a different
component.
Comment 7 Dani Megert CLA 2005-02-01 09:18:58 EST

*** This bug has been marked as a duplicate of 32505 ***
Comment 8 Frederic Fusier CLA 2007-04-02 07:35:46 EDT
Verified for 3.2 using M20060629-1905.