Bug 41358 - Not all builders are executed when changing the javaBuildPath
Summary: Not all builders are executed when changing the javaBuildPath
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 10:46 EDT by dotan CLA
Modified: 2003-12-08 06:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dotan CLA 2003-08-09 10:46:58 EDT
when changing javaBuildPath properties in the project properties page, and
closing the page, only the JavaBuilder gets executed. This could be a problem 
especially if there exists other builders which do bytecode manipulation, or  
depend on class file execution, since not running them leaves the project in an 
unstable state.
Comment 1 Dirk Baeumer CLA 2003-08-11 04:03:41 EDT
Martin, can you please comment.
Comment 2 Martin Aeschlimann CLA 2003-08-11 04:30:48 EDT
What I do is a 'serRawClasspath', JCore does the rest. Moving to JCore for comments.

My guess is that other builders that depend on the classpath of a Java project
should listen to Java element deltas (where classpath changes are reported), and
not rely that a full build of a project is performed.
Comment 3 dotan CLA 2003-08-11 04:51:56 EDT
martin's guess is right, the JavaBuilder indeed checks for classpath change in 
the delta.
The point is that changing the classpath causes an implicit full_build with 
javaBuilder being the only builder to run, which is inconsistent. 

Either : 
1) document this behaviour for builder writters (who should look for a resource 
change with path = projectroot + ".classpath", or
2) run a full build in case of classpath change 
Comment 4 Philipe Mulet CLA 2003-09-02 02:26:19 EDT
Setting a classpath doesn't trigger a build per se. It is only a side effect of 
JDTCore touching the .classpath file, creating thus a resource change which in 
turn causes builder(s) to run whenever platform decides (automatically or when 
user explicitly build).



Comment 5 Philipe Mulet CLA 2003-12-08 06:53:14 EST
Our Java builder then decides to perform a full build internally since it 
doesn't want to get into an incremental mode for such a change.

As long as subsequent builders are properly observing resource changes, then 
will correctly react to a classpath change. If they want to know how the 
classpath did change, then additional Java delta listeners should be used.

The .classpath file is an internal artifact and should remain as such.

If you are seeing a scenario where the platform doesn't correctly trigger all 
downstream builders when the Java builder is invoked, then you should reopen 
this defect and reassign it to Platform/Core. JDT/Core doesn't trigger any 
build action, it only reacts to a build request.