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 184213 - Do not hardcode constant for setAsMain on NewProjectWizard
Summary: Do not hardcode constant for setAsMain on NewProjectWizard
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2010-04-14 20:51 UTC by Jesse Glick
Modified: 2010-04-22 04:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch, with usage in three project types (10.27 KB, patch)
2010-04-14 21:08 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 2010-04-14 20:51:36 UTC
The magic key "setAsMain" is used by a New Project wizard impl to instruct NewProject to set the first returned project directory as the main project.

This should probably be changed to a get/set pair in Templates.
Comment 1 Jesse Glick 2010-04-14 21:08:52 UTC
Created attachment 97396 [details]
Proposed patch, with usage in three project types
Comment 2 Jesse Glick 2010-04-14 21:09:21 UTC
Please review.
Comment 3 Jesse Glick 2010-04-21 15:23:45 UTC
A minor change: for compatibility, the default value of the flag must be true, not false. This explains why e.g. the autoproject wizard always sets the new project as main despite having no code mentioning a main project.

core-main #185434522b7f
Comment 4 Quality Engineering 2010-04-22 04:30:28 UTC
Integrated into 'main-golden', will be available in build *201004220200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/185434522b7f
User: Jesse Glick <jglick@netbeans.org>
Log: Issue #184213: provide proper API for setAsMain constant.