Bug 36721 - refresh does not recompile, deleting class files from filesystem and refresh does not recompile
Summary: refresh does not recompile, deleting class files from filesystem and refresh...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-21 14:23 EDT by mgould CLA
Modified: 2004-03-04 10:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mgould CLA 2003-04-21 14:23:04 EDT
refresh does not recompile,  deleting class files from filesystem and refresh 
does not recompile.

Step 1:  go to command prompt, on my windows NT workstation 
c:\development_sources\del /s /f *.class

This deletes all the class files.
Now go back to eclipse and try to get eclipse to rebuild the source files.  It 
seems oblivious to the fact that the class files are gone.  No matter what you 
do (short of changing a source file, and saving it, triggering a recompile) you 
will not get the source files rebuilt.  Also, it's not clear what source files 
get rebuilt when you change one of them and hit save.  Ostensibly only the 
source files that depend on this file.

This may be related, but the hierarchy browser can't find the files that 
subclass a given class and the Type Browser(CTRL + SHIFT + T) can't find the 
given class (but it's there, and it's not broken).  There appears to be a cache 
and this cache is not in sync with the filesystem, and the type browser is 
affected and the hierarchy browser (select a class and hit F4) the classes that 
subclass the given class are not visible.
Comment 1 John Arthorne CLA 2003-04-22 14:33:05 EDT
Not sure if manual deletion of class files is a valid use case.  Why are you
deleting from the command line instead of doing a full build inside Eclipse? 
Moving to JDT core for futher comment.
Comment 2 Olivier Thomann CLA 2003-04-22 14:50:55 EDT
Does a full build create the class files again?
Comment 3 Kent Johnson CLA 2003-04-22 16:09:53 EDT
As John asked, deleting the class files is not a valid usecase.

'Rebuild project' & 'Rebuild All' exist in Eclipse if you want to rebuild all 
your class files.
Comment 4 mgould CLA 2003-04-23 18:01:17 EDT
'Rebuild [all]' etc., no longer exists.  All I have is 'refresh'.   It seems 
that 'Rebuild [Project et. al.]' was removed in one of the most recent 
releases.

And actually the refresh does not rebuild anything.  Even if you close the 
Eclipse application, when you restart Eclipse it does not think it needs to 
rebuild anything.  You have to change a file and save, which will trigger a 
rebuild and all dependencies.  But sometimes your sources are read-only, so 
that's a bit inconvenient.  It's nice to be able to delete the class files 
since you can then use the source code control to do a diff of just the source 
files.  Basically it's convenient for the refresh to function correctly.  It 
should notice that the class files are missing and create them I believe.

Oh and again, 'Rebuild project' & 'Rebuild All' do not seem to exist any 
longer in eclipse.  I'm running 

   Eclipse Platform
   Version: 2.1.0
   Build id: 200303192032

Comment 5 Philipe Mulet CLA 2003-04-24 02:33:36 EDT
These actions are available in the perspective top menu, under "Project".
Comment 6 Jerome Lanneluc CLA 2004-03-04 10:01:42 EST
Closing as invalid.