Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 45887 - When selecting "Build before launching", the build is not specific to the project launched, but the whole workspace
Summary: When selecting "Build before launching", the build is not specific to the pro...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows 2000
: P2 enhancement (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 15343 39832 45891 49160 52068 59311 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-31 15:23 EST by Robert Weisz CLA
Modified: 2004-05-06 18:01 EDT (History)
8 users (show)

See Also:


Attachments
patch to debug.core (3.08 KB, patch)
2004-03-18 13:13 EST, Kevin Barnes CLA
no flags Details | Diff
patch to jdt.debug.ui (9.14 KB, patch)
2004-03-18 13:14 EST, Kevin Barnes CLA
no flags Details | Diff
patch to jdt.launching (13.51 KB, patch)
2004-03-18 13:14 EST, Kevin Barnes CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Weisz CLA 2003-10-31 15:23:31 EST
From Darin W: the debug platform is performing the build as controlled by the
preference. The debug platform is not aware of what project is being launched -
a notion that is specific to a type of launch configuration, which is
contributed by other plug-ins. E.g. the JUnit launch config knows that it may
pertain to a project, but the debug platform has no way of finding this out.
Thus, an incremental build is performed on the workspace.

... the debug plug-in is not aware of what project is being launched. The
required information is not currently available - it would require the
co-operation of all existing launch configuration types to tell the debug
plug-in what project is being launched - an API which does not exist."

This bugzilla is for asking for this new API/enhancement, to ensure the build is
kicked off on the project which is being selected for launch, not on the whole
workspace.
Comment 1 Darin Wright CLA 2003-10-31 15:31:39 EST
Marking as 3.0 candidate. Requires a way to optionally map a launch config to a 
project. The same support could be leveraged to support bug 19521.
Comment 2 Robert Weisz CLA 2003-10-31 16:28:43 EST
*** Bug 45891 has been marked as a duplicate of this bug. ***
Comment 3 Darin Wright CLA 2003-12-22 11:47:22 EST
*** Bug 49160 has been marked as a duplicate of this bug. ***
Comment 4 Wassim Melhem CLA 2004-02-16 12:13:41 EST
*** Bug 52068 has been marked as a duplicate of this bug. ***
Comment 5 Darin Wright CLA 2004-02-16 12:19:53 EST
Adding Jim as CC, since Jim is also investigating scoped builds.
Comment 6 Felix Pahl CLA 2004-02-16 12:34:18 EST
Though I agree that bug 52068, which was marked as a duplicate of this one,
is probably related, please also take into account my original comments there,
which were about plug-ins I had rendered invisible in the launch configuration.
Comment 7 Darin Wright CLA 2004-02-16 12:36:48 EST
Note that any solution to this problem will likey require domain specific 
knowledge from a launch configuration type (i.e. to get the proper "config -> 
project" dependency information)
Comment 8 Felix Pahl CLA 2004-02-16 12:45:31 EST
Comment #7 is true of this bug, but not of bug 52068
that was marked as a duplicate. In that case, projects
were being *re*built that were fully built. Preventing
this should require only information local to the projects.
Comment 9 Darin Wright CLA 2004-03-16 13:31:43 EST
In 3.0, the debug platform has introduced ILaunchConfigurationDelegate2 which 
provides optional hooks for launch delegates to implement. The hooks allow for

* providing a launch object to seed a launch (or re-use an existing launch)
* allow for initial sanity pre-launch checks/abort (bug 6400)
* pre-lanuch build
* final final pre-launch checks/abort (for bug 54925)

It will be up to launch delegates to implement the building required by their 
launch configration.
Comment 10 Darin Wright CLA 2004-03-16 13:37:55 EST
Will provide an implementation for Java launch configs (local Java apps, 
Applets, JUnit, Remove Java Apps) that builds referenced projects.
Comment 11 Kevin Barnes CLA 2004-03-18 13:13:42 EST
Created attachment 8657 [details]
patch to debug.core
Comment 12 Kevin Barnes CLA 2004-03-18 13:14:05 EST
Created attachment 8658 [details]
patch to jdt.debug.ui
Comment 13 Kevin Barnes CLA 2004-03-18 13:14:52 EST
Created attachment 8659 [details]
patch to jdt.launching
Comment 14 Kevin Barnes CLA 2004-03-18 13:16:29 EST
patches address this bug as well as Bug #6400 and Bug #54925
Comment 15 Kevin Barnes CLA 2004-03-18 13:18:21 EST
Darin, please verify
Comment 16 Darin Wright CLA 2004-03-19 14:44:34 EST
We now have a Java specific solution that ties into the ILaunchDelegate2 
support (pre launch checks & build). We should look at ways to generalize this 
support in the debug platform.
Comment 17 Kevin Barnes CLA 2004-04-08 15:22:49 EDT
Added convenience methods to LaunchConfigurationDelegate
 protected IProject[] getBuildOrder(IProject[] projects)
 protected void fillReferencedProjectSet(IProject project, 
          HashSet referencedProjSet)
 protected IProject[] orderProjectSet(IProject[] projectSet)
 protected boolean existsProblems(IProject proj, int severity) 

Made changes to AbstractJavaLaunchConfigurationDelegate to take advantage of 
the new convenience methods. 
Comment 18 Kevin Barnes CLA 2004-04-08 15:23:55 EDT
Darin, please verify changes in LaunchConfigurationDelegate and 
AbstractJavaLaunchConfigurationDelegate 
Comment 19 Darin Wright CLA 2004-04-15 13:58:52 EDT
Verified. I renamed a few methods in the abstract superclass, and added logic 
to the top-level "buildForLaunch(...)" method. Subclasses just have to 
override "getBuildOrder(...)" which returns a set of projects to build.
Comment 20 Kevin Barnes CLA 2004-04-22 11:32:24 EDT
*** Bug 59311 has been marked as a duplicate of this bug. ***
Comment 21 Darin Wright CLA 2004-05-03 23:19:27 EDT
*** Bug 15343 has been marked as a duplicate of this bug. ***
Comment 22 Darin Wright CLA 2004-05-06 18:01:06 EDT
*** Bug 39832 has been marked as a duplicate of this bug. ***