Bug 207890 - Checking out JFace and then SWT leads to a strange state
Summary: Checking out JFace and then SWT leads to a strange state
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 216940 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-29 21:08 EDT by Boris Bokowski CLA
Modified: 2008-02-05 13:14 EST (History)
8 users (show)

See Also:


Attachments
Proposed fix and regression test (3.97 KB, patch)
2007-11-28 13:19 EST, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Bokowski CLA 2007-10-29 21:08:23 EDT
Just guessing that this is due to PDE.

Steps:

1. Switch to a new empty workspace
2. Check out org.eclipse.jface and org.eclipse.core.commands from CVS
3. Open TreeViewer.java (-> no error markers in file)
4. Uncheck Project > Build automatically
5. Check out org.eclipse.swt and org.eclipse.swt.win32.win32.x86 from CVS
6. Open Navigator view
7. Rename org.eclipse.swt/.classpath_win32 to .classpath
8. Check Project > Build automatically
-> A build is triggered, and you end up with error markers in TreeViewer.java and other files, all over the place.

Not sure if these are the minimum steps.

This happens a lot to people on the UI team whenever they decide to check out SWT from HEAD into an existing workspace.

It is not easy to get things into a proper state again. Sometimes, it helps when you close projects and then open them again. Sometimes, it helps to click the 'Reset' Button on the Target Platform preference page followed by launching an inner Eclipse.
Comment 1 Brian Bauman CLA 2007-10-30 11:36:43 EDT
Which build are you using.  I just tried these steps on I20071030-0010.  The only deviation I made was to use the Package Explorer to change the file name rather than the Navigator view.  When I did that, I got 63 warnings in my workspace but not one error.
Comment 2 Boris Bokowski CLA 2007-10-30 12:52:52 EDT
I just reproduced it with I20071030-0010. Took the SDK build for Windows XP, created a new workspace, and followed the steps. Do you want to watch me (screen sharing) reproducing it?

Note that the problems are in the editors, not in the problems view. So I guess I shouldn't have said error markers - you get the red rectangles in the bar to the right of the editor, and red Xs to the left of the editor.
Comment 3 Paul Webster CLA 2007-10-30 13:04:51 EDT
I followed the steps, and then open ActionContributionItem (or MenuManager).

The java editor reports everything SWT as an error, even though there are no
errors in the workspace.


Mine was on linux-gtk I20071030-0010, so the problem isn't OS dependent.

PW
Comment 4 Darin Wright CLA 2007-10-30 16:32:20 EDT
I opened an editor on a debug UI class, and all imports in debug.core, jface, and swt were marked with red squiggly's. No errors in the problems view or package explorer. Perhaps this is a Java editor issue?
Comment 5 Dani Megert CLA 2007-10-31 04:07:06 EDT
>Perhaps this is a Java editor issue?
Rather a JDT Core reconciler issue then. I'll take a look at this today or tomorrow.
Comment 6 Jerome Lanneluc CLA 2007-10-31 05:57:56 EDT
Reproduced with latest, with 3.4M2 and with 3.3.

It appears to be a problem in JDT/Core (the project cache might not be reset when the .classpath file is renamed).

Moving to JDT/Core for further investigation.
Comment 7 Jerome Lanneluc CLA 2007-11-28 13:19:18 EST
Created attachment 84004 [details]
Proposed fix and regression test
Comment 8 Jerome Lanneluc CLA 2007-11-29 07:59:45 EST
Fix and test released for 3.4M4
Comment 9 Maxime Daniel CLA 2007-12-12 03:21:40 EST
Verified for 3.4 M4 using build I20071211-0010.
Comment 10 Jerome Lanneluc CLA 2008-02-05 13:14:45 EST
*** Bug 216940 has been marked as a duplicate of this bug. ***