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 84544

Summary: new importProject method with additional argument
Product: javaee Reporter: Vince Kraemer <vkraemer>
Component: CodeAssignee: Vince Kraemer <vkraemer>
Status: RESOLVED FIXED    
Severity: blocker CC: apireviews
Priority: P3 Keywords: API_REVIEW_FAST
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 78699, 83520    
Attachments: api change
diffs to close issue

Description Vince Kraemer 2006-09-08 20:40:58 UTC
The additional argument is used to distinguish between projects that are created
from java source files and projects that are created from java class files to
support the packaged Archive project.

By being able to distinguish between these two, the New File menu item issues
can be resolved. See issue 83520 for an example.

This applies to the three Java EE project generator classes:

AppClientProjectGenerator, EjbJarProjectGenerator and WebProjectUtilities (and
WebProjectCreateData).
Comment 1 Vince Kraemer 2006-09-08 20:51:18 UTC
Created attachment 33731 [details]
api change
Comment 2 Vince Kraemer 2006-09-08 21:17:49 UTC
This is a new API and does not affect existing clients.  The archiveproject will
use this api to create project objects with a limited set of recommended and
priviledged templates.
Comment 3 Vince Kraemer 2006-09-08 21:20:42 UTC
These additional project "constructors" are friend level APIs, exported to
org.netbeans.modules.j2ee.archive and org.netbeans.modules.j2ee.earproject.
Comment 4 Pavel Buzek 2006-09-08 22:18:30 UTC
Can you explain a bit more about why you need to know the distinction between
prj w/sources and from archive? Is there no way to detect this other then by
writting it into project properties? The connection with issue 83520 is not
clear to me. Thanks.
Comment 5 Vince Kraemer 2006-09-08 22:42:37 UTC
A project that is created to support a Packaged Archive project needs to present
a more limited set of file templates.  Some of the templates associated with a
"source" based project are not supported by the Packaged Archive project.
Another related issue for this is issue 78699.

I cannot think of another way to detect this that would be as likely to be
correct when the project is reopened.  A project property (without UI to change
it) is pretty safe from random user error.  Some detection method based on
introspection of the project while the project is opening seems like it will
take time (to be complete and safe) or expose the project to a higher likelihood
of being misidentified.
Comment 6 Vince Kraemer 2006-09-14 23:22:24 UTC
Any other comments?
Comment 7 Vince Kraemer 2006-09-15 21:45:34 UTC
Integrating api change Saturday to release55_dev.

Is there some sort of 'golden file' that I need to modify?
Comment 8 Vince Kraemer 2006-09-17 23:24:09 UTC
Created attachment 34057 [details]
diffs to close issue
Comment 9 Vince Kraemer 2006-09-17 23:25:20 UTC
committed to release55_dev