__注意: この FAQ 項目は NetBeans 4.x および 5.x にのみ適用されます。NetBeans 6 では Java 解析の基盤が新しいAPIに置き換えられました。

FileSystem dfs = Repository.getDefault().getDefaultFileSystem();
//or whatever template you want
FileObject fo = dfs.findResource("Templates/Classes/"); 
Dataobject dob = DataObject.find(fo);

DataObject newOne = dob.createFromTemplate(targetFolder, newName);

Resource res = JavaModel.getResource(newOne.getPrimaryFile());

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo