Bug 68585 - index is out of date after encoding change
Summary: index is out of date after encoding change
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 59899
Blocks:
  Show dependency tree
 
Reported: 2004-06-25 06:28 EDT by Tom Hofmann CLA
Modified: 2004-09-06 10:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2004-06-25 06:28:35 EDT
I200406250010

not a big issue, but:

0.(on Linux, platform encoding is UTF-8 by default, it may work as well if you
set the platform encoding to UTF-8 on other platforms)
1. Create a new java project JUnit
2. Import JUnit

Observe: I get JavaModelExceptions due to sun.io.MalformedInputException, which
is ok because junit.framework.TestSuite is not readable using UTF-8. This also
keeps the project from being built.

3. Change the Workbench->Editors->Platform encoding preference to ISO-8859-1

-> problem is corrected

4. Do a rebuild (clean) all

Observe: everything seems fine now as I can open TestSuite.java compile, use
code resolve inside TestSuite.java to navigate etc.

5. In TestCase.java, put the caret on TestCase and do a Global Search (Ctrl+Shift+G)

Observe: the TestCase references in TestSuite are not found. Also, when renaming
TestCase, the references in TestSuite are not updated, resulting in compile errors. 

-> The index (or cache or whatever) seems to have lost TestSuite. It can be
corrected by dirtying and rebuilding TestSuite.
Comment 1 Philipe Mulet CLA 2004-06-25 06:43:28 EDT
This is a known platform issue (no change is broadcasted when encoding is 
changed). Thus we are inconsistent.

Recommended steps after encoding change:
1. close all projects
2. exit/restart Eclipse
3. reopen all projects
4. clean build all projects

This will cause all indexes to be recreated automatically (since we have code 
discarding stale indexes on shutdown).
Comment 2 Philipe Mulet CLA 2004-06-25 06:43:52 EDT
Moving to platform.
Comment 3 Philipe Mulet CLA 2004-06-25 06:44:23 EDT

*** This bug has been marked as a duplicate of 59899 ***
Comment 4 Philipe Mulet CLA 2004-06-30 13:04:03 EDT
Will use this one as counterpart on JDT Core side for encoding API enhancement.
Comment 5 Jerome Lanneluc CLA 2004-08-18 08:00:38 EDT
Changed DeltaProcessor and buider to react to the new ENCODING flag the same 
way they react to the CONTENT flag.

Added regression test EncodingTests.test033().

Fix and test released in both 3_0_maintennace and HEAD.
Comment 6 David Audel CLA 2004-09-06 10:30:22 EDT
Verified for 3.0.1 RC1