This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 44714

Summary: Weird behavior when adding platform and setting the active platform for the project
Product: java Reporter: vbrabant <vbrabant>
Component: UnsupportedAssignee: Martin Matula <mmatula>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 44713    

Description vbrabant 2004-06-10 21:07:30 UTC
I created a totally new JS2E Application Project.
I called it Tiger, because it will be a Tiger
Application.
But when I clicked on finish, it begins to Scan
the Structure of the Project.
Finally, after 5 minutes, I had possibility to
edit the Main Class.
The problem is that I wanted a JDK1.5 project, and
not the default one (JDK 1.4.2).
So, I right-click on the Tiger Project and select
Properties.
I added a new Java Platform (JDK 1.5) and select it.

I was really surprised that nothing occurs.
At least it would rescan the project, to update
the MDR with JDK1.5 classes.
Comment 1 Martin Matula 2004-06-17 15:07:48 UTC
Regarding scanning of sources, we cannot delay the scanning since we
do not know if you will want to change the platform. So this request
is rather a UI issue with the "new project" wizard not allowing to
select the target platform during the project creation.
Regarding rescan when the JDK is changed, it seems to be a bug in
project system. Tomas, could you please look at it? I see two problems:
1) when I add a new platform and enter the project customizer, I see
that the drop down displays the newly added platform as the active one
- this is incorrect
2) so, I switch back to default and then again to the new platform and
close the customizer - nothing is changed
3) I enter the customizer again, change the active project to default
platform and close it - short scanning of project sources follows (as
if source level changed, but there is no reason)
4) I enter the customizer again and change the platform to JDK 1.5.0
(my newly added platform) - now the platform jars are finally scanned
after closing the dialog
Comment 2 Tomas Zezula 2004-06-17 15:57:22 UTC
Fixed.
Comment 3 Tomas Zezula 2004-06-17 16:15:56 UTC
The new project wizard is not going to contain the platform chooser,
most users use the default platform.
Comment 4 vbrabant 2004-06-17 19:23:43 UTC
I really hope you are kidding.

If you drop that feature, I migrate to Eclipse.

Example:

1. We are building web applications. Those web applications are
deployed under WSAS 4.0. It means J2EE 1.3. So, all my jars | user
tags, JSP, Servlets, must be compiled with J2SDK 1.3.

2. We are developping littles applets, they have to be compiled with
JDK 1.1, to be sure they work on majority of browsers without
downloading 50MO.

3. We are evaluating new features of JDK 1.5. Because it's only a beta
version, we prefer to use the J2SDK 1.4.2 as JRE for NetBeans and I
define J2SDK 1.5.1 as JRE for the project.
Comment 5 vbrabant 2004-06-17 21:33:09 UTC
Sorry for the preceding post. I misread it.
I understanded that Platform Choosed will disappear.
But you mean that it will not be added in the new project wizard, right ?

But I would like to ask you somes questions:

What's exactly the purpose of the Scanning the Structure of the Project ?

Is it only used for refactoring ?

If yes, why not postpone until I invocate for the first time the
Refactoring ?

Comment 6 Martin Matula 2004-06-17 23:51:00 UTC
Hi Vincent,
scanning of codebases is needed even when you don't use refactoring.
It is used by the code completion and also by java parser to do the
type resolution correctly. Please note that even if you will work on
projects that require other than the default platform, there will
probably still be projects that you do want to work on using the
default platform. So the initial scanning after you create a new
project is not useless even if you want to change the platform. The
indexes that are produced by the scanning are persisted and next time
you will want to really work on something using the default platform,
you will not have to wait for long scanning since the indexes will
already be there.
Please let me know if I can close this issue.
Comment 7 Tomas Zezula 2004-06-21 09:33:27 UTC
Dosn't seem to be a buildsys issue anymore.
Comment 8 Martin Matula 2004-06-25 15:59:30 UTC
After Tomas fixed the problem with the weird behavior of the
customizer everything seems to work correctly - JDK classes are
properly re-scanned.
Comment 9 Quality Engineering 2007-09-20 09:58:54 UTC
Reorganization of java component