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.
}
public Transferable paste() {
// System.out.println("do paste stuff here!!");
FileLock lock=null;
try {
FileInputStream is = new FileInputStream(generatedJar);
FileSystem fs = target.getFileSystem();
FileObject tf = FileUtil.createData(target,generatedJar.getName());
fs.runAtomicAction (new FileSystem.AtomicAction () {
lock = tf.lock();
public void run () throws IOException {
OutputStream os = tf.getOutputStream(lock);
FileUtil.copy(is,os);
lock.releaseLock();
return null;
//return null;
catch (IOException ioe) {
TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, ioe);
finally {
if (lock!=null)
}); // end of AtomicAction
catch (java.io.IOException ioe) {
ioe.printStackTrace();