Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 205771 - File > Import/Export Project > From/To ZIP
File > Import/Export Project > From/To ZIP
Product: projects
Classification: Unclassified
Component: Generic Projects UI
All All
: P3 (vote)
: 7.2
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2011-12-01 13:08 UTC by Jesse Glick
Modified: 2015-08-27 15:21 UTC (History)
2 users (show)

See Also:

Suggested patch (1.39 KB, patch)
2015-08-27 15:03 UTC, ilia
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-12-01 13:08:53 UTC
contrib/projectpackager has a useful bit of functionality that has long been missing from the standard UI - the ability to export a project as a single ZIP file easily shared via (say) email, and correspondingly the ability to point to a downloaded ZIP and with one action unpack it (somewhere) and open it as a project in the IDE.

Possible features:

1. Automatically exclude build and private dirs (i.e. SharabilityQuery.NOT_SHARABLE).

2. Automatically include nested projects when a parent project is selected.

3. Permit multiple sibling projects to be packed.

4. Check if the (parent) project is the root of a DVCS (Hg, Git) and if so offer to create a history bundle instead (checking for local modifications first). Perhaps even offer to initialize the project as a DVCS.

5. The existing module supports sending the ZIP as an email attachment, though this relies on the user configuring SMTP in their IDE, which is awkward; and the RFC used by Desktop.mail(URI) is not sufficiently powerful to create a message with an attachment.

Note: File > Import/Export Project matches existing menu structure best, though in some ways this functionality better belongs in the Team menu - a lightweight SCM alternative akin to Local History.
Comment 1 Jesse Glick 2011-12-29 23:48:17 UTC
Implemented 1-3, and a brief note for 4. Skipping 5.

core-main #3e606e6d59a2
Comment 2 Quality Engineering 2011-12-31 15:42:59 UTC
Integrated into 'main-golden'
User: Jesse Glick <>
Log: #205771: File > Import/Export Project > From/To ZIP.
Comment 3 ilia 2015-08-27 15:03:08 UTC
Created attachment 155695 [details]
Suggested patch
Comment 4 ilia 2015-08-27 15:03:13 UTC

If user selects a full remote C++ project [1] and tries to export it to ZIP -- exception occurs (see bug [2]).
That happens, because FileUtil.toFile(FileObject) returns null for remote fileobjects. 
Is it possible to apply a suggested patch? At least where will be no exception for now.


Suggested patch:
 * show an error in the status line instead of throwing NPE


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