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 143236 - Support "orphaned" netbeans.org modules
Summary: Support "orphaned" netbeans.org modules
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL: http://wiki.netbeans.org/DevFaqOrphan...
Keywords:
Depends on: 144863
Blocks:
  Show dependency tree
 
Reported: 2008-08-07 22:34 UTC by Jesse Glick
Modified: 2008-11-13 05:07 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Initial patch for apisupport.project which lets you open orphaned netbeans.org projects (9.61 KB, patch)
2008-08-08 00:25 UTC, Jesse Glick
Details | Diff
Updated patch (19.49 KB, patch)
2008-08-08 22:39 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-08-07 22:34:15 UTC
There have been requests to permit users to open and build selected netbeans.org modules without having the complete
source tree available.
Comment 1 Jesse Glick 2008-08-08 00:25:33 UTC
Created attachment 66879 [details]
Initial patch for apisupport.project which lets you open orphaned netbeans.org projects
Comment 2 Jesse Glick 2008-08-08 22:39:01 UTC
Created attachment 66940 [details]
Updated patch
Comment 3 Jesse Glick 2008-08-08 23:00:51 UTC
I think I have this working. I don't want to push an implementation today because I am not confident there is no
potential for regressions (some subtle code in the build system had to be patched) and I will be on vacation next week.
Michal if you have a moment to review the patch, that would be great.

Quick usage guide:

1. Create an nb_all dir wherever you like. It must have at least the nbbuild dir from the netbeans.org source tree (with
the patches in this issue applied).

2. Create nbbuild/user.build.properties and in it set the property 'netbeans.dest.dir' to the full path to a NetBeans
IDE installation you would like to both compile against and build into (you should not use your real development IDE,
rather a copy).

3. Run: ant -f nbbuild/build.xml bootstrap

4. Add subdirs for any netbeans.org module projects you would like to work on. (The modules may be already present in
the target platform. If they are not, you need to check out sources for any transitive dependencies not in the target
platform too.)

5. Using an IDE whose apisupport.project has also been patched as in this issue, open the desired projects and work
normally.

What works:

1. Source projects should open without error and without displaying error badges, assuming all dependencies are
available in either source or binary form.

2. You can build the projects normally. The modules will be built into the target platform (overwriting any existing
copy of the module).

3. You can use Run and Debug to start the target platform with a test userdir after building the modules, set
breakpoints etc.

4. You can Test the source projects normally.

5. Code completion should work against APIs present in other modules. If those modules are available in source form, you
will get popup Javadoc automatically, and can navigate to sources. If not, you can still add popup Javadoc capability
for all published APIs:

a. Download "NetBeans API Documentation" from AU.
b. Open NetBeans Platform Manager.
c. Select the "default" platform and note the location of NetBeansAPIDocs.zip in the Javadoc tab.
d. Create a new platform; select the same dir as you specified for netbeans.dest.dir.
e. In the new platform, add NetBeansAPIDocs.zip to the Javadoc tab.

Caveats:

1. If you want to work on unit or functional tests, you need to have all test-to-test dependencies available as source
projects, because we do not distribute test libraries. Sometimes the transitive dependency tree can get a bit big. For
example, if the functional tests use org.netbeans.junit.ide.ProjectSupport, then you need to check out java.j2seproject
(in whose unit test dir this class resides), then its dependencies in turn: projectapi, projectui, openide.filesystems,
and openide.util. Test-to-module dependencies (e.g. nbjunit, jellytools, ...) can however be satisfied from the target
platform's binaries.

2. If you add new source modules to the tree, you will need to both restart NetBeans and delete the
nbbuild/nbproject/private/ dir in order to reset all caches and ensure that the new sources are recognized.

3. Various targets in nbbuild/build.xml not used in the above scenarios may or may not work usefully, though this should
not affect routine module development.

4. The target platform needs to be new enough to support any API calls you are making from source modules into binary
modules. If the platform is older, you could see error badges. Besides getting a newer platform, this can be corrected
by adding sources of the new version of the API module to the tree.
Comment 4 Jesse Glick 2008-08-21 18:07:33 UTC
I wrote up a wiki page documenting the feature.

Implementing: core-main #8647aaf569db
Comment 5 Quality Engineering 2008-08-22 17:17:10 UTC
Integrated into 'main-golden', available in build *200808221401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/8647aaf569db
User: Jesse Glick <jglick@netbeans.org>
Log: #143236: support orphaned netbeans.org modules.
Comment 6 Quality Engineering 2008-11-13 05:07:22 UTC
Integrated into 'main-golden', will be available in build *200811130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e9e35e7b26d0
User: Jesse Glick <jglick@netbeans.org>
Log: #143236 clean-up; test was failing.