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 34584

Summary: cannot create Compilation Unit via API call
Product: java Reporter: Pavel Buzek <pbuzek>
Component: UnsupportedAssignee: Tomas Zezula <tzezula>
Status: CLOSED INVALID    
Severity: blocker Keywords: API
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Pavel Buzek 2003-06-25 12:47:40 UTC
I have a FileObject that I want to set as a folder
of classpath, a name and a displayname of the
compilation unit. I was using
JavaProject.createCompilationUnit (String,
DataFolder[]) but it is deprecated. I can wither
use JavaProject.createCompilationUnit (String,
String, List) or JavaProject.createCompilationUnit
(String) and then assignSources. But in both cases
I need to represent the sources root as
JavaDescriptor, not just as a FileObject.
JavaDescriptor constructor is protected.

Why do not assignSources and createCompilationUnit
accept list of FileObjects (root folders). What is
the intended use of the current variant with
JavaDescriptor? For reassigning sources between units?
Comment 1 Pavel Buzek 2003-06-25 14:58:56 UTC
oops, I missed JP.createJavaSources. My deep appologies.
Comment 2 Pavel Buzek 2003-07-02 14:07:33 UTC
i've verified all these issues
Comment 3 Pavel Buzek 2003-07-02 14:18:31 UTC
closing all my verified issues