Bug 20948 - Launch config dialog changes config projects [dialogs]
Summary: Launch config dialog changes config projects [dialogs]
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-06-25 10:56 EDT by Leif Nelson CLA
Modified: 2003-02-05 14:39 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 Leif Nelson CLA 2002-06-25 10:56:57 EDT
This problem has caused me some grief while debugging, it is in the GM1 
build.  The debug gui changes the selected project to your first project in 
the debug configuration window after you select the "proper" project (while 
creating a new debug config)...  Do the following to reproduce:

1) Go to java browsing perspective
2) Run->Debug...
3) Select "Java Application"
4) Click "New"
5) Enter a name
6) Pick a project (NOT THE FIRST PROJECT in the list)
7) Click on "include external jars"
8) Select a main class that is in an external jar
9) Click apply
10) Click "debug" or close & reopen the Debug configurations window
11) Select the debug configuration you created in step 5.  Notice that the 
project has been re-set to the FIRST project in the list of projects.  Step 10 
will have failed with a ClassNotFoundException if you selected debug....  

I looked everywhere EXCEPT the project the first time I encountered this 
problem.  (Because I had already SET the project)
Comment 1 Darin Wright CLA 2002-06-25 11:08:47 EDT
Deferred for post 2.0
Comment 2 Jared Burns CLA 2002-07-03 10:42:54 EDT
Another required step for reproducing this problem:
External jar in question needs to be included in the first project's libraries.

It seems that we're computing a project for the config based on the first 
project which contains the config's main type. Why would we recompute the 
project instead of just using the project that is stored with the config?
Comment 3 Darin Wright CLA 2002-07-30 14:20:15 EDT
marking as 2.1 candidate.
Comment 4 Joe Szurszewski CLA 2002-07-31 17:43:37 EDT
Actually, the problem has to do with searching for the main type.  Following the given steps, 
notice that just after step 8 the project field is reset to the first project.  This is because 
JavaMainTab tries to be helpful and fills in the project of the selected main type.  The root of the 
problem is that the project of the main type returned from the dialog created with 
JavaUI.createMainTypeDialog() is set to the first project, despite the fact that the search 
scope passed in to the main type dialog contained only the second project.  This is a bug in the code 
that searches for main types.  Re-assigning to JDT/UI.
Comment 5 Dirk Baeumer CLA 2003-02-05 14:39:35 EST
This is a JDT/Core problem. External Jars are shared and therefore have only 
one parent. The parent they get is the one for which the first get revealed. 
There is nothing we can do as long as Core keeps this sharing semantic.

There is a separate bug in Core to resolve this issue. As soon as this is 
resolved the UI will behave "correctly".

Closing since there is nothing UI can do.